Skip to content

Commit 69788a1

Browse files
committed
Try macdeployqtfix
1 parent 2b9222b commit 69788a1

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

SerialPrograms/azure-pipelines.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ resources:
1414
name: PokemonAutomation/Packages
1515
endpoint: Koi-3088
1616
ref: refs/heads/master
17+
- repository: macdeployqtfix
18+
type: github
19+
name: arl/macdeployqtfix
20+
endpoint: Koi-3088
21+
ref: refs/heads/master
1722

1823
parameters:
1924
- name: buildType
@@ -335,6 +340,12 @@ jobs:
335340
persistCredentials: true
336341
clean: false
337342

343+
- checkout: macdeployqtfix
344+
path: Arduino-Source/macdeployqtfix
345+
submodules: recursive
346+
persistCredentials: true
347+
clean: false
348+
338349
- script: |
339350
export PATH=$(macos_path)
340351
cd "$(Pipeline.Workspace)/Arduino-Source/SerialPrograms"
@@ -370,11 +381,32 @@ jobs:
370381
371382
echo "=== Running Macdeployqt ==="
372383
install_name_tool -add_rpath $BREW_PREFIX/lib $MACOS_DIR/SerialPrograms
373-
otool -l $APP_DIR | grep -A2 LC_RPATH
374-
"$QT_BIN/macdeployqt" "$APP_DIR" -no-strip -verbose=3
384+
otool -l $MACOS_DIR/SerialPrograms | grep -A2 LC_RPATH
385+
"$QT_BIN/macdeployqt" $APP_DIR -no-strip -verbose=3
375386
displayName: 'Run macdeployqt'
376387
condition: succeeded()
377388
389+
- bash: |
390+
set -e
391+
echo "=== Running macdeployqtfix for MacOS $(architecture) ==="
392+
export PATH=$(macos_path)
393+
APP_DIR="$(Pipeline.Workspace)/Arduino-Source/build/$(cmake_preset)/SerialPrograms.app"
394+
MACOS_DIR="$APP_DIR/Contents/MacOS"
395+
396+
if [ $(architecture) = "X64" ]; then
397+
echo "Using Intel Homebrew and Qt..."
398+
BREW_PREFIX=$(/usr/local/bin/brew --prefix)
399+
QT_DIR="$BREW_PREFIX/opt/qt/"
400+
else
401+
echo "Using ARM64 Homebrew and Qt..."
402+
BREW_PREFIX=$(/opt/homebrew/bin/brew --prefix)
403+
QT_DIR="$BREW_PREFIX/opt/qt/"
404+
fi
405+
406+
python3 "$(Pipeline.Workspace)/Arduino-Source/macdeployqtfix/macdeployqtfix.py" $MACOS_DIR/SerialPrograms $QT_DIR -v
407+
displayName: 'Run macdeployqtfix'
408+
condition: succeeded()
409+
378410
- bash: |
379411
set -euo pipefail
380412
echo "=== Fixing the app bundle ==="

0 commit comments

Comments
 (0)