diff --git a/.gitignore b/.gitignore index 1742b876..d9b7b781 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,7 @@ .vs .vscode bin +build obj *.user +.DS_Store diff --git a/src/BuildMacOS.command b/src/BuildMacOS.command index 5a8be1d7..c8a028ea 100644 --- a/src/BuildMacOS.command +++ b/src/BuildMacOS.command @@ -3,21 +3,25 @@ dotnet publish -c Release -r osx-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained dotnet publish -c Release -r osx-arm64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained -rm -rf macOS -mkdir -p macOS -mkdir -p macOS/x64/SourceGit.app/Contents/MacOS -mkdir -p macOS/arm64/SourceGit.app/Contents/MacOS -mkdir -p macOS/x64/SourceGit.app/Contents/Resources -mkdir -p macOS/arm64/SourceGit.app/Contents/Resources +rm -rf build -cp App.plist macOS/x64/SourceGit.app/Contents/Info.plist -cp App.plist macOS/arm64/SourceGit.app/Contents/Info.plist +mkdir -p build/SourceGit +mkdir -p build/SourceGit/x64/SourceGit.app/Contents/MacOS +mkdir -p build/SourceGit/arm64/SourceGit.app/Contents/MacOS +mkdir -p build/SourceGit/x64/SourceGit.app/Contents/Resources +mkdir -p build/SourceGit/arm64/SourceGit.app/Contents/Resources -cp App.icns macOS/x64/SourceGit.app/Contents/Resources/App.icns -cp App.icns macOS/arm64/SourceGit.app/Contents/Resources/App.icns +cp App.plist build/SourceGit/x64/SourceGit.app/Contents/Info.plist +cp App.plist build/SourceGit/arm64/SourceGit.app/Contents/Info.plist -cp -r bin/Release/net8.0/osx-x64/publish/* macOS/x64/SourceGit.app/Contents/MacOS/ -cp -r bin/Release/net8.0/osx-arm64/publish/* macOS/arm64/SourceGit.app/Contents/MacOS/ +cp App.icns build/SourceGit/x64/SourceGit.app/Contents/Resources/App.icns +cp App.icns build/SourceGit/arm64/SourceGit.app/Contents/Resources/App.icns -rm -rf macOS/x64/SourceGit.app/Contents/MacOS/SourceGit.dsym -rm -rf macOS/arm64/SourceGit.app/Contents/MacOS/SourceGit.dsym +cp -r bin/Release/net8.0/osx-x64/publish/* build/SourceGit/x64/SourceGit.app/Contents/MacOS/ +cp -r bin/Release/net8.0/osx-arm64/publish/* build/SourceGit/arm64/SourceGit.app/Contents/MacOS/ + +rm -rf build/SourceGit/x64/SourceGit.app/Contents/MacOS/SourceGit.dsym +rm -rf build/SourceGit/arm64/SourceGit.app/Contents/MacOS/SourceGit.dsym + +cd build +zip SourceGit.macOS.zip -r SourceGit \ No newline at end of file