Nicer method for static builds: Can use vanilla Qt source/include directory now

This commit is contained in:
LoRd_MuldeR 2010-11-11 14:11:44 +01:00
parent 4c9ae789bb
commit ec0eea9d9c
8 changed files with 42 additions and 43 deletions

View File

@ -6,14 +6,14 @@ EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
Release Static|Win32 = Release Static|Win32 Release_Static|Win32 = Release_Static|Win32
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Debug|Win32.ActiveCfg = Debug|Win32 {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Debug|Win32.ActiveCfg = Debug|Win32
{00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Debug|Win32.Build.0 = Debug|Win32 {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Debug|Win32.Build.0 = Debug|Win32
{00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release Static|Win32.ActiveCfg = Release Static|Win32 {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release_Static|Win32.ActiveCfg = Release_Static|Win32
{00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release Static|Win32.Build.0 = Release Static|Win32 {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release_Static|Win32.Build.0 = Release_Static|Win32
{00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release|Win32.ActiveCfg = Release|Win32 {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release|Win32.ActiveCfg = Release|Win32
{00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release|Win32.Build.0 = Release|Win32 {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection

View File

@ -189,7 +189,7 @@
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release Static|Win32" Name="Release_Static|Win32"
OutputDirectory="$(SolutionDir)bin\$(ConfigurationName)" OutputDirectory="$(SolutionDir)bin\$(ConfigurationName)"
IntermediateDirectory="$(SolutionDir)obj\$(ConfigurationName)" IntermediateDirectory="$(SolutionDir)obj\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
@ -221,8 +221,8 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="true" WholeProgramOptimization="true"
AdditionalIncludeDirectories="&quot;$(QTDIR_STATIC)\include&quot;;&quot;$(QTDIR_STATIC)\include\QtCore&quot;;&quot;$(QTDIR_STATIC)\include\QtGui&quot;" AdditionalIncludeDirectories="&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL"
MinimalRebuild="false" MinimalRebuild="false"
BasicRuntimeChecks="0" BasicRuntimeChecks="0"
RuntimeLibrary="0" RuntimeLibrary="0"
@ -246,8 +246,9 @@
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalOptions="&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot;" AdditionalOptions="&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot;"
AdditionalDependencies="qtmain.lib QtCore.lib QtGui.lib QtSvg.lib qsvg.lib qico.lib Winmm.lib imm32.lib ws2_32.lib" AdditionalDependencies="qtmain.lib QtCore.lib QtGui.lib QtSvg.lib qsvg.lib qico.lib Winmm.lib imm32.lib ws2_32.lib"
Version=""
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(QTDIR_STATIC)\lib&quot;;&quot;$(QTDIR_STATIC)\plugins\imageformats&quot;" AdditionalLibraryDirectories="&quot;$(SolutionDir)\etc\Prerequisites\qt4_static\lib&quot;;&quot;$(SolutionDir)\etc\Prerequisites\qt4_static\plugins\imageformats&quot;"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
GenerateDebugInformation="false" GenerateDebugInformation="false"
AssemblyDebug="0" AssemblyDebug="0"
@ -382,7 +383,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -416,7 +417,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -450,7 +451,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -484,7 +485,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -534,7 +535,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -568,7 +569,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -610,7 +611,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -644,7 +645,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -678,7 +679,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -712,7 +713,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -808,7 +809,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -842,7 +843,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -884,7 +885,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -926,7 +927,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -960,7 +961,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -994,7 +995,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -1028,7 +1029,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release Static|Win32" Name="Release_Static|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"

View File

@ -11,11 +11,11 @@ call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86
call "%PATH_QTMSVC%\bin\qtvars.bat" call "%PATH_QTMSVC%\bin\qtvars.bat"
REM ----------------------------------------------------------------- REM -----------------------------------------------------------------
set "LAMEXP_ERROR=1" set "LAMEXP_ERROR=1"
msbuild.exe /property:Configuration=%2 /target:Clean /verbosity:detailed %1 msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Clean /verbosity:detailed %1
if exist "%~d1%~p1bin\%~n2\*.exe" GOTO:EOF if exist "%~d1%~p1bin\%~n2\*.exe" GOTO:EOF
if exist "%~d1%~p1obj\%~n2\*.obj" GOTO:EOF if exist "%~d1%~p1obj\%~n2\*.obj" GOTO:EOF
echo ---------------------------------------------------------------- echo ----------------------------------------------------------------
msbuild.exe /property:Configuration=%2 /target:Rebuild /verbosity:detailed %1 msbuild.exe /property:Configuration=%2 /property:Platform=Win32 /target:Rebuild /verbosity:detailed %1
echo ---------------------------------------------------------------- echo ----------------------------------------------------------------
if not exist "%~d1%~p1bin\%~n2\%~n1.exe" GOTO:EOF if not exist "%~d1%~p1bin\%~n2\%~n1.exe" GOTO:EOF
REM ----------------------------------------------------------------- REM -----------------------------------------------------------------

View File

@ -17,7 +17,7 @@ if not "%LAMEXP_REDIST%"=="0" (
REM ------------------------------------------ REM ------------------------------------------
set "OUT_PATH=..\..\bin\%LAMEXP_CONFIG%" set "OUT_PATH=..\..\bin\%LAMEXP_CONFIG%"
set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%" set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%"
set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG%" set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG:_=-%"
set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp" set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp"
REM ------------------------------------------ REM ------------------------------------------
REM :: READ VERSION INFO :: REM :: READ VERSION INFO ::
@ -53,7 +53,6 @@ REM :: POST BUILD ::
REM ------------------------------------------ REM ------------------------------------------
rd /S /Q "%TMP_PATH%" rd /S /Q "%TMP_PATH%"
mkdir "%TMP_PATH%" mkdir "%TMP_PATH%"
mkdir "%TMP_PATH%\imageformats"
copy "%OUT_PATH%\*.exe" "%TMP_PATH%" copy "%OUT_PATH%\*.exe" "%TMP_PATH%"
REM ------------------------------------------ REM ------------------------------------------
if "%LAMEXP_REDIST%"=="1" ( if "%LAMEXP_REDIST%"=="1" (
@ -61,6 +60,7 @@ if "%LAMEXP_REDIST%"=="1" (
copy "%QTDIR%\bin\QtGui4.dll" "%TMP_PATH%" copy "%QTDIR%\bin\QtGui4.dll" "%TMP_PATH%"
copy "%QTDIR%\bin\QtXml4.dll" "%TMP_PATH%" copy "%QTDIR%\bin\QtXml4.dll" "%TMP_PATH%"
copy "%QTDIR%\bin\QtSvg4.dll" "%TMP_PATH%" copy "%QTDIR%\bin\QtSvg4.dll" "%TMP_PATH%"
mkdir "%TMP_PATH%\imageformats"
copy "%QTDIR%\plugins\imageformats\q???4.dll" "%TMP_PATH%\imageformats" copy "%QTDIR%\plugins\imageformats\q???4.dll" "%TMP_PATH%\imageformats"
) )
REM ------------------------------------------ REM ------------------------------------------

View File

@ -1,4 +1,4 @@
@echo off @echo off
set "LAMEXP_CONFIG=Release Static" set "LAMEXP_CONFIG=Release_Static"
set "LAMEXP_REDIST=0" set "LAMEXP_REDIST=0"
call _deploy.bat call _deploy.bat

View File

@ -0,0 +1 @@
In order to make static builds you must put the static Qt libs here!

View File

@ -50,11 +50,6 @@
#include <Psapi.h> #include <Psapi.h>
#endif //_DEBUG #endif //_DEBUG
//Disable nasty warning
#ifndef QT_DLL
#pragma warning(disable:4101)
#endif
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// TYPES // TYPES
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -194,6 +189,12 @@ void lamexp_init_console(int argc, char* argv[])
} }
} }
/* Disable nasty warning */
#if !defined(QT_DLL) || defined(QT_NODLL)
#pragma warning(push)
#pragma warning(disable:4101)
#endif
/* /*
* Initialize Qt framework * Initialize Qt framework
*/ */
@ -268,6 +269,11 @@ bool lamexp_init_qt(int argc, char* argv[])
return true; return true;
} }
/* Re-enable the warning */
#if !defined(QT_DLL) || defined(QT_NODLL)
#pragma warning(pop)
#endif
/* /*
* Initialize IPC * Initialize IPC
*/ */
@ -392,14 +398,6 @@ void lamexp_ipc_read(unsigned int *command, char* message, size_t buffSize)
LAMEXP_DELETE(lamexp_ipc); LAMEXP_DELETE(lamexp_ipc);
} }
/*
* Communicate with running instance
*/
void lamexp_handle_multiple_instanced(void)
{
}
/* /*
* Get LameXP temp folder * Get LameXP temp folder
*/ */

View File

@ -48,7 +48,6 @@ bool lamexp_version_demo(void);
void lamexp_init_console(int argc, char* argv[]); void lamexp_init_console(int argc, char* argv[]);
bool lamexp_init_qt(int argc, char* argv[]); bool lamexp_init_qt(int argc, char* argv[]);
int lamexp_init_ipc(void); int lamexp_init_ipc(void);
void lamexp_handle_multiple_instanced(void);
void lamexp_register_tool(const QString &toolName, LockedFile *file); void lamexp_register_tool(const QString &toolName, LockedFile *file);
const QString lamexp_lookup_tool(const QString &toolName); const QString lamexp_lookup_tool(const QString &toolName);
void lamexp_finalization(void); void lamexp_finalization(void);