diff --git a/Makefile b/Makefile index f7356d57c6..a27a3201fc 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ RM_RF = $(RM) -rf RUNTIME ?= net6 CONFIGURATION ?= Release +DOTNET_RID = $(shell ${DOTNET} --info | grep RID: | cut -w -f3) # Only for use in target version: VERSION := $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || (c=$$(git rev-parse --short HEAD 2>/dev/null) && echo git-$$c)) @@ -67,15 +68,23 @@ ifndef TARGETPLATFORM UNAME_S := $(shell uname -s) UNAME_M := $(shell uname -m) ifeq ($(UNAME_S),Darwin) +ifeq ($(RUNTIME)-$(DOTNET_RID),net6-osx-arm64) +TARGETPLATFORM = osx-arm64 +else TARGETPLATFORM = osx-x64 +endif else ifeq ($(UNAME_M),x86_64) TARGETPLATFORM = linux-x64 else +ifeq ($(UNAME_M),aarch64) +TARGETPLATFORM = linux-arm64 +else TARGETPLATFORM = unix-generic endif endif endif +endif ##################### DEVELOPMENT BUILDS AND TESTS ##################### # diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index 86a7f37163..ce82589935 100644 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -8,7 +8,7 @@ - + diff --git a/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj b/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj index 6c24b8dd43..be48df088d 100644 --- a/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj +++ b/OpenRA.Platforms.Default/OpenRA.Platforms.Default.csproj @@ -1,9 +1,9 @@  - - - + + + diff --git a/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj b/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj index c52492d025..6125539410 100644 --- a/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj +++ b/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj @@ -21,7 +21,7 @@ - + diff --git a/packaging/functions.sh b/packaging/functions.sh index 5ae2e73b6d..063239fdd1 100755 --- a/packaging/functions.sh +++ b/packaging/functions.sh @@ -10,7 +10,7 @@ # Arguments: # SRC_PATH: Path to the root OpenRA directory # DEST_PATH: Path to the root of the install destination (will be created if necessary) -# TARGETPLATFORM: Platform type (win-x86, win-x64, osx-x64, linux-x64, unix-generic) +# TARGETPLATFORM: Platform type (win-x86, win-x64, osx-x64, osx-arm64, linux-x64, linux-arm64, unix-generic) # RUNTIME: Runtime type (net6, mono) # COPY_GENERIC_LAUNCHER: If set to True the OpenRA.exe will also be copied (True, False) # COPY_CNC_DLL: If set to True the OpenRA.Mods.Cnc.dll will also be copied (True, False) @@ -68,13 +68,13 @@ install_assemblies() ( install -m644 "${LIB}" "${DEST_PATH}" done - if [ "${TARGETPLATFORM}" = "linux-x64" ]; then + if [ "${TARGETPLATFORM}" = "linux-x64" ] || [ "${TARGETPLATFORM}" = "linux-arm64" ]; then for LIB in "${SRC_PATH}/bin/"*.so; do install -m755 "${LIB}" "${DEST_PATH}" done fi - if [ "${TARGETPLATFORM}" = "osx-x64" ]; then + if [ "${TARGETPLATFORM}" = "osx-x64" ] || [ "${TARGETPLATFORM}" = "osx-arm64" ]; then for LIB in "${SRC_PATH}/bin/"*.dylib; do install -m755 "${LIB}" "${DEST_PATH}" done