Use ARCH_NAME during dmg creation

This commit is contained in:
Luis Ángel San Martín Rodríguez 2023-07-18 09:35:55 +02:00
parent f043933923
commit 4b4e7d5814
2 changed files with 19 additions and 15 deletions

View File

@ -11,19 +11,22 @@ QT_VERSION=${4:-""}
ARCH=${5:-"arm64"} ARCH=${5:-"arm64"}
echo "building macos binaries with these params: ${VERSION} ${BUILD_NUMBER} ${SKIP_CODESIGN} ${QT_VERSION}" echo "building macos binaries with these params: ${VERSION} ${BUILD_NUMBER} ${SKIP_CODESIGN} ${QT_VERSION} ${ARCH}"
if [ "$6" == "clean" ]; then if [ "$6" == "clean" ]; then
./cleanOSX.sh ./cleanOSX.sh
fi fi
if [ "$ARCH" == "arm64"]; then if [ "$ARCH" == "arm64" ]; then
ARCH_NAME="Apple" ARCH_NAME="Apple"
elif [ "$ARCH" == "x86_64" ]; then
ARCH_NAME="Intel"
else
echo "Unknown arch: $ARCH"
exit 1
fi fi
if [ "$ARCH" == "x86_64"]; then echo "Building for $ARCH_NAME"
ARCH_NAME="Intel"
fi
hash qmake 2>/dev/null || { echo >&2 "Qmake command not available. Please add the bin subfolder of your Qt installation to the PATH environment variable."; exit 1; } hash qmake 2>/dev/null || { echo >&2 "Qmake command not available. Please add the bin subfolder of your Qt installation to the PATH environment variable."; exit 1; }
@ -84,7 +87,7 @@ fi
echo "Preparing apps for release, Done." echo "Preparing apps for release, Done."
dest="YACReader-$VERSION.$BUILD_NUMBER MacOSX-${ARCH_NAME} ${QT_VERSION}" dest="YACReader-$VERSION.$BUILD_NUMBER MacOSX-$ARCH_NAME ${QT_VERSION}"
echo "Copying to destination folder ${dest}" echo "Copying to destination folder ${dest}"
mkdir -p "$dest" mkdir -p "$dest"
cp -R YACReader.app "${dest}/YACReader.app" cp -R YACReader.app "${dest}/YACReader.app"
@ -108,6 +111,7 @@ echo "Creating dmg package"
sed -i'' -e "s/#VERSION#/$VERSION/g" dmg.json sed -i'' -e "s/#VERSION#/$VERSION/g" dmg.json
sed -i'' -e "s/#BUILD_NUMBER#/$BUILD_NUMBER/g" dmg.json sed -i'' -e "s/#BUILD_NUMBER#/$BUILD_NUMBER/g" dmg.json
sed -i'' -e "s/#QT_VERSION#/$QT_VERSION/g" dmg.json sed -i'' -e "s/#QT_VERSION#/$QT_VERSION/g" dmg.json
sed -i'' -e "s/#ARCH_NAME#/$ARCH_NAME/g" dmg.json
appdmg dmg.json "$dest.dmg" appdmg dmg.json "$dest.dmg"
if [ "$SKIP_CODESIGN" = false ]; then if [ "$SKIP_CODESIGN" = false ]; then

View File

@ -1,5 +1,5 @@
{ {
"title": "YACReader-#VERSION#.#BUILD_NUMBER##QT_VERSION#", "title": "YACReader-9.14.0.0Qt6",
"icon": "icon.icns", "icon": "icon.icns",
"background": "background.png", "background": "background.png",
"window": { "window": {
@ -19,31 +19,31 @@
"x": 80, "x": 80,
"y": 90, "y": 90,
"type": "file", "type": "file",
"path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/YACReader.app" "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/YACReader.app"
}, },
{ {
"x": 235, "x": 235,
"y": 90, "y": 90,
"type": "file", "type": "file",
"path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/YACReaderLibrary.app" "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/YACReaderLibrary.app"
}, },
{ {
"x": 470, "x": 470,
"y": 295, "y": 295,
"type": "file", "type": "file",
"path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/YACReaderLibraryServer" "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/YACReaderLibraryServer"
}, },
{ {
"x": 120, "x": 120,
"y": 295, "y": 295,
"type": "file", "type": "file",
"path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/README.md" "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/README.md"
}, },
{ {
"x": 290, "x": 290,
"y": 295, "y": 295,
"type": "file", "type": "file",
"path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/COPYING.txt" "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/COPYING.txt"
} }
] ]
} }