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
|
# dependencies
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
ifeq ($(UNAME_S),Linux)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
os-dependencies = linux-dependencies
|
|
||||||
else ifneq (,$(findstring BSD,$(UNAME_S)))
|
|
||||||
os-dependencies = bsd-dependencies
|
|
||||||
else ifeq ($(UNAME_S),Darwin)
|
|
||||||
os-dependencies = osx-dependencies
|
os-dependencies = osx-dependencies
|
||||||
|
else
|
||||||
|
os-dependencies = linux-dependencies
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@@ -311,11 +309,6 @@ linux-dependencies: cli-dependencies linux-native-dependencies
|
|||||||
linux-native-dependencies:
|
linux-native-dependencies:
|
||||||
@./thirdparty/configure-native-deps.sh
|
@./thirdparty/configure-native-deps.sh
|
||||||
|
|
||||||
bsd-dependencies: cli-dependencies bsd-native-dependencies
|
|
||||||
|
|
||||||
bsd-native-dependencies:
|
|
||||||
@./thirdparty/configure-native-deps.sh
|
|
||||||
|
|
||||||
windows-dependencies:
|
windows-dependencies:
|
||||||
@./thirdparty/fetch-thirdparty-deps-windows.sh
|
@./thirdparty/fetch-thirdparty-deps-windows.sh
|
||||||
|
|
||||||
@@ -380,7 +373,7 @@ install-core: default
|
|||||||
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
|
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
|
||||||
|
|
||||||
ifeq ($(shell uname),Linux)
|
ifneq ($(UNAME_S),Darwin)
|
||||||
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
|
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ namespace OpenRA
|
|||||||
psi.RedirectStandardOutput = true;
|
psi.RedirectStandardOutput = true;
|
||||||
var p = Process.Start(psi);
|
var p = Process.Start(psi);
|
||||||
var kernelName = p.StandardOutput.ReadToEnd();
|
var kernelName = p.StandardOutput.ReadToEnd();
|
||||||
if (kernelName.Contains("Linux") || kernelName.Contains("BSD"))
|
|
||||||
return PlatformType.Linux;
|
|
||||||
if (kernelName.Contains("Darwin"))
|
if (kernelName.Contains("Darwin"))
|
||||||
return PlatformType.OSX;
|
return PlatformType.OSX;
|
||||||
|
else
|
||||||
|
return PlatformType.Linux;
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user