OSDN Git Service

Add a new configuration for static build (requires Qt as static lib)
authorlordmulder <mulder2@gmx.de>
Wed, 10 Nov 2010 23:25:23 +0000 (00:25 +0100)
committerlordmulder <mulder2@gmx.de>
Wed, 10 Nov 2010 23:25:23 +0000 (00:25 +0100)
LameXP.sln
LameXP.vcproj
etc/Deployment/_build.bat
etc/Deployment/_deploy.bat [new file with mode: 0644]
etc/Deployment/debug.bat
etc/Deployment/release.bat
etc/Deployment/release_static.bat [new file with mode: 0644]
src/Global.cpp

index 923e5e5..7422062 100644 (file)
@@ -6,11 +6,14 @@ EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
+               Release Static|Win32 = Release Static|Win32
                Release|Win32 = Release|Win32
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
                {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}.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|Win32.ActiveCfg = Release|Win32
                {00FE736A-8DB1-41B3-B915-4CD8DB09EF48}.Release|Win32.Build.0 = Release|Win32
        EndGlobalSection
index e3c14ce..f93b907 100644 (file)
                        IntermediateDirectory="$(SolutionDir)obj\$(ConfigurationName)"
                        ConfigurationType="1"
                        CharacterSet="1"
+                       WholeProgramOptimization="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                                AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;$(QTDIR)\plugins\imageformats&quot;"
                                GenerateDebugInformation="false"
                                AssemblyDebug="0"
+                               GenerateMapFile="false"
                                MapExports="false"
                                SubSystem="2"
                                LinkTimeCodeGeneration="1"
                                CommandLine="mkdir &quot;$(TargetDir)imageformats&quot;&#x0D;&#x0A;copy &quot;$(QTDIR)\plugins\imageformats\q???4.dll&quot; &quot;$(TargetDir)imageformats\&quot;&#x0D;&#x0A;"
                        />
                </Configuration>
+               <Configuration
+                       Name="Release Static|Win32"
+                       OutputDirectory="$(SolutionDir)bin\$(ConfigurationName)"
+                       IntermediateDirectory="$(SolutionDir)obj\$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="1"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                               CommandLine=""
+                               Outputs=""
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="3"
+                               InlineFunctionExpansion="2"
+                               EnableIntrinsicFunctions="true"
+                               FavorSizeOrSpeed="1"
+                               OmitFramePointers="true"
+                               WholeProgramOptimization="true"
+                               AdditionalIncludeDirectories="&quot;$(QTDIR_STATIC)\include&quot;;&quot;$(QTDIR_STATIC)\include\QtCore&quot;;&quot;$(QTDIR_STATIC)\include\QtGui&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG"
+                               MinimalRebuild="false"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               EnableEnhancedInstructionSet="0"
+                               FloatingPointModel="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               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;"
+                               AdditionalDependencies="qtmain.lib QtCore.lib QtGui.lib QtSvg.lib qsvg.lib qico.lib Winmm.lib imm32.lib ws2_32.lib"
+                               LinkIncremental="1"
+                               AdditionalLibraryDirectories="&quot;$(QTDIR_STATIC)\lib&quot;;&quot;$(QTDIR_STATIC)\plugins\imageformats&quot;"
+                               IgnoreDefaultLibraryNames=""
+                               GenerateDebugInformation="false"
+                               AssemblyDebug="0"
+                               MapExports="false"
+                               SubSystem="2"
+                               LinkTimeCodeGeneration="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               CommandLine=""
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Dialog_MetaInfo.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Dialog_SplashScreen.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Dialog_WorkingBanner.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Genres.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Model_MetaInfo.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Resource.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Thread_Initialization.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Thread_MessageHandler.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\src\Thread_MessageProducer.h"
                                                Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="MOC &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -o &quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\MOC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                </Filter>
                <Filter
                                                Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\res\Images.qrc"
                                                Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\LameXP.rc"
                                                Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\res\sounds\uuaarrgh.wav"
                                                Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="UIC &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\gui\MetaInfo.ui"
                                                Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="UIC &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\gui\SplashScreen.ui"
                                                Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="UIC &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\gui\WorkingBanner.ui"
                                                Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
                                        />
                                </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release Static|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="UIC &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                               CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               Outputs="&quot;$(SolutionDir)tmp\UIC_$(SafeInputName).h&quot;"
+                                       />
+                               </FileConfiguration>
                        </File>
                </Filter>
                <File
index 598ca0a..76281db 100644 (file)
@@ -2,7 +2,7 @@
 set "LAMEXP_ERROR=1"
 echo ----------------------------------------------------------------
 echo Solution File: %1
-echo Configuration: %~n2
+echo Configuration: %~2
 echo ----------------------------------------------------------------
 call _paths.bat
 if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
@@ -11,11 +11,11 @@ call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86
 call "%PATH_QTMSVC%\bin\qtvars.bat"
 REM -----------------------------------------------------------------
 set "LAMEXP_ERROR=1"
-msbuild.exe /property:Configuration=%~n2 /target:Clean /verbosity:d %1
+msbuild.exe /property:Configuration=%2 /target:Clean /verbosity:detailed %1
 if exist "%~d1%~p1bin\%~n2\*.exe" GOTO:EOF
 if exist "%~d1%~p1obj\%~n2\*.obj" GOTO:EOF
 echo ----------------------------------------------------------------
-msbuild.exe /property:Configuration=%~n2 /target:Rebuild /verbosity:d %1
+msbuild.exe /property:Configuration=%2 /target:Rebuild /verbosity:detailed %1
 echo ----------------------------------------------------------------
 if not exist "%~d1%~p1bin\%~n2\%~n1.exe" GOTO:EOF
 REM -----------------------------------------------------------------
diff --git a/etc/Deployment/_deploy.bat b/etc/Deployment/_deploy.bat
new file mode 100644 (file)
index 0000000..b84fd36
--- /dev/null
@@ -0,0 +1,95 @@
+@echo off
+REM ------------------------------------------
+REM :: SETUP PATHS ::
+REM ------------------------------------------
+call _paths.bat
+if not "%LAMEXP_ERROR%"=="0" (
+       call _error.bat "FAILD TO SETUP PATHS. CHECK YOUR 'BUILDENV.TXT' FILE"
+       GOTO:EOF
+)
+REM ------------------------------------------
+if "%LAMEXP_CONFIG%"=="" (
+       set "LAMEXP_CONFIG=Release"
+)
+REM ------------------------------------------
+set "OUT_PATH=..\..\bin\%LAMEXP_CONFIG%"
+set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%"
+set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.%LAMEXP_CONFIG%"
+set "TMP_PATH=%TEMP%\~LameXP.%OUT_DATE%.tmp"
+REM ------------------------------------------
+REM :: READ VERSION INFO ::
+REM ------------------------------------------
+call _version.bat
+if not "%LAMEXP_ERROR%"=="0" (
+       call _error.bat "FAILD TO READ VERSION INFO!"
+       GOTO:EOF
+)
+REM ------------------------------------------
+REM :: CLEAN UP ::
+REM ------------------------------------------
+del "%OUT_FILE%.exe"
+del "%OUT_FILE%.zip"
+if exist "%OUT_FILE%.exe" (
+       call _error.bat "FAILD TO DELET EXISTING FILE"
+       GOTO:EOF
+)
+if exist "%OUT_FILE%.zip" (
+       call _error.bat "FAILD TO DELET EXISTING FILE"
+       GOTO:EOF
+)
+REM ------------------------------------------
+REM :: BUILD BINARIES ::
+REM ------------------------------------------
+call _build.bat "..\..\LameXP.sln" "%LAMEXP_CONFIG%"
+if not "%LAMEXP_ERROR%"=="0" (
+       call _error.bat "BUILD HAS FAILED"
+       GOTO:EOF
+)
+REM ------------------------------------------
+REM :: POST BUILD ::
+REM ------------------------------------------
+rd /S /Q "%TMP_PATH%"
+mkdir "%TMP_PATH%"
+mkdir "%TMP_PATH%\imageformats"
+REM ------------------------------------------
+copy "%OUT_PATH%\*.exe" "%TMP_PATH%"
+copy "%QTDIR%\bin\QtCore4.dll" "%TMP_PATH%"
+copy "%QTDIR%\bin\QtGui4.dll" "%TMP_PATH%"
+copy "%QTDIR%\bin\QtXml4.dll" "%TMP_PATH%"
+copy "%QTDIR%\bin\QtSvg4.dll" "%TMP_PATH%"
+copy "%QTDIR%\plugins\imageformats\q???4.dll" "%TMP_PATH%\imageformats"
+REM ------------------------------------------
+for %%f in ("%TMP_PATH%\*.exe") do (
+       "%PATH_UPXBIN%\upx.exe" --best --lzma "%%f"
+)
+for %%f in ("%TMP_PATH%\*.dll") do (
+       "%PATH_UPXBIN%\upx.exe" --best --lzma "%%f"
+)
+REM ------------------------------------------
+if exist _postproc.bat (
+       call _postproc.bat "%TMP_PATH%"
+)
+REM ------------------------------------------
+copy "..\Redist\*.*" "%TMP_PATH%"
+copy "..\..\License.txt" "%TMP_PATH%"
+REM ------------------------------------------
+REM :: CREATE PACKAGES ::
+REM ------------------------------------------
+"%PATH_SEVENZ%\7z.exe" a -tzip -r "%OUT_FILE%.zip" "%TMP_PATH%\*"
+"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_DATE=%OUT_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_SUFFIX=%VER_LAMEXP_SUFFIX%" "..\NSIS\setup.nsi"
+rd /S /Q "%TMP_PATH%"
+REM ------------------------------------------
+if not exist "%OUT_FILE%.zip" (
+       call _error.bat "PACKAGING HAS FAILED"
+       GOTO:EOF
+)
+if not exist "%OUT_FILE%.exe" (
+       call _error.bat "PACKAGING HAS FAILED"
+       GOTO:EOF
+)
+REM ------------------------------------------
+echo.
+echo BUIDL COMPLETED SUCCESSFULLY :-)
+echo.
+REM ------------------------------------------
+pause
index 472aef0..06b4f7b 100644 (file)
@@ -1,3 +1,3 @@
 @echo off
-call _build.bat "..\..\LameXP.sln" Debug
-pause
+set "LAMEXP_CONFIG=Debug"
+call _deploy.bat
index f421e8e..393a49c 100644 (file)
@@ -1,88 +1,3 @@
 @echo off
-REM ------------------------------------------
-REM :: SETUP PATHS ::
-REM ------------------------------------------
-call _paths.bat
-if not "%LAMEXP_ERROR%"=="0" (
-       call _error.bat "FAILD TO SETUP PATHS. CHECK YOUR 'BUILDENV.TXT' FILE"
-       GOTO:EOF
-)
-REM ------------------------------------------
-set "OUT_PATH=..\..\bin\Release"
-set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%"
-set "OUT_FILE=%OUT_PATH%\..\LameXP.%OUT_DATE%.Release"
-set "TMP_PATH=%TEMP%\~LameXP.%OUT_DATE%.tmp"
-REM ------------------------------------------
-REM :: READ VERSION INFO ::
-REM ------------------------------------------
-call _version.bat
-if not "%LAMEXP_ERROR%"=="0" (
-       call _error.bat "FAILD TO READ VERSION INFO!"
-       GOTO:EOF
-)
-REM ------------------------------------------
-REM :: CLEAN UP ::
-REM ------------------------------------------
-del "%OUT_FILE%.exe"
-del "%OUT_FILE%.zip"
-if exist "%OUT_FILE%.exe" (
-       call _error.bat "FAILD TO DELET EXISTING FILE"
-       GOTO:EOF
-)
-if exist "%OUT_FILE%.zip" (
-       call _error.bat "FAILD TO DELET EXISTING FILE"
-       GOTO:EOF
-)
-REM ------------------------------------------
-REM :: BUILD BINARIES ::
-REM ------------------------------------------
-call _build.bat "..\..\LameXP.sln" Release
-if not "%LAMEXP_ERROR%"=="0" (
-       call _error.bat "BUILD HAS FAILED"
-       GOTO:EOF
-)
-
-REM ------------------------------------------
-REM :: POST BUILD ::
-REM ------------------------------------------
-rd /S /Q "%TMP_PATH%"
-mkdir "%TMP_PATH%"
-mkdir "%TMP_PATH%\imageformats"
-REM ------------------------------------------
-copy "%OUT_PATH%\*.exe" "%TMP_PATH%"
-copy "%QTDIR%\bin\QtCore4.dll" "%TMP_PATH%"
-copy "%QTDIR%\bin\QtGui4.dll" "%TMP_PATH%"
-copy "%QTDIR%\bin\QtXml4.dll" "%TMP_PATH%"
-copy "%QTDIR%\bin\QtSvg4.dll" "%TMP_PATH%"
-copy "%QTDIR%\plugins\imageformats\q???4.dll" "%TMP_PATH%\imageformats"
-REM ------------------------------------------
-for %%f in ("%TMP_PATH%\*.exe") do (
-       "%PATH_UPXBIN%\upx.exe" --best --lzma "%%f"
-)
-for %%f in ("%TMP_PATH%\*.dll") do (
-       "%PATH_UPXBIN%\upx.exe" --best --lzma "%%f"
-)
-REM ------------------------------------------
-copy "..\Redist\*.*" "%TMP_PATH%"
-copy "..\..\License.txt" "%TMP_PATH%"
-REM ------------------------------------------
-REM :: CREATE PACKAGES ::
-REM ------------------------------------------
-"%PATH_SEVENZ%\7z.exe" a -tzip -r "%OUT_FILE%.zip" "%TMP_PATH%\*"
-"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_DATE=%OUT_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_SUFFIX=%VER_LAMEXP_SUFFIX%" "..\NSIS\setup.nsi"
-rd /S /Q "%TMP_PATH%"
-REM ------------------------------------------
-if not exist "%OUT_FILE%.zip" (
-       call _error.bat "PACKAGING HAS FAILED"
-       GOTO:EOF
-)
-if not exist "%OUT_FILE%.exe" (
-       call _error.bat "PACKAGING HAS FAILED"
-       GOTO:EOF
-)
-REM ------------------------------------------
-echo.
-echo BUIDL COMPLETED SUCCESSFULLY :-)
-echo.
-REM ------------------------------------------
-pause
+set "LAMEXP_CONFIG=Release"
+call _deploy.bat
diff --git a/etc/Deployment/release_static.bat b/etc/Deployment/release_static.bat
new file mode 100644 (file)
index 0000000..ed10f74
--- /dev/null
@@ -0,0 +1,3 @@
+@echo off
+set "LAMEXP_CONFIG=Release Static"
+call _deploy.bat
index 67164b2..d03655d 100644 (file)
 #include <Psapi.h>
 #endif //_DEBUG
 
+//Disable nasty warning
+#ifndef QT_DLL
+#pragma warning(disable:4101)
+#endif
+
 ///////////////////////////////////////////////////////////////////////////////
 // TYPES
 ///////////////////////////////////////////////////////////////////////////////
@@ -241,9 +246,15 @@ bool lamexp_init_qt(int argc, char* argv[])
        QCoreApplication::setLibraryPaths(QStringList() << QApplication::applicationDirPath());
        qDebug("Library Path:\n%s\n", QApplication::libraryPaths().first().toUtf8().constData());
 
+       //Initialize static Qt plugins
+       #ifndef QT_DLL
+               Q_IMPORT_PLUGIN(qsvg);
+               Q_IMPORT_PLUGIN(qico);
+       #endif
+
        //Check for supported image formats
        QList<QByteArray> supportedFormats = QImageReader::supportedImageFormats();
-       if(!(supportedFormats.contains("png") && supportedFormats.contains("gif")  && supportedFormats.contains("ico") && supportedFormats.contains("svg")))
+       if(!(supportedFormats.contains("png") && supportedFormats.contains("gif") && supportedFormats.contains("ico") && supportedFormats.contains("svg")))
        {
                qFatal("Qt initialization error: At least one image format plugin is missing!");
                return false;