https://git.reactos.org/?p=reactos.git;a=commitdiff;h=87df3b548eb0d0214012a…
commit 87df3b548eb0d0214012a0347c5b61d3f1671d36
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Dec 23 18:54:11 2023 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Feb 8 19:08:46 2024 +0100
[SETUP:REACTOS] Temporarily use USETUP file/cabinet extraction routines.
Do this until Wine's setupapi cabinet extraction becomes faster...
---
base/setup/reactos/CMakeLists.txt | 1 +
base/setup/reactos/spapisup/fileqsup.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/base/setup/reactos/CMakeLists.txt b/base/setup/reactos/CMakeLists.txt
index 75418ede517..aa862fa236e 100644
--- a/base/setup/reactos/CMakeLists.txt
+++ b/base/setup/reactos/CMakeLists.txt
@@ -20,5 +20,6 @@ add_executable(reactos ${SOURCE} reactos.rc)
set_module_type(reactos win32gui UNICODE)
add_pch(reactos reactos.h SOURCE)
target_link_libraries(reactos uuid setuplib ext2lib vfatlib btrfslib)
+target_link_libraries(reactos zlib_solo) ## We use USETUP's cabinet implementation
add_importlibs(reactos advapi32 gdi32 user32 comctl32 shlwapi setupapi msvcrt kernel32
ntdll)
add_cd_file(TARGET reactos DESTINATION reactos NO_CAB FOR bootcd)
diff --git a/base/setup/reactos/spapisup/fileqsup.c
b/base/setup/reactos/spapisup/fileqsup.c
index ea46c03f75f..95c789de085 100644
--- a/base/setup/reactos/spapisup/fileqsup.c
+++ b/base/setup/reactos/spapisup/fileqsup.c
@@ -13,6 +13,29 @@
#define NDEBUG
#include <debug.h>
+#ifndef WINE_SETUPAPI_CAB_EXTRACTION_IS_NOT_SLOW_ANYMORE
+
+#define _USETUP_PCH_ // Disable USetup header inclusion
+
+#define NTOS_MODE_USER
+#include <ndk/mmfuncs.h>
+#include <ndk/obfuncs.h>
+
+#include <ntstrsafe.h>
+
+#include "../../usetup/spapisup/cabinet.h"
+#include "../../usetup/spapisup/cabinet.c"
+
+#define SetupOpenFileQueue _SetupOpenFileQueue
+#define SetupCloseFileQueue _SetupCloseFileQueue
+#define SetupQueueDeleteW _SetupQueueDeleteW
+#define SetupQueueRenameW _SetupQueueRenameW
+#define SetupCommitFileQueueW _SetupCommitFileQueueW
+
+#include "../../usetup/spapisup/fileqsup.c"
+
+#else
+
/* SETUP* API COMPATIBILITY FUNCTIONS ****************************************/
/* A simplified version of SetupQueueCopyW that wraps Cabinet support around */
@@ -157,4 +180,6 @@ pSpFileQueueDelete SpFileQueueDelete = SpFileQueueDelete_NtToWin32;
pSpFileQueueRename SpFileQueueRename = SpFileQueueRename_NtToWin32;
pSpFileQueueCommit SpFileQueueCommit = SetupCommitFileQueueW;
+#endif
+
/* EOF */