cargo-bundle
cargo-bundle copied to clipboard
[Windows] Error msi bundle
I get this error
error: Failed to collect resource file information
Caused by: Le fichier spécifié est introuvable. (os error 2)
jojobyte/cargo-bundle@ca33209
First time working working with Rust, there is no way this is the right solution for cross platform.
The error appears to be because its trying to bundle C:/whatever/your/path/hello
instead of C:/whatever/your/path/hello.exe
, fixing it inside the collect_resource_info function just gets it to fail later on inside the generate_resource_cabinets function.
Fixing it in settings solves both problems but then generates a MSI file that won't run/install, but someone else might need to figure out that part.
Think it needs some MSI tables/registry or something but its beyond my current understanding.
As a workaround, you may try using cargo-wix instead.
I just found this project but I could not get the provided example to work on windows either due to this same error. Is there any plans fix this in the near future? Thanks!
Windows support in cargo-bundle is only half-implemented and doesn't work yet. It is waiting for a contributor who knows more about MSI packaging than I do and who has a Windows machine to test on. If that's you, PRs would be very welcome!
I've managed to get the msi support working. It needs a small patch to rust-msi
as well as changes to this crate to set the Word Count property to a suitable value. I'm really busy these days so will send the cleaned-up patches in a few days. Relevantly, I'd like to know if I should send changes in the same PR that implement a working UI for the msi or just those to make it work.
Note: I tested it on Wine's msiexec
implementation.
hi @aerkiaga
THat's really great! I would say a minimal UI as well. You might want to read #116 as there has been a long discussion there as well about MSI support
@aerkiaga This is great news, thanks! A working UI would definitely be good to have, although if it makes sense to split it across multiple smaller PRs, that may be a little easier to review. Up to you.
How is this coming along? I'm new to Windows MSI files and bundlers, but if there isn't much left to be done, I would be willing to take a stab.
@landonwork I got basic msi working with https://github.com/burtonageo/cargo-bundle/pull/142, which has been merged. It lacks some features though. I've drawn a banner for the installer UI here if you need it.
Edit: handling menus, file associations etc. is still left to do. Thanks a lot if you're willing to help!
Any way to fix it? I get the same error now
I get the same error. Is it solved yet??
To clarify, are you having issues with cargo-bundle
as built at HEAD, or using the version published on crates.io?
To clarify, are you having issues with
cargo-bundle
as built at HEAD, or using the version published on crates.io?
I cloned from commit fd94ab531b4d7b0c9a8f029dd649156f0e733157
, (latest master branch as of Jan 29, 24) and installed directly. I still get the error with running cargo bundle --target x86_64-pc-windows-msvc
. I am only using the required configs - I'm on windows 11
Same problem here, with cargo-bundle 0.6.0
@ihsan6133 @Plycedes @Alexangelj @jakobhansson are you passing --format msi
? Like this:
cargo bundle --target x86_64-pc-windows-gnu --format msi
cargo bundle --target x86_64-pc-windows-msvc --format msi
gives the same error.
I do not have the x86_64-pc-windows-gnu
toolchain, is this a requirement?
@jakobhansson I see the fix has not yet made it into a new release. I suggest that you build from source (cargo install --path .
from cargo-bundle
master branch).
I see, I compiled from source and now the cargo bundle --format msi
command completes successfully, but the generated .msi file throws error upon running "This installation packaeg could not be opened..."
Same issues here...
The crates.io version fails to bundle with a "Failed to collect resource file information" error when running cargo bundle --format msi
.
Building from source (cloning and running cargo install --path .
) succeeds with the bundle command and produces a .msi
file but Windows Installer throws "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package" when I try to open it.