From 1a9a97d92913548d3fd9d3de138f600e71005233 Mon Sep 17 00:00:00 2001 From: Iragne Date: Thu, 13 Jul 2023 16:18:10 +0200 Subject: [PATCH 1/5] Create a DMG for deployment Appdmg need to be installed --- deploy/assets/config.json | 8 ++++++++ deploy/mac_dmg.sh | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 deploy/assets/config.json create mode 100755 deploy/mac_dmg.sh diff --git a/deploy/assets/config.json b/deploy/assets/config.json new file mode 100644 index 0000000000..f863fb416e --- /dev/null +++ b/deploy/assets/config.json @@ -0,0 +1,8 @@ +{ + "title": "APM Planner 2.0", + "icon": "../../files/APMIcons/icon.icns", + "contents": [ + { "x": 448, "y": 344, "type": "link", "path": "/Applications" }, + { "x": 192, "y": 344, "type": "file", "path": "../../release/apmplanner2.app" } + ] + } \ No newline at end of file diff --git a/deploy/mac_dmg.sh b/deploy/mac_dmg.sh new file mode 100755 index 0000000000..15de708a12 --- /dev/null +++ b/deploy/mac_dmg.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +appdmg deploy/assets/config.json release/apmplanner2.dmg From ff63d884a33cc1f311b94a4923ccb717b7737a06 Mon Sep 17 00:00:00 2001 From: Iragne Date: Thu, 13 Jul 2023 16:25:44 +0200 Subject: [PATCH 2/5] Update Readme and script --- README.md | 12 ++++++++++++ deploy/mac_dmg.sh | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 0ee7c17595..dd0a07b3a6 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,18 @@ Build APM Planner 4) Run `open ./release/apmplanner2.app` +To build on Mac OS X (10.6 or later): + +Install appdmg +----------- +`npm install -g appdmg` + +Create a DMG +----------- +`./deploy/mac_dmg.sh` + +Dmg file will be located in `./release/apmplanner2.dmg` + Linux ===== diff --git a/deploy/mac_dmg.sh b/deploy/mac_dmg.sh index 15de708a12..141cb63b3b 100755 --- a/deploy/mac_dmg.sh +++ b/deploy/mac_dmg.sh @@ -1,3 +1,7 @@ #!/bin/sh +if [ -f "release/apmplanner2.dmg" ] ; then + rm -rf "release/apmplanner2.dmg" +fi + appdmg deploy/assets/config.json release/apmplanner2.dmg From 1c2ad0acb294f18096bfd9bf352dc921e6749205 Mon Sep 17 00:00:00 2001 From: Iragne Date: Thu, 13 Jul 2023 16:32:30 +0200 Subject: [PATCH 3/5] Add header AP --- deploy/mac_dmg.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/deploy/mac_dmg.sh b/deploy/mac_dmg.sh index 141cb63b3b..cd1bb781ef 100755 --- a/deploy/mac_dmg.sh +++ b/deploy/mac_dmg.sh @@ -1,5 +1,30 @@ #!/bin/sh - +echo "cccccccccccccccccccccccccccccccccccccccccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccccccc +cccccccccccccccccccccccccccloolccccccccccccccccccc +cccccccccccccccccccccclollccldxdolcccccccccccccccc +ccccccccccccccccccccccodkkO0OkO00kdolccccccccccccc +ccccccccccccccccccccccccllox0XWWWWNX0kdlcccccccccc +cccccccccccccccccccccccccccccoxOKWMMMWNKkdlccccccc +ccccccccccclllllccccccclllllllllldkKNWMMMWX0xolccc +ccccccccccxKXXX0dcccccdKXXXXXXXX0kolokKNWMMMWXxccc +cccccccclkNMMMMNxccccl0WMMWX0KNMMW0lcclOWMMMNOlccc +cccccccoOWMNNWMWkccccxNMMMXdcoKMMWOlccdKMMWXxlcccc +ccccccdKWMXxOWMWOlccoKMMMMNOOKWMN0ocldKWMWKdcccccc +cccclxXWMWNKNWMM0lcckNMMNXXKKK0kdllld0WMNOoccccccc +ccclONMWXOOOKWMMKocoKMMWOolllccccldx0NMXklcccccccc +cccdO00OocccoO00kocdO00koccccccodxdONWKdcccccccccc +cccccccccccccccccccccccccccccldxdoxKN0occccccccccc +cccccccccccccccccccccccccccldddlco0Xklcccccccccccc +ccccccccccccccccccccccccloodolcclOKxcccccccccccccc +cccccccccccccccccccccccllllcccclxOoccccccccccccccc +cccccccccccccccccccccccccccccccodlcccccccccccccccc +cccccccccccccccccccccccccccccccllccccccccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccccccc +" if [ -f "release/apmplanner2.dmg" ] ; then rm -rf "release/apmplanner2.dmg" fi From 64bf87637f8a772769fc9617b6c878beda64514c Mon Sep 17 00:00:00 2001 From: Iragne Date: Tue, 29 Aug 2023 13:36:49 +0200 Subject: [PATCH 4/5] Update Matt signing working Create a build with DMG and app Update the architecture to allow x86_64 arm64 --- deploy/mac_dmg.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/deploy/mac_dmg.sh b/deploy/mac_dmg.sh index cd1bb781ef..55a1a30a44 100755 --- a/deploy/mac_dmg.sh +++ b/deploy/mac_dmg.sh @@ -29,4 +29,43 @@ if [ -f "release/apmplanner2.dmg" ] ; then rm -rf "release/apmplanner2.dmg" fi +rm -rf release/apmplanner2.app +make -j8 +echo 'macdeployqt "release/apmplanner2.app"' +macdeployqt "release/apmplanner2.app" + +echo "rm -rf release/apmplanner2.app/Contents/Frameworks/SDL2.framework" +rm -rf release/apmplanner2.app/Contents/Frameworks/SDL2.framework +echo "cp -R libs/lib/Frameworks/SDL2.framework release/apmplanner2.app/Contents/Frameworks" +cp -R libs/lib/Frameworks/SDL2.framework release/apmplanner2.app/Contents/Frameworks + +SIGN="$1" + +ROOT=`pwd` +cd release/ + +echo "cd apmplanner2.app/Contents/MacOS" +cd apmplanner2.app/Contents/MacOS +echo "mv qml ../Resources" +mv qml ../Resources +echo "mv sik_uploader ../Resources " +mv sik_uploader ../Resources +echo "ln -s ../Resources/sik_uploader sik_uploader" +ln -s ../Resources/sik_uploader sik_uploader +echo "ln -s ../Resources/qml qml" +ln -s ../Resources/qml qml + +cd .. +cd .. +cd .. + + +echo "Sign sub Framework" +find apmplanner2.app -name "*.framework" -exec codesign --timestamp --options runtime -f -s "$SIGN" {} \; +echo "Sign sub dylib" +find apmplanner2.app -name "*.dylib" -exec codesign --timestamp --options runtime -f -s "$SIGN" {} \; +echo "Sign apmplanner2.ap" +codesign --timestamp --options runtime -f -s "$SIGN" apmplanner2.app + +cd $ROOT appdmg deploy/assets/config.json release/apmplanner2.dmg From ac8a5ef657a92cc11564353809e1d005f04d869d Mon Sep 17 00:00:00 2001 From: Iragne Date: Tue, 29 Aug 2023 13:37:00 +0200 Subject: [PATCH 5/5] Adding the right param x86_64 arm64 --- apm_planner.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm_planner.pro b/apm_planner.pro index 324d330989..d958322edb 100644 --- a/apm_planner.pro +++ b/apm_planner.pro @@ -177,7 +177,7 @@ MacBuild { QT += multimedia QMAKE_INFO_PLIST = Custom-Info.plist - CONFIG += x86_64 + CONFIG += x86_64 arm64 CONFIG -= x86 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 ICON = $$BASEDIR/files/APMIcons/icon.icns