Skip to content

Commit 9fe8298

Browse files
authored
[KERNELBASE][KERNEL32] Import KernelBase from WINE-10.0 (reactos#8049)
* [KERNELBASE] Import KernelBase from wine-10.0 * [KERNELBASE] Create some cmake files and add stuff into headers
1 parent 1286711 commit 9fe8298

26 files changed

+50869
-2
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502)
3+
add_definitions(-D_WIN32_WINNT=0x601 -DWINVER=0x601)
4+
5+
add_definitions(
6+
-D__WINESRC__
7+
-D_WINE
8+
-D__ROS_LONG64__
9+
-D_KERNELBASE_)
10+
11+
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
12+
13+
#add_subdirectory(wine)
14+
# TODO: ReactOS Isn't ready for Kernelbase.dll
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
add_definitions(-D__WINESRC__ -D_KERNEL32_ -DWINVER=0x601 -D_WIN32_WINNT=0x601)
2+
add_definitions(
3+
-D__WINESRC__
4+
-D_WINE
5+
-D__ROS_LONG64__
6+
-Dwcsnicmp=_wcsnicmp
7+
-Dwcsicmp=_wcsicmp
8+
-Dstrnicmp=_strnicmp
9+
-Dswprintf=_swprintf
10+
-D_KERNELBASE_)
11+
12+
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
13+
14+
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
15+
CMAKE_C_COMPILER_ID STREQUAL "Clang")
16+
# Silence GCC/Clang warnings
17+
add_compile_options(
18+
-Wno-unused-function
19+
-Wno-unknown-pragmas
20+
-Wno-unused-variable
21+
-Wno-unused-value
22+
-Wno-unused-function
23+
)
24+
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-reorder>)
25+
endif()
26+
27+
#list(APPEND SOURCE_PATH
28+
# path.c
29+
# )
30+
#
31+
#add_library(kernelbase_path ${SOURCE_PATH})
32+
#target_link_libraries(kernelbase_path ${PSEH_LIB})
33+
#add_dependencies(kernelbase_path psdk)
34+
35+
if(NOT MSVC)
36+
target_compile_options(kernelbase_path PRIVATE -Wno-unused-variable)
37+
target_compile_options(kernelbase_path PRIVATE -Wno-unused-function)
38+
endif()
39+
40+
list(APPEND SOURCE_STATIC
41+
#console.c #looks like ReactOS console.c is nothing like wine.
42+
)
43+
44+
add_library(kernelbase_static ${SOURCE_STATIC})
45+
target_link_libraries(kernelbase_static psapi_static ${PSEH_LIB})
46+
add_dependencies(kernelbase_static psdk)
47+
48+
if(NOT MSVC)
49+
target_compile_options(kernelbase_static PRIVATE -Wno-unused-variable)
50+
target_compile_options(kernelbase_static PRIVATE -Wno-unused-function)
51+
endif()
52+

0 commit comments

Comments
 (0)