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

Bundle appimagetool properly #545

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAVIS_BUILD_NUMBER: ${{ github.run_number }}
VERSION: continuous
APPIMAGE_EXTRACT_AND_RUN: 1
steps:
- name: Configure build machine
run: |
Expand Down
8 changes: 6 additions & 2 deletions tests/tests-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ make -j$(nproc)
set -e

mkdir -p linuxdeployqt.AppDir/usr/{bin,lib}
cp /usr/bin/{patchelf,desktop-file-validate} /usr/local/bin/{appimagetool,zsyncmake} linuxdeployqt.AppDir/usr/bin/
cp /usr/bin/{patchelf,desktop-file-validate} linuxdeployqt.AppDir/usr/bin/
cp ./bin/linuxdeployqt linuxdeployqt.AppDir/usr/bin/
cp -r /usr/local/lib/appimagekit linuxdeployqt.AppDir/usr/lib/
cp -R /tmp/appimagekit.AppDir linuxdeployqt.AppDir/usr/appimagekit
Copy link
Owner

Choose a reason for hiding this comment

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

Where is /tmp/appimagekit.AppDir supposed to be coming from? I can't seem to see that being created...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Check the other script.

pushd linuxdeployqt.AppDir/usr/bin
ln -s ../appimagekit/AppRun appimagetool
popd
chmod +x linuxdeployqt.AppDir/AppRun
find linuxdeployqt.AppDir/
if [ -z "$VERSION" ] ; then export VERSION=continuous ; fi
Expand Down Expand Up @@ -52,6 +55,7 @@ ulimit -a -H
set +e

# print version number (need to extract the AppImage because we are running in a container, see https://github.com/AppImage/AppImageKit/wiki/FUSE#docker)
export LD_LIBRARY_PATH=/tmp/appimagekit.AppDir/usr/lib
./linuxdeployqt-*-x86_64.AppImage --appimage-extract-and-run --version

# TODO: reactivate tests
Expand Down
11 changes: 5 additions & 6 deletions tests/tests-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ sudo dpkg -i patchelf_0.8-2_amd64.deb
# make -j$(nproc)
# sudo make install

cd /tmp/
pushd /tmp/
Copy link
Owner

Choose a reason for hiding this comment

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

Is there any advantage of pushd over cd? I like cd better because everyone understands it. Am I missing something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It handles recursion properly, - is unreliable. It's well understood by regular shell users, too.

# wget -c https://artifacts.assassinate-you.net/artifactory/AppImageKit/travis-2052/appimagetool-x86_64.AppImage # branch last-good, https://travis-ci.org/AppImage/AppImageKit/jobs/507462541
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool*AppImage
./appimagetool*AppImage --appimage-extract
sudo cp squashfs-root/usr/bin/* /usr/local/bin/
sudo cp -r squashfs-root/usr/lib/appimagekit /usr/local/lib/
sudo chmod +rx /usr/local/lib/appimagekit
cd -
mv squashfs-root/ appimagekit.AppDir/
sudo ln -s "$(readlink -f appimagekit.AppDir/AppRun)" /usr/bin/appimagetool
popd

sudo apt-get -y install qt59base qt59declarative qt59webengine binutils xpra zsync desktop-file-utils gcc g++ make libgl1-mesa-dev fuse psmisc qt59translations
sudo apt-get -y install qt59base qt59declarative qt59webengine binutils xpra zsync desktop-file-utils gcc g++ make libgl1-mesa-dev psmisc qt59translations