Changeset 2327 for 2011/26


Ignore:
Timestamp:
2011-06-29 16:39:36 (12 years ago)
Author:
tekrjant
Message:

MSBuild is looked for if it is not in PATH.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/build_games.py

    r2326 r2327  
    2121 
    2222def check_requirements(): 
     23        global msbuild 
    2324        if not exists("lib\\x86\\Jypeli4.dll"): 
    2425                raise Exception("lib\\x86\\Jypeli4.dll expected") 
    25         return_code = call(msbuild + "/?", shell=True) 
     26        return_code = call(msbuild + " /? 1> NUL 2> NUL", shell=True) 
    2627        if return_code != 0: 
    27                 # etsitaan 
    28                 foo = join(os.getenv("SystemRoot"), "Microsoft.NET\\Framework") 
    29                 print "NO MSBUILD!" 
     28                msbuild = join(os.getenv("SystemRoot"), "Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe") 
     29                if not exists(msbuild): 
     30                        raise Exception("MSBuild not found in " + msbuild) 
    3031 
    3132 
     
    8990 
    9091def build(project_file_path): 
    91         build_cmd = 'msbuild /nologo /verbosity:quiet /p:XnaProfile=Reach /p:Configuration=Release /p:"ReferencePath=%s" /t:Build "%s"' % (lib_dir_x86, project_file_path) 
     92        build_cmd = msbuild + ' /nologo /verbosity:quiet /p:XnaProfile=Reach /p:Configuration=Release /p:"ReferencePath=%s" /t:Build "%s"' % (lib_dir_x86, project_file_path) 
    9293        return call(build_cmd, shell=True) == 0 
    9394 
Note: See TracChangeset for help on using the changeset viewer.