diff --git a/compileOSX.sh b/compileOSX.sh index e3e2ee3a..51601ffa 100755 --- a/compileOSX.sh +++ b/compileOSX.sh @@ -11,19 +11,22 @@ QT_VERSION=${4:-""} 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 -./cleanOSX.sh + ./cleanOSX.sh fi -if [ "$ARCH" == "arm64"]; then - ARCH_NAME="Apple" +if [ "$ARCH" == "arm64" ]; then + ARCH_NAME="Apple" +elif [ "$ARCH" == "x86_64" ]; then + ARCH_NAME="Intel" +else + echo "Unknown arch: $ARCH" + exit 1 fi -if [ "$ARCH" == "x86_64"]; then - ARCH_NAME="Intel" -fi +echo "Building for $ARCH_NAME" 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." -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}" mkdir -p "$dest" 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/#BUILD_NUMBER#/$BUILD_NUMBER/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" if [ "$SKIP_CODESIGN" = false ]; then diff --git a/dmg.json b/dmg.json index 26540e47..32b28981 100644 --- a/dmg.json +++ b/dmg.json @@ -1,5 +1,5 @@ { - "title": "YACReader-#VERSION#.#BUILD_NUMBER##QT_VERSION#", + "title": "YACReader-9.14.0.0Qt6", "icon": "icon.icns", "background": "background.png", "window": { @@ -19,31 +19,31 @@ "x": 80, "y": 90, "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, "y": 90, "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, "y": 295, "type": "file", - "path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/YACReaderLibraryServer" + "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/YACReaderLibraryServer" }, { "x": 120, "y": 295, "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, "y": 295, "type": "file", - "path": "YACReader-#VERSION#.#BUILD_NUMBER# MacOSX-Intel #QT_VERSION#/COPYING.txt" + "path": "YACReader-9.14.0.0 MacOSX-Apple Qt6/COPYING.txt" } ] -} \ No newline at end of file +}