@echo off rem Build audacity with ASIO support on Windows rem See https://wiki.audacityteam.org/wiki/Building_On_Windows rem rem MIT licence rem steve@opendirective.com rem adjustments for Audacity 2.4.2 by jademan set AUDACITY_REL=2.4.2 set PROJROOT=C:\proj242 set WXWIN=%PROJROOT%\wxWidgets set AUDACITY=%PROJROOT%\audacity set ASIOSDK_DIR=%PROJROOT%\asiosdk set EXEDIR=%AUDACITY%\win\bin\Release if NOT (%~dp0) == (%PROJROOT%\) ( echo Error: This script must be run in %PROJROOT% echo but is being run in %~dp0 if not exist %PROJROOT% ( echo Create %PROJROOT% goto exit ) ELSE ( echo CD to %PROJROOT% goto exit ) ) if not exist "C:\Program Files\git\cmd\git.exe" echo Error: Install Git for Windows. Choose the option "Git from the command line" if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" echo Error: Install Visual Studio 2017 && goto exit /b if not exist %ASIOSDK_DIR%\readme.txt echo Error: Get ASIO SDK from http://www.steinberg.net/en/company/developers.html and unzip it to %ASIOSDK_DIR% && echo NB: Rename folder to remove version && goto exit echo. echo Building Audacity %AUDACITY_REL%. echo. git clone --depth 1 --recurse-submodules https://github.com/audacity/wxWidgets/ IF ERRORLEVEL 1 echo Error: cannot checkout. Perhaps delete %WXWIN% && goto exit git clone -b Audacity-%AUDACITY_REL% --depth 1 https://github.com/audacity/audacity/ IF ERRORLEVEL 1 echo Error: cannot checkout. Perhaps delete %AUDACITY% && goto exit rem if not exist %AUDACITY%\win\audacity.sln echo Something is wrong with %AUDACITY% && goto exit if not exist %WXWIN%\wx-config.in echo Something is wrong with %WXWIN% && goto exit if not (%VisualStudioVersion%)==(15.0) call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" rem uncomment to force rebuild of everything each time rem set CLEAN=true cd %WXWIN%\build\msw if defined CLEAN nmake clean /f makefile.vc BUILD=release SHARED=1 nmake /f makefile.vc BUILD=release SHARED=1 cd %AUDACITY% git apply c:\proj242\asio2.patch cd %AUDACITY%\win cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_ffmpeg=loaded .. cd .. cd .. cd %AUDACITY%\win if defined CLEAN msbuild audacity.sln -t:clean -p:configuration=Release msbuild audacity.sln -t:Audacity -p:configuration=Release rem install wx dlls copy /Y %PROJROOT%\wxWidgets\lib\vc_dll\wx*_custom.dll %EXEDIR% rem move nyquist stuff too - not sure why this is in bin\Release\Release xcopy /E %EXEDIR%\Release\* %EXEDIR% cd %PROJROOT% echo echo Build successfull echo You can now run the built Audacity with ASIO driver support echo %EXEDIR%\audacity.exe :exit