Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cellframe/prod_build_cellframe-dashboard
1 result
Show changes
Showing
with 0 additions and 27509 deletions
#!/bin/bash
INSTALLER_USER=$(stat -f '%Su' $HOME)
[ -n "${USER}" ] && USER=${INSTALLER_USER}
LOG_FILE=/tmp/uninstall.log
APP_NAME=Cellframe-Dashboard
SERVICE=com.demlabs."$APP_NAME"Service
NODE=com.demlabs.cellframe-node
# Close standard output file descriptor
exec 1<&-
# Close standard error file descriptor
exec 2<&-
# Open standard output as $LOG_FILE file for read and write.
exec 1<>$LOG_FILE
# Redirect standard error to standard output
exec 2>&1
echo "Installing time!"
sudo -u $USER launchctl stop $SERVICE
sudo -u $USER launchctl unload -w $HOME/Library/LaunchAgents/$SERVICE.plist
sudo -u $USER launchctl stop $NODE
sudo -u $USER launchctl unload -w $HOME/Library/LaunchAgents/$NODE.plist
RET=0
echo "Installation logs" > /tmp/"$APP_NAME"_Install_Logs.txt
echo "Gui_check" >> /tmp/debug_dashboard.txt
if pgrep -x ""$APP_NAME"" > /dev/null
then
echo "Gui is Running" >> /tmp/"$APP_NAME"_Install_Logs.txt
./cmdAlert.app/Contents/MacOS/cmdAlert
RET=$?
else
echo "Gui Stopped" >> /tmp/"$APP_NAME"_Install_Logs.txt
fi
echo "RET from asking user = $RET" >> /tmp/"$APP_NAME"_Install_Logs.txt
if [ "$RET" -eq "0" ]; then
echo "Continue install" >> /tmp/"$APP_NAME"_Install_Logs.txt
elif [ "$RET" -eq "1" ]; then
echo "Stop install" >> /tmp/"$APP_NAME"_Install_Logs.txt
exit 1
fi
#### Kill all opened "$APP_NAME" gui clients
GuiPIDs=$(pgrep -x ""$APP_NAME"")
while read -r GuiPID; do
echo "... $GuiPID ..." >> /tmp/"$APP_NAME"_Install_Logs.txt
if [ "$GuiPID" != "" ]; then
echo ""$APP_NAME" is set! Kill It!!!" >> /tmp/"$APP_NAME"_Install_Logs.txt
sudo kill $GuiPID
fi
done <<< "$GuiPIDs"
echo "unloading the weirdo deps" >> /tmp/debug_dashboard.txt
[ -e /Library/LaunchDaemons/com.demlabs."$APP_NAME"Service.plist ] && launchctl unload -w $HOME/Library/LaunchAgents/com.demlabs."$APP_NAME"Service.plist
[ -e /Library/LaunchDaemons/com.demlabs.cellframe-node.plist ] && launchctl unload -w $HOME/Library/LaunchAgents/com.demlabs.cellframe-node.plist
rm -r /Applications/Cellframe.app
sudo rm -r /Applications/$APP_NAME.app
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/cache
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/etc
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/share
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/var/data
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/var/log
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/var/run
sudo rm -r $HOME/Applications/Cellframe.app/Contents/Resources/var/lib/global_db
sudo rm -r /tmp/"$APP_NAME"_dapps
#delete "$APP_NAME"s from com.apple.dock.plist
echo "path to dock $HOME/Library/Preferences/com.apple.dock.plist" >> /tmp/"$APP_NAME"_Install_Logs.txt
dockApps=$(defaults read $HOME/Library/Preferences/com.apple.dock.plist persistent-apps | nl | grep file-label | awk '/"$APP_NAME"/ {print NR}')
cnt=1
while read -r app; do
app=$[$app-$cnt]
cnt=$[$cnt+1]
if [ "$app" -ne "-1" ]; then
echo "app in dock exists" >> /tmp/"$APP_NAME"_Install_Logs.txt
sudo -u $USER /usr/libexec/PlistBuddy -c "Delete persistent-apps:$app" $HOME/Library/Preferences/com.apple.dock.plist
else
echo "app in dock don't exists" >> /tmp/"$APP_NAME"_Install_Logs.txt
fi
done <<< "$dockApps"
osascript -e 'delay 2' -e 'tell Application "Dock"' -e 'quit' -e 'end tell'
osascript -e 'delay 2' -e 'tell Application "Dock"' -e 'quit' -e 'end tell'
exit 0
echo "cleanup done" >> /tmp/debug_dashboard.txt
sudo pkgutil --forget com.demlabs.$APP_NAME
# <domains enable_localSystem="false" enable_anywhere="true" enable_currentUserHome="true"/>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Cellframe-Dashboard</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
<string>icon-win32.ico</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.Cellframe-Dashboard</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
APPL????
#!/bin/bash
wd=$(pwd)
cd /Library/LaunchDaemons
for filename in $(ls .); do
if [ -L $filename ] && [ ! -e $filename ]; then
launchctl unload -w $filename
rm $filename
fi
done
cd $wd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.demlabs.cleanup</string>
<key>ProgramArguments</key>
<array>
<string>/Library/LaunchDaemons/cleanup/cleanup.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>UserName</key>
<string>root</string>
<key>GroupName</key>
<string>wheel</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.demlabs.Cellframe-DashboardService</string>
<key>Program</key>
<string>/Applications/Cellframe-Dashboard.app/Contents/MacOS/Cellframe-DashboardService</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.demlabs.cellframe-node</string>
<key>Program</key>
<string>/Applications/Cellframe-Dashboard.app/Contents/MacOS/cellframe-node</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
#!/bin/bash
# Global settings
export DAP_PREFIX=/Users/$USER/Applications/Cellframe.app/Contents/Resources
export DAP_PREFIX_TPL="\\/Users\\/$USER\\/Applications\\/Cellframe.app\\/Contents\\/Resources"
export DAP_APP_NAME=cellframe-node
export DAP_CHAINS_NAME=core-t
export DAP_CFG_TPL=/Applications/Cellframe-Dashboard.app/Contents/Resources/share/configs/$DAP_APP_NAME.cfg.tpl
# Values
export DAP_DEBUG_MODE=false
export DAP_AUTO_ONLINE=true
export DAP_SERVER_ENABLED=false
export DAP_SERVER_ADDRESS=0.0.0.0
export DAP_SERVER_PORT=8089
export DAP_NOTIFY_SRV_ADDRESS=127.0.0.1
export DAP_NOTIFY_SRV_PORT=8080
# Subzero testnet
export DAP_SUBZERO_ENABLED=true
export DAP_SUBZERO_ROLE=full
# Backbone testnet
export DAP_BACKBONE_ENABLED=true
export DAP_BACKBONE_ROLE=full
# Mileena testnet
export DAP_MILEENA_ENABLED=true
export DAP_MILEENA_ROLE=full
# Minkowski testnet
export DAP_KELVPN_MINKOWSKI_ENABLED=true
export DAP_KELVPN_MINKOWSKI_ROLE=full
echo "Init configs with prefix " $DAP_PREFIX
/Applications/Cellframe-Dashboard.app/Contents/Resources/create_configs_from_tpl.sh
#!/bin/bash -e
if [ ! -d "$DAP_PREFIX" ]; then
echo "Need to export proper DAP_PREFIX as prefix path for this scripts"
exit 2
fi
if [ ! "$DAP_APP_NAME" ]; then
echo "Need to export DAP_APP_NAME for this scripts"
exit 3
fi
if [ ! "$DAP_CHAINS_NAME" ]; then
echo "Need to export DAP_CHAINS_NAME for this scripts"
exit 4
fi
# set default values
[ "$DAP_DEBUG_MODE_NAME" ] || DAP_DEBUG_MODE="false"
[ "$DAP_AUTO_ONLINE" ] || DAP_AUTO_ONLINE="true"
[ "$DAP_SERVER_ENABLED" ] || DAP_SERVER_ENABLED="false"
[ "$DAP_SERVER_PORT" ] || DAP_SERVER_PORT="8079"
[ "$DAP_SERVER_ADDR" ] || DAP_SERVER_ADDR="0.0.0.0"
[ "$DAP_NOTIFY_SRV_ADDRESS" ] || DAP_NOTIFY_SRV_ADDRESS="127.0.0.1"
[ "$DAP_NOTIFY_SRV_PORT" ] || DAP_NOTIFY_SRV_PORT="8080"
DAP_CFG_TPL="$DAP_PREFIX/share/configs/$DAP_APP_NAME.cfg.tpl"
# Init node config
if [ ! -e "$DAP_CFG" ]; then
DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg"
fi
if [ -e "$DAP_CFG" ]; then
DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg.new"
else
DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg"
fi
cat $DAP_CFG_TPL > $DAP_CFG || true
sed -i .old "s/{DEBUG_MODE}/$DAP_DEBUG_MODE/g" $DAP_CFG || true
sed -i .old "s/{AUTO_ONLINE}/$DAP_AUTO_ONLINE/g" $DAP_CFG || true
sed -i .old "s/{SERVER_ENABLED}/$DAP_SERVER_ENABLED/g" $DAP_CFG || true
sed -i .old "s/{SERVER_PORT}/$DAP_SERVER_PORT/g" $DAP_CFG || true
sed -i .old "s/{SERVER_ADDR}/$DAP_SERVER_ADDR/g" $DAP_CFG || true
sed -i .old "s/{NOTIFY_SRV_PORT}/$DAP_NOTIFY_SRV_PORT/g" $DAP_CFG || true
sed -i .old "s/{NOTIFY_SRV_ADDR}/$DAP_NOTIFY_SRV_ADDRESS/g" $DAP_CFG || true
sed -i .old "s/{PREFIX}/$DAP_PREFIX_TPL/g" $DAP_CFG || true
rm $DAP_CFG.old
#init networks
NET_NAME="subzero"
if [ "$DAP_SUBZERO_ENABLED"="true" ]; then
DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl"
DAP_NET_CFG=""
if [ -e "$DAP_CFG_NET" ]; then
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.new"
else
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
fi
cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true
sed -i .old "s/{NODE_TYPE}/$DAP_SUBZERO_ROLE/" $DAP_NET_CFG || true
rm $DAP_NET_CFG.old
fi
NET_NAME="Backbone"
if [ "$DAP_BACKBONE_ENABLED"="true" ]; then
DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl"
DAP_NET_CFG=""
if [ -e "$DAP_CFG_NET" ]; then
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.new"
else
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
fi
cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true
sed -i .old "s/{NODE_TYPE}/$DAP_BACKBONE_ROLE/" $DAP_NET_CFG || true
rm $DAP_NET_CFG.old
fi
NET_NAME="mileena"
if [ "$DAP_MILEENA_ENABLED"="true" ]; then
DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl"
DAP_NET_CFG=""
if [ -e "$DAP_CFG_NET" ]; then
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.new"
else
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
fi
cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true
sed -i .old "s/{NODE_TYPE}/$DAP_MILEENA_ROLE/" $DAP_NET_CFG || true
rm $DAP_NET_CFG.old
fi
NET_NAME="kelvpn-minkowski"
if [ "$DAP_KELVPN_MINKOWSKI_ENABLED"="true" ]; then
DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl"
DAP_NET_CFG=""
if [ -e "$DAP_CFG_NET" ]; then
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.new"
else
DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg"
fi
cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true
sed -i .old "s/{NODE_TYPE}/$DAP_KELVPN_MINKOWSKI_ROLE/" $DAP_NET_CFG || true
rm $DAP_NET_CFG.old
fi
chmod 0666 $DAP_CFG
chmod 0666 $DAP_CFG_TPL
#!/bin/bash
echo "Deploying the mac app"
pwd
$QT_MAC_PATH/macdeployqt CellFrameDashboardGUI/bin/release/CellFrameDashboard.app -verbose=3
#!/bin/bash
arch=$1
NODE_PATH=./cellframe-node
export QT_MAC_PATH=${OSXCROSS_PATH}/$arch/${QT_PATH}
export CROSS_COMPILE=${arch}${OSX_COMPILE}
export wd=$(pwd)
sed -i "s/arm64/arm64e/g" cellframe-node/cellframe-sdk/3rdparty/monero_crypto/CMakeLists.txt
# compile cellframe-dashboard
./prod_build/mac/scripts/compile.sh $arch || { errcode=$?; echo "[ERR] Mac build errcode $errcode";exit $errcode; }
# compile cellframe-node
echo "[INF] Compile cellframe-node"
./cellframe-node/prod_build/mac/scripts/compile.sh $NODE_PATH || { errcode=$?; echo "[ERR] Mac cellframe-node compile $errcode"; exit $errcode; }
#./prod_build/mac/scripts/addqt.sh $1 || { errcode=$?; echo "[ERR] Mac addqtlibs errcode $errcode";exit $errcode; }
./prod_build/mac/scripts/reloc.sh || { errcode=$?; echo "[ERR] Mac reloc errcode $errcode"; exit $errcode; }
#./prod_build/mac/scripts/sign.sh $1 || exit 6
./prod_build/mac/scripts/pack.sh $arch || { errcode=$?; echo "[ERR] Mac pack errcode $errcode"; exit $errcode; }
make distclean
rm .qmake.stash
exit 0
#!/bin/bash
rm -rf cellframe-node/build
#make distclean
rm -rf build
#!/bin/bash
#set up config
echo "[!] Build source as application $APP_NAME ( $BUILD_PATH )"
echo "Qt path is on $QT_MAC_PATH with BRAND=$brand"
arch=$1
#change standart library's paths on mac to paths on osxcross
sed -i "s/usr\/local/opt\/osxcross\/macports\/pkgs\/opt\/local/g" cellframe-node/cellframe-sdk/cmake/OS_Detection.cmake
sed -i "s/usr\/local/opt\/osxcross\/macports\/pkgs\/opt\/local/g" cellframe-node/cellframe-sdk/dap-sdk/net/server/http_server/CMakeLists.txt
sed -i "s/usr\/local/opt\/osxcross\/macports\/pkgs\/opt\/local/g" cellframe-node/CMakeLists.txt
sed -i "s/usr\/local/opt\/osxcross\/macports\/pkgs\/opt\/local/g" cellframe-node/cellframe-sdk/dap-sdk/core/libdap.pri
sed -i "s/usr\/local/opt\/osxcross\/macports\/pkgs\/opt\/local/g" cellframe-node/cellframe-sdk/dap-sdk/core/src/darwin/macos/macos.pri
$QT_MAC_PATH/qmake *.pro -r -spec macx-clang CONFIG+=$arch
sed -i "/\/opt\/clang\/lib\/clang\/13.0.0\/include/d" .qmake.stash
sed -i "s/x86_64/$arch/g" .qmake.stash Makefile CellFrameDashboardGUI/Makefile CellFrameDashboardService/Makefile
make -j$(nproc)
#!/bin/bash
echo "Deploying to $PACKAGE_PATH"
CELLFRAME_REPO_KEY="~/.ssh/demlabs_publish"
CELLFRAME_FILESERVER_CREDS="admin@pub.cellframe.net"
CELLFRAME_FILESERVER_PATH="~/web/pub.cellframe.net/public_html/macos"
pwd
cd build
PKGFILES=$(ls . | grep .pkg)
[[ -v CI_COMMIT_REF_NAME ]] && [[ $CI_COMMIT_REF_NAME != "master" ]] && SUBDIR="${CI_COMMIT_REF_NAME}" || SUBDIR=""
for pkgfile in $PKGFILES; do
echo "working with $pkgfile"
pkgname=$(echo $pkgfile | sed 's/.pkg$//')
pkgname_public=$(echo $pkgname | cut -d '-' -f1-4,7-) #cutting away Debian-9.12
pkgname_weblink="$(echo $pkgname | cut -d '-' -f1-2,5 )-latest" #leaving only necessary entries
echo "copy $pkgfile in $PACKAGE_PATH"
mv $pkgfile $PACKAGE_PATH/$pkgname.pkg || { echo "[ERR] Something went wrong in publishing the package. Now aborting."; exit -4; }
CODENAME=$(echo $pkgname | rev | cut -d '-' -f1 | rev)
cp -r ../prod_build/general/essentials/weblink-latest ../prod_build/general/essentials/$pkgname_weblink
sed -i "/document/s/cellframe.*deb/$pkgname.pkg/" ../prod_build/general/essentials/$pkgname_weblink/index.html
echo "REF_NAME is $CI_COMMIT_REF_NAME"
ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_FILESERVER_CREDS" "mkdir -p $CELLFRAME_FILESERVER_PATH/$SUBDIR"
scp -i $CELLFRAME_REPO_KEY $PACKAGE_PATH/$pkgname.pkg "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/$pkgname.pkg"
scp -r -i $CELLFRAME_REPO_KEY ../prod_build/general/essentials/$pkgname_weblink "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/"
rm -r ../prod_build/general/essentials/$pkgname_weblink
done
# export -n "UPDVER"
cd ..
exit 0
#!/bin/bash
echo "packing things"
arch=$1
cd $wd
. prod_build/general/pre-build.sh
VERSION_INFO=$(extract_version_number)
#prepare
mkdir -p $BUILD_PATH/payload_build
mkdir -p $BUILD_PATH/scripts_build
mv -f $BUILD_PATH/"$APP_NAME".plist $BUILD_PATH/"$APP_NAME".app $BUILD_PATH/payload_build
mv -f $BUILD_PATH/preinstall $BUILD_PATH/postinstall $BUILD_PATH/scripts_build
mv -f $BUILD_PATH/uninstall $BUILD_PATH/payload_build/$APP_NAME.app/Contents/Resources/
mv -f $BUILD_PATH/cellframe-uninstaller $BUILD_PATH/payload_build/$APP_NAME.app/Contents/Resources/
mv -f $BUILD_PATH/uninstall_icon.rsrc $BUILD_PATH/payload_build/$APP_NAME.app/Contents/Resources/
# create mkbom file
#mkbom -u 0 -g 80 $BUILD_PATH/payload_build $BUILD_PATH/Bom
mkbom -u 0 -g 80 $BUILD_PATH/payload_build $BUILD_PATH/Bom
# create Payload
# --format odc --owner 0:80
(cd $BUILD_PATH/payload_build && find . | cpio -o --format odc --owner 0:80 | gzip -c) > $BUILD_PATH/Payload
# create Scripts
(cd $BUILD_PATH/scripts_build && find . | cpio -o --format odc --owner 0:80 | gzip -c) > $BUILD_PATH/Scripts
#update PkgInfo
numberOfFiles=$(find $BUILD_PATH/payload_build | wc -l)
installKBytes=$(du -k -s $BUILD_PATH/payload_build | cut -d"$(echo -e '\t')" -f1)
echo $numberOfFiles
sed -i "s/numberOfFiles=\"[0-9]\+\"/numberOfFiles=\"$numberOfFiles\"/g" $BUILD_PATH/PackageInfo
sed -i "s/installKBytes=\"[0-9]\+\"/installKBytes=\"$installKBytes\"/g" $BUILD_PATH/PackageInfo
#rm $BUILD_PATH/PackageInfobak
#clear and build pkg
rm -r $BUILD_PATH/payload_build $BUILD_PATH/scripts_build
(cd $BUILD_PATH && xar --compression none -cf ../"$APP_NAME"-"$VERSION_INFO"-$arch.pkg *)
(cd $BUILD_PATH && rm -r Bom PackageInfo Payload Scripts)
# #make distclean
# exit 0
#!/bin/bash
#echo "Stub for post-build actions"
echo "Entering post-build deployment and cleanup"
platform=$1
SCRIPTDIR="prod_build/$platform/scripts"
$SCRIPTDIR/deploy.sh || { echo "[ERR] $platform deploy error" && exit 20; }
#$SCRIPTDIR/cleanup.sh || { echo "[ERR] $platform cleanup error" && exit 21; }
#!/bin/bash
#set up config
echo "[*] Pack with $DEPLOY_OPTS"
macdeployqt $APP_PATH $DEPLOY_OPTS
#find $BUILD_PATH_FRAMEWORKS/GStreamer.framework -path *.a -exec rm -rf {} \;
#find $BUILD_PATH_FRAMEWORKS/GStreamer.framework -path *.la -exec rm -rf {} \;
#fdupes -r -dN $BUILD_PATH_FRAMEWORKS/GStreamer.framework/
exit 0
#!/bin/bash
#set up config
error=0
mkdir -p $wd/$BUILD_PATH
cp -r $APP_PATH $wd/$BUILD_PATH
if [ -e $wd/CellFrameDashboardService/"$APP_SERVICE_NAME" ]; then
mv -f $wd/CellFrameDashboardService/"$APP_SERVICE_NAME" $wd/$BUILD_PATH/$APP_NAME.app/Contents/MacOS
else
echo "[ERR] Not found $wd/CellFrameDashboardService/"$APP_SERVICE_NAME"" && error=1;
fi
if [ -e $wd/cellframe-node/build/"$NODE_NAME" ]; then
mv -f $wd/cellframe-node/build/"$NODE_NAME" $wd/$BUILD_PATH/$APP_NAME.app/Contents/MacOS
else
echo "[ERR] Not found $wd/cellframe-node/build/"$NODE_NAME"" && error=1;
fi
if [ -e $wd/cellframe-node/build/"$NODE_CLI_NAME" ]; then
mv -f $wd/cellframe-node/build/"$NODE_CLI_NAME" $wd/$BUILD_PATH/$APP_NAME.app/Contents/MacOS
else
echo "[ERR] Not found $wd/cellframe-node/build/"$NODE_CLI_NAME"" && error=1;
fi
if [ -e $wd/cellframe-node/build/"$NODE_TOOL_NAME" ]; then
mv -f $wd/cellframe-node/build/"$NODE_TOOL_NAME" $wd/$BUILD_PATH/$APP_NAME.app/Contents/MacOS
else
echo "[ERR] Not found $wd/cellframe-node/build/"$NODE_TOOL_NAME"" && error=1;
fi
if [ -e $wd/prod_build/mac/essentials/com*Cellframe-DashboardService.plist ]; then
cp -f $wd/prod_build/mac/essentials/com*Cellframe-DashboardService.plist $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources/
else
echo "[ERR] Not found $wd/prod_build/mac/essentials/com*Cellframe-DashboardService.plist" && error=1;
fi
if [ -e $wd/prod_build/mac/essentials/com*cellframe-node.plist ]; then
cp -f $wd/prod_build/mac/essentials/com*cellframe-node.plist $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources/
else
echo "[ERR] Not found $wd/prod_build/mac/essentials/com*cellframe-node.plist" && error=1;
fi
if [ -e $wd/prod_build/mac/essentials/cleanup ]; then
cp -rf $wd/prod_build/mac/essentials/cleanup $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources/
else
echo "[ERR] Not found $wd/prod_build/mac/essentials/cleanup" && error=1;
fi
if [ -e $wd/prod_build/mac/essentials/$APP_NAME-pkginstall ]; then
cp -rf $wd/prod_build/mac/essentials/$APP_NAME-pkginstall/* $wd/$BUILD_PATH
else
echo "[ERR] Not found $wd/prod_build/mac/essentials/$APP_NAME-pkginstall" && error=1;
fi
cp -r $wd/cellframe-node/dist/share $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources
cp -r $wd/cellframe-node/dist/etc $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources
cp -f $wd/cellframe-node/scripts/*.sh $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources
cp -f $wd/prod_build/mac/essentials/create_configs.sh $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources
cp -f $wd/prod_build/mac/essentials/create_configs_from_tpl.sh $wd/$BUILD_PATH/$APP_NAME.app/Contents/Resources
exit $error