-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
\#11: Initial AppImage packaging system
- Loading branch information
Showing
6 changed files
with
90 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,8 @@ | |
FROM ubuntu:bionic | ||
LABEL author="Bumsik Kim <[email protected]>" | ||
|
||
WORKDIR /app | ||
CMD ["/bin/bash"] | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y python3-all python3-pip python3-wheel fakeroot debmake debhelper fakeroot wget tar && \ | ||
apt-get install -y python3-all python3-pip python3-wheel fakeroot debmake debhelper fakeroot wget tar curl && \ | ||
apt-get autoremove -y && \ | ||
ln /usr/bin/python3 /usr/bin/python && \ | ||
ln /usr/bin/pip3 /usr/bin/pip && \ | ||
|
@@ -18,3 +15,15 @@ RUN apt-get update && \ | |
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
bash ~/miniconda.sh -b -p ~/miniconda && \ | ||
rm ~/miniconda.sh | ||
|
||
# AppImageKit | ||
WORKDIR /opt | ||
RUN wget https://github.com/AppImage/AppImageKit/releases/download/10/appimagetool-x86_64.AppImage && \ | ||
chmod a+x appimagetool-x86_64.AppImage && \ | ||
./appimagetool-x86_64.AppImage --appimage-extract && \ | ||
mv squashfs-root appimagetool && \ | ||
rm appimagetool-x86_64.AppImage | ||
ENV PATH=/opt/appimagetool/usr/bin:$PATH | ||
|
||
WORKDIR /app | ||
CMD ["/bin/bash"] |
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,15 @@ | ||
#!/bin/sh | ||
# This script is only for isolated miniconda environment | ||
# Used in AppImage package | ||
SCRIPTDIR=$(dirname $0) | ||
ENV=$SCRIPTDIR/usr/share/virtscreen/env | ||
|
||
echo $SCRIPTDIR | ||
export PYTHONPATH=$ENV/lib/python3.6 | ||
export LD_LIBRARY_PATH=$ENV/lib | ||
export QT_PLUGIN_PATH=$ENV/lib/python3.6/site-packages/PyQt5/Qt/plugins | ||
export QML2_IMPORT_PATH=$ENV/lib/python3.6/site-packages/PyQt5/Qt/qml | ||
# export QT_QPA_FONTDIR=/usr/share/fonts | ||
# export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb | ||
|
||
$ENV/bin/python3 $ENV/bin/virtscreen |
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,32 @@ | ||
#!/bin/bash | ||
|
||
# Directory | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
ROOT=$DIR/../.. | ||
|
||
cd $ROOT/package/appimage | ||
mkdir virtscreen.AppDir | ||
cd virtscreen.AppDir | ||
# Create virtualenv | ||
install -d usr/share/virtscreen | ||
source $HOME/miniconda/bin/activate && \ | ||
conda create -y --copy --prefix usr/share/virtscreen/env python=3.6 | ||
# Install VirtScreen using pip | ||
source $HOME/miniconda/bin/activate && \ | ||
source activate usr/share/virtscreen/env && \ | ||
pip install $ROOT | ||
# Delete unnecessary installed files done by setup.py | ||
rm -rf usr/share/virtscreen/env/lib/python3.6/site-packages/usr | ||
# Copy desktop entry, icon, and AppRun | ||
install -m 644 -D $ROOT/virtscreen.desktop \ | ||
usr/share/applications/virtscreen.desktop | ||
install -m 644 -D $ROOT/virtscreen.desktop \ | ||
. | ||
install -m 644 -D $ROOT/data/virtscreen.png \ | ||
usr/share/pixmaps/virtscreen.png | ||
install -m 644 -D $ROOT/data/virtscreen.png \ | ||
. | ||
install -m 755 -D $ROOT/package/appimage/AppRun \ | ||
. | ||
cd .. | ||
appimagetool virtscreen.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