Skip to content

Commit

Permalink
Windows: Removes opaque wine_builtin binary
Browse files Browse the repository at this point in the history
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 #4267
  • Loading branch information
Sonicadvance1 committed Jan 12, 2025
1 parent 8cfc016 commit 4a1a5c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/Windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ function(build_implib name)
add_dependencies(${name_ex} ${name_ex}lib)
endfunction()

# Output DLL patching binary. Needs to be exactly 32-bytes.
add_custom_target(wine_builtin_patch
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
BYPRODUCTS ${CMAKE_BINARY_DIR}/wine_builtin.bin)

function(patch_library_wine target)
add_dependencies(${target} wine_builtin_patch)
add_custom_command(
TARGET ${target} POST_BUILD
COMMAND dd bs=32 count=1 seek=2 conv=notrunc if=${CMAKE_SOURCE_DIR}/Source/Windows/wine_builtin.bin of=$<TARGET_FILE:${target}>
COMMAND dd bs=32 count=1 seek=2 conv=notrunc if=${CMAKE_BINARY_DIR}/wine_builtin.bin of=$<TARGET_FILE:${target}>
)
endfunction()

Expand Down
Binary file removed Source/Windows/wine_builtin.bin
Binary file not shown.

0 comments on commit 4a1a5c7

Please sign in to comment.