Skip to content

๐Ÿ› ๏ธ Development

This page is for developers who want to modify and build the application from source: the GUI frontend and the Rust backend, which calls the SDK's ssconverter crate. Changes to the conversion itself go to SpriteStudio-SDK. If you only want to use the application, see Installation instead.

๐Ÿ› ๏ธ Tech stack

  • Application Framework & Backend: Tauri v2 (Rust)
  • Frontend Build Tool: Vite
  • Frontend UI: TypeScript / HTML / Vanilla CSS (no heavy frameworks used)
  • Core Conversion Logic: SpriteStudio-SDK (ssconverter Rust crate)

๐Ÿงฉ How it is put together

---
config:
  flowchart:
    wrappingWidth: 400
---
flowchart TD
    subgraph fe ["Frontend ยท TypeScript, Vite"]
        ui["The window<br/>drop ยท output ยท history ยท result"]
        ls["localStorage<br/>history ยท theme"]
    end
    subgraph be ["Backend ยท Rust, Tauri v2"]
        cmds["Commands<br/>convert ยท stop ยท open folder"]
        task["Background task<br/>scan, then convert each"]
    end
    conv["ssconverter crate<br/>SDK submodule"]
    files[".sspj in<br/>.ssab ยท .ssqb out"]
    ui --> ls
    ui -->|invoke| cmds
    cmds --> task --> conv --> files
    task -. "log ยท progress ยท failures" .-> ui

The frontend is the whole window, and keeps the history and the theme in localStorage. It calls the backend's commands over Tauri's IPC, and the backend converts on a background task, so the window stays responsive. A dropped folder is scanned first โ€” bounded in entries and in time, so a mis-dropped home folder cannot run unbounded โ€” then each project converts in turn, and every converter message, the progress and each failure come back to the window as events. Stop / Cancel sets a flag that both the scan and the converter check.

For a single project, the folder ๐Ÿ“‚ Reveal Output opens is the one the converter names in its own log; the app does not work it out (for a batch it opens the folder that was selected). The default the ๐Ÿ“ค Output row shows does restate the converter's naming rule, so a test converts the SDK's fixture and checks both the log line and the rule โ€” a submodule bump that changes either fails there rather than in the app.

โš™๏ธ Prerequisites

To build and run this application from source, you need the following environment:

  • Node.js: v26 or higher recommended. We use pnpm as the package manager; if you haven't installed it yet, run npm install -g pnpm beforehand.
  • Rust Toolchain: installed via rustup.
  • Python 3.11 or later, only to build the documentation. If the python3 on your PATH is older, point prepare-docs at a newer one with python=<exe>.
  • PowerShell 7 (pwsh) on Windows, for the .ps1 scripts. CI runs build-release.ps1 with it; Windows PowerShell 5.1 cannot run that script.
  • The Tauri v2 prerequisites for your specific OS (e.g. C++ Build Tools on Windows, Xcode Command Line Tools on macOS, the required libraries on Linux).

๐Ÿš€ Setup and run

1. Clone the repository and submodules

This project uses SpriteStudio-SDK as a submodule for the core logic. Be sure to clone with the --recursive flag.

git clone --recursive https://github.com/cri-middleware/SSConverterGUI.git
cd SSConverterGUI

2. Install dependencies

pnpm install

3. Run in development mode

This compiles the core logic and launches the GUI with hot-reloading enabled.

pnpm run tauri dev

4. Build the application

This builds the app in release mode: the executable in src-tauri/target/release/, and the platform's bundles under src-tauri/target/release/bundle/.

pnpm run tauri build

5. Build a release archive (optional)

pnpm run tauri build does not make the archive a release ships. To reproduce what a release run actually uploads โ€” the same archive name and layout, with LICENSE.md, LICENSE.ja.md and THIRD_PARTY_NOTICES.md bundled in โ€” run build-release. It is what .github/workflows/release.yml runs, so a local run catches a packaging, signing or cross-compilation problem without dispatching a release.

# macOS (universal: Apple Silicon + Intel)
scripts/build-release.sh

# quicker while iterating โ€” the archive then differs from the released one
scripts/build-release.sh sign=no notices=no
# Windows (x86_64, plus the arm64 cross-build)
./scripts/build-release.ps1

# just one of them
./scripts/build-release.ps1 arch=x86_64

Each builds the half of the release its own machine can โ€” through scripts/release-macos.sh and scripts/release-windows.ps1, which are where the platform build itself lives โ€” then checks the archive and writes SHA256SUMS beside it. The archives land in dist-release/, which is git-ignored.

Once the archives from both machines are in one directory, scripts/build-release.sh build=no checks all three together and writes the manifest over them. The workflow runs that step before it creates the Release, and it is the check that matters: a matrix entry that built nothing, or a stale archive from an earlier version, would otherwise be attached to the Release unnoticed.

--help lists every option. The ones worth knowing:

  • Notices: THIRD_PARTY_NOTICES.md is generated here rather than committed โ€” by cargo-about (cargo install cargo-about) for the Rust crates, and by scripts/generate-npm-notices.mjs for the npm packages and the font. about.toml holds the accepted-licence list, and an unlisted licence fails the build rather than shipping unnoticed. Pass notices=no to skip that step for a quicker check โ€” the archive then differs from the released one.
  • Windows arm64: needs the MSVC v143 - VS 2022 C++ ARM64 build tools component from the Visual Studio Installer. The script adds the Rust target itself. The result cannot be run on the x86_64 host that built it โ€” test it on an Arm device. arch=x86_64 skips it.
  • macOS signing and notarization: opt-in, via the same variables the workflow uses. Set APPLE_SIGNING_IDENTITY to sign, and add APPLE_API_KEY / APPLE_API_ISSUER plus either APPLE_API_KEY_PATH or APPLE_API_KEY_BASE64 to notarize and staple. The script then inspects the finished .app and fails if what you asked for did not actually happen โ€” a missing or expired credential otherwise turns signing into a silent no-op. With none of the variables set you get an unsigned app and only a note saying so. sign=yes requires a signed, notarized and stapled app whatever the environment says (what CI passes on a v* tag) and sign=no ignores the variables entirely. Leave APPLE_CERTIFICATE unset locally: CI uses it to hand the Tauri CLI a .p12 to import into a temporary keychain, whereas locally the identity is resolved from the keychains you already have (security find-identity -v -p codesigning). The Windows executable is deliberately not code-signed, so there is no sign= on that side.

๐Ÿ“š Building the documentation

This site is built with Zensical, the successor to MkDocs and the Material theme, matching the other SpriteStudio player repositories. The sources live under docs/en/ and docs/ja/, and two scripts do the whole job.

macOS / Linux (bash)

scripts/prepare-docs.sh          # once: .venv + docs/requirements.txt
scripts/build-docs.sh            # exactly what CI runs; fails on broken links

.venv/bin/zensical serve                   # live preview of English at http://127.0.0.1:8000
.venv/bin/zensical serve -f mkdocs.ja.yml  # ... or of Japanese

Windows (PowerShell)

scripts\prepare-docs.ps1
scripts\build-docs.ps1

.\.venv\Scripts\zensical serve                   # live preview of English
.\.venv\Scripts\zensical serve -f mkdocs.ja.yml  # ... or of Japanese

Both scripts take key=value options and --help โ€” build-docs.sh locale=ja, prepare-docs.sh force=yes. zensical serve is no substitute for the build: it validates nothing and serves one locale at a time. To see the built site with the language selector working, run scripts/build-pages.sh serve=yes (.ps1 on Windows), which builds the tree pages.yml publishes and serves site/ on port 8000.

Zensical builds one locale per configuration, so there is one build per locale and build-docs runs them in the only safe order: English first, because it writes site/ and clears it on the way in โ€” and the Japanese site lives inside it at site/ja. Building only English therefore leaves no Japanese site at all.

Every page exists twice โ€” once under docs/en/ and once under docs/ja/. When you add, move, or rename a page, do it in both locales and add the entry to the nav of both mkdocs.yml and mkdocs.ja.yml; the strict build does not catch a missing one.