From fc7edb536da10cf7cfa1b0c2ed80cc01d44b24df Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 7 Jun 2015 14:13:00 +0000 Subject: [PATCH] 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. --- Makefile | 15 ++++----------- OpenRA.Game/Platform.cs | 4 ++-- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index f0cc1ba251..1934ac005d 100644 --- a/Makefile +++ b/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 diff --git a/OpenRA.Game/Platform.cs b/OpenRA.Game/Platform.cs index 68d562a07a..62da9a8548 100644 --- a/OpenRA.Game/Platform.cs +++ b/OpenRA.Game/Platform.cs @@ -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 { }