mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fixed build.py when using gcc only. Closes #1044
This commit is contained in:
parent
1dbe6050e8
commit
0667b3dd32
|
@ -172,17 +172,13 @@ if flag_build_bam:
|
||||||
print("*** building bam ***")
|
print("*** building bam ***")
|
||||||
os.chdir("%s/%s" % (work_dir, src_dir_bam))
|
os.chdir("%s/%s" % (work_dir, src_dir_bam))
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
bam_compiled = False
|
if os.system("g++ -v >nul 2>&1") == 0:
|
||||||
compiler_bam = ["cl", "gcc"]
|
print("using gcc")
|
||||||
for compiler in compiler_bam:
|
|
||||||
if compiler == "cl":
|
|
||||||
os.system("make_win32_msvc.bat")
|
|
||||||
elif compiler == "gcc":
|
|
||||||
os.system("make_win32_mingw.bat")
|
os.system("make_win32_mingw.bat")
|
||||||
if file_exists("%sbam.exe" % bam_execution_path) == True:
|
else:
|
||||||
bam_compiled = True
|
print("using cl")
|
||||||
break
|
os.system("make_win32_msvc.bat")
|
||||||
if bam_compiled == False:
|
if file_exists("%sbam.exe" % bam_execution_path) == False:
|
||||||
bail("failed to build bam")
|
bail("failed to build bam")
|
||||||
else:
|
else:
|
||||||
os.system("sh make_unix.sh")
|
os.system("sh make_unix.sh")
|
||||||
|
@ -210,6 +206,12 @@ if flag_build_teeworlds:
|
||||||
bail("couldn't find %s source" % name)
|
bail("couldn't find %s source" % name)
|
||||||
command = 1
|
command = 1
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
|
if os.system("g++ -v >nul 2>&1") == 0:
|
||||||
|
print("using gcc")
|
||||||
|
os.chdir(src_dir_teeworlds)
|
||||||
|
command = os.system('"%s\\%s%sbam" %s' % (work_dir, src_dir_bam, bam_execution_path, options.release_type))
|
||||||
|
else:
|
||||||
|
print("using cl")
|
||||||
file = open("build.bat", "wb")
|
file = open("build.bat", "wb")
|
||||||
content = "@echo off\n"
|
content = "@echo off\n"
|
||||||
content += "@REM check if we already have the tools in the environment\n"
|
content += "@REM check if we already have the tools in the environment\n"
|
||||||
|
|
Loading…
Reference in a new issue