Skip to content

Commit

Permalink
Build properly with C++17 support on Ubuntu bionic
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Aug 16, 2022
1 parent 937fde7 commit 89cc726
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ci/Dockerfile.i386
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ ENTRYPOINT ["/entrypoint.sh"]
ENV APPIMAGE_EXTRACT_AND_RUN=1

ENV DOCKER=1

# this lets us build with proper C++17 support (mostly required so we can use std::filesystem)
# however, this requires linuxdeploy-plugin-checkrt
RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get install -y g++-10
ENV CXX=g++-10
9 changes: 9 additions & 0 deletions ci/Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ ENTRYPOINT ["/entrypoint.sh"]
ENV APPIMAGE_EXTRACT_AND_RUN=1

ENV DOCKER=1

# make sure nlohmann_json can be found
ENV CMAKE_PREFIX_PATH=/usr/lib/cmake

# this lets us build with proper C++17 support (mostly required so we can use std::filesystem)
# however, this requires linuxdeploy-plugin-checkrt
RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get install -y g++-10
ENV CXX=g++-10
10 changes: 8 additions & 2 deletions ci/build-appimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ rm -rf {appimageupdatetool,AppImageUpdate}.AppDir/usr/include


# get linuxdeploy and its qt plugin
checkrt_arch="$ARCH"
if [[ "$checkrt_arch" == "i386" ]]; then
checkrt_arch=i686
fi

wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-"$ARCH".AppImage
wget https://github.com/TheAssassin/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-"$ARCH".AppImage
chmod +x linuxdeploy*.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-"$checkrt_arch".sh
chmod +x linuxdeploy*.AppImage linuxdeploy-plugin-checkrt*.sh

patch_appimage() {
while [[ "$1" != "" ]]; do
Expand All @@ -97,7 +103,7 @@ for app in appimageupdatetool AppImageUpdate; do
export OUTPUT="$app"-"$ARCH".AppImage

# bundle application
./linuxdeploy-"$ARCH".AppImage -v0 --appdir "$app".AppDir --output appimage "${EXTRA_FLAGS[@]}" -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png
./linuxdeploy-"$ARCH".AppImage -v0 --appdir "$app".AppDir --output appimage "${EXTRA_FLAGS[@]}" -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt
done

# move AppImages to old cwd
Expand Down

0 comments on commit 89cc726

Please sign in to comment.