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

Getting Windows cross-compilation to work on my Mac #1630

Merged
merged 11 commits into from
Feb 23, 2025

Conversation

rpspringuel
Copy link
Contributor

I don't know if this would solve #1289 on Linux machines, but at least on my Mac I can now build a windows executable and installer with this.

If someone with a native Linux machine could look at this and see if the same kind of thing would work on Linux hosts, I'd appreciate it. I'm still trying to sort out some issues with my Ubuntu VMs.

I don't know if this would solve gregorio-project#1289 on Linux machines, but at least on my Mac I can now build a windows executable and installer with this.
@rpspringuel rpspringuel marked this pull request as draft February 18, 2025 00:39
InnoSetup was issuing some warnings about deprecated/obsolete variables.  This clears that all up by changing things to their current versions.
Still getting a warning about making use of userdesktop.  Need to do more research do figure out the fix.
@eschwab
Copy link
Contributor

eschwab commented Feb 19, 2025

Building on native Linux, with some tweaks I might have a working gregorio executable. Just need to test it in the Win11 box. Have not tried making the installer.

The files that install-gtex.sh is supposed to install are all specified relative to the root of the repository, so we really should make sure that the working directory for this script is the root of the repository (which is also the location where the script itself is stored).
Incorporates the functionality of create_package.sh into the make system.  This facilitates building distributions by allowing for the final distribution products to share common resources (rather than requiring them to build them for themselves).
Addresses gregorio-project#1413
These files have copyright notices which needed to be added to the update list.
@rpspringuel
Copy link
Contributor Author

@eschwab, once you've made sure the executable works, can you double check the Linux compilation instructions (and either submit the updates, or tell me what needs to be changed and I'll do it)?

I renamed the target in the macosx folder and forgot to do so in the parent folder.
Inno Setup 6 changes the name of the output file, so I've fixed the instructions to reflect the new name.
@rpspringuel
Copy link
Contributor Author

I'm particularly interested if the differ from the Mac instructions significantly. I'm thinking of making a makefile in the Windows folder that builds the installer (like I did with the macosx folder) but that doesn't really make sense if the build process on Mac and Linux are significantly different.

@rpspringuel
Copy link
Contributor Author

Ugh. I'm doing some testing and it seems that there might be a dll linking problem in my build. I keep getting an error about lipssp-0.dll being missing.

@rpspringuel
Copy link
Contributor Author

Okay. So that was a simple fix. There was a -static flag missing.

This was linked to issues Feb 20, 2025
@rpspringuel rpspringuel marked this pull request as ready for review February 21, 2025 14:25
@eschwab
Copy link
Contributor

eschwab commented Feb 21, 2025

Never having used gregorio on windows, is the gregorio-.exe portable? That is can I just plop it on a flash drive and run it via powershell? Or does it need to be installed with the installed built with InnoSetup?

@rpspringuel
Copy link
Contributor Author

It's mostly portable. It needs gregorio-vowels.dat to be in a location that kpse can find to work. That means you need a minimal TeX distribution of some sort installed (so that kpse is available) and have to, at least, bring a copy of gregorio-vowels.dat with you onto the machine. However, a full installation is not necessary. If you put your test executable, gregorio-vowels.dat, and your sample gabc file all in the same directory, you should be able to run the test executable with PowerShell (or the Command Prompt) from that folder.

Be more specific about what using the older version of Inno Setup means in terms of the steps needed to build the installer.
Since the Mac packages can only be built on a Mac, I'm protecting the dist-macosx target so that if one accidentally invokes the target on a non-Mac system, you quickly get an informative error message rather than going through the long process of building the prerequisites only to have the whole thing error out near the end.
This header is obsolete and does nothing but raise a warning at this point.
@eschwab
Copy link
Contributor

eschwab commented Feb 22, 2025

I have had to change a few things in build.sh to compile successfully. It probably is best to make a separate PR for cross-compiling for Win on Linux hosts.

This Mac PR can be merged when ready.

@rpspringuel rpspringuel merged commit ba359fe into gregorio-project:release-6.1 Feb 23, 2025
@rpspringuel rpspringuel deleted the build-system branch February 23, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross compiling on Ubuntu 16+ make macosx
2 participants