From 362c4b0fe99d8405e6042e569128fdf1f3bcf65e Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Wed, 16 Apr 2025 09:22:56 -0700 Subject: [PATCH] build.sh: Add xemu_version fallback to macOS builds --- build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index d84b67ee4b..81fca2fb59 100755 --- a/build.sh +++ b/build.sh @@ -66,8 +66,14 @@ package_macos() { cp Info.plist dist/xemu.app/Contents/ - plutil -replace CFBundleShortVersionString -string $(cat ${project_source_dir}/XEMU_VERSION | cut -f1 -d-) dist/xemu.app/Contents/Info.plist - plutil -replace CFBundleVersion -string $(cat ${project_source_dir}/XEMU_VERSION | cut -f1 -d-) dist/xemu.app/Contents/Info.plist + if [[ -e "${project_source_dir}/XEMU_VERSION" ]]; then + xemu_version="$(cat ${project_source_dir}/XEMU_VERSION | cut -f1 -d-)" + else + xemu_version="0.0.0" + fi + + plutil -replace CFBundleShortVersionString -string "${xemu_version}" dist/xemu.app/Contents/Info.plist + plutil -replace CFBundleVersion -string "${xemu_version}" dist/xemu.app/Contents/Info.plist codesign --force --deep --preserve-metadata=entitlements,requirements,flags,runtime --sign - "${exe_path}" python3 ./scripts/gen-license.py --version-file=macos-libs/$target_arch/INSTALLED > dist/LICENSE.txt