1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 23:59:41 +02:00

Provide a much easier way of building wxWidgets

I've added another project to the Audacity solution called
wxWidgets-2.8.12.  And updated the compile.txt file with
instructions on how to build everything.

It automatically copies our setup.h and the fixed window.h
to the proper locations in the wx build tree.

It uses NMAKE to build wxWidgets using the makefile in the
wx tree.  (No, I did not try to duplicate the wx project
files. ;-))

Give it a try.  I think you'll be surprised how easy it will
be for new users.
This commit is contained in:
lllucius 2014-11-04 00:07:25 +00:00
parent 4583e91621
commit 0358e3eb09
5 changed files with 7036 additions and 75 deletions

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D7B6910F-2AAB-4600-97FF-FE704897C448}</ProjectGuid>
<Keyword>MakeFileProj</Keyword>
<ProjectName>wxWidgets-2.8.12</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakePreprocessorDefinitions>
</NMakePreprocessorDefinitions>
<NMakeBuildCommandLine>copy "$(SolutionDir)\wxWidgets_additions\setup.h" "$(WXWIN)\include\wx\msw\setup.h"
copy "$(SolutionDir)\wxWidgets_additions\window.cpp" "$(WXWIN)\src/msw/window.cpp"
cd "$(WXWIN)\build\msw"
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd "$(WXWIN)\build\msw"
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug clean
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release clean
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>cd "$(WXWIN)\build\msw"
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug clean
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release clean</NMakeCleanCommandLine>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakePreprocessorDefinitions>
</NMakePreprocessorDefinitions>
<NMakeBuildCommandLine>copy "$(SolutionDir)\wxWidgets_additions\setup.h" "$(WXWIN)\include\wx\msw\setup.h"
copy "$(SolutionDir)\wxWidgets_additions\window.cpp" "$(WXWIN)\src/msw/window.cpp"
cd "$(WXWIN)\build\msw"
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cd "$(WXWIN)\build\msw"
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug clean
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release clean
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>cd "$(WXWIN)\build\msw"
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=debug clean
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release clean</NMakeCleanCommandLine>
</PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="readme.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
</ItemGroup>
</Project>

View File

@ -57,6 +57,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lv2", "Projects\lv2\lv2.vcx
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expat", "Projects\expat\expat.vcxproj", "{A939AAF8-44F1-4CE7-9DD0-7A6E99814856}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxWidgets-2.8.12", "Projects\wxWidgets-2.8.12\wxWidgets-2.8.12.vcxproj", "{D7B6910F-2AAB-4600-97FF-FE704897C448}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -269,6 +271,14 @@ Global
{A939AAF8-44F1-4CE7-9DD0-7A6E99814856}.wx3-Debug|Win32.Build.0 = wx3-Debug|Win32
{A939AAF8-44F1-4CE7-9DD0-7A6E99814856}.wx3-Release|Win32.ActiveCfg = wx3-Release|Win32
{A939AAF8-44F1-4CE7-9DD0-7A6E99814856}.wx3-Release|Win32.Build.0 = wx3-Release|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.Debug|Win32.ActiveCfg = Debug|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.Debug|Win32.Build.0 = Debug|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.Release|Win32.ActiveCfg = Release|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.Release|Win32.Build.0 = Release|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.wx3-Debug|Win32.ActiveCfg = Debug|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.wx3-Debug|Win32.Build.0 = Debug|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.wx3-Release|Win32.ActiveCfg = Release|Win32
{D7B6910F-2AAB-4600-97FF-FE704897C448}.wx3-Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -54,64 +54,8 @@ To be able to build Audacity for Windows, download wxWidgets:
------------------------
MSVC++ STEP 2: Build wxWidgets
------------------------
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
"C\wxWidgets-2.8.12\build\msw\wx_dll.sln" instead of wx_dll.dsw.
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.
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.
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 that out.
See "MSVC++ STEP 6: Build Audacity" for the differences
between these versions of Audacity.
Because of dependencies, this should also build these projects:
But it may not on VS2013 so you will have to make sure to build these as well:
* wxexpat
* wxjpeg
* wxpng
* wxregex
* wxtiff
* wxzlib
If you build the whole solution, ignore the linker errors for
wxbase28*_odbc*.* dbgrid.
--------------------------
MSVC++ STEP 3: Download Audacity
MSVC++ STEP 2: Download Audacity
--------------------------
To check out the latest
@ -119,16 +63,17 @@ source code from SVN, see the instructions at
"http://audacity.sourceforge.net/community/developers".
--------------------------------------------
MSVC++ STEP 4: Set wxWidgets location for Audacity
MSVC++ STEP 3: 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:
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")
3.1. Include Directory (e.g., "C:\wxWidgets-2.8.12\include")
3.2. Resource Directory (e.g., "C:\wxWidgets-2.8.12\include")
3.3. Library Directory (e.g., "C:\wxWidgets-2.8.12\lib")
Fortunately, this is parameterized, using a Windows
environment variable, WXWIN. There are various ways to set
@ -152,17 +97,18 @@ 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
MSVC++ STEP 4: Consider and Configure Optional Features
-----------------------
5.1. Locally installed help is optional, but required for a full Release
4.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".
previous section, "MSVC++ STEP 3: 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
@ -172,7 +118,7 @@ audacity\scripts\mw2html_audacity\wiki2htm.bat
and re-build the "help" project.
5.2. To support languages other than English in your build of Audacity,
4.2. To support languages other than English in your build of Audacity,
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
@ -181,7 +127,7 @@ Alternatively, put msgfmt.exe somewhere already in the Path,
e.g., C:\Windows.
5.3. Some functionality in Audacity is currently turned on in its default
4.3. Some functionality in Audacity is currently turned on in its default
configuration, but requires that extra libraries be downloaded
separately to use it.
@ -197,23 +143,18 @@ To change the libraries enabled in Audacity, edit
"win\configwin.h" and comment or uncomment the entries.
5.4. DirectSound (Microsoft) and ASIO (Steinberg) are sound card interface
4.4. DirectSound (Microsoft) and ASIO (Steinberg) are sound card interface
protocols that are more efficient than standard WMME. Unlike WMME,
not all sound card drivers support them.
5.4.1. TO ADD SUPPORT FOR DIRECTSOUND:
Install the DirectX SDK from Microsoft (http://msdn.microsoft.com/directx).
For Audacity 2.0.6, we use http://www.microsoft.com/en-us/download/details.aspx?id=6812.
The installation will automatically define the DXSDK_DIR
environment variable and its presence will cause DirectSound
support to be automatically included when Audacity is built.
4.4.1. TO ADD SUPPORT FOR DIRECTSOUND:
When using Visual Studio 2013, you do not have to install a DirectSound SDK.
Audacity releases from 1.3.7 on include DirectSound support.
5.4.2 TO ADD SUPPORT FOR ASIO:
4.4.2 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
@ -236,6 +177,24 @@ the full path to the base directory of the ASIO SDK, e.g.,
------------------------
MSVC++ STEP 5: Build wxWidgets
------------------------
You can now build wxWidgets. This only has to be done once.
5.1. Run Visual C++ and load the Audacity solution, "audacity\win\audacity.sln".
5.2. In the Solution Explorer, right click the "wxWidgets-2.8.12" project and
select "Build".
This will add the Audacity specific configuration to wxWidgets and correct
a minor incompatibility between wxWidgets 2.8.12 and Visual Studio 2013.
It will then build both the Debug AND Release versions of wxWidgets.
-----------------------
MSVC++ STEP 6: Build Audacity
-----------------------

6891
win/wxWidgets_additions/window.cpp Executable file

File diff suppressed because it is too large Load Diff