summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/SCsub13
-rw-r--r--platform/windows/lang_table.h1
-rw-r--r--platform/windows/platform_windows_builders.py22
3 files changed, 26 insertions, 10 deletions
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index ed3827353d..53ed3bf887 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -3,15 +3,8 @@
import os
Import('env')
-def make_debug_mingw(target, source, env):
- mingw_prefix = ""
- if (env["bits"] == "32"):
- mingw_prefix = env["mingw_prefix_32"]
- else:
- mingw_prefix = env["mingw_prefix_64"]
- os.system(mingw_prefix + 'objcopy --only-keep-debug {0} {0}.debugsymbols'.format(target[0]))
- os.system(mingw_prefix + 'strip --strip-debug --strip-unneeded {0}'.format(target[0]))
- os.system(mingw_prefix + 'objcopy --add-gnu-debuglink={0}.debugsymbols {0}'.format(target[0]))
+from platform_methods import run_in_subprocess
+import platform_windows_builders
common_win = [
"context_gl_win.cpp",
@@ -40,4 +33,4 @@ if env['vsproj']:
if not os.getenv("VCINSTALLDIR"):
if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]:
- env.AddPostAction(prog, make_debug_mingw)
+ env.AddPostAction(prog, run_in_subprocess(platform_windows_builders.make_debug_mingw))
diff --git a/platform/windows/lang_table.h b/platform/windows/lang_table.h
index 1a966b502a..78bfadfeae 100644
--- a/platform/windows/lang_table.h
+++ b/platform/windows/lang_table.h
@@ -186,6 +186,7 @@ static const _WinLocale _win_locales[] = {
{ "zh_CN", LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED },
{ "zh_HK", LANG_CHINESE, SUBLANG_CHINESE_HONGKONG },
{ "zh_SG", LANG_CHINESE, SUBLANG_CHINESE_SINGAPORE },
+ { "zh_TW", LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL },
{ 0, 0, 0 },
};
diff --git a/platform/windows/platform_windows_builders.py b/platform/windows/platform_windows_builders.py
new file mode 100644
index 0000000000..a1ad3b8b50
--- /dev/null
+++ b/platform/windows/platform_windows_builders.py
@@ -0,0 +1,22 @@
+"""Functions used to generate source files during build time
+
+All such functions are invoked in a subprocess on Windows to prevent build flakiness.
+
+"""
+import os
+from platform_methods import subprocess_main
+
+
+def make_debug_mingw(target, source, env):
+ mingw_prefix = ""
+ if (env["bits"] == "32"):
+ mingw_prefix = env["mingw_prefix_32"]
+ else:
+ mingw_prefix = env["mingw_prefix_64"]
+ os.system(mingw_prefix + 'objcopy --only-keep-debug {0} {0}.debugsymbols'.format(target[0]))
+ os.system(mingw_prefix + 'strip --strip-debug --strip-unneeded {0}'.format(target[0]))
+ os.system(mingw_prefix + 'objcopy --add-gnu-debuglink={0}.debugsymbols {0}'.format(target[0]))
+
+
+if __name__ == '__main__':
+ subprocess_main(globals())