Skip to content

Commit 021d4d2

Browse files
CopilotLeftofZen
andauthored
Fix build.sh packaging issues from code review (#236)
* Initial plan * Fix build.sh issues from code review Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
1 parent 4c5206f commit 021d4d2

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

build.sh

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ framework=$(grep '<TargetFramework>' Gui/Gui.csproj | sed 's/.*<TargetFramework>
3030

3131
build_windows() {
3232
echo "Building the ${FG_BLUE}Editor${RESET} (win-x64)"
33-
dotnet publish Gui/Gui.csproj -c Release -p:WarningLevel=0 -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime win-x64
33+
dotnet publish Gui/Gui.csproj -c Release -p:WarningLevel=0 -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime win-x64 --no-restore
3434

3535
echo "Building the ${FG_BLUE}Updater${RESET} (win-x64)"
36-
dotnet publish GuiUpdater/GuiUpdater.csproj -c Release -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime win-x64
36+
dotnet publish GuiUpdater/GuiUpdater.csproj -c Release -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime win-x64 --no-restore
3737

3838
echo "Copying ${FG_BLUE}Updater${RESET} files into ${FG_BLUE}Gui${RESET} folders (win-x64)"
3939
cp GuiUpdater/bin/Release/$framework/win-x64/publish/* Gui/bin/Release/$framework/win-x64/publish
@@ -47,21 +47,21 @@ build_windows() {
4747

4848
build_linux() {
4949
echo "Building the ${FG_BLUE}Editor${RESET} (linux-x64)"
50-
dotnet publish Gui/Gui.csproj -c Release -p:WarningLevel=0 -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime linux-x64
50+
dotnet publish Gui/Gui.csproj -c Release -p:WarningLevel=0 -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime linux-x64 --no-restore
5151

5252
echo "Building the ${FG_BLUE}Updater${RESET} (linux-x64)"
53-
dotnet publish GuiUpdater/GuiUpdater.csproj -c Release -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime linux-x64
53+
dotnet publish GuiUpdater/GuiUpdater.csproj -c Release -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime linux-x64 --no-restore
5454

5555
echo "Copying ${FG_BLUE}Updater${RESET} files into ${FG_BLUE}Gui${RESET} folders (linux-x64)"
5656
cp GuiUpdater/bin/Release/$framework/linux-x64/publish/* Gui/bin/Release/$framework/linux-x64/publish
5757

58-
echo "Zipping ${FG_BLUE}linux-x64${RESET}"
58+
echo "Creating bzip2 tarball for ${FG_BLUE}linux-x64${RESET}"
5959
pushd "Gui/bin/Release/$framework/linux-x64/publish"
6060
chmod +x "./ObjectEditor"
6161
chmod +x "./ObjectEditorUpdater"
62-
touch "object-editor-$version-linux-x64.tar"
63-
tar --exclude="object-editor-$version-linux-x64.tar" -jcf "object-editor-$version-linux-x64.tar" .
64-
mv "object-editor-$version-linux-x64.tar" ../../..
62+
touch "object-editor-$version-linux-x64.tar.bz2"
63+
tar --exclude="object-editor-$version-linux-x64.tar.bz2" -jcf "object-editor-$version-linux-x64.tar.bz2" .
64+
mv "object-editor-$version-linux-x64.tar.bz2" ../../..
6565
popd
6666
}
6767

@@ -71,13 +71,12 @@ build_macos() {
7171
mac_bundle_id="com.openloco.objecteditor"
7272
macos_publish_dir="Gui/bin/Release/$framework/osx-x64/publish"
7373
macos_bundle_dir="$macos_publish_dir/$app_name.app"
74-
macos_plist_template="Gui/Packaging/macOS/Info.plist"
7574

7675
echo "Building the ${FG_BLUE}Editor${RESET} (osx-x64)"
77-
dotnet publish Gui/Gui.csproj -c Release -p:WarningLevel=0 -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime osx-x64
76+
dotnet publish Gui/Gui.csproj -c Release -p:WarningLevel=0 -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime osx-x64 --no-restore
7877

7978
echo "Building the ${FG_BLUE}Updater${RESET} (osx-x64)"
80-
dotnet publish GuiUpdater/GuiUpdater.csproj -c Release -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime osx-x64
79+
dotnet publish GuiUpdater/GuiUpdater.csproj -c Release -p:PublishSingleFile=true -p:Version=$version --self-contained --runtime osx-x64 --no-restore
8180

8281
echo "Copying ${FG_BLUE}Updater${RESET} files into ${FG_BLUE}Gui${RESET} folders (osx-x64)"
8382
cp GuiUpdater/bin/Release/$framework/osx-x64/publish/* Gui/bin/Release/$framework/osx-x64/publish
@@ -114,13 +113,13 @@ build_macos() {
114113
<key>NSHighResolutionCapable</key>
115114
<true/>
116115
<key>CFBundleIconFile</key>
117-
<string>loco_icon.icns</string>
116+
<string>loco_icon.png</string>
118117
</dict>
119118
</plist>
120119
EOF
121120

122-
if [ -f "Gui/Assets/loco_icon.icns" ]; then
123-
cp "Gui/Assets/loco_icon.icns" "$macos_bundle_dir/Contents/Resources/"
121+
if [ -f "Gui/Assets/loco_icon.png" ]; then
122+
cp "Gui/Assets/loco_icon.png" "$macos_bundle_dir/Contents/Resources/"
124123
fi
125124

126125
echo "Zipping ${FG_BLUE}osx-x64${RESET}"

0 commit comments

Comments
 (0)