-- Compiling Audacity for Windows 7 --

I am assuming you are going to be doing this on Windows. There might make a difference in some of the steps depending on your OS (XP, Win7 etc.; 64/32-bit), for now, I will try to specify any differences. I am going to also assume you have lots of hard drive space--if not you may need to make some choices about what to install.

I will try to attach some zipped pictures with details.

.

1) Get Microsoft VC++ 2008 (the compiler you will need--it is free from Microsoft). You may get the 32-bit version (which will work on 64-bit) here:

http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express

XXX pix

Select the plus sign next to "Visual C++ 2008 Express edition with SP1", it will open up. Choose your language, click "FREE DOWNLOAD"; vcsetup.exe will be downloaded automatically by your browser. When the DL finishes, open your download folder and double-click the file you just DLed--it will start the install process (you must remain connected to the internet during the Microsoft install stuff). Install everything, accepting the defaults.

.

2) Get the 2.8.12 version of wxWidgets (it works just fine with Audacity) from here:

http://www.wxwidgets.org/downloads/#latest_stable

choose the wxMSW installer which will start a download -- wxMSW-2.8.12-Setup...when completed (it's the full package so you need not be connected to the internet to run it after it is DLed) double-click it to install; install everything and accept the defaults.

XXX pix

.

3) Compile wxWidgets. Hereafter it starts getting complicated!

3a) You will need to set up your WX environmental variable. I will give you the Win7 steps -- open the Control Panel (if on basic view switch to "all items" view) select System, choose Advanced system settings, choose Environmental Variables, in the top half (User variables) choose New...; a dialog will open. In the top field (name) put WXWIN (use all caps), in the bottom put the exact full path to the folder in which you installed wxWidgets (if you accepted the default it will be: C:\wxWidgets-2.8.12 ). Click OK (DO NOT use the close window buttons) on all three of the dialogs and close the control panel.

.

3b) Now would be a good time to open the text file:

C:\wxWidgets-2.8.12\BuildCVS.txt

because you need to do step c):

Copy c:\wxWidgets\include\wx\msw\setup0.h

to c:\wxWidgets\include\wx\msw\setup.h

you will not need to change any of the #defines as the default features will get you going.

.

3c) In folder C:\wxWidgets-2.8.12\docs\msw are two files: "install.txt" and "readme.txt"; it might make sense to read them but if "install.txt" is too confusing just skip it for now.

3d) Build the wxWidget libraries, open the folder:

C:\wxWidgets-2.8.12\build\msw

and look for:

wx_dll.dsw

it is a MS VC++ 2006 (not 2008) project and will be automatically converted to a VC++ 2008 project by double-clicking on it. VC++ 2008 will start, a dialog will open--choose "Yes to all" in re. Convert.... After a short bit you will be ready to compile.

.

4) There are two methods of building everything; one requires a lot of up-front time but allows you to leave the process unattended for long periods of time (my choice); the other is less tedious but requires many small steps. Here is the first process:

In VC++ choose "Batch Build…" from the Build menu, a dialog will open:

XXX pix

Select ALL the items not related to "Universal" (I circled examples in green to select and red to ignore). When you have them all selected choose the Build button.

The dialog will close and a LOT of work will be done (it takes 20+- minutes on my super-fast machine). There will be some error messages--ignore them for now. You might need to re-open the Batch Build dialog quite a few times and keep doing Build (no need to change the checkboxes--they will be remembered) until you get two identical sets of error in a row. These will be due to a known bug in the wxWidgets project--four DLLs are installed in lib/vc_lib not lib/vc_dll but it is easy to fix...the easiest way is to copy ALL of C:\wxWidgets-2.8.12\lib\vc_lib to C:\wxWidgets-2.8.12\lib\vc_dll (very quick--select all, but you really only NEED to find the four missing ones and copy them). Now, one final pass of Batch Build... Build and all should be done for wxWidgets.

.

4a) The other method is to build each solution one-at-a-time; this avoids the tedious (and potentially fraught with danger of selecting a choice in error) method above. In VC++'s Solution field chose:

XXX pix

Now, from the Build menu choose Build Solution--it should compile with no errors but at some point you will run into the missing library problems as noted above--just keep copying them from vc_lib to vc_dll as needed. When the Debug solution compiles successfully compile the following solutions, it is critical to do these in the following EXACT ORDER:

Debug (you just did this one)

Release

Unicode Debug

Unicode Release

DLL DLL Debug

DLL Release

DLL Unicode Debug

DLL Unicode Release

OK, part 3 is obtaining and compiling Audacity. You may first need to install an SVN package and Python 2.6 (unless you already have them on your system); you might need to uncompress a .tgz file, if so you will need something like 7Zip.

.

0) Get & install 7Zip as needed:

http://www.7-zip.org/download.html

Get the appropriate installer.

.

1) Get & install Python 2.6 as needed. 2.7 or later may not work with all the other tools you are getting. The most recent stable installer is at:

http://www.python.org/getit/releases/2.6/

There is a source only 2.6.7 here:

http://www.python.org/getit/releases/2.6.7/

…which is fine but require you to compile and install it--not necessary as 2.6 works well enough.

.

2) Get & install TortoiseSVN:

http://tortoisesvn.net/downloads.html#

Get the appropriate installer--a re-boot may be required even thought it might not say so.

.

3) Get & compile the Audacity SVN HEAD. To do this…

3a) Create a new folder somewhere you have access, c:\Audacity, C:\Users\\Documents, or anywhere on any other drive -- all should work but c:\Audacity might not depending on access permissions.

3b) Right-click that new folder – a context menu will pop up and one of the entries will be "SVN Checkout…" – select it. A dialog will appear; in the topmost text field enter this URL:

http://audacity.googlecode.com/svn/audacity-src/trunk

The next text field should already have the location of the folder on which you right-clicked. Make sure that "Multiple, independent working copies" is NOT checked; "Checkout Depth" is set to "Fully recursive"; and Revision is set to HEAD – click okay. A transfer progress dialog will open, go grab a serving of your favorite beverage – this will take about five minutes.

.

4) After the dialog automatically closes it is time to do a little bit of housekeeping chores. Open the folder in which you just checked out Audacity; create a new folder and call it "wxLibs" or anything else which suits you; open that new folder, and within it create a new folder "Unicode Release" (it must be exactly that). Now open your wxWidgets DLL library ( C:\wxWidgets-2.8.12\lib\vc_dll ) and copy the following four files into that newly created wxLibs\Unicode Release (or whatever you called it) folder:

wxbase28u_net_vc_custom.dll
wxbase28u_vc_custom.dll
wxmsw28u_adv_vc_custom.dll
wxmsw28u_core_vc_custom.dll
wxmsw28u_html_vc_custom.dll

(The above libraries will be used in compiling Unicode Release Audacity. If you wish to learn how to debug then you will also need to get a little bit more fancy with your housekeeping. Instead of just having the single folder, you will end up with three new folders -- wxLibs, and two new folders within it: "Unicode Release" and "Unicode Debug". In this case the above listed for libraries will end up in the Unicode Release folder and these libraries will end up in the Unicode Debug folder:

wxbase28ud_net_vc_custom.dll
wxbase28ud_vc_custom.dll
wxmsw28ud_adv_vc_custom.dll
wxmsw28ud_core_vc_custom.dll
wxmsw28ud_html_vc_custom.dll

You will note that these filenames are almost identical – the only difference is: ...28u_... becomes …28ud_…).

.

5) It is now time to compile Audacity; from here on out I am going to make an assumption that you created a folder called D:\Audacity when I refer to specific directory locations (you will need to modify the exact path to suit where you put your Audacity checkout). Open the folder D:\Audacity\win; open the folder wxLibs and select the folder(s) you just filled with the DLLs; right-click and drag them into the D:\Audacity\win folder, choose to "Copy here" – make sure you do not choose any of the other options!

.

6) Within that D:\Audacity\win folder you will see a file called:
audacity.sln
double-click on that file to launch VC++ 2008; after a few seconds you will be ready to start compiling. You must change the solution because Audacity defaults to a Debug solution which is outmoded. At this point I have no idea what the toolbars on a default install of VC++ 2008 looks like so if you don't see anything on your toolbar (green ellipse) that looks like the picture below,

XXX pix

… then you'll need to choose "Configuration Manager…" from the Build Menu – in the top left corner you see a drop down where you will be able to change the solution – choose the Unicode Release solution and then click Close.

XXX pix

.

7) The time is finally here – go to the Build menu and choose Built Solution. Go put a head on that beverage – this could take some time (more than five minutes on my screaming fast system).

If all goes well you will not get any errors.

.
-----