[Build/Apple] Use XeniOS mac bundle naming

This commit is contained in:
XeniOS
2026-06-16 10:23:53 +09:00
parent 6236eb1ada
commit 4d3abfcf55
6 changed files with 43 additions and 43 deletions
+15 -15
View File
@@ -71,31 +71,31 @@ jobs:
- name: Download macOS arm64 app bundle
uses: actions/download-artifact@main
with:
name: xenia_edge_macos_arm64_app
name: xenios_macos_arm64_app
path: macos_arm64_app
- name: Download macOS x86_64 app bundle
uses: actions/download-artifact@main
with:
name: xenia_edge_macos_x86_64_app
name: xenios_macos_x86_64_app
path: macos_x86_64_app
- name: Build universal macOS DMG
run: |
mkdir -p macos_arm64_extracted macos_x86_64_extracted
tar -xf macos_arm64_app/Xenia-edge.app.tar -C macos_arm64_extracted
tar -xf macos_x86_64_app/Xenia-edge.app.tar -C macos_x86_64_extracted
tar -xf macos_arm64_app/XeniOS.app.tar -C macos_arm64_extracted
tar -xf macos_x86_64_app/XeniOS.app.tar -C macos_x86_64_extracted
arm64_bundle="macos_arm64_extracted/Xenia-edge.app"
x86_64_bundle="macos_x86_64_extracted/Xenia-edge.app"
arm64_exe="$arm64_bundle/Contents/MacOS/Xenia-edge"
x86_64_exe="$x86_64_bundle/Contents/MacOS/Xenia-edge"
arm64_bundle="macos_arm64_extracted/XeniOS.app"
x86_64_bundle="macos_x86_64_extracted/XeniOS.app"
arm64_exe="$arm64_bundle/Contents/MacOS/XeniOS"
x86_64_exe="$x86_64_bundle/Contents/MacOS/XeniOS"
# Only the main executable gets merged; any non-Mach-O drift between
# the two Contents/ trees would be silently dropped here, so fail
# loudly if the bundles diverge anywhere outside MacOS/Xenia-edge.
# loudly if the bundles diverge anywhere outside MacOS/XeniOS.
if ! diff -r --brief \
--exclude=Xenia-edge \
--exclude=XeniOS \
"$arm64_bundle/Contents" "$x86_64_bundle/Contents"; then
echo "::error::arm64 and x86_64 app bundles differ outside the main executable"
exit 1
@@ -105,8 +105,8 @@ jobs:
# Mach-O with the fat one. Write to a separate path then mv — lipo
# reads inputs before writing, but overlapping input/output is
# fragile.
lipo -create "$arm64_exe" "$x86_64_exe" -output Xenia-edge.universal
mv Xenia-edge.universal "$arm64_exe"
lipo -create "$arm64_exe" "$x86_64_exe" -output XeniOS.universal
mv XeniOS.universal "$arm64_exe"
info=$(lipo -info "$arm64_exe")
echo "$info"
@@ -124,9 +124,9 @@ jobs:
cp LICENSE dmg_contents/
ln -s /Applications dmg_contents/Applications
hdiutil create -volname "Xenia-edge" \
hdiutil create -volname "XeniOS" \
-srcfolder dmg_contents -ov -format UDZO \
xenia_edge_macos.dmg
xenios_macos.dmg
rm -rf dmg_contents
- name: Create Release
@@ -166,5 +166,5 @@ jobs:
# Create release
gh release create $tag \
xenia_edge_linux.AppImage xenia_edge_windows.zip \
xenia_edge_macos.dmg \
xenios_macos.dmg \
--target $GITHUB_SHA -t "xenia_edge" --notes-file release_notes.md
+12 -12
View File
@@ -199,13 +199,13 @@ jobs:
- name: Prepare artifacts
id: prepare_artifacts
run: |
app_bundle="build/bin/macOS/Release/Xenia-edge.app"
app_bundle="build/bin/macOS/Release/XeniOS.app"
if [ ! -d "$app_bundle" ]; then
echo "::error::App bundle not found at $app_bundle"
ls -la build/bin/macOS/Release/ 2>&1 || true
exit 1
fi
main_exe="$app_bundle/Contents/MacOS/Xenia-edge"
main_exe="$app_bundle/Contents/MacOS/XeniOS"
if [ "$(stat -f%z "$main_exe")" -le 100000 ]; then
echo "::error::$main_exe is too small."
exit 1
@@ -220,14 +220,14 @@ jobs:
# Tar the bundle so upload-artifact preserves the executable bit and
# any symlinks; the universal-merge job untars and lipos.
mkdir -p artifacts
tar -cf artifacts/Xenia-edge.app.tar -C "$(dirname "$app_bundle")" "$(basename "$app_bundle")"
tar -cf artifacts/XeniOS.app.tar -C "$(dirname "$app_bundle")" "$(basename "$app_bundle")"
- name: Upload xenia edge macOS arm64 app bundle
- name: Upload XeniOS macOS arm64 app bundle
if: steps.prepare_artifacts.outcome == 'success'
uses: actions/upload-artifact@main
with:
name: xenia_edge_macos_arm64_app
path: artifacts/Xenia-edge.app.tar
name: xenios_macos_arm64_app
path: artifacts/XeniOS.app.tar
if-no-files-found: error
build-macos-x86_64:
@@ -283,13 +283,13 @@ jobs:
- name: Prepare artifacts
id: prepare_artifacts
run: |
app_bundle="build-x64/bin/macOS/Release/Xenia-edge.app"
app_bundle="build-x64/bin/macOS/Release/XeniOS.app"
if [ ! -d "$app_bundle" ]; then
echo "::error::App bundle not found at $app_bundle"
ls -la build-x64/bin/macOS/Release/ 2>&1 || true
exit 1
fi
main_exe="$app_bundle/Contents/MacOS/Xenia-edge"
main_exe="$app_bundle/Contents/MacOS/XeniOS"
if [ "$(stat -f%z "$main_exe")" -le 100000 ]; then
echo "::error::$main_exe is too small."
exit 1
@@ -302,14 +302,14 @@ jobs:
fi
mkdir -p artifacts
tar -cf artifacts/Xenia-edge.app.tar -C "$(dirname "$app_bundle")" "$(basename "$app_bundle")"
tar -cf artifacts/XeniOS.app.tar -C "$(dirname "$app_bundle")" "$(basename "$app_bundle")"
- name: Upload xenia edge macOS x86_64 app bundle
- name: Upload XeniOS macOS x86_64 app bundle
if: steps.prepare_artifacts.outcome == 'success'
uses: actions/upload-artifact@main
with:
name: xenia_edge_macos_x86_64_app
path: artifacts/Xenia-edge.app.tar
name: xenios_macos_x86_64_app
path: artifacts/XeniOS.app.tar
if-no-files-found: error
build-windows:
+3 -3
View File
@@ -169,7 +169,7 @@ endif()
if(APPLE)
# Drives the .app bundle directory name and the binary in Contents/MacOS/.
set_target_properties(xenia-app PROPERTIES OUTPUT_NAME "Xenia-edge")
set_target_properties(xenia-app PROPERTIES OUTPUT_NAME "XeniOS")
else()
set_target_properties(xenia-app PROPERTIES OUTPUT_NAME "xenia_edge")
endif()
@@ -336,8 +336,8 @@ elseif(APPLE)
set_target_properties(xenia-app PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
MACOSX_BUNDLE_BUNDLE_NAME "Xenia-edge"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.xenia.edge"
MACOSX_BUNDLE_BUNDLE_NAME "XeniOS"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.xenios"
MACOSX_BUNDLE_BUNDLE_VERSION "1"
MACOSX_BUNDLE_SHORT_VERSION_STRING "1.0"
MACOSX_BUNDLE_ICON_FILE "AppIcon.icns")
+1 -1
View File
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Xenia-edge</string>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
+9 -9
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Combine two single-arch Xenia-edge.app bundles into one universal bundle.
# Combine two single-arch XeniOS.app bundles into one universal bundle.
# Run after both arm64 and x86_64 builds complete. Similar to the lipo step
# in .github/workflows/CI.yml but meant for interactive dev use.
#
@@ -11,8 +11,8 @@
set -euo pipefail
arm64_app=${1:-build/bin/macOS/Release/Xenia-edge.app}
x86_64_app=${2:-build-x64/bin/macOS/Release/Xenia-edge.app}
arm64_app=${1:-build/bin/macOS/Release/XeniOS.app}
x86_64_app=${2:-build-x64/bin/macOS/Release/XeniOS.app}
for app in "$arm64_app" "$x86_64_app"; do
if [[ ! -d "$app" ]]; then
@@ -21,8 +21,8 @@ for app in "$arm64_app" "$x86_64_app"; do
fi
done
arm64_exe="$arm64_app/Contents/MacOS/Xenia-edge"
x86_64_exe="$x86_64_app/Contents/MacOS/Xenia-edge"
arm64_exe="$arm64_app/Contents/MacOS/XeniOS"
x86_64_exe="$x86_64_app/Contents/MacOS/XeniOS"
# Returns a path containing only the requested arch. If the input is already
# thin and matches, returns the original path; if it's fat (e.g. left over from
@@ -43,7 +43,7 @@ thin_input() {
printf -v "$out" '%s' "$exe"
else
local tmp
tmp=$(mktemp -t Xenia-edge."$want")
tmp=$(mktemp -t XeniOS."$want")
lipo -thin "$want" "$exe" -output "$tmp"
printf -v "$out" '%s' "$tmp"
fi
@@ -57,15 +57,15 @@ thin_input "$x86_64_exe" x86_64 x86_64_input
# xenia.log is a runtime drop (the app cwd is Contents/MacOS), and
# _CodeSignature is regenerated by the codesign call below.
if ! diff -r --brief \
--exclude=Xenia-edge \
--exclude=XeniOS \
--exclude=xenia.log \
--exclude=_CodeSignature \
"$arm64_app/Contents" "$x86_64_app/Contents"; then
echo "error: bundles differ outside Contents/MacOS/Xenia-edge" >&2
echo "error: bundles differ outside Contents/MacOS/XeniOS" >&2
exit 1
fi
tmp=$(mktemp -t Xenia-edge.universal)
tmp=$(mktemp -t XeniOS.universal)
lipo -create "$arm64_input" "$x86_64_input" -output "$tmp"
mv "$tmp" "$arm64_exe"
+3 -3
View File
@@ -334,9 +334,9 @@ compile_bundle_icon_assets() {
local app_bundle="$1"
local platform="$2"
local min_version="$3"
local icon_catalog="$root/assets/apple/AppIcon.xcassets"
local icon_source="$root/assets/apple/AppIcon.icon"
[ -d "$icon_catalog" ] || die "missing icon catalog: $icon_catalog"
[ -d "$icon_source" ] || die "missing Icon Composer source: $icon_source"
local resources_dir plist partial_plist
resources_dir="$(bundle_resources_path "$app_bundle")"
@@ -365,7 +365,7 @@ compile_bundle_icon_assets() {
plist_delete_key "$plist" "CFBundleIconName"
fi
actool_cmd+=("$icon_catalog")
actool_cmd+=("$icon_source")
"${actool_cmd[@]}" >/dev/null
plist_merge "$plist" "$partial_plist"
rm -f "$partial_plist"