Improve mac unity setup steps (#501)
* Improve mac unity setup steps * Remove silent flag on hub install --------- Co-authored-by: David Finol <davidmfinol@gmail.com>pull/499/head
parent
584c0366c6
commit
fb5b03c3b8
|
@ -7433,9 +7433,10 @@ class SetupMac {
|
||||||
static setup(buildParameters, actionFolder) {
|
static setup(buildParameters, actionFolder) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
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`;
|
||||||
// Only install unity if the editor doesn't already exist
|
if (!fs_1.default.existsSync(this.unityHubPath)) {
|
||||||
if (!fs_1.default.existsSync(unityEditorPath)) {
|
|
||||||
yield SetupMac.installUnityHub();
|
yield SetupMac.installUnityHub();
|
||||||
|
}
|
||||||
|
if (!fs_1.default.existsSync(unityEditorPath)) {
|
||||||
yield SetupMac.installUnity(buildParameters);
|
yield SetupMac.installUnity(buildParameters);
|
||||||
}
|
}
|
||||||
yield SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
|
yield SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
|
||||||
|
@ -7464,12 +7465,20 @@ class SetupMac {
|
||||||
case 'iOS':
|
case 'iOS':
|
||||||
command += `--module ios `;
|
command += `--module ios `;
|
||||||
break;
|
break;
|
||||||
|
case 'tvOS':
|
||||||
|
command += '--module tvos ';
|
||||||
|
break;
|
||||||
case 'StandaloneOSX':
|
case 'StandaloneOSX':
|
||||||
command += `--module mac-il2cpp `;
|
command += `--module mac-il2cpp `;
|
||||||
break;
|
break;
|
||||||
case 'android':
|
case 'Android':
|
||||||
command += `--module android `;
|
command += `--module android `;
|
||||||
break;
|
break;
|
||||||
|
case 'WebGL':
|
||||||
|
command += '--module webgl ';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error(`Unsupported module for target platform: ${buildParameters.targetPlatform}.`);
|
||||||
}
|
}
|
||||||
command += `--childModules`;
|
command += `--childModules`;
|
||||||
// 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
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -9,9 +9,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`;
|
||||||
|
|
||||||
// Only install unity if the editor doesn't already exist
|
if (!fs.existsSync(this.unityHubPath)) {
|
||||||
if (!fs.existsSync(unityEditorPath)) {
|
|
||||||
await SetupMac.installUnityHub();
|
await SetupMac.installUnityHub();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!fs.existsSync(unityEditorPath)) {
|
||||||
await SetupMac.installUnity(buildParameters);
|
await SetupMac.installUnity(buildParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,12 +42,20 @@ class SetupMac {
|
||||||
case 'iOS':
|
case 'iOS':
|
||||||
command += `--module ios `;
|
command += `--module ios `;
|
||||||
break;
|
break;
|
||||||
|
case 'tvOS':
|
||||||
|
command += '--module tvos ';
|
||||||
|
break;
|
||||||
case 'StandaloneOSX':
|
case 'StandaloneOSX':
|
||||||
command += `--module mac-il2cpp `;
|
command += `--module mac-il2cpp `;
|
||||||
break;
|
break;
|
||||||
case 'android':
|
case 'Android':
|
||||||
command += `--module android `;
|
command += `--module android `;
|
||||||
break;
|
break;
|
||||||
|
case 'WebGL':
|
||||||
|
command += '--module webgl ';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error(`Unsupported module for target platform: ${buildParameters.targetPlatform}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
command += `--childModules`;
|
command += `--childModules`;
|
||||||
|
|
Loading…
Reference in New Issue