prepare-obs-windows.cmd 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. @echo off
  2. SETLOCAL EnableDelayedExpansion
  3. REM If obs-studio directory does not exist, clone the git repo
  4. if not exist %OBSPath% (
  5. echo obs-studio directory does not exist
  6. git clone https://github.com/obsproject/obs-studio %OBSPath%
  7. cd /D %OBSPath%\
  8. git describe --tags --abbrev=0 --exclude="*-rc*" > "%OBSPath%\obs-studio-latest-tag.txt"
  9. set /p OBSLatestTag=<"%OBSPath%\obs-studio-latest-tag.txt"
  10. )
  11. REM Prepare OBS Studio builds
  12. echo Running CMake...
  13. cd /D %OBSPath%
  14. echo git checkout %OBSLatestTag%
  15. git checkout %OBSLatestTag%
  16. echo:
  17. if not exist build32 mkdir build32
  18. if not exist build64 mkdir build64
  19. echo Running cmake for obs-studio %OBSLatestTag% 32-bit...
  20. cd build32
  21. cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DDepsPath="%DepsPath32%" -DBUILD_CAPTIONS=true -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
  22. echo:
  23. echo:
  24. echo Running cmake for obs-studio %OBSLatestTag% 64-bit...
  25. cd ..\build64
  26. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DDepsPath="%DepsPath64%" -DBUILD_CAPTIONS=true -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
  27. echo:
  28. echo:
  29. dir "%OBSPath%\libobs"