Feature/binary patch bundle types
This is first PR to address https://github.com/tauri-apps/plugins-workspace/issues/2277
Thanks to this the updater plugin will be able to determine which installer to download.
There is a breaking change here requiring updater plugin and tauri-cli to be compatible since we need __TAURI_BUNDLE_TYPE variable to be present in the binary. In case the variable is not found error is reported. Not sure if it's ok or if we need a better solution here.
Package Changes Through 4ff1d8cc69ee97804eb6d972ebfa9772e816b60a
There are 4 changes which include @tauri-apps/api with patch, tauri-cli with patch, tauri-bundler with patch, tauri-utils with patch
Planned Package Versions
The following package releases are the planned based on the context of changes in this pull request.
| package | current | next |
|---|---|---|
| @tauri-apps/api | 2.6.0 | 2.6.1 |
| tauri-utils | 2.5.0 | 2.5.1 |
| tauri-bundler | 2.5.0 | 2.5.1 |
| tauri-runtime | 2.7.0 | 2.7.1 |
| tauri-runtime-wry | 2.7.1 | 2.7.2 |
| tauri-codegen | 2.3.0 | 2.3.1 |
| tauri-macros | 2.3.1 | 2.3.2 |
| tauri-plugin | 2.3.0 | 2.3.1 |
| tauri-build | 2.3.0 | 2.3.1 |
| tauri | 2.6.2 | 2.6.3 |
| @tauri-apps/cli | 2.6.2 | 2.6.3 |
| tauri-cli | 2.6.2 | 2.6.3 |
Add another change file through the GitHub UI by following this link.
Read about change files or the docs at github.com/jbolda/covector
i think we should consider using https://github.com/denoland/sui it has an easy to use API
i think we should consider using https://github.com/denoland/sui it has an easy to use API
Definitely looks simpler than goblin. Wish I knew about it before :)
Should I just change the patching implementation?
@lucasfernog I've pushed some of the suggested changes. I decided no to use sui as this would add dependency to the app, not just the builder. If there anything else missing here?
Didn't look at it yet, but it seems like the ubuntu build is failing https://github.com/tauri-apps/tauri/actions/runs/16120739808/job/45485616619
@Legend-Master I've just checked and the tests I added to plugins-workspace/plugins/updater/tests/app-updater still pass. I will check the build ASAP.
@Legend-Master pushed the fix. Turns out my tests used --debug but the failing test don't. In release mode the bundle type variable was stripped even though it's referenced in public method. I've added #[used] to it and release builds work now.
...Now I see this PR was closed already. Do I have to create a new PR with the fix?
...Now I see this PR was closed already. Do I have to create a new PR with the fix?
Yeah, that's how we usually do it
@Legend-Master Submitted here: https://github.com/tauri-apps/tauri/pull/13808
Hey, Looks like the patcher is modifying the binary after code signing. This is rendering the signing to be invalid. maybe move the signing to after binary is patched?
@kittuov Hey, can you point me to the place were we sign the binary? I'm only familiar wit generating the signatures files for the bundles.
@kittuov Hey, can you point me to the place were we sign the binary? I'm only familiar wit generating the signatures files for the bundles.
It was signing the main executable on Windows (you sign both the binaries and the bundles on Windows instead of just the bundles on Linux, and we don't do binary patching on macOS yet), should be fixed in #13870 (we sign the binaries first before generating all the bundles, but now we need to sign them after the binary patching)
Thanks for taking a look anyways 🙃