[fix] add .exe suffix on Windows in vmake.py

Signed-off-by: szdytom <szdytom@163.com>
This commit is contained in:
方而静 2023-01-20 22:43:13 +08:00
parent 58c16ab3c4
commit 6d917be515
2 changed files with 9 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
# Editor
.vscode/
*.swp
# Test
test*

View File

@ -58,6 +58,10 @@ for i in range(1, sub_tasks + 1):
for j in range(1, task_cnt[i - 1] + 1):
tot_id += 1
if platform.system() == "Windows":
mk_path = "./mk_{}.exe".format(name)
std_path = "./std_{}.exe".format(name)
else:
mk_path = "./mk_{}".format(name)
std_path = "./std_{}".format(name)
in_path = "{}/.input.tmp".format(folder)
@ -68,7 +72,7 @@ for i in range(1, sub_tasks + 1):
check_file(std_path, "[ERR] Executable file {} not found.".format(std_path))
input_tmp = open(in_path, "w")
input_tmp.write(str(i))
input_tmp.write(str(i) + " " + str(j))
input_tmp.close()
mk_time, mk_code = run(mk_path, in_path, out_path)