[COMCTL32] Install comctl32 v6 and its manifest in first stage
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 3 Oct 2017 19:28:12 +0000 (22:28 +0300)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 24 Dec 2017 19:19:03 +0000 (21:19 +0200)
boot/bootdata/packages/reactos.dff.in
dll/win32/comctl32/CMakeLists.txt
dll/win32/comctl32/commctrl.c
dll/win32/comctl32/rsrc.rc
dll/win32/comctl32/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef.manifest [moved from dll/win32/comctl32/comctl32v5.manifest with 100% similarity]
dll/win32/comctl32/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest [moved from dll/win32/comctl32/comctl32.manifest with 100% similarity]
sdk/cmake/CMakeMacros.cmake

index 283f32d..a365760 100644 (file)
@@ -71,6 +71,10 @@ Signature = "$ReactOS$"
 51 = system32\CatRoot
 52 = system32\CatRoot2
 53 = AppPatch
 51 = system32\CatRoot
 52 = system32\CatRoot2
 53 = AppPatch
+54 = winsxs
+55 = winsxs\manifests
+56 = winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef
+57 = winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef
 
 .InfEnd
 
 
 .InfEnd
 
index 1b55c5d..9285001 100644 (file)
@@ -64,5 +64,7 @@ add_delay_importlibs(comctl32 winmm uxtheme)
 add_importlibs(comctl32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
 add_pch(comctl32 comctl32.h SOURCE)
 add_cd_file(TARGET comctl32 DESTINATION reactos/system32 FOR all)
 add_importlibs(comctl32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
 add_pch(comctl32 comctl32.h SOURCE)
 add_cd_file(TARGET comctl32 DESTINATION reactos/system32 FOR all)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/comctl32v5.manifest DESTINATION reactos/winsxs/manifests NAME_ON_CD x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef.manifest FOR livecd)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/comctl32.manifest DESTINATION reactos/winsxs/manifests NAME_ON_CD x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest FOR livecd)
\ No newline at end of file
+add_cd_file(TARGET comctl32 DESTINATION reactos/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef FOR all)
+add_cd_file(TARGET comctl32 DESTINATION reactos/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
\ No newline at end of file
index e091ccc..df063c0 100644 (file)
@@ -129,64 +129,6 @@ static WCHAR* GetManifestPath(BOOL create, BOOL bV6)
     return pwszBuf;
 }
 
     return pwszBuf;
 }
 
-static BOOL create_manifest(BOOL install, BOOL bV6)
-{
-    WCHAR *pwszBuf;
-    HRSRC hResInfo;
-    HGLOBAL hResData;
-    PVOID pManifest;
-    DWORD cbManifest, cbWritten;
-    HANDLE hFile;
-    BOOL bRet = FALSE;
-
-    if (bV6)
-        hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFEST", (LPWSTR)RT_MANIFEST);
-    else
-        hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFESTV5", (LPWSTR)RT_MANIFEST);
-
-    if (!hResInfo)
-        return FALSE;
-
-    cbManifest = SizeofResource(COMCTL32_hModule, hResInfo);
-    if (!cbManifest)
-        return FALSE;
-
-    hResData = LoadResource(COMCTL32_hModule, hResInfo);
-    if (!hResData)
-        return FALSE;
-
-    pManifest = LockResource(hResData);
-    if (!pManifest)
-        return FALSE;
-
-    pwszBuf = GetManifestPath(TRUE, bV6);
-    if (!pwszBuf)
-        return FALSE;
-
-    if (install)
-    {
-        hFile = CreateFileW(pwszBuf, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
-        if (hFile != INVALID_HANDLE_VALUE)
-        {
-            if (WriteFile(hFile, pManifest, cbManifest, &cbWritten, NULL) && cbWritten == cbManifest)
-                bRet = TRUE;
-
-            CloseHandle(hFile);
-
-            if (!bRet)
-                DeleteFileW(pwszBuf);
-            else
-                TRACE("created %s\n", debugstr_w(pwszBuf));
-        }
-    }
-    else
-        bRet = DeleteFileW(pwszBuf);
-
-    HeapFree(GetProcessHeap(), 0, pwszBuf);
-
-    return bRet;
-}
-
 static HANDLE CreateComctl32ActCtx(BOOL bV6)
 {
     HANDLE ret;
 static HANDLE CreateComctl32ActCtx(BOOL bV6)
 {
     HANDLE ret;
@@ -1179,21 +1121,6 @@ HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
 {
     TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
 
 {
     TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
 
-#ifdef __REACTOS__
-
-    if (!create_manifest(bInstall, TRUE))
-    {
-        ERR("Failed to install comctl32 v6 manifest!\n");
-        return HRESULT_FROM_WIN32(GetLastError());
-    }
-
-    if (!create_manifest(bInstall, FALSE))
-    {
-        ERR("Failed to install comctl32 v5 manifest!\n");
-        return HRESULT_FROM_WIN32(GetLastError());
-    }
-#endif
-
     return S_OK;
 }
 
     return S_OK;
 }
 
index 0fb8289..e0a9376 100644 (file)
@@ -36,10 +36,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 
 #include "wine/wine_common_ver.rc"
 
 
 #include "wine/wine_common_ver.rc"
 
-/* @makedep: comctl32.manifest */
-WINE_MANIFEST RT_MANIFEST comctl32.manifest
-WINE_MANIFESTV5 RT_MANIFEST comctl32v5.manifest
-
 /* @makedep: idt_check.bmp */
 IDT_CHECK BITMAP idt_check.bmp
 
 /* @makedep: idt_check.bmp */
 IDT_CHECK BITMAP idt_check.bmp
 
index 95f99f3..dc9a58e 100644 (file)
@@ -271,6 +271,14 @@ macro(dir_to_num dir var)
         set(${var} 52)
     elseif(${dir} STREQUAL reactos/AppPatch)
         set(${var} 53)
         set(${var} 52)
     elseif(${dir} STREQUAL reactos/AppPatch)
         set(${var} 53)
+    elseif(${dir} STREQUAL reactos/winsxs)
+        set(${var} 54)
+    elseif(${dir} STREQUAL reactos/winsxs/manifests)
+        set(${var} 55)
+    elseif(${dir} STREQUAL reactos/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef)
+        set(${var} 56)
+    elseif(${dir} STREQUAL reactos/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef)
+        set(${var} 57)
     else()
         message(FATAL_ERROR "Wrong destination: ${dir}")
     endif()
     else()
         message(FATAL_ERROR "Wrong destination: ${dir}")
     endif()