summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-08-23 20:22:08 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-08-23 20:22:08 -0300
commit4b40f9228bdfe8573a2d70a6cd76404df117c8b9 (patch)
treefba6e0bf34f1164c966667fd77995e79f2a0ec5d /platform
parent07e97414250827c3b930befa123a4bbd48d24861 (diff)
parente1e54d39e456c32c43442f3a7f5389597e535930 (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'platform')
-rw-r--r--platform/android/detect.py42
-rw-r--r--platform/windows/os_windows.cpp6
-rw-r--r--platform/windows/os_windows.h3
-rw-r--r--platform/x11/detect.py3
4 files changed, 51 insertions, 3 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 5ef405f7b6..76575a1ec6 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -54,13 +54,53 @@ def create(env):
def configure(env):
+ # Workaround for MinGW. See:
+ # http://www.scons.org/wiki/LongCmdLinesOnWin32
+ import os
+ if (os.name=="nt"):
+
+ import subprocess
+
+ def mySubProcess(cmdline,env):
+ #print "SPAWNED : " + cmdline
+ startupinfo = subprocess.STARTUPINFO()
+ startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
+ proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env = env)
+ data, err = proc.communicate()
+ rv = proc.wait()
+ if rv:
+ print "====="
+ print err
+ print "====="
+ return rv
+
+ def mySpawn(sh, escape, cmd, args, env):
+
+ newargs = ' '.join(args[1:])
+ cmdline = cmd + " " + newargs
+
+ rv=0
+ if len(cmdline) > 32000 and cmd.endswith("ar") :
+ cmdline = cmd + " " + args[1] + " " + args[2] + " "
+ for i in range(3,len(args)) :
+ rv = mySubProcess( cmdline + args[i], env )
+ if rv :
+ break
+ else:
+ rv = mySubProcess( cmdline, env )
+
+ return rv
+
+ env['SPAWN'] = mySpawn
+
if env['x86']=='yes':
env['NDK_TARGET']='x86-4.8'
if env['PLATFORM'] == 'win32':
import methods
env.Tool('gcc')
- env['SPAWN'] = methods.win32_spawn
+ #env['SPAWN'] = methods.win32_spawn
env['SHLIBSUFFIX'] = '.so'
# env.android_source_modules.append("../libs/apk_expansion")
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index ec9e17c4f0..87d9a43d8c 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1899,6 +1899,12 @@ uint64_t OS_Windows::get_unix_time() const {
return (*(uint64_t*)&ft - *(uint64_t*)&fep) / 10000000;
};
+uint64_t OS_Windows::get_system_time_msec() const {
+ SYSTEMTIME st;
+ GetSystemTime(&st);
+ return st.wMilliseconds;
+}
+
void OS_Windows::delay_usec(uint32_t p_usec) const {
if (p_usec < 1000)
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 31e030d02e..cce94f5b25 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -263,6 +263,7 @@ public:
virtual Time get_time(bool utc) const;
virtual TimeZoneInfo get_time_zone_info() const;
virtual uint64_t get_unix_time() const;
+ virtual uint64_t get_system_time_msec() const;
virtual bool can_draw() const;
virtual Error set_cwd(const String& p_cwd);
@@ -272,7 +273,7 @@ public:
virtual Error execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id=NULL,String* r_pipe=NULL,int *r_exitcode=NULL);
virtual Error kill(const ProcessID& p_pid);
-
+
virtual bool has_environment(const String& p_var) const;
virtual String get_environment(const String& p_var) const;
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index ff85e286db..56e3ba78f6 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -126,7 +126,8 @@ def configure(env):
env.ParseConfig('pkg-config x11 --cflags --libs')
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xcursor --cflags --libs')
- env.ParseConfig('pkg-config openssl --cflags --libs')
+ if (env["openssl"]=="yes"):
+ env.ParseConfig('pkg-config openssl --cflags --libs')
env.ParseConfig('pkg-config freetype2 --cflags --libs')