forked from baumgarr/nixnote2
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #171: switch docker build to Ubuntu focal and using system brow…
…ser for OAuth
- Loading branch information
Showing
4 changed files
with
86 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
PROG=nixnote2 | ||
DESKTOP_FILE=appdir/usr/share/applications/${PROG}.desktop | ||
|
||
BUILD_DIR=$(cat _build_dir_.txt) | ||
echo Build dir: ${BUILD_DIR} | ||
|
||
if [ ! -f "$DESKTOP_FILE" ]; then | ||
echo "$DESKTOP_FILE not found!" | ||
exit 1 | ||
fi | ||
|
||
export VERSIONX=$(cat appdir/usr/share/nixnote2/version.txt) | ||
echo Version: ${VERSIONX} | ||
|
||
# First, create appdir with bundled binaries | ||
CMD="linuxdeploy --desktop-file=$DESKTOP_FILE --appdir=appdir --plugin qt" | ||
echo About to run: $CMD | ||
$CMD | ||
|
||
# Then remove nss libs from the AppDir as they are known to cause troubles, see | ||
# https://github.com/probonopd/linuxdeployqt/issues/35 | ||
rm -f appdir/usr/lib/libnss3.so | ||
rm -f appdir/usr/lib/libnssutil3.so | ||
|
||
# Now create the actual appimage | ||
echo "Creating AppImage" | ||
appimagetool -n appdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM ubuntu:focal | ||
|
||
ARG wdir="/opt" | ||
WORKDIR $wdir | ||
|
||
ARG make_core=4 | ||
ENV PATH="${wdir}/linuxdeploy:${wdir}/linuxdeploy-plugin-qt:${wdir}/appimagetool:${PATH}" | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y software-properties-common | ||
RUN add-apt-repository ppa:nixnote/nixnote2-stable -y && apt-get update -qq | ||
RUN apt-get update && apt-get install -y git-core qt5-default build-essential ccache p7zip-full libssl1.1 libcrypt1 libnss3 \ | ||
wget curl make pkg-config \ | ||
qtwebengine5-dev qtwebengine5-dev-tools \ | ||
libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev libcurl4-openssl-dev \ | ||
libpoppler-qt5-dev libqt5webkit5-dev qt5-qmake qttools5-dev-tools libhunspell-dev nixnote2-tidy | ||
|
||
# install linuxdeploy | ||
RUN wget -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" && \ | ||
chmod a+x ./linuxdeploy-x86_64.AppImage && \ | ||
./linuxdeploy-x86_64.AppImage --appimage-extract && \ | ||
mv squashfs-root linuxdeploy && \ | ||
mv linuxdeploy/AppRun linuxdeploy/linuxdeploy | ||
|
||
# install linuxdeploy-plugin-qt | ||
RUN wget -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" && \ | ||
chmod a+x ./linuxdeploy-plugin-qt-x86_64.AppImage && \ | ||
./linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract && \ | ||
mv squashfs-root linuxdeploy-plugin-qt && \ | ||
mv linuxdeploy-plugin-qt/AppRun linuxdeploy-plugin-qt/linuxdeploy-plugin-qt | ||
|
||
# install appimagetool | ||
RUN wget -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" && \ | ||
chmod a+x appimagetool-x86_64.AppImage && \ | ||
./appimagetool-x86_64.AppImage --appimage-extract && \ | ||
mv squashfs-root appimagetool && \ | ||
mv appimagetool/AppRun appimagetool/appimagetool | ||
|
||
RUN cd $wdir && git clone "https://github.com/robert7/nixnote2.git" && cd nixnote2 && git checkout master | ||
|
||
CMD /bin/bash |