Alexandre Julliard : setupapi: Add support for a WinePreInstall section for registry keys that need to be created before anything else .

Alexandre Julliard julliard at winehq.org
Thu May 31 13:30:40 CDT 2012


Module: wine
Branch: master
Commit: 9a6a1126b9b8b4b5f17b16249eba761063be4be8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9a6a1126b9b8b4b5f17b16249eba761063be4be8

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 30 20:25:37 2012 +0200

setupapi: Add support for a WinePreInstall section for registry keys that need to be created before anything else.

---

 dlls/setupapi/install.c |   10 ++++++++++
 tools/wine.inf.in       |    4 ++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c
index 96eb914..874b4a9 100644
--- a/dlls/setupapi/install.c
+++ b/dlls/setupapi/install.c
@@ -91,6 +91,7 @@ static const WCHAR Name[]            = {'N','a','m','e',0};
 static const WCHAR CmdLine[]         = {'C','m','d','L','i','n','e',0};
 static const WCHAR SubDir[]          = {'S','u','b','D','i','r',0};
 static const WCHAR WineFakeDlls[]    = {'W','i','n','e','F','a','k','e','D','l','l','s',0};
+static const WCHAR WinePreInstall[]  = {'W','i','n','e','P','r','e','I','n','s','t','a','l','l',0};
 static const WCHAR DisplayName[]     = {'D','i','s','p','l','a','y','N','a','m','e',0};
 static const WCHAR Description[]     = {'D','e','s','c','r','i','p','t','i','o','n',0};
 static const WCHAR ServiceBinary[]   = {'S','e','r','v','i','c','e','B','i','n','a','r','y',0};
@@ -1067,6 +1068,15 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
     BOOL ret;
     int i;
 
+    if (flags & SPINST_REGISTRY)
+    {
+        struct registry_callback_info info;
+
+        info.default_root = key_root;
+        info.delete = FALSE;
+        if (!iterate_section_fields( hinf, section, WinePreInstall, registry_callback, &info ))
+            return FALSE;
+    }
     if (flags & SPINST_FILES)
     {
         struct files_callback_info info;
diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index f95d9dc..e8bf101 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -80,6 +80,7 @@ AddReg=\
 [DefaultInstall.ntamd64]
 RegisterDlls=RegisterDllsSection
 WineFakeDlls=FakeDlls
+WinePreInstall=Wow64
 UpdateInis=SystemIni
 CopyFiles=@l_intl.nls
 AddReg=\
@@ -102,8 +103,7 @@ AddReg=\
     SessionMgr,\
     Tapi,\
     Timezones,\
-    VersionInfo,\
-    Wow64
+    VersionInfo
 
 [Wow64Install]
 RegisterDlls=RegisterDllsSection




More information about the wine-cvs mailing list