jadeite/injector/meson.build

51 lines
1.2 KiB
Meson
Raw Permalink Normal View History

include_dir = include_directories('include')
str_include_dir = join_paths(meson.current_source_dir(), 'include')
2023-06-25 09:32:19 +00:00
# Assemble the payloads
launcher_payload_bin = asm_gen.process(
'src/launcher_p.asm',
extra_args: [ '-i', str_include_dir ]
)
2023-06-05 21:23:08 +00:00
2023-06-25 09:32:19 +00:00
game_payload_bin = asm_gen.process(
'src/game_p.asm',
extra_args: [ '-i', str_include_dir ]
)
# Embed them into .o files
exe_res_files = custom_target(
'launcher_p.[oh]',
output: [ 'launcher_p.o', 'launcher_p.h' ],
input: [ launcher_payload_bin ],
command: [ gen_res, '--header', '--object', './injector', '@OUTPUT0@', '@OUTPUT1@', '@INPUT@' ]
2023-06-25 09:32:19 +00:00
)
dll_res_files = custom_target(
'game_p.[oh]',
output: [ 'game_p.o', 'game_p.h' ],
input: [ game_payload_bin ],
command: [ gen_res, '--header', '--object', './injector', '@OUTPUT0@', '@OUTPUT1@', '@INPUT@' ]
2023-06-05 21:23:08 +00:00
)
# Main injector exe
executable(
'jadeite',
2023-06-25 09:32:19 +00:00
'src/exe.c',
'src/inject.c',
exe_res_files,
include_directories: include_dir,
name_prefix: '',
link_args: '-municode'
2023-06-05 21:23:08 +00:00
)
2023-06-25 09:32:19 +00:00
# Dll that will be injected into the launcher
shared_library(
'launcher_payload',
'src/dll.c',
'src/inject.c',
dll_res_files,
include_directories: include_dir,
name_prefix: '',
link_args: '-municode'
2023-06-25 09:32:19 +00:00
)