Closed ghost closed 1 year ago
For the record, unofficial AppImage's published here:
But I ask for setup Travis-CI & Github for producing official AppImage's as @probonopd recommend already.
Given this https://github.com/milkytracker/MilkyTracker/blob/master/.travis.yml it should be rather straightforward to produce AppImages from the Travis CI builds like in the examples on https://github.com/probonopd/linuxdeployqt.
lets do it
Let me know if you are running into any issues or get stuck, I'm happy to help.
Any news?
I am happy to help if someone from the project is working on this and is running into issues.
Perhaps someone could submit a pull request for this?
I'm familiar at least at a basic level with using AppImage with packaging Love2D & also just built a AppImage for Milky 0.90.85 . I'm going to try building from source but I'm not to familiar with travis... or good with CMake. For example I dont understand how the "script" portion of the example yaml for linuxdeployqt
Seems to be mixed up because there are Linux commands in the os: osx
section and there is -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
in the os: linux
section. Shouldn't it be the other way around?
What does script: &cmake_build
mean?
For example I dont understand how the "script" portion of the example yaml for linuxdeployqt
Let me annotate it:
script:
# Configure the application in the release configuration with the prefix /usr (as for any Qt based application), has nothing to do with AppImage specifically
- qmake CONFIG+=release PREFIX=/usr
# Compile the application, has nothing to do with AppImage specifically
- make -j$(nproc)
# Install the application, but inside an appdir/ directory (rather than in / as you would normally do)
- make INSTALL_ROOT=appdir -j$(nproc) install ; find
# Download the linuxdeployqt tool which will transform the contents of the appdir/ directory into an AppImage
- wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
# Make it executable
- chmod a+x linuxdeployqt-continuous-x86_64.AppImage
# Unset variables that were set earlier, so that linuxdeployqt can work correctly
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
# Export the VERSION environment variable so that the linuxdeployqt tool knows the version of the application to be put into the AppImage
- export VERSION=$(git rev-parse --short HEAD) # linuxdeployqt uses this for naming the file
# Run linuxdeployqt so that it copies dependencies into the appdir/ directory; tell it (by pointing to the desktop file) which application is the main application inside the appdir/; also tell it to not just bundle Qt but other libraries, too
- ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
# Run linuxdeployqt again and tell it to convert the appdir/ directory to an AppImage file
- ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
Does this make it clear? If not, which portions are unclear?
@probonopd Thank you for going into such detail for me. I am not a travis CI / CMake user so I'll have to do a bit more research & get a little familiar with MT specific stuff. Hopefully I can get it working over the weekend. Does anyone know if Travis CI works on forks? @Symbian9 are you familiar with it enough so we can work on this together?
Yes, it works on forks just as normal.
I'm getting a lot closer. I still need to clean up the osx script that I messed up but here's the current yaml . This is the latest TCI but the last command fails:
./linuxdeployqt-continuous-x86_64.AppImage *.desktop -appimage
Looking at the output it seems like linuxdeployqt is pulling the binary from Cpack instead of the binary I copied... should I need to copy the files into a new directory?
I have it decently working but what's the best way to integrate this? I dont think it should stay in the yaml as it's quite a bit for just one build esp if others wanted to add in snaps, flatpak, etc.
I think it's good to have it in .travis.yml
- does it produce a working AppImage?
@Deltafire What are your thoughts? Should I have AppImage generation in it's own script & just put minimal lines into the yaml? What would have to stay is linuxdeployqt ppa info, the script, & adding Appimage into releases.
I think it should be in .travis.yaml, perhaps with a comment to specify which build steps are specific to appimage.
ps. I've created a more or less working milkytracker AppImage (though using appveyor.yml
since I didn't know about this thread).
AppImage is now created automatically since v1.04 🎉
Providing an AppImage would have, among others, these advantages:
Here is an overview of some projects that are already distributing upstream-provided, official AppImages.
https://github.com/probonopd/linuxdeployqt has lots of real-world examples on how to do this. Let @probonopd know if something is not clear or you need some help.
https://github.com/probonopd/uploadtool script will help you setup Travis-CI for uploading built AppImage's automatically back to Github repo in "Releases" section.
If you have questions, AppImage developers are on #AppImage on irc.freenode.net
Ask @probonopd for help you on Github ;-)