-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
base: dev
Are you sure you want to change the base?
Feature/binary patch bundle types #13209
Conversation
only patch if the updater is included fix linux warnings patch binary when updaer is configured
…lczyk/tauri into feature/binary_patch_bundle_types
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? |
There was a problem hiding this comment.
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* |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
crates/tauri-bundler/src/error.rs
Outdated
HashError, | ||
/// Failed to parse binary | ||
#[error("Binary parse error: `{0}`")] | ||
BinaryParseError(String), |
There was a problem hiding this comment.
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.
Package Changes Through 455b2c6There 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 VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
crates/tauri-bundler/src/bundle.rs
Outdated
@@ -13,6 +13,28 @@ mod settings; | |||
mod updater_bundle; | |||
mod windows; | |||
|
|||
impl From<goblin::error::Error> for crate::error::Error { |
There was a problem hiding this comment.
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
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? |
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.