Updater for SealDice, successor of seal-updater.
The program accepts three principal arguments: --package (short -p, alias --upgrade), --binary-name (short -b, alias --binary), and --pid. It waits for the process with the specified PID to terminate before extracting files from the provided package into the current directory. Finally, it tries to start the executable named by --binary-name unless the --skip-launch flag is set. If --binary-name is omitted, it defaults to sealdice-core or sealdice-core.exe depending on the platform.
For a full definition of acceptable arguments and flags, see src/cli.rs.
Warning
Please use the 2024 Edition of Rust (version 1.85+) when working on this project.
-
Use
cargo fmtwith configurations speficied in.rustfmt.tomlto format the project. Do not runrustfmtdirectly as it formats on a per-file basis and may remove disambiguate imports. -
Import types directly; prefer
Fileoverstd::fs::Fileorfs::File, unless ambiguity forbids (Errorandio::Error). -
Import functions by their immediate parent module; prefer
io::stdin()overstd::io::stdin()orstdin().
- Implement business logic.
- Add log information.
- Add manifest and static build for Windows (via
embed_manifestandstatic_vcruntime). - CI/CD & auto-release
- Tests
- Make SealDice migrate from the old seal-updater.
-
We might need a graceful way to log and print information rather than litteringdebug!()andprintln!()everywhere. -
The current implementation of
proc::wait()is the best we can do, but feedback we got from seal-updater proves it is not always reliable.