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

Added AppImage support. #280

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,34 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get -y install gdb libgdal-dev libproj-dev qt6-base-dev qt6-base-dev-tools qt6-tools-dev build-essential libgl1-mesa-dev cmake git libexiv2-dev libqt6svg* libqt6core5compat* qt6-l10n-tools qt6-tools-dev-tools

- name: Build
run: |
./ci/travis-linux-script.sh

linux-appimage:
runs-on: ubuntu-22.04
name: Linux / AppImage
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get -y install gdb libgdal-dev libproj-dev qt6-base-dev qt6-base-dev-tools qt6-tools-dev build-essential libgl1-mesa-dev cmake git libexiv2-dev libqt6svg* libqt6core5compat* qt6-l10n-tools qt6-tools-dev-tools
sudo apt-get -y install python3-pip libglib2.0-dev bash dash squashfs-tools zsync fakeroot
sudo pip install git+https://github.com/AppImageCrafters/appimage-builder.git
- name: Build
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DEXTRA_TESTS=OFF
make -j3
make DESTDIR=AppDir install
appimage-builder --skip-tests
- name: Upload artifacts
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
if: contains('refs/heads/master refs/heads/gh-actions refs/heads/appimage', github.ref) || startsWith(github.ref, 'refs/tags/')
run: |
pip3 install cloudsmith-cli
./build/upload-artifacts.sh
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
# Prepare deployment script
##############################################
configure_file("${PROJECT_SOURCE_DIR}/cmake/upload-artifacts.sh.in" "${PROJECT_BINARY_DIR}/upload-artifacts.sh" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/cmake/AppImageBuilder.yml.in" "${PROJECT_BINARY_DIR}/AppImageBuilder.yml" @ONLY)

##############################################
# Mac OS X specific deploy scripts
Expand Down
52 changes: 52 additions & 0 deletions cmake/AppImageBuilder.yml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 1

AppDir:
path: ./AppDir

app_info:
id: be.merkaartor
name: merkaartor
icon: merkaartor
version: @VCS_DESCRIBE@
exec: usr/local/bin/merkaartor

apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'

include:
- libgdal30
- libproj22
- libexiv2-dev
- libqt6network6
- libqt6xml6
- libqt6concurrent6
- libqt6printsupport6
- libqt6widgets6
- libqt6gui6
- libqt6core6
- libqt6dbus6
- libqt6svg6
- libqt6core5compat6
- qt6-qpa-plugins

files:
exclude:
- usr/lib/x86_64-linux-gnu/gconv
- usr/share/man
- usr/share/doc
- usr/**/*.a
- usr/**/perl
- usr/include
- usr/lib/llvm-*
- usr/lib/x86_64-linux-gnu/libLLVM*
runtime:
env:
APPDIR_LIBRARY_PATH: $APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib

AppImage:
update-information: None
sign-key: None
arch: x86_64
2 changes: 1 addition & 1 deletion cmake/upload-artifacts.sh.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

EXIT_CODE=0
for file in build/merkaartor-*.{dmg,zip,exe}; do
for file in build/merkaartor-*.{dmg,zip,exe,AppImage}; do
# The glob may expand to non-existing file if one of the suffixes don't exist. Ignore those and only upload existing artifacts.
if [ -e "$file" ]; then
cloudsmith push raw --version "@VCS_DESCRIBE@" merkaartor/merkaartor-nightly "$file"
Expand Down