2
0

build_editor_win_x64_fast.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/python
  2. # Builds and packages the editor. Make sure you have MSBuild
  3. # installed and the path is valid.
  4. # Usage: "build_editor_win_x64 $Configuration"
  5. # Where: $Configuration - e.g. OptimizedDebug, Release
  6. import os
  7. import multiprocessing
  8. msbuildPath = "C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\amd64"
  9. buildPath = "..\\Build\\VS2015\\"
  10. def buildCSWorker(args):
  11. projectPath = buildPath + "\\" + args[0] + "\\" + args[0] + ".csproj"
  12. os.system("msbuild {0} /t:ClCompile /p:Configuration={1};Platform=x64 /m".format(projectPath, args[1]))
  13. return
  14. if __name__ == '__main__':
  15. if not os.path.exists(msbuildPath):
  16. print("MSBuild path is not valid. Used path {0}: ".format(msbuildPath))
  17. exit;
  18. os.environ["PATH"] += os.pathsep + msbuildPath
  19. # Build native projects
  20. os.system("fast_build.py OptimizedDebug x64")
  21. os.system("fast_build.py Release x64")
  22. # Build managed projects
  23. csProjectArgs = [("MBansheeEngine", "Debug"), ("MBansheeEngine", "Release"),
  24. ("MBansheeEditor", "Debug"), ("MBansheeEditor", "Release")]
  25. pool = multiprocessing.Pool(multiprocessing.cpu_count())
  26. pool.map(buildCSWorker, csProjectArgs)
  27. os.system("package_editor.py " + configuration)