Skip to content

Commit

Permalink
[SETUPLIB] Use proper SEH instead of nasty hacks
Browse files Browse the repository at this point in the history
Addendum to commit 2268b3d
  • Loading branch information
tkreuzer committed Nov 18, 2024
1 parent 8107ff8 commit 31334eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions base/setup/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions base/setup/lib/utils/filesup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion base/setup/reactos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion base/setup/usetup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 31334eb

Please sign in to comment.