Skip to content

Commit

Permalink
Packaging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Sep 29, 2023
1 parent 9cc43cf commit 40bc9c3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
30 changes: 19 additions & 11 deletions deploy_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,27 @@ done

if [[ $make_install = true ]] ; then
echo '---- Running make install'
make INSTALL_ROOT=appdir/ install
make INSTALL_ROOT=bin/ install

#echo '---- Installation directory content recap:'
#find appdir/
#echo '---- Installation directory content recap (after make install):'
#find bin/

cp -r bin appdir
mv bin $APP_NAME
fi

## DEPLOY ######################################################################

unset LD_LIBRARY_PATH; #unset QT_PLUGIN_PATH; #unset QTDIR;

if [[ $use_contribs = true ]] ; then
export LD_LIBRARY_PATH=$(pwd)/contribs/src/env/linux_x86_64/usr/lib/:/usr/lib
else
export LD_LIBRARY_PATH=/usr/lib/
fi

echo '---- Prepare linuxdeploy + plugins'

unset LD_LIBRARY_PATH; #unset QT_PLUGIN_PATH; #unset QTDIR;

USRDIR=/usr;
if [ -d appdir/usr/local ]; then
USRDIR=/usr/local
Expand All @@ -74,7 +80,6 @@ if [ -z "$QTDIR" ]; then
QTDIR=/usr/lib/qt
fi

echo '---- Downloading linuxdeploy + plugins'
if [ ! -x contribs/deploy/linuxdeploy-x86_64.AppImage ]; then
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -P contribs/deploy/
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage" -P contribs/deploy/
Expand All @@ -88,23 +93,26 @@ chmod a+x contribs/deploy/linuxdeploy-plugin-qt-x86_64.AppImage
export QML_SOURCES_PATHS="$(pwd)/qml/"
export EXTRA_QT_PLUGINS="svg;"

#echo '---- Installation directory content recap:'
#find appdir/

## PACKAGE (AppImage) ##########################################################

if [[ $create_package = true ]] ; then
echo '---- Running AppImage packager'
./contribs/deploy/linuxdeploy-x86_64.AppImage --appdir appdir --plugin qt --output appimage
mv $APP_NAME-x86_64.AppImage $APP_NAME-$APP_VERSION-linux64.AppImage

#echo '---- Installation directory content recap (after linuxdeploy):'
#find appdir/
fi

## PACKAGE (archive) ###########################################################

if [[ $create_package = true ]] ; then
echo '---- Faking package'
cp -r appdir/lib/* $APP_NAME/
cp -r appdir/plugins $APP_NAME/
cp -r appdir/qml $APP_NAME/
echo '---- Compressing package'
mv appdir/ toolBLEx/
tar zcvf $APP_NAME-$APP_VERSION-linux64.tar.gz toolBLEx/
tar zcvf $APP_NAME-$APP_VERSION-linux64.tar.gz $APP_NAME/
fi

## UPLOAD ######################################################################
Expand Down
4 changes: 2 additions & 2 deletions deploy_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if [[ $make_install = true ]] ; then
echo '---- Running make install'
make INSTALL_ROOT=bin/ install

#echo '---- Installation directory content recap:'
#echo '---- Installation directory content recap (after make install):'
#find bin/
fi

Expand All @@ -68,7 +68,7 @@ fi
echo '---- Running macdeployqt'
macdeployqt bin/$APP_NAME.app -qmldir=qml/ -hardened-runtime -timestamp -appstore-compliant

#echo '---- Installation directory content recap:'
#echo '---- Installation directory content recap (after macdeployqt):'
#find bin/

## PACKAGE (zip) ###############################################################
Expand Down
10 changes: 5 additions & 5 deletions deploy_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if [[ $make_install = true ]] ; then
echo '---- Running make install'
make INSTALL_ROOT=bin/ install

#echo '---- Installation directory content recap:'
#echo '---- Installation directory content recap (after make install):'
#find bin/
fi

Expand All @@ -57,23 +57,23 @@ fi
echo '---- Running windeployqt'
windeployqt bin/ --qmldir qml/

#echo '---- Installation directory content recap:'
#echo '---- Installation directory content recap (after windeployqt):'
#find bin/

mv bin $APP_NAME-$APP_VERSION-win64
mv bin $APP_NAME

## PACKAGE (zip) ###############################################################

if [[ $create_package = true ]] ; then
echo '---- Compressing package'
7z a $APP_NAME-$APP_VERSION-win64.zip $APP_NAME-$APP_VERSION-win64
7z a $APP_NAME-$APP_VERSION-win64.zip $APP_NAME
fi

## PACKAGE (NSIS) ##############################################################

if [[ $create_package = true ]] ; then
echo '---- Creating installer'
mv $APP_NAME-$APP_VERSION-win64 assets/windows/$APP_NAME
mv $APP_NAME assets/windows/$APP_NAME
makensis assets/windows/setup.nsi
mv assets/windows/*.exe $APP_NAME-$APP_VERSION-win64.exe
fi
Expand Down

0 comments on commit 40bc9c3

Please sign in to comment.