deploy stage on macos workflow

This commit is contained in:
alemuntoni 2020-10-19 14:21:42 +02:00
parent 0f8de0a9d3
commit 21c478acbb
2 changed files with 17 additions and 42 deletions

View File

@ -28,6 +28,10 @@ jobs:
- name: Configure and Build
run: |
sh install/macos/macos_build.sh
- name: Deploy
run: |
sh install/macos/macos_deploy.sh
macos_build_qmake:
@ -60,9 +64,9 @@ jobs:
- name: Create DMG
run: |
sh install/macos/qmake/macos_dmg.sh
mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos_qmake.dmg
- name: Upload DMG
uses: actions/upload-artifact@v1
with:
name: meshlab_macos_dmg
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos_qmake.dmg

View File

@ -16,60 +16,31 @@ realpath() {
#checking for parameters
if [ "$#" -eq 0 ]
then
DISTRIB_PATH="../../distrib"
BUNDLE_PATH="../../src/install"
else
DISTRIB_PATH=$( realpath $1 )
BUNDLE_PATH=$(realpath $1)
fi
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR #move to script directory
SOURCE_PATH=$PWD/../../../src
APPNAME="meshlab.app"
echo "Hopefully I should find" $DISTRIB_PATH/$APPNAME
echo "Hopefully I should find " $BUNDLE_PATH/$APPNAME
if ! [ -e $DISTRIB_PATH/$APPNAME -a -d $DISTRIB_PATH/$APPNAME ]
if ! [ -e $BUNDLE_PATH/$APPNAME -a -d $BUNDLE_PATH/$APPNAME ]
then
echo "Started in the wrong dir: I have not found the meshlab.app"
exit -1
fi
echo "Copying the built app into the bundle"
mkdir $DISTRIB_PATH/$APPNAME/Contents/PlugIns
# copy the files icons into the app.
cp $SOURCE_PATH/meshlab/images/meshlab_obj.icns $DISTRIB_PATH/$APPNAME/Contents/Resources
for x in $DISTRIB_PATH/plugins/*.dylib
do
cp $x $DISTRIB_PATH/$APPNAME/Contents/PlugIns/
done
#copy libIFX libraries and change rpath u3d plugin
cp -a $DISTRIB_PATH/lib/meshlab/libIFX* $DISTRIB_PATH/$APPNAME/Contents/Frameworks
rm $DISTRIB_PATH/$APPNAME/Contents/Frameworks/libIFXCoreStatic.a
install_name_tool -change libIFXCore.1.so @rpath/libIFXCore.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
install_name_tool -change libIFXExporting.1.so @rpath/libIFXExporting.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
install_name_tool -change libIFXScheduling.1.so @rpath/libIFXScheduling.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
echo 'Copying other files'
#shaders
mkdir $DISTRIB_PATH/$APPNAME/Contents/shaders
cp -r $DISTRIB_PATH/shaders/*.gdp $DISTRIB_PATH/shaders/*.vert $DISTRIB_PATH/shaders/*.frag $DISTRIB_PATH/shaders/*.txt $DISTRIB_PATH/$APPNAME/Contents/shaders
#added rendermonkey shaders
mkdir $DISTRIB_PATH/$APPNAME/Contents/shaders/shadersrm
cp $DISTRIB_PATH/shaders/shadersrm/*.rfx $DISTRIB_PATH/$APPNAME/Contents/shaders/shadersrm
#added shadowmapping shaders
cp -r $DISTRIB_PATH/shaders/decorate_shadow $DISTRIB_PATH/$APPNAME/Contents/shaders
echo "Changing the paths of the qt component frameworks using the qt tool macdeployqt"
#cp -a $DISTRIB_PATH/lib/meshlab/libIFX* $DISTRIB_PATH/$APPNAME/Contents/Frameworks
#rm $DISTRIB_PATH/$APPNAME/Contents/Frameworks/libIFXCoreStatic.a
#install_name_tool -change libIFXCore.1.so @rpath/libIFXCore.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
#install_name_tool -change libIFXExporting.1.so @rpath/libIFXExporting.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
#install_name_tool -change libIFXScheduling.1.so @rpath/libIFXScheduling.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
if [ -e $QTDIR/bin/macdeployqt ]
then
$QTDIR/bin/macdeployqt $DISTRIB_PATH/$APPNAME -executable=$DISTRIB_PATH/$APPNAME/Contents/MacOS/meshlabserver
$QTDIR/bin/macdeployqt $BUNDLE_PATH/$APPNAME
else
macdeployqt $DISTRIB_PATH/$APPNAME -executable=$DISTRIB_PATH/$APPNAME/Contents/MacOS/meshlabserver
macdeployqt $BUNDLE_PATH/$APPNAME
fi