fix for windows

This commit is contained in:
lixianjing 2019-04-23 11:06:13 +08:00
parent 00ee2479af
commit f287dfd4ca
2 changed files with 9 additions and 3 deletions

View File

@ -55,9 +55,15 @@ def toExe(name):
else:
return name
def writeArgs(filename, str):
fd = os.open(filename, os.O_RDWR | os.O_CREAT | os.O_TRUNC)
os.write(fd, str)
os.close(fd)
def run(cmd, flags, files):
cmd_args=cmd + ' ' + flags + ' ' + getIncludes() + ' ' + ' '.join(files)
cmd_args = flags + ' ' + getIncludes() + ' ' + ' '.join(files)
cmd_args = cmd_args.replace('\\', '\\\\');
writeArgs("args.txt", cmd_args);
print(cmd_args)
#os.system(cmd_args);
subprocess.call(cmd_args, shell=True);
os.system(cmd + ' @args.txt');

Binary file not shown.