-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat: add mainBinaryName
option
#10977
Conversation
Package Changes Through 5047cbeThere are 5 changes which include tauri-bundler with premajor, tauri-cli with prerelease, tauri with prerelease, tauri-build with prerelease, tauri-utils with prerelease 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 |
@@ -133,8 +133,8 @@ pub fn generate_data( | |||
fn generate_changelog_file(settings: &Settings, data_dir: &Path) -> crate::Result<()> { | |||
if let Some(changelog_src_path) = &settings.deb().changelog { | |||
let mut src_file = File::open(changelog_src_path)?; | |||
let bin_name = settings.main_binary_name(); |
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.
let's also document that the changelog path changed
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.
for tauri v1, the path is unchanged, it is only a breaking change for those on v2. Added a change file nevertheless
@@ -306,7 +306,7 @@ fn generate_md5sums(control_dir: &Path, data_dir: &Path) -> crate::Result<()> { | |||
/// Copy the bundle's resource files into an appropriate directory under the | |||
/// `data_dir`. | |||
fn copy_resource_files(settings: &Settings, data_dir: &Path) -> crate::Result<()> { | |||
let resource_dir = data_dir.join("usr/lib").join(settings.main_binary_name()); | |||
let resource_dir = data_dir.join("usr/lib").join(settings.product_name()); |
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.
and also document the resource path changed - this will cause new apps to duplicate the resources in the system
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.
As far as I tested, at least .deb
removes all bins and resources directory as well when installing a new version and then adds the new binaries and resources.
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.
and also document the resource path changed
for tauri v1, the path is unchanged, it is only a breaking change for those on v2. Added a change file nevertheless
@@ -912,12 +911,9 @@ impl AppSettings for RustAppSettings { | |||
for entry in fs_bins { | |||
let path = entry?.path(); | |||
if let Some(name) = path.file_stem() { | |||
let bin_exists = binaries.iter().any(|bin| { | |||
bin.name() == name || path.ends_with(bin.src_path().unwrap_or(&"".to_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.
this check is here to fix the following issue:
- you have a
src-tauri/src/bin/app.rs
file (automatically discovered as a binary by Cargo) - you configure the binary manually in Cargo.toml (yeah it's silly, but it's possible and allows you to configure more stuff)
[[bin]]
name = "lucass"
path = "src/bin/app.rs"
then the Tauri CLI will try to load both app
and lucass
, while only lucass
exists
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.
reverted
I also think our migration script should fill this value with the productName value, it'll prevent some issues if you do not ship the final v1 update before migrating to v2. |
No description provided.