Skip to content

Commit

Permalink
define WINDOWS_PROPERTIES and SELF_CONTAINED_PROPERTIES in Makefile
Browse files Browse the repository at this point in the history
see also. .NET 7 Self-Contained, NativeAOT, and ReadyToRun Cheatsheet
https://www.nikouusitalo.com/blog/net-7-self-contained-nativeaot-and-readytorun-cheatsheet/
  • Loading branch information
takano32 committed Apr 11, 2023
1 parent 9a80f84 commit a667aeb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
WINDOWS_PROPERTIES=-p:DefineConstants="SEVENZIP" -p:EnableWindowsTargeting=true
SELF_CONTAINED_PROPERTIES=-p:PublishSingleFile=true -p:SelfContained=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false
.PHONY: all build clean
all:
$(MAKE) clean
Expand All @@ -16,24 +18,24 @@ clean: clean-gui-win-x64 clean-win-x64 clean-linux-x64 clean-osx-x64 clean-osx-a


build-gui-win-x64:
dotnet publish ./PSXPackagerGUI/PSXPackagerGUI.csproj -c Release --self-contained -r win-x64 -o ./build/PsxPackagerGUI -p:PublishSingleFile=true -p:PublishReadyToRun=false -p:DefineConstants="SEVENZIP" -p:DebugType=None -p:DebugSymbols=false -p:EnableWindowsTargeting=true
dotnet publish ./PSXPackagerGUI/PSXPackagerGUI.csproj -c Release -r win-x64 -o ./build/PsxPackagerGUI $(SELF_CONTAINED_PROPERTIES) $(WINDOWS_PROPERTIES) -p:PublishTrimmed=false
cp -a ./libs/* ./build/PsxPackagerGUI

build-win-x64:
dotnet publish ./PSXPackager/PSXPackager-windows.csproj -c Release --self-contained -r win-x64 -o ./build/win-x64 -p:DefineConstants="SEVENZIP" -p:DebugType=None -p:DebugSymbols=false -p:EnableWindowsTargeting=true
dotnet publish ./PSXPackager/PSXPackager-windows.csproj -c Release -r win-x64 -o ./build/win-x64 $(SELF_CONTAINED_PROPERTIES) $(WINDOWS_PROPERTIES)
cp -a ./libs/* ./build/win-x64
cp README.md ./build/win-x64

build-linux-x64:
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release --self-contained -r linux-x64 -o ./build/linux-x64 -p:DebugType=None -p:DebugSymbols=false
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release -r linux-x64 -o ./build/linux-x64 $(SELF_CONTAINED_PROPERTIES)
cp README.md ./build/linux-x64

build-osx-x64:
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release --self-contained -r osx-x64 -o ./build/osx-x64 -p:DebugType=None -p:DebugSymbols=false
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release -r osx-x64 -o ./build/osx-x64 $(SELF_CONTAINED_PROPERTIES)
cp README.md ./build/osx-x64

build-osx-arm64:
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release --self-contained -r osx-arm64 -o ./build/osx-arm64 -p:DebugType=None -p:DebugSymbols=false
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release -r osx-arm64 -o ./build/osx-arm64 $(SELF_CONTAINED_PROPERTIES)
cp README.md ./build/osx-arm64

clean-gui-win-x64:
Expand Down

0 comments on commit a667aeb

Please sign in to comment.