Skip to content

Commit

Permalink
deploy: 674dba5
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 21, 2024
1 parent 2003fde commit 4ee7fd0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/compile_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def compile_mod(
'windhawk_api.h',
'-target',
compiler_target,
'-Wl,--export-all-symbols',
'-o',
output_paths[arch],
*extra_args,
Expand All @@ -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
Expand Down

0 comments on commit 4ee7fd0

Please sign in to comment.