To simplify the implementation of a near-identical user
interface across platforms, Audacity uses classes and
resources from wxWidgets, a portable GUI framework for C++
(and Python). You must download and build wxWidgets before
attempting to compile Audacity, or nothing will work!
wxWidgets is available at "http://www.wxwidgets.org/".
Audacity 1.3.8 requires wxWidgets 2.8.10.
To build on Windows only, download the wxMSW package
(installer or zip).
When you have downloaded and installed wxWidgets, you must
build it.
For wxWidgets' instructions on compilation
(and details about static versus dll linkage), see
"C:\wxWidgets-2.8.10\docs\msw\install.txt".
Note therein that wx_dll.dsw adds the dependencies to
force the correct build order for DLLs, which wx.dsw
does not. Because of this, wx_dll.dsw doesn't work for
static libraries.
1. Open "C:\wxWidgets-2.8.10\build\msw\wx_dll.dsw" with
Visual Studio 2008 (for VC9).
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
"C\wxWidgets-2.8.10\build\msw\wx_dll.sln" instead of wx_dll.dsw.
2. If you want to use the accessibility features, we have modified a
couple of the wxWidgets files. Rather than provide a patch, we
store the modified files in CVS, and you can replace the
corresponding wxWidgets files.
In "audacity\win\wxWidgets_additions" are one .cpp and one .h file.
You may want to make backups of the wxWidgets originals of these,
in case you also build without these accessibility features.
* Copy access.cpp to "C:\wxWidgets-2.8.10\src\msw\ole\".
* Copy setup.h to "C:\wxWidgets-2.8.10\include\wx\msw\".
Audacity releases are built with these accessibility features.
3. Build wxWidgets for all configurations of Audacity that you want.
* Build "DLL Release" to use in a "Release" version of Audacity.
* Build "DLL Unicode Release" to use in a "Unicode Release"
version of Audacity.
* Build "DLL Debug" to use in a "Debug" version of Audacity.
* Build "DLL Unicode Debug" to use in a "Unicode Debug"
version of Audacity.
See "MSVC++ STEP 5: Build Audacity" for the differences
between these versions of Audacity.
If you use "Batch Build" under the "Build" menu, you need select
only the following five projects to build (not the whole solution)
for each configuration:
* adv
* base
* core
* html
* net
Because of dependencies, this should also build these projects:
* wxexpat
* wxjpeg
* wxpng
* wxregex
* wxtiff
* wxzlib
If you build the whole solution, ignore the linker errors for
wxbase28*_odbc*.* dbgrid.
4. Note the directory "C\wxWidgets-2.8.10\lib\vc_dll". For each
build of WxWidgets you made, you will need from here five DLLs
appropriate to that build to go in the corresponding Audacity
build directory. The DLLs required are noted at "Provide access
to the wxWidgets DLLs" at "MSVC++ STEP 5: Build Audacity" below.
Now you can compile Audacity. To check out the latest
source code from CVS, see the instructions at
"http://audacity.sourceforge.net/community/developers".
--------------------------------------------
MSVC++ STEP 4: Set wxWidgets location for Audacity
--------------------------------------------
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:
1. Include Directory (e.g., "C:\wxWidgets-2.8.10\include")
2. Resource Directory (e.g., "C:\wxWidgets-2.8.10\include")
3. Library Directory (e.g., "C:\wxWidgets-2.8.10\lib")
Fortunately, this is parameterized, using a Windows system
environment variable. There are various ways to set these, so
look in the Windows help system. You want to create an
environment variable WXWIN, set to the top-level directory
where you installed wxWidgets. For example,
in your "autoexec.bat" file, you might have a line:
set WXWIN=C:\wxWidgets-2.8.10
Note that you don't want a trailing backslash on that.
On newer version of Windows, the settings for environment
variables can be found in the system control panel. Click
the "System" option, then the "Extended" or "Advanced" tab,
then "Environment variables".
In the Audacity project file, there are declarations like
$(WXWIN)\include
that get interpreted as, e.g., "C:\wxWidgets-2.8.10\include".
Once you have set the WXWIN environment variable correctly,
the Audacity project file's declarations will do the rest.
Note that you have to restart the IDE so it picks up changes
in the environment variables.