Skip to content
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

[Windows] Error msi bundle #77

Open
mrdev023 opened this issue Jul 17, 2019 · 19 comments
Open

[Windows] Error msi bundle #77

mrdev023 opened this issue Jul 17, 2019 · 19 comments

Comments

@mrdev023
Copy link

mrdev023 commented Jul 17, 2019

I get this error

error: Failed to collect resource file information
  Caused by: Le fichier spécifié est introuvable. (os error 2)
jojobyte added a commit to jojobyte/cargo-bundle that referenced this issue Jul 25, 2019
@jojobyte
Copy link

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.

@slonopotamus
Copy link
Contributor

As a workaround, you may try using cargo-wix instead.

@lobis
Copy link

lobis commented Aug 11, 2022

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!

@mdsteele
Copy link
Collaborator

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!

@aerkiaga
Copy link
Contributor

aerkiaga commented May 26, 2023

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.

@JessicaTegner
Copy link

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

@mdsteele
Copy link
Collaborator

@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.

@landonwork
Copy link

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.

@aerkiaga
Copy link
Contributor

aerkiaga commented Jul 3, 2023

@landonwork I got basic msi working with #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!

@ihsan6133
Copy link

Any way to fix it? I get the same error now

@Plycedes
Copy link

I get the same error. Is it solved yet??

@mdsteele
Copy link
Collaborator

To clarify, are you having issues with cargo-bundle as built at HEAD, or using the version published on crates.io?

@Alexangelj
Copy link

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

@jakobhansson
Copy link

Same problem here, with cargo-bundle 0.6.0

@aerkiaga
Copy link
Contributor

@ihsan6133 @Plycedes @Alexangelj @jakobhansson are you passing --format msi? Like this:

cargo bundle --target x86_64-pc-windows-gnu --format msi

@jakobhansson
Copy link

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?

@aerkiaga
Copy link
Contributor

@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).

@jakobhansson
Copy link

jakobhansson commented Feb 20, 2024

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..."

@aardhyn
Copy link

aardhyn commented Mar 12, 2024

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.

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

No branches or pull requests