diff --git a/win/compile.txt b/win/compile.txt index dc9ec804f..ca1a6ba56 100644 --- a/win/compile.txt +++ b/win/compile.txt @@ -22,24 +22,31 @@ email audacity-devel@lists.sourceforge.net. Audacity releases for Windows are currently built with Microsoft Visual Studio 2013 C++. Most of us use the Express edition, which is free. +For instructions on compiling Audacity under the Cygwin +UNIX Emulation Layer, see the "Compiling Audacity under +Cygwin" section below. This is not maintained. Note that Audacity uses VC++'s multithreaded DLL runtime libraries. If you have MSVC installed, these are in your PATH, but users to whom you distribute your builds may not have them, so you may have to distribute them, as described for the wxWidgets DLLs, below. +For instructions on compiling Audacity under the Cygwin +UNIX Emulation Layer, see the "Compiling Audacity under +Cygwin" section below. This is not maintained (for a very long time!). ------------------------------------------------------------------------- -MSVC++ STEP 1: Download and Install wxWidgets ------------------------------------------------------------------------- +--------------------------- +MSVC++ STEP 1: Download and Install wxWidgets +--------------------------- -To simplify the implementation of a near-identical user interface across -platforms, Audacity uses wxWidgets, a GUI framework. (https://www.wxwidgets.org/). +To simplify the implementation of a near-identical user +interface across platforms, Audacity uses wxWidgets, a +GUI framework. (https://www.wxwidgets.org/). Audacity 2.1.0 requires wxWidgets 2.8.12. -To be able to build Audacity for Windows, download and install wxWidgets: +To be able to build Audacity for Windows, download and install wxWidgets: * installer: https://sourceforge.net/projects/wxwindows/files/2.8.12/wxMSW-2.8.12-Setup.exe @@ -47,53 +54,45 @@ To be able to build Audacity for Windows, download and install wxWidgets: ------------------------------------------------------------------------- -MSVC++ STEP 2: Download and Install Audacity ------------------------------------------------------------------------- +------------------------ +MSVC++ STEP 2: Build wxWidgets +------------------------ -To check out the latest -source code from SVN, see the instructions at -"http://audacity.sourceforge.net/community/developers". - - - ------------------------------------------------------------------------- -MSVC++ STEP 3: Build wxWidgets ------------------------------------------------------------------------- - -3.1. Open "C:\wxWidgets-2.8.12\build\msw\wx_dll.dsw" with - Microsoft Visual Studio. +2.1. Open "C:\wxWidgets-2.8.12\build\msw\wx_dll.dsw" with + Microsoft Visual Studio. Make sure to use wx_dll.dsw, not wx.dsw, because wx.dsw does not have the correct dependencies for the DLL builds. When you open wx_dll.dsw, Visual Studio will prompt whether to convert. Click "Yes To All". Next time you open a Visual - Studio session, you can avoid this prompt by opening + Studio session, you can avoid this prompt by opening "C\wxWidgets-2.8.12\build\msw\wx_dll.sln" instead of wx_dll.dsw. -3.2. If you want to use the wxWidgets accessibility features, we have - modified one of the wxWidgets files. Rather than provide a patch, - we store the modified file in the Audacity code repository, and you - can replace the corresponding wxWidgets file. You will need to - download Audacity (next step) to get these. +2.2. If you want to use the wxWidgets accessibility features, we have + modified one of the wxWidgets files. Rather than provide a patch, + we store the modified file in the Audacity code repository, and you + can replace the corresponding wxWidgets file. You will need to + download Audacity (next step) to get these. - In "audacity\win\wxWidgets_additions" is one .h file. - You may want to make a backup of the wxWidgets original of it, - in "C:\wxWidgets-2.8.12\include\wx\msw\setup.h", - e.g., by renaming it "setup.h.bak" before copying the replacement, - in case you also build without these accessibility features. + In "audacity\win\wxWidgets_additions" is one .h file. + You may want to make a backup of the wxWidgets original of it, + in "C:\wxWidgets-2.8.12\include\wx\msw\setup.h", + e.g., by renaming it "setup.h.bak" before copying the replacement, + in case you also build without these accessibility features. - Copy "audacity\win\wxWidgets_additions\setup.h" to + Copy "audacity\win\wxWidgets_additions\setup.h" to "C:\wxWidgets-3.0.2\include\wx\msw\setup.h". Audacity releases are built with these accessibility features. -3.3. Build wxWidgets for all configurations of Audacity that you want. - * Build "DLL Unicode Release" to use in a "Release" +2.3. Build wxWidgets for all configurations of Audacity that you want. + * Build "DLL Unicode Release" to use in a "Release" + version of Audacity. + * Build "DLL Unicode Debug" to use in a "Debug" version of Audacity. -With VS2013 you will get an error for missing pbt.h header, you can (apparently safely) comment t +With VS2013 you will get an error for missing pbt.h header, you can (apparently safely) comment that out. See "MSVC++ STEP 6: Build Audacity" for the differences between these versions of Audacity. @@ -107,56 +106,66 @@ With VS2013 you will get an error for missing pbt.h header, you can (apparently * wxtiff * wxzlib - If you build the whole solution, ignore the linker errors for + If you build the whole solution, ignore the linker errors for wxbase28*_odbc*.* dbgrid. +-------------------------- +MSVC++ STEP 3: Download and Install Audacity +-------------------------- ------------------------------------------------------------------------- +To check out the latest +source code from SVN, see the instructions at +"http://audacity.sourceforge.net/community/developers". + + +-------------------------------------------- MSVC++ STEP 4: Set wxWidgets location for Audacity ------------------------------------------------------------------------- +-------------------------------------------- -The Audacity Visual Studio project has been set up to use enviornment -variables to locate all externally referenced SDKs. For wxWidgets, it -uses the "WXWIN" environment variable. +Before you can start the build process, you must update the +project settings to tell Visual C++ where to find wxWidgets. +There are three settings that need changing: + 4.1. Include Directory (e.g., "C:\wxWidgets-2.8.12\include") + 4.2. Resource Directory (e.g., "C:\wxWidgets-2.8.12\include") + 4.3. Library Directory (e.g., "C:\wxWidgets-2.8.12\lib") -Before you can build Audacity, you must set the variable. This process -can vary depending on the version of Windows you're using. The following -is based on Windows 7, so you may need to make adjustments. +eFortunately, this is parameterized, using a Windows +environment variable, WXWIN. There are various ways to set +these, so look in the Windows help system. -4.1. Open the "Control Panel" -4.2. Click the "System" app -4.3. Click the "Advanced system settings" link -4.4. On the "Advanced" tab, click the "Envirnment Variables..." button -4.5. Click "New..." in the "System variables" group -4.6. Set the "Variable name" to "WXWIN" (without the quotes) -4.7. Set the "Variable value" to the full path of where you installed - wxWidgets (typically c:\wxWidgets-2.8.12) -4.8. Click "Ok" until you exit the "System Properties" app +In the Audacity project file, there are declarations like -Once you have set the WXWIN environment variable correctly, the Audacity -Project file's declarations will do the rest. + $(WXWIN)\include -Note that if you currently have the Audacity Solution open in Visual -Studio, you must restart Visual Studio for it to recognize the new -environment variable. +that get interpreted as, e.g., "C:\wxWidgets-2.8.12\include". -In some cases, you may need to reboot the computer to ensure the -variable it updated. +The typical setting for WXWIN is "C:\wxWidgets-2.8.12". +For example, + + set WXWIN =C:\wxWidgets-2.8.12 + +Once you have set the WXWIN environment variable correctly, +the Audacity project file's declarations will do the rest. + +Note that you must restart the Audacity solution (sln) +file so it picks up changes in the environment variables. + +In some cases, you may need to reboot the computer to ensure +the variables are read correctly. - ------------------------------------------------------------------------- +----------------------- MSVC++ STEP 5: Consider and Configure Optional Features ------------------------------------------------------------------------- +----------------------- 5.1. Locally installed help is optional, but required for a full Release build. (The "help" folder is included in the installer, but removed from the zip distribution.) The Python library is required, obtainable from http://www.python.org/download/ . Add the location of the top-level -directory where you installed Python to your Path environment variable. -For instructions on setting environment variables, see the previous -section, "MSVC++ STEP 4: Set wxWidgets location for Audacity". +directory where you installed Python to your Path environment +variable. For instructions on setting environment variables, see the +previous section, "MSVC++ STEP 4: Set wxWidgets location for Audacity". Build the "help" project by enabling it in the MS Visual Studio Configuration Manager (Build menu). This will download a copy of the @@ -171,7 +180,7 @@ you must enable and build the optional "locale" project. This is required for a full release. You will need to obtain msgfmt.exe from http://audacity.sourceforge.net/files/msgfmt.zip. Add the location of the directory containing msgfmt.exe to your Path environment variable. -Alternatively, put msgfmt.exe somewhere already in the Path, +Alternatively, put msgfmt.exe somewhere already in the Path, e.g., C:\Windows. @@ -191,35 +200,34 @@ To change the libraries enabled in Audacity, edit "win\configwin.h" and comment or uncomment the entries. -5.4. To add support for ASIO: +5.4 TO ADD SUPPORT FOR ASIO: +Because ASIO is a proprietary, closed standard, +we (or any third party) cannot distribute its SDK. +That means we cannot distribute builds of Audacity that support +ASIO, because Audacity is licensed under the +GPL (http://audacity.sourceforge.net/about/license), which requires +we distribute all source code. -ASIO (from Steinberg) is a sound card interface protocol that is faster -than standard WMME. Unlike WMME, not all soundcard drivers support it. +So, although you can build your own copies of Audacity with +ASIO support, for personal use, you cannot distribute them without +violating the Audacity license and the ASIO license. +If you build ASIO support into Audacity, do not distribute that build. -Because ASIO is a proprietary, closed standard, we (or any third party) -cannot distribute its SDK. That means we cannot distribute builds of -Audacity that support ASIO, because Audacity is licensed under the GPL -(http://audacity.sourceforge.net/about/license), which requires we -distribute all source code. +For ASIO support, get the ASIO SDK from Steinberg +(http://www.steinberg.net/en/company/developers.html), +install at C:\ASIOSDK, then define an environment variable called +ASIOSDK_DIR. -So, although you can build your own copies of Audacity with ASIO -support, for personal use, you cannot distribute them without violating -the Audacity license and the ASIO license. If you build ASIO support -into Audacity, do not distribute that build. +The value should be the full path to the base directory of the +ASIO SDK, e.g., -For ASIO support, get the ASIO SDK from Steinberg: - -http://www.steinberg.net/en/company/developers.html - -Install at C:\ASIOSDK, then define an environment variable called -ASIOSDK_DIR. The value should be the full path to the base directory -of the ASIO SDK. + set ASIOSDK_DIR=C:\ASIOSDK2 ------------------------------------------------------------------------- +----------------------- MSVC++ STEP 6: Build Audacity ------------------------------------------------------------------------- +----------------------- Now you can compile Audacity. Run Visual C++ and load the Audacity solution, "audacity\win\audacity.sln". @@ -237,9 +245,9 @@ Build Audacity by giving the "Build" menu > "Rebuild Solution" command. ------------------------------------------------------------------------- +----------------------- MSVC++ STEP 7: Provide Access to the wxWidgets DLLs ------------------------------------------------------------------------- +----------------------- Each Audacity executable needs access to five specific wxWidgets DLLs from those you built in "MSVC++ STEP 2: Build wxWidgets" @@ -283,9 +291,9 @@ installation of the wxWidgets source and the latest Audacity source from SVN". So if that's not what you attempted, please try that first. ------------------------------------------------------------------------- +--------------------------- HELP! I get linker errors! ------------------------------------------------------------------------- +--------------------------- In some cases, Audacity does compile, but during the linking process you get a bunch of error messages like this: