OSDN Git Service

Updated Visual Studio 2008 project file.
authorlordmulder <mulder2@gmx.de>
Sat, 18 Aug 2012 18:55:59 +0000 (20:55 +0200)
committerlordmulder <mulder2@gmx.de>
Sat, 18 Aug 2012 18:55:59 +0000 (20:55 +0200)
LameXP_VS2008.vcproj
src/Config.h
src/Global.cpp
src/Global.h

index c2794ea..84440e1 100644 (file)
@@ -71,6 +71,7 @@
                                AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;$(QTDIR)\plugins\imageformats&quot;;&quot;$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\lib\Win32&quot;"
                                GenerateDebugInformation="true"
                                SubSystem="2"
+                               EntryPointSymbol="lamexp_entry_point"
                                TargetMachine="1"
                        />
                        <Tool
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
                                LinkTimeCodeGeneration="1"
+                               EntryPointSymbol="lamexp_entry_point"
                                SetChecksum="true"
                                TargetMachine="1"
                        />
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
                                LinkTimeCodeGeneration="1"
+                               EntryPointSymbol="lamexp_entry_point"
                                SetChecksum="true"
                                TargetMachine="1"
                        />
                                        <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;"
+                                               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>
                                        <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;"
+                                               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>
                                        <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;"
+                                               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>
index 55b4536..bded25b 100644 (file)
@@ -30,7 +30,7 @@
 #define VER_LAMEXP_MINOR_LO                                    5
 #define VER_LAMEXP_TYPE                                                Beta
 #define VER_LAMEXP_PATCH                                       4
-#define VER_LAMEXP_BUILD                                       1089
+#define VER_LAMEXP_BUILD                                       1090
 
 ///////////////////////////////////////////////////////////////////////////////
 // Tool versions (minimum expected versions!)
index 5d5e7d7..748cf74 100644 (file)
@@ -2177,6 +2177,22 @@ QStringList lamexp_available_codepages(bool noAliases)
 }
 
 /*
+ * Entry point checks
+ */
+static bool lamexp_entry_check(void);
+static bool g_lamexp_entry_check = false;
+static bool g_lamexp_entry_check_result = lamexp_entry_check();
+static bool lamexp_entry_check(void)
+{
+       if(!g_lamexp_entry_check)
+       {
+               FatalAppExit(0, L"Application initialization has failed!");
+               TerminateProcess(GetCurrentProcess(), -1);
+       }
+       return true;
+}
+
+/*
  * Application entry point (runs before static initializers)
  */
 extern "C"
@@ -2185,13 +2201,15 @@ extern "C"
        
        int lamexp_entry_point(void)
        {
+               /*MessageBoxA(NULL, "lamexp_entry_point", NULL, MB_TOPMOST);*/
+               
                if((!LAMEXP_DEBUG) && lamexp_check_for_debugger())
                {
                        FatalAppExit(0, L"Not a debug build. Please unload debugger and try again!");
                        TerminateProcess(GetCurrentProcess(), -1);
                }
                
-               //Init global structs to NULL *before* constructors are called
+               //Zero *before* constructors are called
                LAMEXP_ZERO_MEMORY(g_lamexp_argv);
                LAMEXP_ZERO_MEMORY(g_lamexp_tools);
                LAMEXP_ZERO_MEMORY(g_lamexp_currentTranslator);
@@ -2199,6 +2217,10 @@ extern "C"
                LAMEXP_ZERO_MEMORY(g_lamexp_folder);
                LAMEXP_ZERO_MEMORY(g_lamexp_ipc_ptr);
 
+               //Make sure we will pass the check
+               g_lamexp_entry_check = true;
+
+               //Now initialize the C Runtime library!
                return WinMainCRTStartup();
        }
 }
index a742cfb..68ae2f6 100644 (file)
@@ -185,7 +185,7 @@ SIZE_T lamexp_dbg_private_bytes(void);
 
 //Memory check
 #if LAMEXP_DEBUG
-#define LAMEXP_MEMORY_CHECK(FUNC, RETV,  ...) \
+#define LAMEXP_MEMORY_CHECK(FUNC, RETV,  ...) do \
 { \
        SIZE_T _privateBytesBefore = lamexp_dbg_private_bytes(); \
        RETV = FUNC(__VA_ARGS__); \
@@ -197,12 +197,14 @@ SIZE_T lamexp_dbg_private_bytes(void);
                OutputDebugStringA(_buffer); \
                OutputDebugStringA("----------\n"); \
        } \
-}
+} \
+while(0)
 #else
-#define LAMEXP_MEMORY_CHECK(FUNC, RETV,  ...) \
+#define LAMEXP_MEMORY_CHECK(FUNC, RETV,  ...) do \
 { \
        RETV = __noop(__VA_ARGS__); \
-}
+} \
+while(0)
 #endif
 
 //Check for CPU-compatibility options