bld.bat 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. @REM Use the MSVC sln to build static lib and dll
  2. msbuild ^
  3. /p:Platform=%PLATFORM% ^
  4. /p:Configuration=Release ^
  5. /p:AdditionalIncludeDirectories=%LIBRARY_INC% ^
  6. /p:AdditionalDependencies=/LIBPATH:%LIBRARY_LIB% ^
  7. /p:WindowsTargetPlatformVersion=10.0.17763.0 ^
  8. windows\%c_compiler%\xz_win.sln
  9. COPY windows\%c_compiler%\Release\x64\liblzma\liblzma.lib %LIBRARY_LIB%\liblzma_static.lib
  10. COPY windows\%c_compiler%\Release\x64\liblzma_dll\liblzma.lib %LIBRARY_LIB%\liblzma.lib
  11. COPY windows\%c_compiler%\Release\x64\liblzma_dll\liblzma.dll %LIBRARY_PREFIX%\bin\liblzma.dll
  12. @REM Use min-gw to build command line tools
  13. set MSYSTEM=MINGW%ARCH%
  14. set MSYS2_PATH_TYPE=inherit
  15. set CHERE_INVOKING=1
  16. @REM No longer want to use cl.exe
  17. set CC=
  18. set "saved_recipe_dir=%RECIPE_DIR%"
  19. FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i"
  20. FOR /F "delims=" %%i IN ('cygpath.exe -u "%BUILD_PREFIX%"') DO set "BUILD_PREFIX=%%i"
  21. FOR /F "delims=" %%i IN ('cygpath.exe -m "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_M=%%i"
  22. FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_U=%%i"
  23. FOR /F "delims=" %%i IN ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i"
  24. FOR /F "delims=" %%i IN ('cygpath.exe -u "%RECIPE_DIR%"') DO set "RECIPE_DIR=%%i"
  25. FOR /F "delims=" %%i IN ('cygpath.exe -u "%SP_DIR%"') DO set "SP_DIR=%%i"
  26. FOR /F "delims=" %%i IN ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i"
  27. FOR /F "delims=" %%i IN ('cygpath.exe -u "%STDLIB_DIR%"') DO set "STDLIB_DIR=%%i"
  28. bash -lxc %RECIPE_DIR%/bld_win.sh
  29. if %errorlevel% neq 0 exit /b %errorlevel%
  30. exit /b 0s