diff --git a/README.md b/README.md index cb085ef..d18a9d4 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,13 @@ The Rubber Band code is compatible with both the traditional Visual C++ compiler (`cl`) and the Clang front-end (`clang`), and the build system will use whichever appears (first) in your path. +To build against a specific Visual C++ runtime, use the built-in Meson +option `b_vscrt`: + +``` +> meson build -Db_vscrt=mt +``` + See "FFT and resampler selection" below for further build options. Alternatively, if you only need the static library and prefer a Visual diff --git a/otherbuilds/deploy/win.bat b/otherbuilds/deploy/win.bat new file mode 100644 index 0000000..84e9f2e --- /dev/null +++ b/otherbuilds/deploy/win.bat @@ -0,0 +1,54 @@ + +echo on + +set STARTPWD=%CD% +set ORIGINALPATH=%PATH% +set PATH=C:\Program Files (x86)\Windows Kits\10\bin\x64;%PATH% + +set vcvarsall="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" + +if not exist %vcvarsall% ( +@ echo "Could not find MSVC vars batch file" +@ exit /b 2 +) + +set VERSION=%1 +shift +if "%VERSION%" == "" ( +@echo "Usage: win.bat " +exit /b 1 +) + +@echo Building version %VERSION% + +call %vcvarsall% amd64 +if errorlevel 1 exit /b %errorlevel% + +del /q /s build + +meson build --buildtype release "-Dextra_include_dirs=C:\Program Files\libsndfile\include" "-Dextra_lib_dirs=C:\Program Files\libsndfile\lib" "-Db_vscrt=mt" +if errorlevel 1 exit /b %errorlevel% + +ninja -C build +if errorlevel 1 exit /b %errorlevel% + +cd build +ren rubberband-program.exe rubberband.exe +set NAME=Christopher Cannam +signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a rubberband.exe +if errorlevel 1 exit /b %errorlevel% + +cd .. +set DIR=rubberband-%VERSION%-gpl-executable-windows +del /q /s %DIR% +mkdir %DIR% +copy build\rubberband.exe %DIR% +copy "c:\Program Files\libsndfile\bin\sndfile.dll" %DIR% +copy COPYING %DIR% +copy README.md %DIR% +copy CHANGELOG %DIR% + +set PATH=%ORIGINALPATH% +cd %STARTPWD% +@echo Done, now test and zip the directory %DIR% +