-
Notifications
You must be signed in to change notification settings - Fork 13
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
RFC: Add a batch file to compile mc with MSYS2 instead on GnuWin32 #42
base: master
Are you sure you want to change the base?
Conversation
GnuWin32 is not actively developed. It doesn't even provide a recent gmake compatible with our makefiles. MSYS2, other the other hand, is actively developed. It is also included with Git for Windows. Only OpenWatcom and Strawberry Perl are supported at this time. Perl included with MSYS2 is not supported.
This PR is mostly to help others build MC for Windows. I'm not sure if it needs to be merged, although it should not cause any harm. This script works around numerous issues that need to be addressed elsewhere in the code. I made sure to add comments to the script. Following is an extended version. It's time to migrate from GnuWin32. It's too old. The latest file on Sourceforge is over 12 years old: https://sourceforge.net/projects/gnuwin32/files/ The link to GnuWin32 in the mcwin32 documentation (https://unxutils.sourceforge.net/) has a broken link to https://unxutils.sourceforge.net/UnxUtils.zip - not reassuring. The version of GNU make in GnuWin32 doesn't support the else-if directive used in the mcwin32 makefiles. A newer GNU make is provided under MSYS2 is a better alternative. It is also part of Git for Windows. Unfortunately, it has a problematic Ideally, we should be using the version of Perl that comes with MSYS2, but it's not working due to its path conversions. It can be supported in the future. ActiveState Perl is too greedy and annoying, which leaves Strawberry Perl as the best option at this time. It's a bad idea to use (and potentially package!) a random Busybox binary in PATH when one exists under version control. Likewise, GNU Make from the version control would be used for predictable results. MSYS2 doesn't ship GNU make. There is one in Strawberry Perl, but it doesn't feel right to use it. The MSYS2 executables need to be in PATH. Using the The build fails without the I added the GNU make invocation at the end, so it's not just a "config" script, it's a "config and build" script. The reason is to ensure that the correct GNU make binary is run. |
Understand issue with win/unix style tools, dealing with similar for years; there is never a clean solution |
Good to know. I wish I looked there earlier. Still, it would be good to have scripts for users wishing to compile mc locally, with support for incremental builds and more environment variability. |
@adamyg: Any news about this PR? |
@adamyg: It will be nice to merge? |
Unsure about the host specific abs paths, yet wont deny there are similar within some other support scripts. Slowly cleaning up scripts, removing installation assumptions and documenting build methods/requirements via an INSTALL doc using CI integrations as working examples. https://github.com/adamyg/mcwin32/blob/master/.github/workflows/build.yml. Could add as an example. |
GnuWin32 is not actively developed. It doesn't even provide a recent gmake compatible with our makefiles.
MSYS2, other the other hand, is actively developed. It is also included with Git for Windows.
Only OpenWatcom and Strawberry Perl are supported at this time. Perl included with MSYS2 is not supported.