Skip to content

Commit

Permalink
🐛 fix build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Reverier-Xu committed Apr 8, 2024
1 parent 458a6eb commit b6d15bb
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export EXTRA_QT_PLUGINS="svg;"

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

#echo '---- Installation directory content recap (after linuxdeploy):'
Expand Down
92 changes: 92 additions & 0 deletions deploy_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env bash

export APP_NAME="WebSocketReflectorX"
export APP_VERSION=0.2.1
export GIT_VERSION=$(git rev-parse --short HEAD)

echo "> $APP_NAME packager (macOS x86_64) [v$APP_VERSION]"

## CHECKS ######################################################################

if [ "$(id -u)" == "0" ]; then
echo "This script MUST NOT be run as root" 1>&2
exit 1
fi

if [ ${PWD##*/} != $APP_NAME ]; then
echo "This script MUST be run from the $APP_NAME/ directory"
exit 1
fi

## SETTINGS ####################################################################

use_contribs=false
make_install=false
create_package=false
upload_package=false

while [[ $# -gt 0 ]]
do
case $1 in
-c|--contribs)
use_contribs=true
;;
-i|--install)
make_install=true
;;
-p|--package)
create_package=true
;;
-u|--upload)
upload_package=true
;;
*)
echo "> Unknown argument '$1'"
;;
esac
shift # skip argument or value
done

## APP INSTALL #################################################################

if [[ $make_install = true ]] ; then
echo '---- Running make install'
mkdir -p dist
APP_ROOT=dist
install -D ./build/bin/wsrx "${APP_ROOT}/wsrx"
install -D ./build/bin/wsrx-desktop "${APP_ROOT}/wsrx-desktop"

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

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

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

echo '---- Running macdeployqt'
macdeployqt bin/$APP_NAME.app -qmldir=desktop/components -qmldir=desktop/ui -hardened-runtime -timestamp -appstore-compliant

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

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

if [[ $create_package = true ]] ; then
echo '---- Compressing package'
cd bin/
zip -r -y -X ../$APP_NAME-$APP_VERSION-macos.zip $APP_NAME.app
cd ..
fi

## UPLOAD ######################################################################

if [[ $upload_package = true ]] ; then
printf "---- Uploading to transfer.sh"
curl --upload-file $APP_NAME*.zip https://transfer.sh/$APP_NAME.$APP_VERSION-git$GIT_VERSION-macOS.zip
printf "\n"
fi

0 comments on commit b6d15bb

Please sign in to comment.