[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() endif()
include_directories(spapisup utils) include_directories(spapisup utils)
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/pseh/include)
list(APPEND SOURCE list(APPEND SOURCE
spapisup/fileqsup.c spapisup/fileqsup.c

View file

@ -10,18 +10,11 @@
#include "precomp.h" #include "precomp.h"
#include "filesup.h" #include "filesup.h"
#include <pseh/pseh2.h>
#define NDEBUG #define NDEBUG
#include <debug.h> #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 ****************************************************************/ /* FUNCTIONS ****************************************************************/
static static

View file

@ -19,7 +19,7 @@ add_rc_deps(reactos.rc ${reactos_rc_deps})
add_executable(reactos ${SOURCE} reactos.rc) add_executable(reactos ${SOURCE} reactos.rc)
add_pch(reactos reactos.h SOURCE) add_pch(reactos reactos.h SOURCE)
set_module_type(reactos win32gui UNICODE) 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 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_importlibs(reactos advapi32 gdi32 user32 comctl32 shlwapi setupapi msvcrt kernel32 ntdll)
add_cd_file(TARGET reactos DESTINATION reactos NO_CAB FOR bootcd) add_cd_file(TARGET reactos DESTINATION reactos NO_CAB FOR bootcd)

View file

@ -35,6 +35,6 @@ endif()
add_pch(usetup usetup.h SOURCE) add_pch(usetup usetup.h SOURCE)
set_module_type(usetup nativecui) 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_importlibs(usetup ntdll)
add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest) add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest)