Fix unity path
parent
21da302529
commit
de94250c1b
Binary file not shown.
|
@ -6996,10 +6996,10 @@ const node_fs_1 = __importDefault(__nccwpck_require__(87561));
|
||||||
class SetupMac {
|
class SetupMac {
|
||||||
static async setup(buildParameters, actionFolder) {
|
static async setup(buildParameters, actionFolder) {
|
||||||
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;
|
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;
|
||||||
if (!node_fs_1.default.existsSync(this.unityHubExecPath)) {
|
if (!node_fs_1.default.existsSync(this.unityHubExecPath.replace(/"/g, ''))) {
|
||||||
await SetupMac.installUnityHub(buildParameters);
|
await SetupMac.installUnityHub(buildParameters);
|
||||||
}
|
}
|
||||||
if (!node_fs_1.default.existsSync(unityEditorPath)) {
|
if (!node_fs_1.default.existsSync(unityEditorPath.replace(/"/g, ''))) {
|
||||||
await SetupMac.installUnity(buildParameters);
|
await SetupMac.installUnity(buildParameters);
|
||||||
}
|
}
|
||||||
await SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
|
await SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
|
||||||
|
@ -7087,10 +7087,26 @@ class SetupMac {
|
||||||
...moduleArguments,
|
...moduleArguments,
|
||||||
'--childModules',
|
'--childModules',
|
||||||
];
|
];
|
||||||
|
<<<<<<< HEAD
|
||||||
const escapedExecPath = this.unityHubExecPath.replace(/ /g, '\\ ');
|
const escapedExecPath = this.unityHubExecPath.replace(/ /g, '\\ ');
|
||||||
|
||||||| parent of 0374d67 (Fix unity path)
|
||||||
|
const moduleArgument = SetupMac.getModuleParametersForTargetPlatform(buildParameters.targetPlatform);
|
||||||
|
const command = `${this.unityHubExecPath} -- --headless install \
|
||||||
|
--version ${buildParameters.editorVersion} \
|
||||||
|
--changeset ${unityChangeset.changeset} \
|
||||||
|
${moduleArgument} \
|
||||||
|
--childModules `;
|
||||||
|
=======
|
||||||
|
>>>>>>> 0374d67 (Fix unity path)
|
||||||
// Ignoring return code because the log seems to overflow the internal buffer which triggers
|
// Ignoring return code because the log seems to overflow the internal buffer which triggers
|
||||||
// a false error
|
// a false error
|
||||||
|
<<<<<<< HEAD
|
||||||
const errorCode = await exec_1.exec(escapedExecPath, execArguments, { silent, ignoreReturnCode: true });
|
const errorCode = await exec_1.exec(escapedExecPath, execArguments, { silent, ignoreReturnCode: true });
|
||||||
|
||||||| parent of 0374d67 (Fix unity path)
|
||||||
|
const errorCode = await exec_1.exec(command, undefined, { silent, ignoreReturnCode: true });
|
||||||
|
=======
|
||||||
|
const errorCode = await exec_1.exec(this.unityHubExecPath, execArguments, { silent, ignoreReturnCode: true });
|
||||||
|
>>>>>>> 0374d67 (Fix unity path)
|
||||||
if (errorCode) {
|
if (errorCode) {
|
||||||
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
|
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,11 +12,11 @@ class SetupMac {
|
||||||
public static async setup(buildParameters: BuildParameters, actionFolder: string) {
|
public static async setup(buildParameters: BuildParameters, actionFolder: string) {
|
||||||
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;
|
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;
|
||||||
|
|
||||||
if (!fs.existsSync(this.unityHubExecPath)) {
|
if (!fs.existsSync(this.unityHubExecPath.replace(/"/g, ''))) {
|
||||||
await SetupMac.installUnityHub(buildParameters);
|
await SetupMac.installUnityHub(buildParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(unityEditorPath)) {
|
if (!fs.existsSync(unityEditorPath.replace(/"/g, ''))) {
|
||||||
await SetupMac.installUnity(buildParameters);
|
await SetupMac.installUnity(buildParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,11 +122,9 @@ class SetupMac {
|
||||||
'--childModules',
|
'--childModules',
|
||||||
];
|
];
|
||||||
|
|
||||||
const escapedExecPath = this.unityHubExecPath.replace(/ /g, '\\ ');
|
|
||||||
|
|
||||||
// Ignoring return code because the log seems to overflow the internal buffer which triggers
|
// Ignoring return code because the log seems to overflow the internal buffer which triggers
|
||||||
// a false error
|
// a false error
|
||||||
const errorCode = await exec(escapedExecPath, execArguments, { silent, ignoreReturnCode: true });
|
const errorCode = await exec(this.unityHubExecPath, execArguments, { silent, ignoreReturnCode: true });
|
||||||
if (errorCode) {
|
if (errorCode) {
|
||||||
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
|
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue