@24i/smartapps-bigscreen-rnv-build-engine 0.17.2-alpha.2156 → 0.17.2-alpha.2158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -88,7 +88,8 @@ const handleAndroidTVSdk = async (c) => {
|
|
|
88
88
|
const installPath = `${os.homedir()}/Android`;
|
|
89
89
|
const rnvSdkKey = 'ANDROID_SDK';
|
|
90
90
|
const sdkName = 'android';
|
|
91
|
-
|
|
91
|
+
const isInstalledSDK = ANDROID_SDK ? fs.existsSync(ANDROID_SDK) : false;
|
|
92
|
+
if (!isInstalledSDK) {
|
|
92
93
|
if (fs.existsSync(installPath)) {
|
|
93
94
|
await (0, sdk_utils_1.registerSdkPath)(c, rnvSdkKey, installPath);
|
|
94
95
|
}
|
|
@@ -101,8 +102,8 @@ const handleAndroidTVSdk = async (c) => {
|
|
|
101
102
|
await (0, services_1.download)(ANDROID_SDK_INSTALLER_URL, downloadedFilePath);
|
|
102
103
|
rnv_1.Logger.logInfo(`Unpacking...`);
|
|
103
104
|
rnv_1.Logger.logDebug(`Unpacking from ${downloadedFilePath} to ${unzippedDirPath}`);
|
|
104
|
-
(0, services_1.unzip)(downloadedFilePath);
|
|
105
|
-
fs.mkdirSync(`${installPath}/cmdline-tools/latest
|
|
105
|
+
(0, services_1.unzip)(downloadedFilePath, unzippedDirPath);
|
|
106
|
+
fs.mkdirSync(`${installPath}/cmdline-tools/latest`, { recursive: true });
|
|
106
107
|
(0, child_process_1.execSync)(`cp -r ${unzippedDirPath}/cmdline-tools/. ${installPath}/cmdline-tools/latest`);
|
|
107
108
|
}
|
|
108
109
|
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.unzip = void 0;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
|
-
const unzip = (filePath) => {
|
|
5
|
+
const unzip = (filePath, outputDirPath) => {
|
|
6
6
|
const spawnOptions = { maxBuffer: 5242880 };
|
|
7
|
-
const
|
|
7
|
+
const outputDirAttr = outputDirPath ? ['-d', outputDirPath] : [];
|
|
8
|
+
const unzipProcess = (0, child_process_1.spawnSync)('unzip', ['-n', filePath, ...outputDirAttr], spawnOptions);
|
|
8
9
|
if (unzipProcess.stderr.length) {
|
|
9
10
|
throw new Error(unzipProcess.stderr.toString());
|
|
10
11
|
}
|
|
@@ -5,6 +5,8 @@ const rnv_1 = require("rnv");
|
|
|
5
5
|
const schemeParser_1 = require("rnv/dist/core/configManager/schemeParser");
|
|
6
6
|
const packageParser_1 = require("rnv/dist/core/configManager/packageParser");
|
|
7
7
|
const replaceRelevantStringsInConfig_1 = require("../utils/replaceRelevantStringsInConfig");
|
|
8
|
+
const sdks_1 = require("../sdks");
|
|
9
|
+
const constants_1 = require("../constants");
|
|
8
10
|
const { TASK_PLATFORM_CONFIGURE, TASK_PROJECT_CONFIGURE, TASK_INSTALL, PARAMS } = rnv_1.Constants;
|
|
9
11
|
const taskRnvPlatformConfigure = async (c, parentTask, originTask) => {
|
|
10
12
|
rnv_1.Logger.logTask('taskRnvPlatformConfigure', '');
|
|
@@ -12,7 +14,12 @@ const taskRnvPlatformConfigure = async (c, parentTask, originTask) => {
|
|
|
12
14
|
await rnv_1.TaskManager.executeTask(c, TASK_PROJECT_CONFIGURE, TASK_PLATFORM_CONFIGURE, originTask);
|
|
13
15
|
await rnv_1.PlatformManager.isPlatformSupported(c);
|
|
14
16
|
await (0, schemeParser_1.isBuildSchemeSupported)(c);
|
|
15
|
-
|
|
17
|
+
if (platform === constants_1.Platforms.ANDROIDTV) {
|
|
18
|
+
await (0, sdks_1.handlePlatformSdk)(c);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
await rnv_1.SDKManager.Installer.checkSdk(c);
|
|
22
|
+
}
|
|
16
23
|
(0, replaceRelevantStringsInConfig_1.replaceRelevantStringsInConfig)(c);
|
|
17
24
|
await rnv_1.RuntimeManager.configureRuntimeDefaults(c);
|
|
18
25
|
if (c.program.only && !!parentTask)
|
package/package.json
CHANGED