From 85733835d1d7277caf0118df4a46ce21789f0cec Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 11 Jan 2012 20:03:46 +0000 Subject: [PATCH] Kill setup.cpp and move library inclusion to config_windows0.h. Closes #949. Originally committed to SVN as r6276. --- .../aegisub_vs2008/aegisub_vs2008.vcproj | 4 - aegisub/build/msbuild/Aegisub/Aegisub.vcxproj | 1 - .../msbuild/Aegisub/Aegisub.vcxproj.filters | 3 - aegisub/src/config/config_windows0.h | 53 +++++++----- aegisub/src/setup.cpp | 81 ------------------- 5 files changed, 34 insertions(+), 108 deletions(-) delete mode 100644 aegisub/src/setup.cpp diff --git a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj index 43f7a8540..1d079b499 100644 --- a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj +++ b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj @@ -1271,10 +1271,6 @@ RelativePath="..\..\src\plugin_manager.h" > - - diff --git a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj index 88e512651..99392224b 100644 --- a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj +++ b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj @@ -350,7 +350,6 @@ - diff --git a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters index 67fe6853b..fe37aa465 100644 --- a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters +++ b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters @@ -1016,9 +1016,6 @@ Utilities - - Config - Main UI diff --git a/aegisub/src/config/config_windows0.h b/aegisub/src/config/config_windows0.h index 78d4a12fc..cd6303265 100644 --- a/aegisub/src/config/config_windows0.h +++ b/aegisub/src/config/config_windows0.h @@ -34,47 +34,57 @@ /// @ingroup build /// - #pragma once - // Build credit: Set this to a string with your name as you want it to appear on the program #ifndef BUILD_CREDIT #define BUILD_CREDIT "Anonymous" #endif - // Endianness: We don't support any Windows version that runs on big endian #define HAVE_LITTLE_ENDIAN #undef HAVE_BIG_ENDIAN - ////////////// HIGH PRIORITY ///////////// // Enable Automation 4 Lua // Requires: Lua 5.1 (in repository) #define WITH_AUTO4_LUA - // Enable DirectSound audio player // Requires: DirectX SDK #define WITH_DIRECTSOUND - +#ifdef WITH_DIRECTSOUND +#pragma comment(lib, "dsound.lib") +#pragma comment(lib, "dxguid.lib") +#endif // Enable Avisynth -// Requires: nothing (just the avisynth dlls) +// Requires: nothing (just the avisynth dlls at runtime) #define WITH_AVISYNTH -// Enable ffmpegsource video and audio providers -// Requires: FFmpegSource2 headers (in repository), loader library and DLL +// Enable FFMS2 video and audio providers +// Requires: FFMS2 SDK //#define WITH_FFMS2 - - - +#ifdef WITH_FFMS2 +#pragma comment(lib, "ffms2.lib") +#endif ///////////// MEDIUM PRIORITY //////////// +// Enable FreeType2 font lister for the fonts collector +// Make sure the version numbers are correct, as the library names change +// Requires: FreeType2 +#define WITH_FREETYPE2 +#ifdef WITH_FREETYPE2 +#ifdef _DEBUG +#pragma comment(lib, "freetype235_D.lib") +#else +#pragma comment(lib, "freetype235.lib") +#endif + + // Enable FreeType2 font lister for the fonts collector // If you're on Visual Studio, also uncomment the library names and make sure they match the files that you have // Requires: FreeType2 @@ -104,7 +114,9 @@ // tricky to get working on Windows, and has the additional problem of being GPL licensed. // Enable this option to use FFTW to get faster rendering of the audio spectrogram //#define WITH_FFTW3 -//#pragma comment(lib,libfftw.lib) +#ifdef WITH_FFTW3 +#pragma comment(lib,libfftw.lib) +#endif // Specify tags the update checker accepts // See for details on tags. // Depending on who will be using your build, you may or may not want to have the @@ -123,33 +135,36 @@ // Enable FontConfig // Requires: fontconfig //#define WITH_FONTCONFIG - +#ifdef WITH_FONTCONFIG +#pragma comment(lib,"libfontconfig.lib") +#endif // Enable libass // Requires: libass //#define WITH_LIBASS - +#ifdef WITH_LIBASS +#pragma comment(lib, "libass.lib") +#endif // Enable PortAudio audio player // Requires PortAudio release 19 //#define WITH_PORTAUDIO - +#ifdef WITH_PORTAUDIO +#pragma comment(lib,"portaudio_x86.lib") +#endif // Enable ALSA audio player // Requires Linux and libasound //#define WITH_ALSA - // Enable OpenAL audio player // Requires OpenAL development libraries and headers //#define WITH_OPENAL - // Enable Pulse Audio audio player // Requires libpulse (and a *NIX compatible system and a running sound server to actually use) //#define WITH_LIBPULSE - // Display trace-level diagnostic messages during startup // Only enable for making special builds for end users having trouble with starting Aegisub //#define WITH_STARTUPLOG diff --git a/aegisub/src/setup.cpp b/aegisub/src/setup.cpp deleted file mode 100644 index 1a9285545..000000000 --- a/aegisub/src/setup.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2006, Rodrigo Braz Monteiro -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of the Aegisub Group nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -// Aegisub Project http://www.aegisub.org/ -// -// $Id$ - -/// @file setup.cpp -/// @brief Pragmas for automatically linking in required libraries during Windows build -/// @ingroup main -/// - -#include "config.h" - -//////////////// -// FFMpegSource -#ifdef WITH_FFMPEGSOURCE -#pragma comment(lib, "ffms2.lib") -#endif - -#ifdef WITH_PORTAUDIO -#pragma comment(lib,"portaudio_x86.lib") -#endif - - -//////////////// -// Direct Sound -#ifdef WITH_DIRECTSOUND -#pragma comment(lib, "dsound.lib") -#pragma comment(lib, "dxguid.lib") -#endif - - -///////////// -// FreeType2 -#ifdef WITH_FREETYPE2 -#ifdef _DEBUG -#ifdef FT2_LIB_DEBUG -#pragma comment(lib,FT2_LIB_DEBUG) -#endif -#else -#ifdef FT2_LIB_RELEASE -#pragma comment(lib,FT2_LIB_RELEASE) -#endif -#endif -#endif - - -/////////////// -// Font Config -#ifdef WITH_FONTCONFIG -#pragma comment(lib,"libfontconfig.lib") -#endif - -#ifdef WITH_LIBASS -#pragma comment(lib, "libass.lib") -#endif