feat: windows64 iggy support

This commit is contained in:
Tropical
2026-04-11 14:56:17 -05:00
parent 7adc6c4788
commit 8d3f8dea3a
3 changed files with 125 additions and 117 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+25 -17
View File
@@ -3,13 +3,15 @@ project('shiggy', 'c',
meson_version: '>= 1.1.0' meson_version: '>= 1.1.0'
) )
pymod = import('python')
python = pymod.find_installation('python3', required: true)
ar = find_program('ar')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
iggy_object_files = [ if host_machine.system() == 'linux'
pymod = import('python')
python = pymod.find_installation('python3', required: true)
ar = find_program('ar')
iggy_object_files = [
'ORBIS_rrAtomics.obj', 'ORBIS_rrAtomics.obj',
'ORBIS_rrCpu.obj', 'ORBIS_rrCpu.obj',
'ORBIS_rrThreads.obj', 'ORBIS_rrThreads.obj',
@@ -86,14 +88,14 @@ iggy_object_files = [
'swf_state.obj', 'swf_state.obj',
'triangulate_ears.obj', 'triangulate_ears.obj',
'zlib.obj', 'zlib.obj',
] ]
patched_object_files = [] patched_object_files = []
foreach file : iggy_object_files foreach file : iggy_object_files
patched_object_files += file.replace('.obj', '.o') patched_object_files += file.replace('.obj', '.o')
endforeach endforeach
unpacked_objects = custom_target( unpacked_objects = custom_target(
'unpack-archive', 'unpack-archive',
input: meson.project_source_root() / 'libs' / 'libiggy_orbis.a', input: meson.project_source_root() / 'libs' / 'libiggy_orbis.a',
output: iggy_object_files, output: iggy_object_files,
@@ -103,9 +105,9 @@ unpacked_objects = custom_target(
'@INPUT@' '@INPUT@'
], ],
install: false, install: false,
) )
patched_relocations = custom_target( patched_relocations = custom_target(
'patch-relocations', 'patch-relocations',
input: unpacked_objects, input: unpacked_objects,
output: patched_object_files, output: patched_object_files,
@@ -117,13 +119,19 @@ patched_relocations = custom_target(
'@INPUT@', # The extracted .obj files '@INPUT@', # The extracted .obj files
], ],
install: false, install: false,
) )
shiggy_dep = declare_dependency( shiggy_dep = declare_dependency(
link_with: static_library( link_with: static_library('shiggy',
'shiggy',
meson.project_source_root() / 'src' / 'shims.c', meson.project_source_root() / 'src' / 'shims.c',
include_directories: include_directories('include'), include_directories: include_directories('include'),
objects: patched_relocations, objects: patched_relocations,
) )
) )
elif host_machine.system() == 'windows'
shiggy_dep = declare_dependency(
dependencies: cc.find_library('iggy_w64',
dirs: [meson.project_source_root() / 'libs']
)
)
endif