From 2bce3822a489afdaaa4c93029ab3d906d2f035d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?martin=20mauchauff=C3=A9e?= Date: Fri, 6 Dec 2024 17:45:20 +0100 Subject: [PATCH] allow to set --libpath --- package.json | 8 ++++++++ src/pdc/PDCExecutionFactory.ts | 2 ++ src/pdc/PDCTaskRunner.ts | 3 +++ src/pdc/getPDCCommand.ts | 7 +++++++ 4 files changed, 20 insertions(+) diff --git a/package.json b/package.json index 46fdf18..c8815d0 100644 --- a/package.json +++ b/package.json @@ -170,6 +170,14 @@ "type": "boolean", "description": "Skip unrecognized files instead of copying them to the pdx folder", "default": false + }, + "libPath": { + "type": "array", + "description": "List of paths to additional libraries to include in the build", + "items": { + "type": "string" + }, + "default": [] } } }, diff --git a/src/pdc/PDCExecutionFactory.ts b/src/pdc/PDCExecutionFactory.ts index e31172f..e1f536a 100644 --- a/src/pdc/PDCExecutionFactory.ts +++ b/src/pdc/PDCExecutionFactory.ts @@ -44,6 +44,7 @@ export class PDCExecutionFactory implements TaskExecutionFactory { verbose, quiet, skipUnknown, + libPath, sdkPath: sdkPathDef, sourcePath: sourcePathDef, gamePath: gamePathDef, @@ -65,6 +66,7 @@ export class PDCExecutionFactory implements TaskExecutionFactory { verbose, quiet, skipUnknown, + libPath, incrementBuildNumber, sdkVersion, }); diff --git a/src/pdc/PDCTaskRunner.ts b/src/pdc/PDCTaskRunner.ts index 6d9f1ff..2679334 100644 --- a/src/pdc/PDCTaskRunner.ts +++ b/src/pdc/PDCTaskRunner.ts @@ -25,6 +25,7 @@ export interface PDCTaskRunnerOptions { skipUnknown?: boolean; incrementBuildNumber?: boolean; sdkVersion: string; + libPath?: string[]; } /** @@ -65,6 +66,7 @@ export class PDCTaskRunner implements TaskRunner { verbose, quiet, skipUnknown, + libPath, sdkVersion, } = this.options; @@ -77,6 +79,7 @@ export class PDCTaskRunner implements TaskRunner { verbose, quiet, skipUnknown, + libPath, sdkVersion, }; } diff --git a/src/pdc/getPDCCommand.ts b/src/pdc/getPDCCommand.ts index 5c893ed..3cc0794 100644 --- a/src/pdc/getPDCCommand.ts +++ b/src/pdc/getPDCCommand.ts @@ -12,6 +12,7 @@ export interface GetPDCCommandOptions { verbose?: boolean; quiet?: boolean; skipUnknown?: boolean; + libPath?: string[]; sdkVersion: string; } @@ -25,6 +26,7 @@ export function getPDCCommand(options: GetPDCCommandOptions) { verbose, quiet, skipUnknown, + libPath, sdkVersion, } = options; @@ -55,6 +57,11 @@ export function getPDCCommand(options: GetPDCCommandOptions) { if (skipUnknown) { optionalArgs.push("--skip-unknown"); } + if (libPath) { + libPath.forEach((lib) => { + optionalArgs.push("--libpath", quote(lib)); + }); + } const requiredArgs = [ "-sdkpath",