From 9983ceecf25a4110793aeeae0378b2b50316f34d Mon Sep 17 00:00:00 2001 From: PeaceSells Date: Thu, 23 Jul 2015 18:04:50 -0600 Subject: Fixes compile bug for Android template on Windows. --- platform/android/detect.py | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'platform') 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") -- cgit v1.2.3 From 6f9a084ac8a820450632f17384161c6a24da86d3 Mon Sep 17 00:00:00 2001 From: Maximillian Date: Thu, 6 Aug 2015 10:29:33 -0700 Subject: Add OS.get_system_time_msec --- platform/windows/os_windows.cpp | 6 ++++++ platform/windows/os_windows.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'platform') 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& 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; -- cgit v1.2.3 From 2de5e121164eee707772fb1dfa1e8bef1ca3e80c Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 21 Aug 2015 22:31:06 -0300 Subject: fix for built-in ssl (easier to build 32 bits export) --- platform/x11/detect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index ff85e286db..eba8a965fa 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') -- cgit v1.2.3 From e1e54d39e456c32c43442f3a7f5389597e535930 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 21 Aug 2015 22:33:49 -0300 Subject: damn github built-in editor --- platform/x11/detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index eba8a965fa..56e3ba78f6 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -126,7 +126,7 @@ def configure(env): env.ParseConfig('pkg-config x11 --cflags --libs') env.ParseConfig('pkg-config xinerama --cflags --libs') env.ParseConfig('pkg-config xcursor --cflags --libs') - if (env("openssl"]=="yes"): + if (env["openssl"]=="yes"): env.ParseConfig('pkg-config openssl --cflags --libs') -- cgit v1.2.3