Skip to content
Snippets Groups Projects
Commit 71472175 authored by akiraohgaki's avatar akiraohgaki
Browse files

Package build script for Appimage

parent 2ca807e6
No related branches found
No related tags found
No related merge requests found
......@@ -55,12 +55,60 @@ build_arch() {
makepkg -s
}
build_appimage() {
#sudo add-apt-repository ppa:beineri/opt-qt57-xenial
#sudo apt update
#sudo apt install build-essential fuse desktop-file-utils
#sudo apt install qt57base qt57svg qt57quickcontrols qt57quickcontrols2
#curl https://transfer.sh/DHN4B/linuxdeployqt-799f704-x86-64.appimage -o linuxdeployqt.appimage
#sudo install -m 755 -p linuxdeployqt.appimage /usr/local/bin/linuxdeployqt.appimage
#sudo modprobe fuse
#source /opt/qt57/bin/qt57-env.sh
cd $PROJDIR
export VERSION=$(git describe --always)
cd $PARENTDIR
tar -czvf $TMPDIR/$PROJNAME.tar.gz --exclude ".git" $PROJNAME
mkdir $BUILDDIR
mv $TMPDIR/$PROJNAME.tar.gz $BUILDDIR
tar -xzvf $BUILDDIR/$PROJNAME.tar.gz -C $BUILDDIR
cd $BUILDDIR/$PROJNAME
/opt/qt57/bin/qmake
make
strip xdgurl
cd $BUILDDIR
mkdir -p $BUILDDIR/xdgurl.AppDir/usr/bin
install -m 755 -p $BUILDDIR/$PROJNAME/xdgurl $BUILDDIR/xdgurl.AppDir/xdgurl
install -m 644 -p $BUILDDIR/$PROJNAME/src/desktop/xdgurl.desktop $BUILDDIR/xdgurl.AppDir/xdgurl.desktop
install -m 644 -p $BUILDDIR/$PROJNAME/src/desktop/xdgurl.svg $BUILDDIR/xdgurl.AppDir/xdgurl.svg
install -m 755 -p /usr/bin/update-desktop-database $BUILDDIR/xdgurl.AppDir/usr/bin/update-desktop-database
install -m 755 -p /usr/bin/desktop-file-validate $BUILDDIR/xdgurl.AppDir/usr/bin/desktop-file-validate
install -m 755 -p /usr/bin/desktop-file-install $BUILDDIR/xdgurl.AppDir/usr/bin/desktop-file-install
linuxdeployqt.appimage $BUILDDIR/xdgurl.AppDir/xdgurl -qmldir=$BUILDDIR/$PROJNAME/src/app/qml -verbose=2 -bundle-non-qt-libs # https://github.com/probonopd/linuxdeployqt/issues/25
linuxdeployqt.appimage $BUILDDIR/xdgurl.AppDir/xdgurl -qmldir=$BUILDDIR/$PROJNAME/src/app/qml -verbose=2 -bundle-non-qt-libs # twice because of #25
rm $BUILDDIR/xdgurl.AppDir/AppRun
install -m 755 -p $BUILDDIR/$PROJNAME/src/desktop/appimage-desktopintegration $BUILDDIR/xdgurl.AppDir/AppRun
linuxdeployqt.appimage --appimage-extract
./squashfs-root/usr/bin/appimagetool $BUILDDIR/xdgurl.AppDir
}
if [ $1 ] && [ $1 = 'ubuntu' ]; then
build_ubuntu
elif [ $1 ] && [ $1 = 'fedora' ]; then
build_fedora
elif [ $1 ] && [ $1 = 'arch' ]; then
build_arch
elif [ $1 ] && [ $1 = 'appimage' ]; then
build_appimage
else
echo 'sh build.sh [ubuntu|fedora|arch]'
echo 'sh build.sh [ubuntu|fedora|arch|appimage]'
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment