@zsukim/ctv-run 1.0.13 β 1.0.14
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.
- package/dist/platforms/firetv.js +13 -3
- package/dist/platforms/tizen.js +15 -0
- package/dist/platforms/webos.js +18 -0
- package/package.json +1 -1
package/dist/platforms/firetv.js
CHANGED
|
@@ -116,9 +116,7 @@ function runFireTv() {
|
|
|
116
116
|
console.log('π Force stopping existing process...');
|
|
117
117
|
(0, child_process_1.execSync)(`${adbBin} -s ${tvIp}:5555 shell am force-stop ${pkg}`);
|
|
118
118
|
// μ€ν 컀맨λ μμ±
|
|
119
|
-
const fullActivityPath = activity
|
|
120
|
-
? `${pkg}/${activity}`
|
|
121
|
-
: activity;
|
|
119
|
+
const fullActivityPath = buildActivityComponent(pkg, activity);
|
|
122
120
|
let launchCmd = `${adbBin} -s ${tvIp}:5555 shell am start -n ${fullActivityPath}`;
|
|
123
121
|
// Live ModeμΌ λλ§ URL μ£Όμ
|
|
124
122
|
if (!targetArg) {
|
|
@@ -138,3 +136,15 @@ function runFireTv() {
|
|
|
138
136
|
}
|
|
139
137
|
});
|
|
140
138
|
}
|
|
139
|
+
function buildActivityComponent(pkg, activity) {
|
|
140
|
+
const trimmed = (activity || '').trim();
|
|
141
|
+
if (!trimmed)
|
|
142
|
+
return `${pkg}/.MainActivity`;
|
|
143
|
+
if (trimmed.includes('/'))
|
|
144
|
+
return trimmed;
|
|
145
|
+
if (trimmed.startsWith('.'))
|
|
146
|
+
return `${pkg}/${trimmed}`;
|
|
147
|
+
if (trimmed.includes('.'))
|
|
148
|
+
return `${pkg}/${trimmed}`;
|
|
149
|
+
return `${pkg}/.${trimmed}`;
|
|
150
|
+
}
|
package/dist/platforms/tizen.js
CHANGED
|
@@ -254,6 +254,21 @@ function ensureTizenFiles(appId_1, tempDir_1, appName_1) {
|
|
|
254
254
|
if (found) {
|
|
255
255
|
fs_extra_1.default.copyFileSync(found, destConfigXml);
|
|
256
256
|
console.log(`π config.xml 볡μ¬: ${found}`);
|
|
257
|
+
// config.xmlμμ μ°Έμ‘°νλ μμ
νμΌμ κ°μ λλ ν 리μμ 볡μ¬
|
|
258
|
+
try {
|
|
259
|
+
const xmlContent = fs_extra_1.default.readFileSync(found, 'utf8');
|
|
260
|
+
const sourceDir = path_1.default.dirname(found);
|
|
261
|
+
const srcMatches = [...xmlContent.matchAll(/src="([^"]+\.(?:png|jpg|jpeg|gif|svg|webp|ico|bmp))"/gi)];
|
|
262
|
+
for (const match of srcMatches) {
|
|
263
|
+
const srcFile = path_1.default.join(sourceDir, match[1]);
|
|
264
|
+
const destFile = path_1.default.join(tempDir, match[1]);
|
|
265
|
+
if (fs_extra_1.default.existsSync(srcFile) && !fs_extra_1.default.existsSync(destFile)) {
|
|
266
|
+
fs_extra_1.default.copyFileSync(srcFile, destFile);
|
|
267
|
+
console.log(`π μμ
볡μ¬: ${match[1]}`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
catch (_a) { }
|
|
257
272
|
}
|
|
258
273
|
else {
|
|
259
274
|
console.log(`π config.xml μμ± μ€... (Name: ${appName}, ID: ${appId})`);
|
package/dist/platforms/webos.js
CHANGED
|
@@ -150,6 +150,24 @@ function ensureWebosAppInfo(appId, tempDir, specifiedPath) {
|
|
|
150
150
|
for (const candidate of candidates) {
|
|
151
151
|
if (fs_extra_1.default.existsSync(candidate)) {
|
|
152
152
|
fs_extra_1.default.copySync(candidate, destPath);
|
|
153
|
+
// appinfo.jsonμμ μ°Έμ‘°νλ μμ
νμΌμ κ°μ λλ ν 리μμ 볡μ¬
|
|
154
|
+
try {
|
|
155
|
+
const appInfo = fs_extra_1.default.readJsonSync(candidate);
|
|
156
|
+
const sourceDir = path_1.default.dirname(candidate);
|
|
157
|
+
const assetFields = ['icon', 'largeIcon', 'splashBackground'];
|
|
158
|
+
for (const field of assetFields) {
|
|
159
|
+
const val = appInfo[field];
|
|
160
|
+
if (typeof val === 'string' && val) {
|
|
161
|
+
const srcAsset = path_1.default.join(sourceDir, val);
|
|
162
|
+
const destAsset = path_1.default.join(tempDir, val);
|
|
163
|
+
if (fs_extra_1.default.existsSync(srcAsset) && !fs_extra_1.default.existsSync(destAsset)) {
|
|
164
|
+
fs_extra_1.default.copyFileSync(srcAsset, destAsset);
|
|
165
|
+
console.log(`π μμ
볡μ¬: ${val}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch (_a) { }
|
|
153
171
|
return;
|
|
154
172
|
}
|
|
155
173
|
}
|