Skip to content

Commit 4a1a5c7

Browse files
committed
Windows: Removes opaque wine_builtin binary
Instead generate it with an echo command which is easier to see what it is doing. It's a trivial file that is just a string and 16 zeroes. Brought up by FEX-Emu#4267
1 parent 8cfc016 commit 4a1a5c7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Source/Windows/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ function(build_implib name)
1212
add_dependencies(${name_ex} ${name_ex}lib)
1313
endfunction()
1414

15+
# Output DLL patching binary. Needs to be exactly 32-bytes.
16+
add_custom_target(wine_builtin_patch
17+
COMMAND echo -n 'Wine builtin DLL\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0' > ${CMAKE_BINARY_DIR}/wine_builtin.bin
18+
BYPRODUCTS ${CMAKE_BINARY_DIR}/wine_builtin.bin)
19+
1520
function(patch_library_wine target)
21+
add_dependencies(${target} wine_builtin_patch)
1622
add_custom_command(
1723
TARGET ${target} POST_BUILD
18-
COMMAND dd bs=32 count=1 seek=2 conv=notrunc if=${CMAKE_SOURCE_DIR}/Source/Windows/wine_builtin.bin of=$<TARGET_FILE:${target}>
24+
COMMAND dd bs=32 count=1 seek=2 conv=notrunc if=${CMAKE_BINARY_DIR}/wine_builtin.bin of=$<TARGET_FILE:${target}>
1925
)
2026
endfunction()
2127

Source/Windows/wine_builtin.bin

-32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)