build.sh: Add xemu_version fallback to macOS builds

This commit is contained in:
Erik Abair 2025-04-16 09:22:56 -07:00 committed by mborgerson
parent 2cc926588b
commit 1f876ce0da
1 changed files with 8 additions and 2 deletions

View File

@ -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