aboutsummaryrefslogtreecommitdiff
path: root/tools/my_spawn.py
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-09-23 22:25:30 +0200
committer GitHub <noreply@github.com>2023-09-23 22:25:30 +0200
commit5ff04702985dcaefa891266417d77ac4e197cfeb (patch)
tree6b3cbbc9f6d5e793d6c337023e95d94105ca888f /tools/my_spawn.py
parent977661f6f4301be19fa64abfc6cda5040c3899b1 (diff)
parent348668afee5bfbbc376d0615b51dca210213c1ec (diff)
Merge pull request #17 from OpenVicProject/outsource/extras
Diffstat (limited to 'tools/my_spawn.py')
-rw-r--r--tools/my_spawn.py53
1 files changed, 0 insertions, 53 deletions
diff --git a/tools/my_spawn.py b/tools/my_spawn.py
deleted file mode 100644
index 915f972..0000000
--- a/tools/my_spawn.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copied from https://github.com/godotengine/godot-cpp/blob/93f2091185ff4390ca8fc8901ebc68ebc35a218f/tools/my_spawn.py
-import os
-
-
-def exists(env):
- return os.name == "nt"
-
-
-# Workaround for MinGW. See:
-# http://www.scons.org/wiki/LongCmdLinesOnWin32
-def configure(env):
- 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.decode("utf-8"))
- 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
- env.Replace(ARFLAGS=["q"])