Author: akhaldi
Date: Fri May 17 21:40:46 2013
New Revision: 59028
URL:
http://svn.reactos.org/svn/reactos?rev=59028&view=rev
Log:
[SYSSETUP]
* Add a way to register typelibs using the TypeLibraries section in syssetup.inf. Brought
to you by Giannis Adamopoulos.
Modified:
trunk/reactos/dll/win32/syssetup/CMakeLists.txt
trunk/reactos/dll/win32/syssetup/globals.h
trunk/reactos/dll/win32/syssetup/install.c
trunk/reactos/dll/win32/syssetup/wizard.c
Modified: trunk/reactos/dll/win32/syssetup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/CMakeLists.txt [iso-8859-1] Fri May 17 21:40:46 2013
@@ -15,7 +15,7 @@
add_library(syssetup SHARED ${SOURCE})
add_pch(syssetup precomp.h)
set_module_type(syssetup win32dll UNICODE)
-target_link_libraries(syssetup uuid ${PSEH_LIB})
+target_link_libraries(syssetup uuid wine ${PSEH_LIB})
add_importlibs(syssetup
msvcrt
Modified: trunk/reactos/dll/win32/syssetup/globals.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/globals…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/globals.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/globals.h [iso-8859-1] Fri May 17 21:40:46 2013
@@ -61,6 +61,8 @@
extern HINF hSysSetupInf;
extern SETUPDATA SetupData;
+BOOL RegisterTypeLibraries (HINF hinf, LPCWSTR szSection);
+
/* security.c */
NTSTATUS SetAccountDomain(LPCWSTR DomainName,
PSID DomainSid);
Modified: trunk/reactos/dll/win32/syssetup/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] Fri May 17 21:40:46 2013
@@ -28,6 +28,8 @@
#include "precomp.h"
+#include <rpcproxy.h>
+
#define NDEBUG
#include <debug.h>
@@ -393,6 +395,61 @@
return TRUE;
}
+
+
+
+BOOL
+RegisterTypeLibraries (HINF hinf, LPCWSTR szSection)
+{
+ INFCONTEXT InfContext;
+ BOOL res;
+ WCHAR szName[MAX_PATH];
+ WCHAR szPath[MAX_PATH];
+ INT csidl;
+ LPWSTR p;
+ HMODULE hmod;
+ HRESULT hret;
+
+ /* Begin iterating the entries in the inf section */
+ res = SetupFindFirstLine(hinf, szSection, NULL, &InfContext);
+ if (!res) return FALSE;
+
+ do
+ {
+ /* Get the name of the current type library */
+ if (!SetupGetStringFieldW(&InfContext, 1, szName, MAX_PATH, NULL))
+ {
+ FatalError("SetupGetStringFieldW failed\n");
+ continue;
+ }
+
+ if (!SetupGetIntField(&InfContext, 2, &csidl))
+ csidl = CSIDL_SYSTEM;
+
+ hret = SHGetFolderPathW(NULL, csidl, NULL, 0, szPath);
+ if (FAILED(hret))
+ {
+ FatalError("SHGetSpecialFolderPathW failed hret=0x%d\n", hret);
+ continue;
+ }
+
+ p = PathAddBackslash(szPath);
+ _tcscpy(p, szName);
+
+ hmod = LoadLibraryW(szName);
+ if (hmod == NULL)
+ {
+ FatalError("LoadLibraryW failed\n");
+ continue;
+ }
+
+ __wine_register_resources(hmod);
+
+ }while (SetupFindNextLine(&InfContext, &InfContext));
+
+ return TRUE;
+}
+
static BOOL
EnableUserModePnpManager(VOID)
{
@@ -668,6 +725,8 @@
{
DPRINT1("SetupInstallFromInfSectionW failed!\n");
}
+
+ RegisterTypeLibraries(hSysSetupInf, L"TypeLibraries");
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
Modified: trunk/reactos/dll/win32/syssetup/wizard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Fri May 17 21:40:46 2013
@@ -1685,6 +1685,8 @@
SetupTermDefaultQueueCallback(RegistrationData->DefaultContext);
HeapFree(GetProcessHeap(), 0, RegistrationData);
+ RegisterTypeLibraries(hSysSetupInf, L"TypeLibraries");
+
// FIXME: Move this call to a separate cleanup page!
RtlCreateBootStatusDataFile();