mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Use ARCH_NAME during dmg creation
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user