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

feat: add appimage build #11570

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
69 changes: 66 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,60 @@ jobs:
quarto --paths
quarto --version

make-appimage:
runs-on: ubuntu-latest
needs: [configure]

steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Configure
run: |
./configure.sh

- name: Prepare Distribution
run: |
pushd package/src/
./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} --log-level info
popd

- name: Install necessary packages
run: |
sudo apt-get update
sudo apt-get -y install desktop-file-utils

- name: Build AppImage
env:
TARGET_ARCH: x86_64
VERSION: ${{needs.configure.outputs.version}}
run: |
./package/scripts/linux/appimage/build-appimage.sh

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: AppImage
path: Quarto-${{needs.configure.outputs.version}}-x86_64.AppImage

test-appimage:
runs-on: ubuntu-latest
needs: [configure, make-appimage]
steps:
- uses: actions/download-artifact@v4
with:
name: AppImage
path: .
- run: |
mv Quarto-${{needs.configure.outputs.version}}-x86_64.AppImage quarto
chmod a+x quarto
- run: |
ls -lR
./quarto check
./quarto --paths
./quarto --version

make-installer-win:
runs-on: windows-latest
needs: [configure]
Expand Down Expand Up @@ -488,9 +542,11 @@ jobs:
make-arm64-tarball,
make-tarball,
make-source-tarball,
make-appimage,
test-zip-win,
test-zip-mac,
test-tarball-linux,
test-appimage,
]

steps:
Expand Down Expand Up @@ -525,8 +581,8 @@ jobs:
pushd RHEL\ Zip
sha256sum quarto-${{needs.configure.outputs.version}}-linux-rhel7-amd64.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
popd
fi
fi

pushd Deb\ Zip
sha256sum quarto-${{needs.configure.outputs.version}}-linux-amd64.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
popd
Expand All @@ -541,7 +597,11 @@ jobs:

pushd Deb\ Arm64\ Installer
sha256sum quarto-${{needs.configure.outputs.version}}-linux-arm64.deb >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
popd
popd

pushd AppImage
sha256sum Quarto-${{needs.configure.outputs.version}}-x86_64.AppImage >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
popd

pushd Source
sha256sum quarto-${{needs.configure.outputs.version}}.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
Expand All @@ -567,6 +627,7 @@ jobs:
./RHEL Zip/quarto-${{needs.configure.outputs.version}}-linux-rhel7-amd64.tar.gz
./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
./Deb Arm64 Installer/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
./AppImage/Quarto-${{needs.configure.outputs.version}}-x86_64.AppImage
./Windows Installer/quarto-${{needs.configure.outputs.version}}-win.msi
./Windows Zip/quarto-${{needs.configure.outputs.version}}-win.zip
./Mac Installer/quarto-${{needs.configure.outputs.version}}-macos.pkg
Expand All @@ -587,9 +648,11 @@ jobs:
make-arm64-tarball,
make-tarball,
make-source-tarball,
make-appimage,
test-zip-win,
test-zip-mac,
test-tarball-linux,
test-appimage,
publish-release,
]
runs-on: ubuntu-latest
Expand Down
12 changes: 12 additions & 0 deletions package/scripts/linux/appimage/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
export PATH="${HERE}/usr/bin/:${HERE}/usr/sbin/:${HERE}/usr/games/:${HERE}/bin/:${HERE}/sbin/${PATH:+:$PATH}"
export LD_LIBRARY_PATH="${HERE}/usr/lib/:${HERE}/usr/lib/i386-linux-gnu/:${HERE}/usr/lib/x86_64-linux-gnu/:${HERE}/usr/lib32/:${HERE}/usr/lib64/:${HERE}/lib/:${HERE}/lib/i386-linux-gnu/:${HERE}/lib/x86_64-linux-gnu/:${HERE}/lib32/:${HERE}/lib64/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export PYTHONPATH="${HERE}/usr/share/pyshared/${PYTHONPATH:+:$PYTHONPATH}"
export XDG_DATA_DIRS="${HERE}/usr/share/${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
export PERLLIB="${HERE}/usr/share/perl5/:${HERE}/usr/lib/perl5/${PERLLIB:+:$PERLLIB}"
export GSETTINGS_SCHEMA_DIR="${HERE}/usr/share/glib-2.0/schemas/${GSETTINGS_SCHEMA_DIR:+:$GSETTINGS_SCHEMA_DIR}"
export QT_PLUGIN_PATH="${HERE}/usr/lib/qt4/plugins/:${HERE}/usr/lib/i386-linux-gnu/qt4/plugins/:${HERE}/usr/lib/x86_64-linux-gnu/qt4/plugins/:${HERE}/usr/lib32/qt4/plugins/:${HERE}/usr/lib64/qt4/plugins/:${HERE}/usr/lib/qt5/plugins/:${HERE}/usr/lib/i386-linux-gnu/qt5/plugins/:${HERE}/usr/lib/x86_64-linux-gnu/qt5/plugins/:${HERE}/usr/lib32/qt5/plugins/:${HERE}/usr/lib64/qt5/plugins/${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}"
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)
exec "${EXEC}" "$@"
23 changes: 23 additions & 0 deletions package/scripts/linux/appimage/build-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

OUTPUT_DIR="./AppDir"

# Remove any previous build.
rm -rf $OUTPUT_DIR | true

# Make appdir and copy quarto files.
mkdir $OUTPUT_DIR
cp -T -r ./package/pkg-working/ $OUTPUT_DIR/usr/

# Add icon and desktop file.
cp ./package/scripts/linux/appimage/quarto.svg $OUTPUT_DIR/
cp ./package/scripts/linux/appimage/quarto.desktop $OUTPUT_DIR/

# Add AppRun file
cp ./package/scripts/linux/appimage/AppRun $OUTPUT_DIR/AppRun
chmod a+x $OUTPUT_DIR/AppRun

# Get and run appimagetool
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod a+x ./appimagetool-x86_64.AppImage
ARCH=$TARGET_ARCH ./appimagetool-x86_64.AppImage $OUTPUT_DIR Quarto-${VERSION}-${TARGET_ARCH}.AppImage
7 changes: 7 additions & 0 deletions package/scripts/linux/appimage/quarto.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Quarto
Icon=quarto
Exec=quarto render %u
Terminal=true
Categories=Development;Building;Science;
56 changes: 56 additions & 0 deletions package/scripts/linux/appimage/quarto.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading