mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 07:29:59 -07:00
implement installer as library and use it in gui
This commit is contained in:
committed by
Markus Unterwaditzer
parent
9e9fe4d392
commit
3b44234ae1
@@ -12,16 +12,22 @@ You'll need to install [Tauri's dependencies](https://tauri.app/start/prerequisi
|
||||
|
||||
### Rayhunter CLI Installer
|
||||
|
||||
The Rayhunter GUI installer currently just bundles and wraps the CLI Rayhunter installer. When building the GUI installer, the CLI installer needs to be built and available for bundling. By default it assumed the installer is present in the repo's `target` directory at either `debug/installer` or `release/installer` depending on whether you're doing a debug or release build of the GUI installer.
|
||||
The GUI installer pulls in the CLI installer as a library. Like with the CLI installer, the firmware binary needs to be present and can be overridden with the same envvars. See `../installer/build.rs` for options.
|
||||
|
||||
You can use a different path by setting the environment variable INSTALLER_PATH when the GUI installer being built. You can also use the environment variable SKIP_INSTALLER_COPY which leaves any previously bundled CLI installer unmodified or if one does not exist bundles a dummy installer file allowing the GUI installer to be successfully built.
|
||||
For example, to build the firmware in development mode and then provide the path explicitly:
|
||||
|
||||
```bash
|
||||
cargo build-daemon-firmware-devel
|
||||
|
||||
(cd installer-gui && FILE_RAYHUNTER_DAEMON=$PWD/../target/armv7-unknown-linux-musleabihf/firmware-devel/rayhunter-daemon npm run tauri android build)
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
After preparing dependencies, the GUI installer can be built by:
|
||||
|
||||
1. Running `npm install` in this directory.
|
||||
2. Setting INSTALLER_PATH or SKIP_INSTALLER_COPY if desired and running `npm run tauri dev`.
|
||||
2. Running `npm run tauri dev`.
|
||||
|
||||
This will build the GUI installer in development mode. While this command is running, any changes to either the frontend or backend code will cause the installer to be reloaded or rebuilt.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user