mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Support architecture parameter
This commit is contained in:
parent
7afabe74da
commit
920bcc320b
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -72,6 +72,26 @@ class SetupMac {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static getArchitectureParameters(): string[] {
|
||||||
|
const architectureArgument = [];
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
const process = require('process');
|
||||||
|
|
||||||
|
switch (process.arch) {
|
||||||
|
case 'x64':
|
||||||
|
architectureArgument.push('--architecture', 'x86_64');
|
||||||
|
break;
|
||||||
|
case 'arm64':
|
||||||
|
architectureArgument.push('--architecture', 'arm64');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error(`Unsupported architecture: ${process.arch}.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return architectureArgument;
|
||||||
|
}
|
||||||
|
|
||||||
private static getModuleParametersForTargetPlatform(targetPlatform: string): string[] {
|
private static getModuleParametersForTargetPlatform(targetPlatform: string): string[] {
|
||||||
const moduleArgument = [];
|
const moduleArgument = [];
|
||||||
switch (targetPlatform) {
|
switch (targetPlatform) {
|
||||||
@ -111,6 +131,7 @@ class SetupMac {
|
|||||||
|
|
||||||
const unityChangeset = await getUnityChangeset(buildParameters.editorVersion);
|
const unityChangeset = await getUnityChangeset(buildParameters.editorVersion);
|
||||||
const moduleArguments = SetupMac.getModuleParametersForTargetPlatform(buildParameters.targetPlatform);
|
const moduleArguments = SetupMac.getModuleParametersForTargetPlatform(buildParameters.targetPlatform);
|
||||||
|
const architectureArguments = SetupMac.getArchitectureParameters();
|
||||||
|
|
||||||
const execArguments: string[] = [
|
const execArguments: string[] = [
|
||||||
'--',
|
'--',
|
||||||
@ -119,6 +140,7 @@ class SetupMac {
|
|||||||
...['--version', buildParameters.editorVersion],
|
...['--version', buildParameters.editorVersion],
|
||||||
...['--changeset', unityChangeset.changeset],
|
...['--changeset', unityChangeset.changeset],
|
||||||
...moduleArguments,
|
...moduleArguments,
|
||||||
|
...architectureArguments,
|
||||||
'--childModules',
|
'--childModules',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user