diff --git a/deploy.ts b/deploy.ts index 4e70acd2..877ca9c1 100644 --- a/deploy.ts +++ b/deploy.ts @@ -174,9 +174,20 @@ function generateModData(modId: string, changelogPath: string, modDir: string) { const modVersionCompiled64FilePath = path.join(modDir, `${metadata.version}_64.dll`); const cachedMod32Path = findCachedMod(modId, metadata.version, '32'); const cachedMod64Path = findCachedMod(modId, metadata.version, '64'); - if (cachedMod32Path && cachedMod64Path) { - fs.copyFileSync(cachedMod32Path, modVersionCompiled32FilePath); - fs.copyFileSync(cachedMod64Path, modVersionCompiled64FilePath); + if (cachedMod32Path || cachedMod64Path) { + const modHas32 = metadata.architecture?.includes('x86') ?? true; + const modHas64 = metadata.architecture?.includes('x86-64') ?? true; + if (modHas32 != !!cachedMod32Path || modHas64 != !!cachedMod64Path) { + throw new Error(`Mod ${modId} architecture mismatch`); + } + + if (cachedMod32Path) { + fs.copyFileSync(cachedMod32Path, modVersionCompiled32FilePath); + } + + if (cachedMod64Path) { + fs.copyFileSync(cachedMod64Path, modVersionCompiled64FilePath); + } } else { compileMod(modVersionFilePath, modVersionCompiled32FilePath, modVersionCompiled64FilePath); } diff --git a/scripts/compile_mod.py b/scripts/compile_mod.py index d8a73714..df613d13 100644 --- a/scripts/compile_mod.py +++ b/scripts/compile_mod.py @@ -398,6 +398,7 @@ def compile_mod( 'windhawk_api.h', '-target', compiler_target, + '-Wl,--export-all-symbols', '-o', output_paths[arch], *extra_args, @@ -410,9 +411,8 @@ def compile_mod( if mod_file_temp: mod_file_temp.unlink() - print(f'Result: {result}') - if result != 0: + print(f'Failed to compile {mod_file}') succeeded = False return succeeded