You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit af465ea
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cli): add --no-binary-patching flag to build and bundle (#15619)
* feat(bundler): add bundle > disableBinaryPatching option
Tauri patches the main executable with bundle type information so the updater
plugin can pick the matching installer format when multiple bundle types target
the same platform. This rewrites the binary after it is built, invalidating an
existing code signature on it, which breaks bundling an already-signed binary
(e.g. inside the NSIS bundler).
Add a `bundle > disableBinaryPatching` config option (default false). When set,
the bundler skips patching the main binary and the subsequent re-sign, leaving
the executable untouched.
closes#15591
* feat(cli): add --no-binary-patching flag to build and bundle
Switch the disable-binary-patching control from the proposed
`bundle > disableBinaryPatching` config option to a `--no-binary-patching`
CLI flag on `tauri build` and `tauri bundle`, mirroring the `--no-sign`
precedent. When set, the bundler skips patching the main executable with
bundle type information (and the subsequent re-sign), preserving an
already-signed binary. Patching only matters when shipping multiple bundle
types per platform.
* chore: add @tauri-apps/cli to changefile
* refactor(bundler): use positive binary_patching flag defaulting to true
* refactor(bundler): hand-write SettingsBuilder default, notice on skip
- Implement Default for SettingsBuilder manually so binary_patching
defaults to true, instead of overriding it on top of a derived default.
- Log a notice when --no-binary-patching skips patching, mirroring the
--no-sign notice, and drop the now-redundant inline comment.
* Always sign and warn with path data
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
Add a `--no-binary-patching` flag to `tauri build` and `tauri bundle`. When set, the bundler skips patching the main executable with bundle type information (and the subsequent re-signing), leaving an already-signed binary untouched. Patching is only required when shipping multiple bundle types per platform that should each update with their own installer format.
log::warn!("Failed to add bundler type to the binary: {e}. Updater plugin may not be able to update this package. This shouldn't normally happen, please report it to https://github.com/tauri-apps/tauri/issues");
log::warn!("Failed to add bundler type to the binary: {e}. Updater plugin may not be able to update this package. This shouldn't normally happen, please report it to https://github.com/tauri-apps/tauri/issues");
153
+
}
154
+
}else{
155
+
log::warn!(
156
+
"Skipping binary patching for {} due to --no-binary-patching flag.",
157
+
main_binary_path.display()
158
+
);
152
159
}
153
160
154
161
// sign main binary for every package type after patch
0 commit comments