Merge pull request #8431 from jbeich/unix_quirks

A few minor portability fixes
This commit is contained in:
Oliver Brakmann
2015-06-09 22:53:52 +02:00
2 changed files with 8 additions and 15 deletions

View File

@@ -71,17 +71,15 @@ INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = rsdl2 rnull game utility
TOOLS = editor crashdialog
TOOLS = editor gamemonitor
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
# 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
@@ -391,7 +384,7 @@ install-tools: tools
install-linux-icons:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
@$(CP_R) packaging/linux/hicolor/ "$(DESTDIR)$(datadir)/icons"
@$(CP_R) packaging/linux/hicolor "$(DESTDIR)$(datadir)/icons/"
install-linux-desktop:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"

View File

@@ -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 { }