Skip to content

Conversation

@tresf
Copy link
Member

@tresf tresf commented May 12, 2024

Features:

  • Simplifies Mac and Linux packaging command to simply: make package
    - make install && make appimage
    - make install && make dmg
    + make package
    # -- AppImage create: /__w/lmms/lmms/build/lmms-1.3.0-alpha.1.638+pr7252.gaaa9b4816-linux-x86_64.AppImage
  • Adds new WANT_DEBUG_CPACK flag to easily show detailed console messages about packaging
    cmake .. -DWANT_DEBUG_CPACK=true
      Developer 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
    • Preserves old CPack TGZ behavior through a hidden flag, WANT_CPACK_TARBALL. Does anyone use this?
  • Adds new CPACK_TOOL parameter to switch between .AppImage (default) and .run (experimental)
    export CPACK_TOOL=makeself
    make package
    # -- Installer create: /__w/lmms/lmms/build/lmms-1.3.0-alpha.1.638+pr7252.gaaa9b4816-linux-x86_64.run
  • Packaging now requires CMake 3.19+

TODO:

  • Fix Carla compilation errors in certain environments (TBD)
  • TripleOscillator does not show waveforms folder when the + button is pressed
  • Mallets rawwaves is missing
  • Refactor bash-complete per review
  • Test VST support
  • Fix Zyn on mac
  • Fix Carla crashing
  • Investigate possibly using the provided Mac DMG generators.
    • Port the install_apple.sh script to CMake.
      It's called MacDeployQt.cmake now.
  • Investigate possibility using CPack for creating Linux AppImages
    • Port the package_linux.sh script to Cmake
      It's called LinuxDeploy.cmake now.
  • Upgrade CMake for Linux runners

BUGS:

STRETCH GOALS:

Background:

Click to expand
  • The AppImage and Apple DMG installers historically (confusingly) require make install to be run prior to making packages. This PR is a proposal to remove that by switching to CPack.
    • Utilizes make package now, just like Windows does
    • Mac utilizes CPACK_GENERATOR of DragNDrop Bundle which will create a DMG without the need for node's appdmg package (still requires macdeployqt)
    • Linux will utilize CPACK_GENERATOR of "External", which will use custom CMake commands to replace package_linux.sh (still requires linuxdeployqt).

@tresf

This comment was marked as outdated.

@tresf tresf changed the title CPack: Proof of concept for making Apple installers CPack: Refactor AppImage and Apple DMG Generation May 14, 2024
@tresf

This comment was marked as outdated.

@tresf

This comment was marked as outdated.

@midi-pascal

This comment was marked as outdated.

@tresf

This comment was marked as outdated.

@midi-pascal

This comment was marked as outdated.

@PhysSong
Copy link
Member

FYI, CMake homepage lists the official PPA and pip package as alternative installation methods.

@messmerd
Copy link
Member

@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

@tresf

This comment was marked as outdated.

@tresf

This comment was marked as outdated.

@Rossmaxx
Copy link
Contributor

can we use the PPA for mingw ci image too?

@messmerd
Copy link
Member

messmerd commented May 15, 2024

yeah, I'll take that offer. 🤣

I'll try to do it sometime today

can we use the PPA for mingw ci image too?

Yes, I think so, though I don't think it will be needed for this PR

@tresf
Copy link
Member Author

tresf commented May 15, 2024

Yes, I think so, though I don't think it will be needed for this PR

Actually, we can justify it here since bad79a8.

@tresf tresf marked this pull request as ready for review May 16, 2024 04:40
@tresf
Copy link
Member Author

tresf commented May 16, 2024

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

@tresf tresf mentioned this pull request May 16, 2024
@tresf
Copy link
Member Author

tresf commented Jan 30, 2025

I just tried it again on Linux Mint 22 with the latest commit, and the icon does not show up.

Yeah same. I noticed that linuxdeploy creates an icon folder for 256x256 but we don't provide these icons, so I've added them in a 1x to see if behavior changes.

Edit: Still doesn't work. 😢

@tresf
Copy link
Member Author

tresf commented Jan 31, 2025

I've reverted all trial-and-error attempts at fixing the AppImage icons generated from CI.

  • AppImages generated directly in Linux Mint 22 show the icon
  • AppImages downloaded from CI don't show the icon

One difference I noticed is that the GitHub runners have SELinux enabled, so I may experiment with that next, but I'm running out of steam on fixing this issue.

@tresf
Copy link
Member Author

tresf commented Jan 31, 2025

I've reverted all trial-and-error attempts at fixing the AppImage icons generated from CI.

  • AppImages generated directly in Linux Mint 22 show the icon
  • AppImages downloaded from CI don't show the icon

I've decided to reach out to the Linux Mint community to see if they can shed some light on where to look next. https://forums.linuxmint.com/viewtopic.php?t=439346.

@tresf
Copy link
Member Author

tresf commented Jan 31, 2025

By shimming a custom script into /usr/share/thumbnailers/xapp-appimage-thumbnailer.thumbnailer I can get some more information about how Mint's Nemo calls its thumbnailing service...

[Thumbnailer Entry]
TryExec=xapp-appimage-thumbnailer
# Exec=xapp-appimage-thumbnailer -i %i -o %o -s %s
Exec=script -qc 'echo "xapp-appimage-thumbnailer -i %i -o %o -s %s"' /tmp/thumbnailer
MimeType=application/vnd.appimage;
touch /tmp/thumbnailer && tail -f /tmp/thumbnailer

Which shows something like this:

xapp-appimage-thumbnailer -i /home/owner/Downloads/lmms-1.2.2-linux-x86_64.AppImage
                          -o /tmp/.gnome_desktop_thumbnail.6Z6Q02
                          -s 256

I can reliably get an error for some of our AppImages, I'm not sure how I missed this before:

- xapp-thumbnails PIL load error:  cannot identify image file '/dev/shm/tmpnhjrczzb/out/.DirIcon'

In lieu of this new information, I'm doing the following via 8e7f554:

  • Reverting to PNG to avoid double-symlink and/or SVG related errors
  • Reverting our icon to 256x256 as Nemo prefers

However, this isn't conclusive. When testing the above thumbnail shim, I've noticed for AppImages that have a clock/hourglass icon, the thumbnailer never gets called. This leads me to believe that a Nemo background service is hanging before the thumbnail service starts. This is further supported by the following statement from @messmerd on Discord:

@tresf I wonder if there's an issue with Linux Mint? I'm pretty sure half of these icons weren't showing up yesterday:
image

Will continue testing once the CI is done building.

@messmerd
Copy link
Member

With the latest commit, the icon appears to be stuck in some loading state:
image

@tresf
Copy link
Member Author

tresf commented Jan 31, 2025

I found a workaround:

touch ~/Downloads/*.AppImage
Click to show video...
MIDAS_TOUCH_QBERT_SWEAR_WORDS.mov

@tresf
Copy link
Member Author

tresf commented Jan 31, 2025

Bug filed upstream linuxmint/nemo#3522

Copy link
Member

@messmerd messmerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. No issues discovered during testing except the aforementioned VST issue with the AppImage CI builds.

@tresf tresf merged commit 10bdf12 into LMMS:master Feb 1, 2025
9 of 10 checks passed
@tresf tresf deleted the cpack branch February 1, 2025 09:02
@Rudxain
Copy link

Rudxain commented Feb 2, 2025

Props to everyone who worked on this! I can see the thumbnail issue was very frustrating

tresf added a commit that referenced this pull request Feb 3, 2025
* SharedMemory: Make key optional, shorter on macOS
* Add getters for shared memory size
* macOS: Fix linking regression for RemoteZynAddSubFx introduced with #7252 

---------

Co-authored-by: Dalton Messmer <[email protected]>
sakertooth pushed a commit to sakertooth/lmms that referenced this pull request Feb 17, 2025
* CPack: Refactor AppImage and Apple DMG Generation
* Switch from linuxdeployqt to linuxdelpoy
* Add ARM64 AppImage support
* Add support for `.run` installers using `makeself`, an alternative to AppImage
* Refactor BashCompletion.cmake
* Enable CPack debugging via `WANT_DEBUG_CPACK`
* Add `download_binary`, `create_symlink` macros
* Qt6: Fix @rpath bug on macOS
* Detect and bundle LV2 UI Suil modules (Related LMMS#7201)
* Allow remote plugins to honor `LMMS_PLUGIN_DIR`
* Add .github/workflows/deps-ubuntu-24.04-gcc.txt
* Fix waveforms FileDialog

Co-authored-by: Dalton Messmer <[email protected]>
sakertooth pushed a commit to sakertooth/lmms that referenced this pull request Feb 17, 2025
…S#7681)

* SharedMemory: Make key optional, shorter on macOS
* Add getters for shared memory size
* macOS: Fix linking regression for RemoteZynAddSubFx introduced with LMMS#7252 

---------

Co-authored-by: Dalton Messmer <[email protected]>
Rossmaxx pushed a commit to Rossmaxx/lmms that referenced this pull request Mar 1, 2025
…S#7681)

* SharedMemory: Make key optional, shorter on macOS
* Add getters for shared memory size
* macOS: Fix linking regression for RemoteZynAddSubFx introduced with LMMS#7252 

---------

Co-authored-by: Dalton Messmer <[email protected]>
@tresf tresf mentioned this pull request Sep 4, 2025
13 tasks
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

Successfully merging this pull request may close these issues.

Request: ARM64 version for Raspberry Pi OS

7 participants