makepanda.bat 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @echo off
  2. REM
  3. REM Check the Windows architecture and determine with Python
  4. REM to use; 64-bit or 32-bit. Verify that we can find the
  5. REM 'makepanda' python script and the python interpreter.
  6. REM If we can find both, then run 'makepanda'.
  7. REM
  8. if %PROCESSOR_ARCHITECTURE% == AMD64 (
  9. set suffix=-x64
  10. ) else (
  11. set suffix=
  12. )
  13. set thirdparty=thirdparty
  14. if defined MAKEPANDA_THIRDPARTY set thirdparty=%MAKEPANDA_THIRDPARTY%
  15. if exist %thirdparty%\win-python3.8%suffix%\python.exe (
  16. set pythondir=win-python3.8%suffix%
  17. ) else (
  18. set pythondir=win-python3.7%suffix%
  19. )
  20. if not exist makepanda\makepanda.py goto :missing1
  21. if not exist %thirdparty%\%pythondir%\python.exe goto :missing2
  22. %thirdparty%\%pythondir%\python.exe makepanda\makepanda.py %*
  23. if errorlevel 1 if x%1 == x--slavebuild exit 1
  24. goto done
  25. :missing1
  26. echo You need to change directory to the root of the panda source tree
  27. echo before invoking makepanda. For further install instructions, read
  28. echo the installation instructions in the file doc/INSTALL-MK.
  29. goto done
  30. :missing2
  31. echo %thirdparty%
  32. echo You seem to be missing the 'thirdparty' directory. You probably checked
  33. echo the source code out from GitHub. The GitHub repository is
  34. echo missing the 'thirdparty' directory. You will need to supplement the
  35. echo code by downloading the 'thirdparty' directory from www.panda3d.org
  36. goto done
  37. :done