Skip to content

Commit

Permalink
macdeployqt returns 0 when it fails...
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Nov 15, 2023
1 parent cd135e6 commit 44e263c
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions scripts/macOS/2_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,24 @@ do
ARGUMENTS="${ARGUMENTS} -executable=${plugin}"
done

if ${QT_DIR}macdeployqt $INSTALL_PATH/dummybin.app \
# save in message the output of macdeployqt
message=$(${QT_DIR}macdeployqt $INSTALL_PATH/dummybin.app \
-executable=$MODULE_NAME \
$ARGUMENTS; \
then
echo "macdeployqt completed successfully."
rsync -a $INSTALL_PATH/dummybin.app/Contents/Frameworks/ $INSTALL_PATH/Frameworks/
rsync -a $INSTALL_PATH/dummybin.app/Contents/PlugIns/ $INSTALL_PATH/PlugIns/
mv $INSTALL_PATH/dummybin.app/Contents/pmeshlab* $INSTALL_PATH/
rm -rf $INSTALL_PATH/dummybin.app
else
echo "macdeployqt failed with error code $?. Script was not completed successfully."
$ARGUMENTS 2>&1)

# if message contains "ERROR" then macdeployqt failed
if [[ $message == *"ERROR"* ]]; then
echo "macdeployqt failed."
echo "macdeployqt output:"
echo $message
exit 1
fi

echo "macdeployqt completed successfully."
rsync -a $INSTALL_PATH/dummybin.app/Contents/Frameworks/ $INSTALL_PATH/Frameworks/
rsync -a $INSTALL_PATH/dummybin.app/Contents/PlugIns/ $INSTALL_PATH/PlugIns/
mv $INSTALL_PATH/dummybin.app/Contents/pmeshlab* $INSTALL_PATH/
rm -rf $INSTALL_PATH/dummybin.app



0 comments on commit 44e263c

Please sign in to comment.