macos github actions deploy .app

This commit is contained in:
alemuntoni 2020-02-05 13:38:29 +01:00
parent 14ffa33e80
commit b2e68efa7c
4 changed files with 30 additions and 109 deletions

View File

@ -24,6 +24,8 @@ jobs:
id: envs
shell: bash
run: |
#sh install/macos/macos_setup_env.sh
#necessary here on github actions:
echo '::set-env name=QTDIR::/usr/local/opt/qt'
echo '::add-path::/usr/local/opt/qt/bin'
echo '::set-env name=LD_LIBRARY_PATH::/usr/local/opt/qt/lib:${{env.LD_LIBRARY_PATH}}'
@ -35,12 +37,20 @@ jobs:
- name: Deploying MeshLab
run: |
sh install/macos/macos_deploy.sh
- name: Creating MeshLab Portable APP
run: |
zip -r distrib/MeshLab${{steps.envs.outputs.date}}-macos.app.zip distrib/meshlab.app
- name: Creating DMG
run: |
sh install/macos/macos_dmg.sh
mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
- name: Uploading APP
uses: actions/upload-artifact@v1
with:
name: meshlab_macos_portable
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.app.zip
- name: Uploading DMG
uses: actions/upload-artifact@v1
with:
name: meshlab_macos
name: meshlab_macos_dmg
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg

View File

@ -27,19 +27,19 @@ jobs:
- name: Compiling MeshLab
run: |
sh install/linux/linux_build.sh
- name: Creating Meshlab Portable ZIP
- name: Creating MeshLab Portable ZIP
run : |
sh install/linux/linux_appimage.sh
mv distrib/*.AppImage .
- name: Uploading Meshlab Portable
uses: actions/upload-artifact@v1
with:
name: meshlab_linux_portable
name: meshlab_portable_linux
path: distrib/
- name: Uploading Meshlab AppImage
uses: actions/upload-artifact@v1
with:
name: meshlab_linux_appimage
name: meshlab_appimage_linux
path: MeshLab${{steps.envs.outputs.date}}-linux.AppImage

View File

@ -1,105 +0,0 @@
#!/bin/bash
# this is a script shell for setting up the application bundle for MacOS
# Default directories (BUILD_PATH and SOURCE_PATH) are set in order to work if
# you did not use shadow build and you are running (not sourcing) this script
# from the install/macx directory.
# If you built MeshLab with shadow build, run this script with the path to the
# build directory as a parameter:
# sh macinstall_latest.sh /path/to/shadow/build
#
# This script does all the dirty work of moving all the needed plugins and
# frameworks into the package and runs the install_tool on them to change the
# linking path to the local version of qt.
#
# The env variable $QTDIR should be correctly set, and all the stuff to be copied
# should be in the '$BUILD_PATH/distrib' folder.
#checking for parameters
if [ "$#" -eq 0 ]
then
BUILD_PATH="../.."
else
BUILD_PATH=$1
fi
echo "Build path is: " $BUILD_PATH
# change this if this script is not in the directory meshlab/install/macx
SOURCE_PATH="../../src"
APPNAME="meshlab.app"
echo "Hopefully I should find" $BUILD_PATH/distrib/$APPNAME
APPFOLDER=$BUILD_PATH/distrib/$APPNAME
BUNDLE=$BUILD_PATH/distrib/MeshLabBundle
if [ -e $APPFOLDER -a -d $APPFOLDER ]
then
echo "------------------"
else
echo "Started in the wrong dir: I have not found the MeshLab.app"
exit 0
fi
# Start by erasing everything
rm -r -f $BUNDLE
echo "Copying the built app into the bundle"
mkdir $BUNDLE
cp -r $APPFOLDER $BUNDLE
mkdir $BUNDLE/$APPNAME/Contents/PlugIns
# copy the files icons into the app.
cp $SOURCE_PATH/meshlab/images/meshlab_obj.icns $BUNDLE/$APPNAME/Contents/Resources
for x in $BUILD_PATH/distrib/plugins/*.dylib
do
cp $x $BUNDLE/meshlab.app/Contents/PlugIns/
done
for x in $BUILD_PATH/distrib/plugins/*.xml
do
cp $x $BUNDLE/meshlab.app/Contents/PlugIns/
done
for x in $BUNDLE/meshlab.app/Contents/PlugIns/*.dylib
do
install_name_tool -change libcommon.1.dylib @executable_path/libcommon.1.dylib $x
done
echo 'Copying other files'
cp $SOURCE_PATH/../LICENSE.txt $BUNDLE
cp $SOURCE_PATH/../docs/readme.txt $BUNDLE
cp -r $BUILD_PATH/distrib/plugins/U3D_OSX $BUNDLE/$APPNAME/Contents/PlugIns/
mkdir $BUNDLE/$APPNAME/Contents/shaders
cp $BUILD_PATH/distrib/shaders/*.gdp $BUILD_PATH/distrib/shaders/*.vert $BUILD_PATH/distrib/shaders/*.frag $BUILD_PATH/distrib/shaders/*.txt $BUNDLE/$APPNAME/Contents/shaders
#added rendermonkey shaders
mkdir $BUNDLE/$APPNAME/Contents/shaders/shadersrm
cp $BUILD_PATH/distrib/shaders/shadersrm/*.rfx $BUNDLE/$APPNAME/Contents/shaders/shadersrm
#added shadowmapping shaders
cp -r $BUILD_PATH/distrib/shaders/decorate_shadow $BUNDLE/$APPNAME/Contents/shaders
echo "Changing the paths of the qt component frameworks using the qt tool macdeployqt"
if [ -e $QTDIR/bin/macdeployqt ]
then
echo
$QTDIR/bin/macdeployqt $BUNDLE/$APPNAME -executable=$BUNDLE/$APPNAME/Contents/MacOS/meshlabserver
else
macdeployqt $BUNDLE/$APPNAME -executable=$BUNDLE/$APPNAME/Contents/MacOS/meshlabserver
fi
# final step create the dmg using appdmg
# appdmg is installed with 'npm install -g appdmg'",
sed "s%BUILD_PATH%$BUILD_PATH%g" meshlab_dmg_latest.json > meshlab_dmg_final.json
sed -i '' "s%SOURCE_PATH%$SOURCE_PATH%g" meshlab_dmg_final.json
rm -f $BUILD_PATH/distrib/*.dmg
echo "Running appdmg"
appdmg meshlab_dmg_final.json $BUILD_PATH/distrib/MeshLab$(date +%Y.%m).dmg

View File

@ -0,0 +1,16 @@
#!/bin/bash
# this is a script shell sets up a MacOS environment where
# MeshLab can be compiled.
#
# Run this script if you never installed any of the MeshLab dependencies.
#
# Requires: homebrew
brew install llvm libomp qt
npm install -g appdmg
echo "export QTDIR=/usr/local/opt/qt" >> ~/.bash_profile
echo "export PATH=$QTDIR/bin:$PATH" >> ~/.bash_profile
echo "export LD_LIBRARY_PATH=/usr/local/opt/qt/lib:$LD_LIBRARY_PATH" >> ~/.bash_profile
echo "export PKG_CONFIG_PATH=/usr/local/opt/qt/lib:$PKG_CONFIG_PATH" >> ~/.bash_profile
. ~/.bash_profile