build/install: fall back to Unix desktop
Instead of enumerating every Unix assume Freedesktop-compliant behavior. In future Android may want to define its own flavor like OSX.
This commit is contained in:
15
Makefile
15
Makefile
@@ -76,12 +76,10 @@ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev
|
||||
|
||||
# dependencies
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
os-dependencies = linux-dependencies
|
||||
else ifneq (,$(findstring BSD,$(UNAME_S)))
|
||||
os-dependencies = bsd-dependencies
|
||||
else ifeq ($(UNAME_S),Darwin)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
os-dependencies = osx-dependencies
|
||||
else
|
||||
os-dependencies = linux-dependencies
|
||||
endif
|
||||
|
||||
|
||||
@@ -311,11 +309,6 @@ linux-dependencies: cli-dependencies linux-native-dependencies
|
||||
linux-native-dependencies:
|
||||
@./thirdparty/configure-native-deps.sh
|
||||
|
||||
bsd-dependencies: cli-dependencies bsd-native-dependencies
|
||||
|
||||
bsd-native-dependencies:
|
||||
@./thirdparty/configure-native-deps.sh
|
||||
|
||||
windows-dependencies:
|
||||
@./thirdparty/fetch-thirdparty-deps-windows.sh
|
||||
|
||||
@@ -380,7 +373,7 @@ install-core: default
|
||||
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
|
||||
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
|
||||
|
||||
ifeq ($(shell uname),Linux)
|
||||
ifneq ($(UNAME_S),Darwin)
|
||||
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
|
||||
endif
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ namespace OpenRA
|
||||
psi.RedirectStandardOutput = true;
|
||||
var p = Process.Start(psi);
|
||||
var kernelName = p.StandardOutput.ReadToEnd();
|
||||
if (kernelName.Contains("Linux") || kernelName.Contains("BSD"))
|
||||
return PlatformType.Linux;
|
||||
if (kernelName.Contains("Darwin"))
|
||||
return PlatformType.OSX;
|
||||
else
|
||||
return PlatformType.Linux;
|
||||
}
|
||||
catch { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user