mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-07-29 12:18:46 +00:00
Created a script for building on mac, as creating a universal binary is somewhat involved
This commit is contained in:
parent
71e24de72e
commit
3e2ccda94d
4 changed files with 70 additions and 13 deletions
34
UnionPatcher.Gui.MacOS/Info.plist
Executable file
34
UnionPatcher.Gui.MacOS/Info.plist
Executable file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.lbpunion.unionpatcher</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright LBP Union 2024©</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Icon.icns</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>UnionPatcher</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>LBPUnion.UnionPatcher.Gui.MacOS</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<string>False</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -7,6 +7,8 @@
|
|||
<AssemblyName>LBPUnion.UnionPatcher.Gui.MacOS</AssemblyName>
|
||||
<RootNamespace>LBPUnion.UnionPatcher.Gui.MacOS</RootNamespace>
|
||||
<ApplicationIcon>Icon64.ico</ApplicationIcon>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
26
build-all.sh
26
build-all.sh
|
@ -1,4 +1,4 @@
|
|||
mkdir -p builds;
|
||||
mkdir -p builds
|
||||
#dotnet clean;
|
||||
|
||||
dotnet publish -c Windows -r win-x64 --self-contained
|
||||
|
@ -13,19 +13,19 @@ dotnet publish -c MacOS -r osx-arm64 --self-contained
|
|||
# $1: Name.zip
|
||||
# $2: Path to zip
|
||||
function createBuild() {
|
||||
currentDirectory=$(pwd)
|
||||
cd $2 || return 1;
|
||||
|
||||
zip -r "$1" *;
|
||||
cd $currentDirectory || return 1;
|
||||
mv "$2/$1" builds/
|
||||
currentDirectory=$(pwd)
|
||||
cd $2 || return 1
|
||||
|
||||
zip -r "$1" *
|
||||
cd $currentDirectory || return 1
|
||||
mv "$2/$1" builds/
|
||||
}
|
||||
|
||||
createBuild "UnionPatcher-Windows-x64.zip" "UnionPatcher.Gui.Windows/bin/Release/net6.0-windows/win-x64/publish/"
|
||||
createBuild "UnionPatcher-Windows-x64.zip" "UnionPatcher.Gui.Windows/bin/Release/net8.0-windows/win-x64/publish/"
|
||||
|
||||
createBuild "UnionPatcher-Linux-x64.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-x64/publish/"
|
||||
createBuild "UnionPatcher-Linux-arm.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-arm/publish/"
|
||||
createBuild "UnionPatcher-Linux-arm64.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-arm64/publish/"
|
||||
createBuild "UnionPatcher-Linux-x64.zip" "UnionPatcher.Gui.Linux/bin/Release/net8.0/linux-x64/publish/"
|
||||
createBuild "UnionPatcher-Linux-arm.zip" "UnionPatcher.Gui.Linux/bin/Release/net8.0/linux-arm/publish/"
|
||||
createBuild "UnionPatcher-Linux-arm64.zip" "UnionPatcher.Gui.Linux/bin/Release/net8.0/linux-arm64/publish/"
|
||||
|
||||
createBuild "UnionPatcher-macOS-x64.zip" "UnionPatcher.Gui.MacOS/bin/Release/net6.0/osx-x64/publish/"
|
||||
createBuild "UnionPatcher-macOS-arm64.zip" "UnionPatcher.Gui.MacOS/bin/Release/net6.0/osx-arm64/publish/"
|
||||
# CODESIGN_IDENTITY is the certificate that you want to use for codesigning for mac, if not present then will not be signed
|
||||
./build-mac.sh $CODESIGN_IDENTITY
|
||||
|
|
21
build-mac.sh
Executable file
21
build-mac.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
# Script to build UnionPatcher for mac, builds a universal binary, and zips it up. also codesigns if $1 is specified
|
||||
|
||||
dotnet clean
|
||||
dotnet publish UnionPatcher.Gui.MacOS --configuration Release /p:Platform="Any CPU" --self-contained -o macbuild
|
||||
dotnet publish UnionPatcher.Gui.MacOS --configuration Release /p:Platform="Any CPU" --arch x64 --self-contained -o macbuildx86
|
||||
|
||||
rm -rf macbuilduniversal
|
||||
mkdir macbuilduniversal
|
||||
cp -r macbuild/UnionPatcher.Gui.MacOS.app macbuilduniversal/UnionPatcher.app
|
||||
cp UnionPatcher.Gui.MacOS/Info.plist macbuilduniversal/UnionPatcher.app/Contents/Info.plist
|
||||
rm -rf macbuilduniversal/UnionPatcher.app/Contents/MacOS/scetool/linux*
|
||||
rm -rf macbuilduniversal/UnionPatcher.app/Contents/MacOS/scetool/win*
|
||||
|
||||
lipo -create -output macbuilduniversal/UnionPatcher.app/Contents/MacOS/LBPUnion.UnionPatcher.Gui.MacOS macbuildx86/LBPUnion.UnionPatcher.Gui.MacOS macbuild/LBPUnion.UnionPatcher.Gui.MacOS
|
||||
touch macbuilduniversal/UnionPatcher.app
|
||||
|
||||
if [ -z ${1+x} ]; then
|
||||
codesign -f --deep -s "$1" macbuilduniversal/UnionPatcher.app
|
||||
fi
|
||||
cd macbuilduniversal
|
||||
zip -r UnionPatcher-macOS-universal.zip UnionPatcher.app
|
Loading…
Add table
Add a link
Reference in a new issue