Conversation
There was a problem hiding this comment.
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
.appbundle creation with an inlineInfo.plistand zips the bundle. - Adds explicit
dotnet restoresteps 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" |
There was a problem hiding this comment.
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.
| macos_plist_template="Gui/Packaging/macOS/Info.plist" |
| 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" ../../.. |
There was a problem hiding this comment.
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.
| 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" ../../.. |
| # 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 |
There was a problem hiding this comment.
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).
| <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/" |
There was a problem hiding this comment.
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.
| <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/" |
No description provided.