Skip to content

Commit bc02bc4

Browse files
committed
Create MacDeploy.sh to bundle Qt frameworks
1 parent 43df997 commit bc02bc4

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ jobs:
123123
cd Source/build
124124
cmake ..
125125
make
126+
echo "\n\n\n" | ../../Tools/MacDeploy.sh
126127
shell: bash
127128

128129
- name: Copy LICENSE, README, Prepare Artifacts

Tools/MacDeploy.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." ; pwd -P)"
3+
package="$project_root/Source/build/dolphin-memory-engine.app"
4+
5+
printf "Enter location of DME package (default=$package): "
6+
read -r package_
7+
if [ ! -z "$package_" ]; then package="$package_"; fi
8+
9+
printf "Perform rpath fix? (required in most cases with Homebrew Qt install) [Y/n] "
10+
read -r rpath_fix
11+
if [ "$rpath_fix" == "y" ] || [ "$rpath_fix" == "Y" ] || [ -z "$rpath_fix" ] ; then
12+
qtlib="$(brew --prefix qt@6)"
13+
printf "Enter location of Qt installation (default=$qtlib): "
14+
read -r qtlib_
15+
if [ ! -z "$qtlib_" ]; then qtlib="$qtlib_"; fi
16+
17+
ln -s "$qtlib/Frameworks" "$package/../lib"
18+
fi
19+
20+
macdeployqt "$package"
21+
if [ $? -ne 0 ]; then
22+
echo "Failed to deploy package!"
23+
exit 1
24+
fi
25+
26+
codesign --force --deep -s - "$package"
27+
if [ $? -ne 0 ]; then
28+
echo "Failed to sign deployed package!"
29+
exit 1
30+
fi

0 commit comments

Comments
 (0)