-
Notifications
You must be signed in to change notification settings - Fork 181
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
Support for macOS app bundles for GUI apps #2739
Conversation
This can absorb some of the logic around this currently found in https://github.com/MRtrix3/macos-installer/ and/or https://github.com/MRtrix3/mrtrix3/tree/app_bundles
In the current binary installer for macos, we add wrapper scripts in the bin folder that point to the GUI apps (mrview and shview) inside their app bundle folders, e.g. https://github.com/MRtrix3/macos-installer/blob/master/mrview, to ensure seamless operation of mrview and shview from both the macOS command-line and macOS GUI. We probably have to do something similar in CMake or come up with a more elegant solution. |
I have cleaned up the generation of and completed the contents of the plist files by using custom Info.plist template support provided by CMake (this is the only way one can generate plist files for app bundles to liking). What is currently still missing is:
I don't know CMake well enough to do this in the appropriate way... |
Unfortunately, CMake's documentation is rather lacking on this front. For GUI use cases, I always recommend checking Qt's documentation, which is often excellent. For setting the icon, something like this should work:
|
Noticed that while the app bundles work fine in the build directory, they break when installed to the installation directory. Cmake correctly replaces the absolute library paths to relative ones on installation, but appears to apply the exact same logic to both the regular binaries and the ones in a bundle. As a result, in the current form we need to run:
|
clang-tidy review says "All clean, LGTM! 👍" |
OK, so I have had a look at this in more detail. I think it'd be good to move To solve the issue with the |
clang-tidy review says "All clean, LGTM! 👍" |
Currently nothing seems to trigger the creation of the app bundle (at least not on my machine). |
08f0ffe
to
727ad60
Compare
clang-tidy review says "All clean, LGTM! 👍" |
727ad60
to
1eafc83
Compare
clang-tidy review says "All clean, LGTM! 👍" |
It should work now. |
It does! Thanks! A few outstanding things that need to be fixed:
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
What do you mean by this? We don't have any binary tests for those commands. |
Never mind. It was the docs generation that was failing in the CI before when the mrview/shview wrappers were not present, not the binary tests (which are indeed not present). |
One more thing about the CLI-wrappers: they are currently only added in the "installation" phase. Is it possible to already do this in the "build" stage? So that a developer can use the build without installing? |
This must be called prior to the project()
5dc6cec
to
f4bee41
Compare
Done. |
5d22b0d
to
3c804f6
Compare
This can absorb some of the logic around this currently found in https://github.com/MRtrix3/macos-installer/ and/or https://github.com/MRtrix3/mrtrix3/tree/app_bundles