3 Commits
3 changed files with 130 additions and 57 deletions

No files matched your search

+21 -20
View File
@@ -2,7 +2,7 @@
A visual novel of the whole of *Faust, Part I* (Goethe), in Teodoro Llorente's public-domain A visual novel of the whole of *Faust, Part I* (Goethe), in Teodoro Llorente's public-domain
Spanish translation: 28 scenes from the Dedicatoria to the prison, about 31,000 words of Spanish translation: 28 scenes from the Dedicatoria to the prison, about 31,000 words of
verse, never rewritten. It is the first work built with [`vnpipe`](../vnpipe), the reusable verse, never rewritten. It is the first work built with [`vnpipe`](https://github.com/Dasemu/vnpipe), the reusable
"classic novels to visual novels" pipeline. "classic novels to visual novels" pipeline.
The game is in Spanish, with an English version (Bayard Taylor's public-domain verse The game is in Spanish, with an English version (Bayard Taylor's public-domain verse
@@ -26,30 +26,30 @@ Released under the [GNU GPL v3](LICENSE); the source text and voice recordings a
40 characters/second (change it in Preferences) and a blinking arrow marks the end of a box; 40 characters/second (change it in Preferences) and a blinking arrow marks the end of a box;
verse boxes hold at most 4 lines, and the lyric scenes use full-page stanzas. verse boxes hold at most 4 lines, and the lyric scenes use full-page stanzas.
## How to play ## Play from a clean clone
Needs the [Ren'Py](https://www.renpy.org/) 8.5 SDK (`tools/renpy-sdk` or `RENPY_SDK`): For ready-to-run packages, see [Releases](https://github.com/Dasemu/faust-vn/releases).
To run from source, install Git, [uv](https://docs.astral.sh/uv/) and the
**Ren'Py 8.5.3 SDK** as described in [docs/running.md](docs/running.md).
The following commands use Bash on Linux x86-64:
```bash ```bash
tools/renpy-sdk/renpy.sh vn # play the generated project git clone https://github.com/Dasemu/faust-vn.git
cd faust-vn
uv sync --locked
uv run vnpipe --work . renpy
tools/renpy-sdk/renpy.sh vn
``` ```
## Quick start Python >=3.12 is required; uv can provision it. `uv sync --locked` installs vnpipe
from the Git revision recorded in `uv.lock`. No sibling checkout or edit to
`[tool.uv.sources]` is needed. To reproduce a release, check out its tag before syncing.
`vnpipe` is a path dependency: clone it next to this repo and adjust The committed data is sufficient to generate the game: fetching, parsing, annotation
`[tool.uv.sources]` in `pyproject.toml` if it lives elsewhere. and translation commands are content-development steps, not prerequisites for playing.
`vn/` is generated, including a copy of `audio/` in `vn/game/audio/`; regenerate after cloning.
Separate desktop, web and Android setup and commands are in [docs/running.md](docs/running.md).
```bash
uv sync
uv run vnpipe fetch # download the source into data/raw
uv run vnpipe parse # data/raw -> data/parsed.json
uv run vnpipe translate fetch && uv run vnpipe translate build # English -> data/translations/en.json
uv run vnpipe renpy # data/annotated.json + audio/ -> vn/
tools/renpy-sdk/renpy.sh vn # play (Ren'Py 8.5.3 SDK, see docs/running.md)
```
`vn/` is generated and its `game/audio/` is not committed (it copies `audio/`): run
`uv run vnpipe renpy` after cloning. Web and desktop builds: [docs/running.md](docs/running.md).
Everything specific to this text (cast, scenes and their subtitles, staging, music Everything specific to this text (cast, scenes and their subtitles, staging, music
overrides, menu background) is in `work.toml`. overrides, menu background) is in `work.toml`.
@@ -58,5 +58,6 @@ Plan and layout: [docs/plan.md](docs/plan.md).
## Downloads ## Downloads
Every release on GitHub (Releases page) ships the Android APK and the Windows, Linux, macOS and Releases ship Windows, Linux, macOS and web builds. The Android APK is included only
web builds. See `docs/running.md` for building them locally. when CI has the signing secret configured. See [docs/running.md](docs/running.md)
for local builds.
+1 -1
View File
@@ -1 +1 @@
0.2.0 0.2.1
+108 -36
View File
@@ -1,22 +1,41 @@
# Running, linting and building the game # Running, linting and building the game
The Ren'Py project in `vn/` is generated by vnpipe (`../vnpipe`); never edit it by hand. All The Ren'Py project in `vn/` is generated by [vnpipe](https://github.com/Dasemu/vnpipe);
commands run from the repository root. Generic details (CLI, GUI template, SDK commands): never edit it by hand. All commands below run from the repository root and use
`../vnpipe/docs/running.md`. **Bash on Linux x86-64**, matching the release runner. Other hosts need the corresponding
SDK launcher and bundled Python executable. Generic details:
[vnpipe running guide](https://github.com/Dasemu/vnpipe/blob/main/docs/running.md).
## 1. Ren'Py SDK ## 1. Clean clone and common setup
The SDK is not committed (`tools/` is gitignored). Install **Ren'Py 8.5.3** (SDK Install Git, [uv](https://docs.astral.sh/uv/), curl, tar (with bzip2 support) and unzip.
archive from <https://www.renpy.org/latest.html>, `renpy-8.5.3-sdk.tar.bz2`) so that Python >=3.12 is required; uv can provision it.
`tools/renpy-sdk/renpy.sh` exists:
```sh ```bash
mkdir -p tools && tar -xjf renpy-8.5.3-sdk.tar.bz2 -C tools && mv tools/renpy-8.5.3-sdk tools/renpy-sdk git clone https://github.com/Dasemu/faust-vn.git
cd faust-vn
uv sync --locked
uv run vnpipe --work . renpy
``` ```
The SDK already contains the web runtime (`tools/renpy-sdk/web`) and the Linux, Windows vnpipe is a Git dependency pinned by `uv.lock`, not a sibling path dependency.
and macOS distribution templates. Inside the sandbox set `HOME=$TMPDIR/renpy-home` for Do not change `[tool.uv.sources]` for normal use. To reproduce a specific release,
SDK commands, since Ren'Py writes to `~/.renpy`. check out its tag before `uv sync --locked`. The committed inputs are sufficient;
fetching, parsing, annotating and rebuilding translations are optional content-development
tasks, not part of this startup path.
Install **Ren'Py 8.5.3** (the SDK is not committed; `tools/` is gitignored):
```bash
mkdir -p tools/renpy-sdk
curl -fsSL https://www.renpy.org/dl/8.5.3/renpy-8.5.3-sdk.tar.bz2 \
| tar -xj --strip-components=1 -C tools/renpy-sdk
```
This provides `tools/renpy-sdk/renpy.sh` and the desktop distribution templates.
Install the matching web or RAPT add-on only for that target (below).
The examples use this fixed SDK path; `RENPY_SDK` is also recognized by the Python tests,
but does not automatically replace paths in shell commands.
## 2. Regenerate the project ## 2. Regenerate the project
@@ -58,7 +77,7 @@ documentation assets.
## 3. Lint ## 3. Lint
```sh ```sh
HOME=$TMPDIR/renpy-home tools/renpy-sdk/renpy.sh vn lint tools/renpy-sdk/renpy.sh vn lint
``` ```
The expected result is a statistics block with no warnings above it. The expected result is a statistics block with no warnings above it.
@@ -94,50 +113,103 @@ main menu (one test run per scene); `ShowMenu("preferences")`, `"load"`, `"histo
`"vn_credits"`, `"vn_scene_select"` work anywhere. Set `persistent.art_style` with `"vn_credits"`, `"vn_scene_select"` work anywhere. Set `persistent.art_style` with
`run SetField(persistent, "art_style", "anime")` (a bare `$` does not redraw). `run SetField(persistent, "art_style", "anime")` (a bare `$` does not redraw).
## 4. Play ## 4. Desktop: play and package
```sh After the common setup, launch the game:
```bash
tools/renpy-sdk/renpy.sh vn tools/renpy-sdk/renpy.sh vn
``` ```
## 5. Builds (output under `build/`, gitignored) Build a desktop package (outputs are gitignored):
```sh ```bash
# Web (HTML5) mkdir -p build/dist
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher web_build vn --destination build/web
python3 -m http.server -d build/web 8000 # then open http://localhost:8000
# Linux desktop
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher distribute vn --package linux --destination build/dist tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher distribute vn --package linux --destination build/dist
``` ```
`--package` also accepts `win` and `mac`; omit it to build every package. The web build Use `win` or `mac` instead of `linux` for those targets. Extract the resulting package
also leaves a `build/web.zip` next to the folder. A web build writes on its target OS and run its launcher. Ren'Py is bundled in desktop distributions.
`vn/progressive_download.txt`; delete it (it is not part of the generated project).
## 5. Web and Android builds
### Web (HTML5)
After the common setup, install the matching web add-on explicitly, as CI does:
```bash
curl -fsSL -o /tmp/faust-renpy-web.zip https://www.renpy.org/dl/8.5.3/renpy-8.5.3-web.zip
unzip -q /tmp/faust-renpy-web.zip -d tools/renpy-sdk
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher web_build vn --destination build/web
rm -f vn/progressive_download.txt
uv run python -m http.server --bind 127.0.0.1 --directory build/web 8000
```
Open <http://localhost:8000>; serve the build over HTTP rather than opening its HTML
with `file://`. The build also creates `build/web.zip`.
`vn/progressive_download.txt` is temporary web-build output, not a source input.
### Android APK ### Android APK
One-time local setup: unpack `renpy-8.5.3-rapt.zip` into `tools/renpy-sdk/rapt`, use JDK 21 After the common setup, install **JDK 21**, set `JAVA_HOME` to its installation and
(`JAVA_HOME`), and install the Android SDK with RAPT's `android.py installsdk` (this accepts put `$JAVA_HOME/bin` on `PATH`; check `java -version` reports 21.
Google's Android SDK licence). The `[android]` table in `work.toml` makes `vnpipe renpy` write Use ASCII-only absolute paths for the checkout and SDK (for example
`vn/android.json`, the icons and the presplash. `/home/dario/src/faust-vn`); Gradle's `local.properties` uses Latin-1.
If necessary, move or copy the checkout to such a path before setup.
```sh Install RAPT 8.5.3 and its Android SDK once:
```bash
curl -fsSL -o /tmp/faust-renpy-rapt.zip https://www.renpy.org/dl/8.5.3/renpy-8.5.3-rapt.zip
unzip -q /tmp/faust-renpy-rapt.zip -d tools/renpy-sdk
(
cd tools/renpy-sdk/rapt
../lib/py3-linux-x86_64/python -c '
import runpy, sys
sys.path[:0] = [".."]
sys.argv = ["android.py", "installsdk"]
runpy.run_path("android.py", run_name="__main__")
'
)
```
Review and accept the Android SDK licences when prompted. The `[android]` table in
`work.toml` makes vnpipe generate `vn/android.json`, icons and presplash.
For an update to an existing release, restore its private signing key as both
`vn/android.keystore` and `vn/bundle.keystore` **before** building
(alias `android`, password `android`). For a first independent local build,
RAPT creates keys when absent; back them up. Both files are gitignored.
Always reuse the same signing key for updates and never commit it.
```bash
mkdir -p build/dist
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher android_build vn --destination build/dist tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher android_build vn --destination build/dist
``` ```
- Signing: copy the release keystore to `vn/android.keystore` and `vn/bundle.keystore` (alias Transfer the APK from `build/dist` to the Android device, permit installation from
`android`, password `android`; both are gitignored). Always sign with the **same** keystore: that source and install it. An APK signed with a different key cannot update the
a different one cannot update an installed app. Keep a private backup; never commit it. official installed app.
- The project path must be ASCII (Gradle's `local.properties` is Latin-1): from a path with
accents such as `Darío`, build from a copy of `vn/` in an ASCII directory. ### Developing vnpipe itself (optional)
A separate checkout can live anywhere. To try unpublished changes without editing
the project's source configuration or upgrading its lockfile:
```bash
uv run --with-editable /absolute/path/to/vnpipe vnpipe --work . renpy
```
Maintainers intentionally updating the pinned dependency run
`uv lock --upgrade-package vnpipe` after pushing the upstream changes, then review
and commit the updated lockfile.
## 6. Releases (CI) ## 6. Releases (CI)
`.github/workflows/release.yml` builds Windows, Linux, macOS, web and the signed APK. `.github/workflows/release.yml` builds Windows, Linux, macOS, web and the signed APK.
- Push to `development` or a manual run: builds are kept as workflow artifacts (7 days). - Push to `development` or a manual run: builds are kept as workflow artifacts (7 days).
- Merge `development` into `main`: `version.yml` bumps the version, then `release.yml` - Merge `development` into `main`: `version.yml` bumps the version, then `release.yml`
publishes the GitHub release `vMAJOR.MINOR.PATCH` with all five files. publishes the GitHub release `vMAJOR.MINOR.PATCH` with desktop and web files (and the APK when signing is configured).
- The APK needs the `ANDROID_KEYSTORE_B64` repository secret - The APK needs the `ANDROID_KEYSTORE_B64` repository secret
(`base64 -w0 android.keystore | gh secret set ANDROID_KEYSTORE_B64`); without it the (`base64 -w0 android.keystore | gh secret set ANDROID_KEYSTORE_B64`); without it the
Android build is skipped. Android build is skipped.