-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
CPack: Refactor AppImage and Apple DMG Generation #7252
base: master
Are you sure you want to change the base?
Conversation
I was able to get the CPack DMG generator to work with Edit: For simplicity, I've checked in the |
Hmm... the AppImage is missing... investigating... |
The AppImage is missing because the CPack feature for running custom scripts through variable |
Perhaps I have a hint for this: I use Ubuntu 20.04 that comes with cmake version 3.16 BUT Qt (5.15.2 installed from Qt site) comes with cmake 3.27 in its tools directory. This is the one I use. |
Thanks! Any recommendation for getting this into a CI (command line?) |
Not sure of what I will suggest below since I build using Qt Creator(so all is set automagically) but there are environment variables related to cmake:
|
FYI, CMake homepage lists the official PPA and pip package as alternative installation methods. |
@tresf I could update the Linux image with a newer CMake using the official PPA if you want. That might be easiest and also won't impact build times |
If parties agree on this CPack strategy, yes please (or from snap). Tested on Ubuntu 20.04: sudo snap install cmake --classic
alias cmake='snap run cmake'
# cmake --version
# cmake version 3.29.3
#
# CMake suite maintained and supported by Kitware (kitware.com/cmake). ... I had reservations about whether or not the snap version of cmake would play nicely... and it seems to work just fine. |
can we use the PPA for mingw ci image too? |
I'll try to do it sometime today
Yes, I think so, though I don't think it will be needed for this PR |
Actually, we can justify it here since bad79a8. |
I've marked this ready for review because I think it's in pretty good shape. (artifacts should start generating once cmake is updated). ARM64.AppImage.mp4 |
- Refactor BashCompletion.cmake - Add initial support for Linux AppImages (untested) - Add debug flags for cpack
endif() | ||
|
||
if(CMAKE_VERSION VERSION_LESS "3.19") | ||
message(WARNING "AppImage creation requires at least CMake 3.19") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, this warning is hardly noticeable. If we can find a way to halt when CPack is invoked, it would be great. Unfortunately the CPack feature that would allow us to catch this scenario -- CPACK_PRE_BUILD_SCRIPTS
-- isn't available (catch-22?), so if we want to guard the users from trying to package with old CMake version, it will require some workaround that's not immediately obvious. For example, if we can detect that our install prefix contains the string _CPack*
, we might be able to throw a FATAL_ERROR
at install time ('install' being a subjective word here, the 'install' code is run prior to CPack, but with a custom prefix); "install" is arguably the wrong place do do it, but the alternative is a misleading and unhelpful "successful" CPack package to the user with a JSON "External" file that's neither helpful nor intuitive.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation added to the Ubuntu wiki: https://github.com/LMMS/lmms/wiki/Dependencies-Ubuntu/_compare/452b36d7a1059bb97ffb5a8ed5614b0108ba00fd...2edcd976398314b3c5d6c3615fc51cedfc903e43
…ngs go south and get unrecoverable with linuxdeploy.
Basic Currently installs to |
Edit: DMGs on ARM64 are fixed, but the background image is missing again, likely due to the |
Yeah, I can't seem to get the background image to work with CMake's DMG generator. I tried to copy the I'll have to revert the MacDeployQt script back to using appdmg. |
Testing on Discord shows the following error, investigating... - ./lmms-1.3.0.run: /home/ubuntu/lmms2/build/cmake/linux/setup.sh: inaccessible or not found |
Done via ddca4e7. |
Due to unreliability with FUSE (availability, compatibility), I'm changing this PR to always extracting AppImages before running them. Quoting
At a glance, this may be a bit confusing, because the build system will create a symlink with the AppImage name. e.g. |
Features:
make package
WANT_DEBUG_CPACK
flag to easily show detailed console messages about packagingDeveloper options ----------------------------------------- * Debug FP exceptions : Disabled * Debug using AddressSanitizer : Disabled * Debug using ThreadSanitizer : Disabled * Debug using MemorySanitizer : Disabled * Debug using UBSanitizer : Disabled + * Debug packaging commands : Enabled
TGZ
behavior through a hidden flag,WANT_CPACK_TARBALL
. Does anyone use this?CPACK_TOOL
parameter to switch between.AppImage
(default) and.run
(experimental).TODO:
install_apple.sh
script to CMake.It's called
MacDeployQt.cmake
now.package_linux.sh
script to CmakeIt's called
LinuxDeploy.cmake
now.BUGS:
WANT_DEBUG_CPACK
is incorrectly toggled in CI. https://github.com/LMMS/lmms/actions/runs/9131345271/job/25110338288. Closed via 82a3aa6.STRETCH GOALS:
linuxdeployqt
tolinuxdeploy
Examples:
linuxdeployqt
(in favor oflinuxdeploy
)Background:
Click to expand
make install
to be run prior to making packages. This PR is a proposal to remove that by switching toCPack
.make package
now, just like Windows doesCPACK_GENERATOR
ofDragNDrop
Bundle
which will create a DMG without the need for node'sappdmg
package (still requiresmacdeployqt
)CPACK_GENERATOR
of "External", which will use custom CMake commands to replacepackage_linux.sh
(still requireslinuxdeployqt
).