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

Missing msys-2.dll dependency for bash.exe used by postinst.cmd #27

Open
elementgreen opened this issue Dec 27, 2020 · 1 comment
Open

Comments

@elementgreen
Copy link

I'm packaging a GTK based application using Styrene. This has worked in the past, but with latest MSYS2 I'm seeing an issue with the resulting Styrene installer. It seems the included bash.exe has an msys-2.dll dependency. This results in a popup dialog error with the message:
The code execution cannot proceed because msys-2.0.dll was not found. Reinstalling the program may fix this problem.

If I run the final executable in mingw64/bin it runs fine. So the issue is with the bash.exe included for executing the postinst.cmd script.

Any ideas on how to resolve this issue would be appreciated. I found some mentions that building executables using the MSYS2 shell vs the MINGW shell can lead to this dependency. In particular these two different environments use different gcc compilers. Maybe Styrene is building with the wrong one when building these support executables? I'm also not really sure why this post install script is really even needed to be honest, but I still lack understanding of what it does.

@emgstabilis
Copy link

One workaround is to add msys2-runtime in the list of packages to install:

packages =
         (...)
        msys2-runtime

Then, optionally you can also delete the executables and libraries that you don't need in order to keep only bash, cygpath, and the msys-2.0.dll

delete =
       usr/bin/*.exe
       usr/bin/*.dll
nodelete =
         usr/bin/bash.exe
         usr/bin/cygpath.exe
         usr/bin/msys-2.0.dll

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

2 participants