Turn MiniBrowser into a stub .exe launcher and a .dll that contains all the real...
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jan 2012 14:57:46 +0000 (14:57 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jan 2012 14:57:46 +0000 (14:57 +0000)
This allows us to add the Apple Application Support directory to PATH before trying to load
WebKit so that CoreGraphics.dll and friends can be found.

Fixes <http://webkit.org/b/68576> <rdar://problem/10163853> MiniBrowser fails to launch when
double-clicked

Reviewed by Anders Carlsson.

Tools:

* MiniBrowser/MiniBrowser.vcproj:
* MiniBrowser/Configurations/MiniBrowserCommon.vsprops:
Changed to build MiniBrowser.dll instead of MiniBrowser.exe.

* MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops: Added.
* MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops: Added.
* MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops: Added.
* MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops: Added.
* MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops: Added.
* MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops: Added.
* MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops: Added.

* MiniBrowser/MiniBrowserLauncher.vcproj: Copied from Tools/MiniBrowser/MiniBrowser.vcproj
but changed to build the stub launcher.

* MiniBrowser/win/main.cpp: Moved the /manifestdependency code to DLLLauncherMain.cpp, since
it needs to be compiled into the .exe instead of the .dll.
(DllMain): Added. We use this to store the DLL's HINSTANCE.
(dllLauncherEntryPoint): Renamed from _tWinMain. This is what gets called by the
DLLLauncherMain code.

* win/DLLLauncher/DLLLauncherMain.cpp: Moved the /manifestdependency code from MiniBrowser
to here.

Source/WebKit/win:

Add MiniBrowserLauncher to WebKit.sln

It builds just after MiniBrowser.

* WebKit.vcproj/WebKit.sln: Added MiniBrowserLauncher.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104155 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebKit.vcproj/WebKit.sln
Tools/ChangeLog
Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops
Tools/MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops [new file with mode: 0644]
Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops [new file with mode: 0644]
Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops [new file with mode: 0644]
Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops [new file with mode: 0644]
Tools/MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops [new file with mode: 0644]
Tools/MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops [new file with mode: 0644]
Tools/MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops [new file with mode: 0644]
Tools/MiniBrowser/MiniBrowser.vcproj
Tools/MiniBrowser/MiniBrowserLauncher.vcproj [new file with mode: 0644]
Tools/MiniBrowser/win/main.cpp
Tools/win/DLLLauncher/DLLLauncherMain.cpp

index 5470e32..9f4123c 100644 (file)
@@ -1,5 +1,18 @@
 2012-01-04  Adam Roben  <aroben@apple.com>
 
+        Add MiniBrowserLauncher to WebKit.sln
+
+        It builds just after MiniBrowser.
+
+        Part of <http://webkit.org/b/68576> <rdar://problem/10163853> MiniBrowser fails to launch
+        when double-clicked
+
+        Reviewed by Anders Carlsson.
+
+        * WebKit.vcproj/WebKit.sln: Added MiniBrowserLauncher.
+
+2012-01-04  Adam Roben  <aroben@apple.com>
+
         Add WinLauncherLauncher to WebKit.sln
 
         It builds just after WinLauncher.
index f221ebe..d5b7369 100644 (file)
@@ -163,6 +163,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinLauncherLauncher", "..\.
                {114FCA11-216B-4C8C-957E-30A75AE80443} = {114FCA11-216B-4C8C-957E-30A75AE80443}
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MiniBrowserLauncher", "..\..\..\..\Tools\MiniBrowser\MiniBrowserLauncher.vcproj", "{7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}"
+       ProjectSection(ProjectDependencies) = postProject
+               {1480CF5F-4160-47B5-A0E6-96AEC8258FB5} = {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug_All|Win32 = Debug_All|Win32
@@ -543,6 +548,18 @@ Global
                {767B10FB-76C1-44D0-8005-85ED7F9AA5E4}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
                {767B10FB-76C1-44D0-8005-85ED7F9AA5E4}.Release|Win32.ActiveCfg = Release|Win32
                {767B10FB-76C1-44D0-8005-85ED7F9AA5E4}.Release|Win32.Build.0 = Release|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Debug_All|Win32.Build.0 = Debug_All|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Debug|Win32.ActiveCfg = Debug|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Debug|Win32.Build.0 = Debug|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Production|Win32.ActiveCfg = Production|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Production|Win32.Build.0 = Production|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Release|Win32.ActiveCfg = Release|Win32
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}.Release|Win32.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -579,5 +596,6 @@ Global
                {B0101604-B483-4F8C-9C51-90B46A2B1CD3} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
                {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
                {767B10FB-76C1-44D0-8005-85ED7F9AA5E4} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+               {7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
        EndGlobalSection
 EndGlobal
index 98874c7..edcf45a 100644 (file)
@@ -1,5 +1,41 @@
 2012-01-04  Adam Roben  <aroben@apple.com>
 
+        Turn MiniBrowser into a stub .exe launcher and a .dll that contains all the real code
+
+        This allows us to add the Apple Application Support directory to PATH before trying to load
+        WebKit so that CoreGraphics.dll and friends can be found.
+
+        Fixes <http://webkit.org/b/68576> <rdar://problem/10163853> MiniBrowser fails to launch when
+        double-clicked
+
+        Reviewed by Anders Carlsson.
+
+        * MiniBrowser/MiniBrowser.vcproj:
+        * MiniBrowser/Configurations/MiniBrowserCommon.vsprops:
+        Changed to build MiniBrowser.dll instead of MiniBrowser.exe.
+
+        * MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops: Added.
+        * MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops: Added.
+        * MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops: Added.
+        * MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops: Added.
+        * MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops: Added.
+        * MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops: Added.
+        * MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops: Added.
+
+        * MiniBrowser/MiniBrowserLauncher.vcproj: Copied from Tools/MiniBrowser/MiniBrowser.vcproj
+        but changed to build the stub launcher.
+
+        * MiniBrowser/win/main.cpp: Moved the /manifestdependency code to DLLLauncherMain.cpp, since
+        it needs to be compiled into the .exe instead of the .dll.
+        (DllMain): Added. We use this to store the DLL's HINSTANCE.
+        (dllLauncherEntryPoint): Renamed from _tWinMain. This is what gets called by the
+        DLLLauncherMain code.
+
+        * win/DLLLauncher/DLLLauncherMain.cpp: Moved the /manifestdependency code from MiniBrowser
+        to here.
+
+2012-01-04  Adam Roben  <aroben@apple.com>
+
         Make WinLauncher's window frame respond to clicks/drags again
 
         Fixes <http://webkit.org/b/75562> REGRESSION (r84990): Can't drag WinLauncher by its title
index 1a42a72..c86035d 100644 (file)
@@ -9,4 +9,8 @@
                AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
                UsePrecompiledHeader="2"
        />
+       <Tool
+               Name="VCLinkerTool"
+               OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
+       />
 </VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops
new file mode 100644 (file)
index 0000000..e86688a
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncherCommon"
+       >
+       <Tool
+               Name="VCLinkerTool"
+               AdditionalDependencies="shlwapi.lib"
+               OutputFile="$(OutDir)\MiniBrowser$(WebKitConfigSuffix).exe"
+               ProgramDatabaseFile="$(TargetDir)$(TargetName)Launcher.pdb"
+       />
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops
new file mode 100644 (file)
index 0000000..6731dc7
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncherDebug"
+       InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\MiniBrowserLauncherCommon.vsprops"
+       >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops
new file mode 100644 (file)
index 0000000..40a5686
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncherDebugAll"
+       InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\MiniBrowserLauncherCommon.vsprops"
+       >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops
new file mode 100644 (file)
index 0000000..f03f9ac
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserDebugCairoCFLite"
+       InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops"
+       >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops
new file mode 100644 (file)
index 0000000..5d24355
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncherProduction"
+       InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\MiniBrowserLauncherCommon.vsprops"
+       >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops
new file mode 100644 (file)
index 0000000..58d1f38
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncherRelease"
+       InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\MiniBrowserLauncherCommon.vsprops"
+       >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops
new file mode 100644 (file)
index 0000000..43062ff
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncherReleaseCairoCFLite"
+       InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\MiniBrowserLauncherCommon.vsprops"
+       >
+</VisualStudioPropertySheet>
index 4b7b8fc..a52e222 100644 (file)
@@ -17,7 +17,7 @@
        <Configurations>
                <Configuration
                        Name="Debug|Win32"
-                       ConfigurationType="1"
+                       ConfigurationType="2"
                        InheritedPropertySheets=".\Configurations\MiniBrowserDebug.vsprops"
                        UseOfATL="1"
                        CharacterSet="1"
@@ -79,7 +79,7 @@
                </Configuration>
                <Configuration
                        Name="Release|Win32"
-                       ConfigurationType="1"
+                       ConfigurationType="2"
                        InheritedPropertySheets=".\Configurations\MiniBrowserRelease.vsprops"
                        UseOfATL="1"
                        CharacterSet="1"
                </Configuration>
                <Configuration
                        Name="Debug_All|Win32"
-                       ConfigurationType="1"
+                       ConfigurationType="2"
                        InheritedPropertySheets=".\Configurations\MiniBrowserDebugAll.vsprops"
                        UseOfATL="1"
                        CharacterSet="1"
                </Configuration>
                <Configuration
                        Name="Debug_Cairo_CFLite|Win32"
-                       ConfigurationType="1"
+                       ConfigurationType="2"
                        InheritedPropertySheets=".\Configurations\MiniBrowserDebugCairoCFLite.vsprops"
                        UseOfATL="1"
                        CharacterSet="1"
                </Configuration>
                <Configuration
                        Name="Release_Cairo_CFLite|Win32"
-                       ConfigurationType="1"
+                       ConfigurationType="2"
                        InheritedPropertySheets=".\Configurations\MiniBrowserReleaseCairoCFLite.vsprops"
                        UseOfATL="1"
                        CharacterSet="1"
                </Configuration>
                <Configuration
                        Name="Production|Win32"
-                       ConfigurationType="1"
+                       ConfigurationType="2"
                        InheritedPropertySheets=".\Configurations\MiniBrowserProduction.vsprops"
                        UseOfATL="1"
                        CharacterSet="1"
diff --git a/Tools/MiniBrowser/MiniBrowserLauncher.vcproj b/Tools/MiniBrowser/MiniBrowserLauncher.vcproj
new file mode 100644 (file)
index 0000000..330ffad
--- /dev/null
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="MiniBrowserLauncher"
+       ProjectGUID="{7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}"
+       RootNamespace="MiniBrowserLauncher"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       ConfigurationType="1"
+                       InheritedPropertySheets=".\Configurations\MiniBrowserLauncherDebug.vsprops"
+                       CharacterSet="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       ConfigurationType="1"
+                       InheritedPropertySheets=".\Configurations\MiniBrowserLauncherRelease.vsprops"
+                       CharacterSet="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug_Cairo_CFLite|Win32"
+                       ConfigurationType="1"
+                       InheritedPropertySheets=".\Configurations\MiniBrowserLauncherDebugCairoCFLite.vsprops"
+                       CharacterSet="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug_All|Win32"
+                       ConfigurationType="1"
+                       InheritedPropertySheets=".\Configurations\MiniBrowserLauncherDebugAll.vsprops"
+                       CharacterSet="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Production|Win32"
+                       ConfigurationType="1"
+                       InheritedPropertySheets=".\Configurations\MiniBrowserLauncherProduction.vsprops"
+                       CharacterSet="1"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release_Cairo_CFLite|Win32"
+                       ConfigurationType="1"
+                       InheritedPropertySheets=".\Configurations\MiniBrowserLauncherReleaseCairoCFLite.vsprops"
+                       CharacterSet="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <File
+                       RelativePath="..\win\DLLLauncher\DLLLauncherMain.cpp"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 93b47ce..ba09c94 100644 (file)
 #include "MiniBrowser.h"
 #include <string>
 
-#if defined _M_IX86
-#define PROCESSORARCHITECTURE "x86"
-#elif defined _M_IA64
-#define PROCESSORARCHITECTURE "ia64"
-#elif defined _M_X64
-#define PROCESSORARCHITECTURE "amd64"
-#else
-#define PROCESSORARCHITECTURE "*"
-#endif
-
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
-
 static bool shouldTranslateMessage(const MSG& msg)
 {
     // Only these four messages are actually translated by ::TranslateMessage or ::TranslateAccelerator.
@@ -57,10 +45,16 @@ static bool shouldTranslateMessage(const MSG& msg)
     return wcscmp(className, L"WebKit2WebViewWindowClass");
 }
 
-int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow)
+BOOL WINAPI DllMain(HINSTANCE dllInstance, DWORD reason, LPVOID)
 {
-    MiniBrowser::shared().initialize(hInstance);
+    if (reason == DLL_PROCESS_ATTACH)
+        MiniBrowser::shared().initialize(dllInstance);
 
+    return TRUE;
+}
+
+extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow)
+{
     // Create and show our initial window.
     MiniBrowser::shared().createNewWindow();
 
index bd1ce43..f6fd508 100644 (file)
 
 using namespace std;
 
+#if defined _M_IX86
+#define PROCESSORARCHITECTURE "x86"
+#elif defined _M_IA64
+#define PROCESSORARCHITECTURE "ia64"
+#elif defined _M_X64
+#define PROCESSORARCHITECTURE "amd64"
+#else
+#define PROCESSORARCHITECTURE "*"
+#endif
+
+#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
+
 static void enableTerminationOnHeapCorruption()
 {
     // Enable termination on heap corruption on OSes that support it (Vista and XPSP3).