fixed build.py when using gcc only. Closes #1044

This commit is contained in:
oy 2013-01-05 17:27:03 +01:00
parent 1dbe6050e8
commit 0667b3dd32

View file

@ -172,17 +172,13 @@ if flag_build_bam:
print("*** building bam ***")
os.chdir("%s/%s" % (work_dir, src_dir_bam))
if os.name == "nt":
bam_compiled = False
compiler_bam = ["cl", "gcc"]
for compiler in compiler_bam:
if compiler == "cl":
os.system("make_win32_msvc.bat")
elif compiler == "gcc":
if os.system("g++ -v >nul 2>&1") == 0:
print("using gcc")
os.system("make_win32_mingw.bat")
if file_exists("%sbam.exe" % bam_execution_path) == True:
bam_compiled = True
break
if bam_compiled == False:
else:
print("using cl")
os.system("make_win32_msvc.bat")
if file_exists("%sbam.exe" % bam_execution_path) == False:
bail("failed to build bam")
else:
os.system("sh make_unix.sh")
@ -210,6 +206,12 @@ if flag_build_teeworlds:
bail("couldn't find %s source" % name)
command = 1
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")
content = "@echo off\n"
content += "@REM check if we already have the tools in the environment\n"