summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct11
-rw-r--r--drivers/png/SCsub5
-rw-r--r--platform/android/detect.py42
3 files changed, 52 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index a1a3238305..9cd1da7f45 100644
--- a/SConstruct
+++ b/SConstruct
@@ -54,13 +54,16 @@ methods.save_active_platforms(active_platforms,active_platform_ids)
custom_tools=['default']
+platform_arg = ARGUMENTS.get("platform", False)
+
if (os.name=="posix"):
pass
elif (os.name=="nt"):
- if (os.getenv("VSINSTALLDIR")==None):
- custom_tools=['mingw']
+ if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"):
+ custom_tools=['mingw']
env_base=Environment(tools=custom_tools,ENV = {'PATH' : os.environ['PATH']});
+
#env_base=Environment(tools=custom_tools);
env_base.global_defaults=global_defaults
env_base.android_source_modules=[]
@@ -363,8 +366,8 @@ if selected_platform in platform_list:
#env['MSVS_VERSION']='9.0'
env['MSVSBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
- env['MSVSREBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
- env['MSVSCLEANCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
+ env['MSVSREBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes vsproj=true"
+ env['MSVSCLEANCOM'] = "scons --clean platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
debug_variants = ['Debug|Win32']+['Debug|x64']
release_variants = ['Release|Win32']+['Release|x64']
diff --git a/drivers/png/SCsub b/drivers/png/SCsub
index c3919567bc..7b937d4dfb 100644
--- a/drivers/png/SCsub
+++ b/drivers/png/SCsub
@@ -27,7 +27,10 @@ if ("neon_enabled" in env and env["neon_enabled"]):
if "S_compiler" in env:
env_neon['CC'] = env['S_compiler']
env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"])
- png_sources.append(env_neon.Object("#drivers/png/filter_neon.S"))
+ import os
+ # Currently .ASM filter_neon.S does not compile on NT.
+ if (os.name!="nt"):
+ png_sources.append(env_neon.Object("#drivers/png/filter_neon.S"))
env.drivers_sources+=png_sources
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")