safing-portmaster/desktop/tauri/src-tauri
2025-04-04 11:48:09 +03:00
..
capabilities [desktop] update tauri npm packages 2024-09-02 09:55:21 +03:00
gen/schemas [packaging] Add migration for linux installers 2025-03-05 16:13:00 +02:00
src [destkop] Fix tray context menu update 2025-03-31 16:20:50 +03:00
templates Merge pull request #1855 from safing/feature/installer-migration 2025-04-04 11:17:12 +03:00
.gitignore Migrate tauri from portmaster-ui to desktop/tauri. Update build system 2024-03-22 11:45:18 +01:00
build.rs Migrate tauri from portmaster-ui to desktop/tauri. Update build system 2024-03-22 11:45:18 +01:00
Cargo.lock [desktop] Add rust-dark-light as direct dependency 2025-02-25 11:34:21 +02:00
Cargo.toml Bump binaries versions to v2 2025-03-21 12:16:51 +00:00
Cross.toml Update Earthfile to hopefully get cross-compilation for rust to work 2024-03-26 15:38:47 +01:00
README.md [desktop] Improve tauri update doc 2025-03-04 18:09:10 +02:00
tauri.conf.json5 Bump binaries versions to v2 2025-03-21 12:16:51 +00:00

Update Tauri guide

Check latest versions of tauri packages and update them accordingly (https://crates.io/)
Cargo.toml:

[build-dependencies]
tauri-build = { version = "2.0.0-beta.19", features = [] } # Update to latest

[dependencies]
# Tauri
tauri = { version = "2.0.0-beta.24", features = ["tray-icon", "image-png", "config-json5", "devtools"] } # Update to latest
tauri-plugin-shell = "2.0.0-beta"
tauri-plugin-dialog = "2.0.0-beta"
tauri-plugin-clipboard-manager = "2.0.0-beta"
tauri-plugin-os = "2.0.0-beta"
tauri-plugin-single-instance = "2.0.0-beta"
tauri-plugin-cli = "2.0.0-beta"
tauri-plugin-notification = "2.0.0-beta"
tauri-plugin-log = "2.0.0-beta"
tauri-plugin-window-state = "2.0.0-beta"

tauri-cli = "2.0.0-beta.21" # Update to latest

Run:

cargo update

Make sure to update the npm tauri plugin dependencies to have the same version as the rust plugins. (desktop/angular)

Update WIX installer template

If the migration functionality is not needed anymore remove the template, this will cause tauri to use its default template and not call the migration script.

  1. Get the latest main.wxs template from the repository.
  2. Replace the contents of templates/wix/main_original.wxs with the repository version. (The file is kept only for reference)
  3. Replace the contents of templates/wix/main.wsx and add the fallowing lines at the end of the file, inside the Product tag.
    <!-- Service fragments -->
    <CustomActionRef Id='MigrationPropertySet' />
    <CustomActionRef Id='Migration' />
    <!-- Uncommenting the next line will cause the installer to check if the old service is running and fail. Without it, it will automatically stop and remove the old service without notifying the user. -->
    <!-- <CustomActionRef Id='CheckServiceStatus' /> -->
    <!-- End Service fragments -->