Skip to content

Feature/binary patch bundle types #13209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

kandrelczyk
Copy link
Contributor

@kandrelczyk kandrelczyk commented Apr 11, 2025

This is first PR to address tauri-apps/plugins-workspace#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.

@kandrelczyk kandrelczyk requested a review from a team as a code owner April 11, 2025 20:18
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Apr 11, 2025
let mut bundles = Vec::<Bundle>::new();
for package_type in &package_types {
// bundle was already built! e.g. DMG already built .app
if bundles.iter().any(|b| b.package_type == *package_type) {
continue;
} // REMOVE THIS?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this. This only applies to DMG, right? We don't want to skip anything on linux or windows as the binary needs to be patched for each type anyway.

.idea
debug.log
TODO.md
.aider*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for those weird patches. I think this is line end issue because I worked on both windows and linux. I only added '.aider*' here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to set autocrlf to true or input

git config --global core.autocrlf true/git config --global core.autocrlf input
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#:~:text=with%20these%20issues.-,core.autocrlf,-If%20you%E2%80%99re%20programming

HashError,
/// Failed to parse binary
#[error("Binary parse error: `{0}`")]
BinaryParseError(String),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same line end issue. New errors are here.

Copy link
Contributor

github-actions bot commented Apr 12, 2025

Package Changes Through 455b2c6

There are 9 changes which include @tauri-apps/api with minor, tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils with minor, tauri-bundler with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-driver 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.4.1 2.5.0
tauri-utils 2.3.1 2.4.0
tauri-bundler 2.3.1 2.4.0
tauri-runtime 2.5.1 2.6.0
tauri-runtime-wry 2.5.1 2.6.0
tauri-codegen 2.1.1 2.1.2
tauri-macros 2.1.1 2.1.2
tauri-plugin 2.1.1 2.1.2
tauri-build 2.1.1 2.1.2
tauri 2.4.1 2.5.0
@tauri-apps/cli 2.4.1 2.5.0
tauri-cli 2.4.1 2.5.0
tauri-driver 2.0.3 2.0.4

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@@ -13,6 +13,28 @@ mod settings;
mod updater_bundle;
mod windows;

impl From<goblin::error::Error> for crate::error::Error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be done inside crate::error::Error::BinaryParseError by leverating thiserror #[from] attribute

@lucasfernog
Copy link
Member

i think we should consider using https://github.com/denoland/sui it has an easy to use API

@kandrelczyk
Copy link
Contributor Author

kandrelczyk commented Apr 13, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📬Proposal
Development

Successfully merging this pull request may close these issues.

3 participants