Skip to content

Commit

Permalink
Easy to use, self-contained tileset update script (I-am-Erk#1557)
Browse files Browse the repository at this point in the history
* try to make tileset update a self-contained no-brainer

* add script to set game directory env var interactively, enable interactive directory in updtset

* add a script to interactively set the tileset

* add option silent to helper scripts, to not pause on error

* fix finding Python script location for file in game directory, minor fixes

* handle more use cases in path helper script

Handle:
* rel. path as argument
* call from or inside game folder
* drag&drop
* interactive

* add script to set LIBVIPS_PATH, minor fixes setting CDDA_PATH

* allow usage of LIBVIPS_PATH in Python files

* minor fix to comments in updtset.cmd

* add docstring to new scripts

* add copy of compose.py, adapt batch script

* add workflow to docs, keep path helper scripts console open on success
  • Loading branch information
mlange-42 authored Sep 12, 2022
1 parent a7e77e9 commit 512d124
Show file tree
Hide file tree
Showing 11 changed files with 1,517 additions and 119 deletions.
3 changes: 3 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CDDA-Tilesets documentation

The documentation is best viewed in it's [**rendered version**](https://i-am-erk.github.io/CDDA-Tilesets).
1 change: 1 addition & 0 deletions doc/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Summary

- [Installation & Building](installation.md)
- [Windows guide](installation_windows.md)
- [Style guidelines](style/summary.md)
- [General](style/general.md)
- [Items](style/items.md)
Expand Down
53 changes: 53 additions & 0 deletions doc/installation_windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Windows guide

Guide for Windows users, without touching the Command Line.

## Install requirements

**Python**

Install Python 3 from [python.org](https://www.python.org/downloads/windows/).

During installation, check "Add Python to PATH".

**libvips**

Download the latest libvips distribution from [libvips.github.io](https://libvips.github.io/libvips/install.html)
(get vips-dev-w64-web-#.#.#.zip NOT vips-dev-w64-all-#.#.#.zip).

Extract the files somewhere.

**Cataclysm-DDA game**

The easiest way to get the game is to use the [CDDA Game Launcher](https://github.com/remyroy/CDDA-Game-Launcher).
With the launcher, install the latest **experimental** release.

## Setting up paths

For composing tilesets, some path must be known to the respective scripts.
This section describes the most easy drag & drop approach.

In `CDDA-Tilesets`, go into folder `tools`.

1. Copy `set_game_path.cmd` into the game's folder, and double-click it.
OR: Drag & drop the game folder onto `set_game_path.cmd`.
> Note: This sets the environmental variable `CDDA_PATH`.
2. Copy `set_vips_path.cmd` into the vips folder (e.g. `C:\vips-dev-x.xx`), and double-click it.
OR: Drag & drop the vips folder onto `set_vips_path.cmd`.
> Note: This sets the environmental variable `LIBVIPS_PATH`.
3. Optional: To set a tileset to compose permanently, double-click `set_tileset.cmd` and select the desired tileset.
If not set permanently, the update script will allow for interactive selection of a tileset.
> Note: This sets the environmental variable `CDDA_TILESET`.
After these steps, it might be necessary to restart the computer.

## Compose and update tileset

In `tools`, double-click `updtset.cmd`.

You will be prompted to select a tileset (unless it was set permanently).
At the first run, `pyvips` will be installed automatically.

If something goes wrong, read the script's output carefully!
Loading

0 comments on commit 512d124

Please sign in to comment.