From b2e68efa7c40bc3c2ff32430002716ca3c9fc9b8 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Wed, 5 Feb 2020 13:38:29 +0100 Subject: [PATCH] macos github actions deploy .app --- .github/workflows/CompileMacOS.yml | 12 +++- .github/workflows/CompileUbuntu.yml | 6 +- install/macos/macinstall_old.sh | 105 ---------------------------- install/macos/macos_setup_env.sh | 16 +++++ 4 files changed, 30 insertions(+), 109 deletions(-) delete mode 100755 install/macos/macinstall_old.sh create mode 100644 install/macos/macos_setup_env.sh diff --git a/.github/workflows/CompileMacOS.yml b/.github/workflows/CompileMacOS.yml index fda89cbff..348acbab6 100755 --- a/.github/workflows/CompileMacOS.yml +++ b/.github/workflows/CompileMacOS.yml @@ -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 diff --git a/.github/workflows/CompileUbuntu.yml b/.github/workflows/CompileUbuntu.yml index 2bae7a6d5..b844bb58d 100755 --- a/.github/workflows/CompileUbuntu.yml +++ b/.github/workflows/CompileUbuntu.yml @@ -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 diff --git a/install/macos/macinstall_old.sh b/install/macos/macinstall_old.sh deleted file mode 100755 index b808f783a..000000000 --- a/install/macos/macinstall_old.sh +++ /dev/null @@ -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 diff --git a/install/macos/macos_setup_env.sh b/install/macos/macos_setup_env.sh new file mode 100644 index 000000000..8b56efe76 --- /dev/null +++ b/install/macos/macos_setup_env.sh @@ -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