Skip to content

attempt to build mac app bundle#232

Open
LeftofZen wants to merge 1 commit intomasterfrom
fixmacbuild
Open

attempt to build mac app bundle#232
LeftofZen wants to merge 1 commit intomasterfrom
fixmacbuild

Conversation

@LeftofZen
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 4, 2026 08:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the build.sh packaging pipeline to produce platform-specific build artifacts and adds an initial macOS .app bundle packaging step.

Changes:

  • Refactors the build steps into per-platform functions (Windows/Linux/macOS).
  • Adds macOS .app bundle creation with an inline Info.plist and zips the bundle.
  • Adds explicit dotnet restore steps prior to building.

mac_bundle_id="com.openloco.objecteditor"
macos_publish_dir="Gui/bin/Release/$framework/osx-x64/publish"
macos_bundle_dir="$macos_publish_dir/$app_name.app"
macos_plist_template="Gui/Packaging/macOS/Info.plist"
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos_plist_template points to Gui/Packaging/macOS/Info.plist, but that directory doesn’t exist in the repo and the variable is never used. Remove it or implement template-based plist generation to avoid dead/incorrect config.

Suggested change
macos_plist_template="Gui/Packaging/macOS/Info.plist"

Copilot uses AI. Check for mistakes.
Comment on lines +58 to +64
echo "Zipping ${FG_BLUE}linux-x64${RESET}"
pushd "Gui/bin/Release/$framework/linux-x64/publish"
chmod +x "./ObjectEditor"
chmod +x "./ObjectEditorUpdater"
touch "object-editor-$version-linux-x64.tar"
tar --exclude="object-editor-$version-linux-x64.tar" -jcf "object-editor-$version-linux-x64.tar" .
mv "object-editor-$version-linux-x64.tar" ../../..
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Linux artifact is created with tar -j (bzip2 compression) but is named *.tar and the log says "Zipping". This produces a misleading filename/content-type for consumers of the build output. Rename the output to *.tar.bz2 (or drop -j if you intend an uncompressed tar) and adjust the log message accordingly.

Suggested change
echo "Zipping ${FG_BLUE}linux-x64${RESET}"
pushd "Gui/bin/Release/$framework/linux-x64/publish"
chmod +x "./ObjectEditor"
chmod +x "./ObjectEditorUpdater"
touch "object-editor-$version-linux-x64.tar"
tar --exclude="object-editor-$version-linux-x64.tar" -jcf "object-editor-$version-linux-x64.tar" .
mv "object-editor-$version-linux-x64.tar" ../../..
echo "Creating bzip2 tarball for ${FG_BLUE}linux-x64${RESET}"
pushd "Gui/bin/Release/$framework/linux-x64/publish"
chmod +x "./ObjectEditor"
chmod +x "./ObjectEditorUpdater"
touch "object-editor-$version-linux-x64.tar.bz2"
tar --exclude="object-editor-$version-linux-x64.tar.bz2" -jcf "object-editor-$version-linux-x64.tar.bz2" .
mv "object-editor-$version-linux-x64.tar.bz2" ../../..

Copilot uses AI. Check for mistakes.
Comment on lines +136 to +143
# Restore dependencies first to avoid race conditions during parallel builds
dotnet restore Gui/Gui.csproj
dotnet restore GuiUpdater/GuiUpdater.csproj

# 3. Build the editor for different platforms in parallel
build_windows
build_linux
build_macos
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet restore is run explicitly, but dotnet publish will restore again unless --no-restore is passed. This adds unnecessary work and can significantly slow CI packaging. Add --no-restore to the publishes (or remove the explicit restores if you prefer publish-driven restores).

Copilot uses AI. Check for mistakes.
Comment on lines +117 to +123
<string>loco_icon.icns</string>
</dict>
</plist>
EOF

if [ -f "Gui/Assets/loco_icon.icns" ]; then
cp "Gui/Assets/loco_icon.icns" "$macos_bundle_dir/Contents/Resources/"
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated Info.plist declares CFBundleIconFile as loco_icon.icns, but the repo doesn't contain Gui/Assets/loco_icon.icns (only .ico/.png). As written, the bundle will never include the icon you declare. Either add/generate an .icns during the build (e.g., from the PNG) or update the plist/icon copy logic to match an actual bundled icon file.

Suggested change
<string>loco_icon.icns</string>
</dict>
</plist>
EOF
if [ -f "Gui/Assets/loco_icon.icns" ]; then
cp "Gui/Assets/loco_icon.icns" "$macos_bundle_dir/Contents/Resources/"
<string>loco_icon.png</string>
</dict>
</plist>
EOF
if [ -f "Gui/Assets/loco_icon.png" ]; then
cp "Gui/Assets/loco_icon.png" "$macos_bundle_dir/Contents/Resources/"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant