Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/desktop-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- os: macos-15
name: macos-arm64
target: aarch64-apple-darwin
build_command: npm run build:web && cd src/apps/desktop && npm exec -- tauri build --target aarch64-apple-darwin --bundles dmg
build_command: cd src/apps/desktop && npm exec -- tauri build --target aarch64-apple-darwin --bundles dmg
- os: macos-15-intel
name: macos-x64
target: x86_64-apple-darwin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- os: macos-15
name: macos-arm64
target: aarch64-apple-darwin
build_command: npm run build:web && cd src/apps/desktop && npm exec -- tauri build --target aarch64-apple-darwin --bundles dmg
build_command: cd src/apps/desktop && npm exec -- tauri build --target aarch64-apple-darwin --bundles dmg
- os: macos-15-intel
name: macos-x64
target: x86_64-apple-darwin
Expand Down
55 changes: 45 additions & 10 deletions BitFun-Installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,20 @@ Language Select → Options → Progress → Model Setup → Theme Setup
### Setup

```bash
cd ..
npm ci
cd BitFun-Installer
npm install
npm ci
```

Or from repository root:

```bash
npm --prefix BitFun-Installer ci
```

Production installer builds call workspace desktop build scripts, so root dependencies are required.

### Repository Hygiene

Keep generated artifacts out of commits. This project ignores:
Expand All @@ -107,6 +117,7 @@ Key behavior:
- Windows uninstall registry entry points to:
`"<installPath>\\uninstall.exe" --uninstall "<installPath>"`.
- Launching with `--uninstall` opens the dedicated uninstall UI flow.
- Launching `uninstall.exe` directly also enters uninstall mode automatically.

Local debug command:

Expand All @@ -123,24 +134,47 @@ Core implementation:

### Build

Build the complete installer (builds main app first):
Build the complete installer in release mode (default, optimized):

```bash
npm run installer:build
```

Use this as the release entrypoint. `npm run tauri:build` does not prepare validated payload assets for production.
Release artifacts embed payload files into the installer binary, so runtime installation does not depend on an external `payload` folder.

Build the complete installer in fast mode (faster compile, less optimization):

```bash
node scripts/build-installer.cjs
npm run installer:build:fast
```

Build installer only (skip main app build):

```bash
node scripts/build-installer.cjs --skip-app-build
npm run installer:build:only
```

`installer:build:only` now requires an existing valid desktop executable in target output paths. If payload validation fails, build exits with an error.

Build installer only with fast mode:

```bash
npm run installer:build:only:fast
```

### Output

The built installer will be at:
The built executable will be at:

```
src-tauri/target/release/bitfun-installer.exe
```

Fast mode output path:

```
src-tauri/target/release/bundle/nsis/BitFun-Installer_x.x.x_x64-setup.exe
src-tauri/target/release-fast/bitfun-installer.exe
```

## Customization Guide
Expand All @@ -166,6 +200,7 @@ Edit `src/styles/variables.css` — all colors, spacing, and animations are cont
### Adding Installer Payload

Place the built BitFun application files in `src-tauri/payload/` before building the installer. The build script handles this automatically.
During `cargo build`, the payload directory is packed into an embedded zip inside `bitfun-installer.exe`.

## Integration with CI/CD

Expand All @@ -175,12 +210,12 @@ Add to your GitHub Actions workflow:
- name: Build Installer
run: |
cd BitFun-Installer
npm install
node scripts/build-installer.cjs --skip-app-build
npm ci
npm run installer:build:only

- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: BitFun-Setup
path: BitFun-Installer/src-tauri/target/release/bundle/nsis/*.exe
name: BitFun-Installer-Exe
path: BitFun-Installer/src-tauri/target/release/bitfun-installer.exe
```
79 changes: 79 additions & 0 deletions BitFun-Installer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions BitFun-Installer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@
"type": "module",
"description": "BitFun Custom Installer - Modern branded installation experience",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"sync:model-i18n": "node scripts/sync-model-i18n.cjs",
"sync:theme-i18n": "node scripts/sync-theme-i18n.cjs",
"sync:i18n": "npm run sync:model-i18n && npm run sync:theme-i18n",
"dev": "npm run sync:i18n && vite",
"build": "npm run sync:i18n && tsc && vite build",
"preview": "vite preview",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build",
"tauri:dev": "npm run sync:i18n && tauri dev",
"tauri:build": "npm run sync:i18n && tauri build",
"tauri:build:fast": "npm run sync:i18n && tauri build -- --profile release-fast",
"tauri:build:exe": "npm run sync:i18n && tauri build --no-bundle",
"tauri:build:exe:fast": "npm run sync:i18n && tauri build --no-bundle -- --profile release-fast",
"installer:build": "node scripts/build-installer.cjs",
"installer:build:fast": "node scripts/build-installer.cjs --mode fast",
"installer:build:only": "node scripts/build-installer.cjs --skip-app-build",
"installer:build:only:fast": "node scripts/build-installer.cjs --skip-app-build --mode fast",
"installer:dev": "node scripts/build-installer.cjs --dev",
"type-check": "tsc --noEmit"
},
"dependencies": {
Expand All @@ -25,6 +36,7 @@
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.6.0",
"terser": "^5.46.0",
"typescript": "~5.8.3",
"vite": "^7.0.4"
}
Expand Down
Loading