[SETUPLIB] Use proper SEH instead of nasty hacks

Addendum to commit 2268b3d
This commit is contained in:
Timo Kreuzer 2024-10-13 19:10:22 +03:00
parent 8107ff8636
commit 31334ebcfe
4 changed files with 4 additions and 10 deletions

View File

@ -5,6 +5,7 @@ if(_WINKD_)
endif()
include_directories(spapisup utils)
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/pseh/include)
list(APPEND SOURCE
spapisup/fileqsup.c

View File

@ -10,18 +10,11 @@
#include "precomp.h"
#include "filesup.h"
#include <pseh/pseh2.h>
#define NDEBUG
#include <debug.h>
// ACHTUNG! HAXX FIXME!!
#define _SEH2_TRY
#define _SEH2_LEAVE goto __SEH2_FINALLY__label;
#define _SEH2_FINALLY __SEH2_FINALLY__label:
#define _SEH2_END
/* FUNCTIONS ****************************************************************/
static

View File

@ -19,7 +19,7 @@ add_rc_deps(reactos.rc ${reactos_rc_deps})
add_executable(reactos ${SOURCE} reactos.rc)
add_pch(reactos reactos.h SOURCE)
set_module_type(reactos win32gui UNICODE)
target_link_libraries(reactos uuid setuplib ext2lib vfatlib btrfslib)
target_link_libraries(reactos uuid setuplib ext2lib vfatlib btrfslib ${PSEH_LIB})
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)

View File

@ -35,6 +35,6 @@ endif()
add_pch(usetup usetup.h SOURCE)
set_module_type(usetup nativecui)
target_link_libraries(usetup inflib setuplib zlib_solo ext2lib vfatlib btrfslib chkstk)
target_link_libraries(usetup inflib setuplib zlib_solo ext2lib vfatlib btrfslib chkstk ${PSEH_LIB})
add_importlibs(usetup ntdll)
add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest)