-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07d6760
commit a272715
Showing
6 changed files
with
108 additions
and
46 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
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,39 @@ | ||
#!/bin/bash | ||
|
||
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/.. | ||
|
||
INSTALL_PATH=$SCRIPTS_PATH/../../install | ||
QT_DIR="" | ||
APPNAME="meshlab.app" | ||
|
||
#checking for parameters | ||
for i in "$@" | ||
do | ||
case $i in | ||
-i=*|--install_path=*) | ||
INSTALL_PATH="${i#*=}" | ||
shift # past argument=value | ||
;; | ||
-qt=*|--qt_dir=*) | ||
QT_DIR=${i#*=}/bin/ | ||
shift # past argument=value | ||
;; | ||
*) | ||
# unknown option | ||
;; | ||
esac | ||
done | ||
|
||
ARGUMENTS="" | ||
|
||
for plugin in $INSTALL_PATH/$APPNAME/Contents/PlugIns/*.so | ||
do | ||
ARGUMENTS="${ARGUMENTS} -executable=${plugin}" | ||
done | ||
|
||
${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \ | ||
$ARGUMENTS | ||
|
||
# remove everything from install path, except the appbundle | ||
cd $INSTALL_PATH | ||
ls | grep -xv "${APPNAME}" | xargs rm |
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,52 @@ | ||
#!/bin/bash | ||
|
||
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/.. | ||
RESOURCES_PATH=$SCRIPTS_PATH/../../resources | ||
INSTALL_PATH=$SCRIPTS_PATH/../../install | ||
PACKAGES_PATH=$SCRIPTS_PATH/../../packages | ||
|
||
#checking for parameters | ||
for i in "$@" | ||
do | ||
case $i in | ||
-i=*|--install_path=*) | ||
INSTALL_PATH="${i#*=}" | ||
shift # past argument=value | ||
;; | ||
-p=*|--packages_path=*) | ||
PACKAGES_PATH="${i#*=}" | ||
shift # past argument=value | ||
;; | ||
*) | ||
# unknown option | ||
;; | ||
esac | ||
done | ||
|
||
if ! [ -e $INSTALL_PATH/meshlab.app -a -d $INSTALL_PATH/meshlab.app ] | ||
then | ||
echo "Started in the wrong dir: I have not found the meshlab.app" | ||
exit -1 | ||
fi | ||
|
||
#get version | ||
IFS=' ' #space delimiter | ||
STR_VERSION=$($INSTALL_PATH/meshlab.app/Contents/MacOS/meshlab --version) | ||
read -a strarr <<< "$STR_VERSION" | ||
ML_VERSION=${strarr[1]} #get the meshlab version from the string | ||
|
||
# final step create the dmg using appdmg | ||
# appdmg is installed with 'npm install -g appdmg'", | ||
sed "s%DISTRIB_PATH%$INSTALL_PATH%g" $RESOURCES_PATH/macos/meshlab_dmg_latest.json > $RESOURCES_PATH/macos/meshlab_dmg_final.json | ||
sed -i '' "s%ML_VERSION%$ML_VERSION%g" $RESOURCES_PATH/macos/meshlab_dmg_final.json | ||
sed -i '' "s%RESOURCES_PATH%$RESOURCES_PATH%g" $RESOURCES_PATH/macos/meshlab_dmg_final.json | ||
|
||
rm -f $INSTALL_PATH/*.dmg | ||
|
||
mv $INSTALL_PATH/meshlab.app $INSTALL_PATH/MeshLab$ML_VERSION.app | ||
|
||
mkdir $PACKAGES_PATH | ||
|
||
appdmg $RESOURCES_PATH/macos/meshlab_dmg_final.json $PACKAGES_PATH/MeshLab$ML_VERSION-macos.dmg | ||
|
||
rm $RESOURCES_PATH/macos/meshlab_dmg_final.json |
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