Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 7a8d017

Browse files
fix: fix xxd path for local snapshots generation
1 parent 3a03de6 commit 7a8d017

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎snapshot/android/snapshot-generator.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ SnapshotGenerator.prototype.getSnapshotToolCommand = function (snapshotToolPath,
247247
return `${snapshotToolPath} ${inputFilePath} --startup_blob ${outputPath} ${toolParams}`;
248248
}
249249

250-
SnapshotGenerator.prototype.getXxdCommand = function (srcOutputDir) {
250+
SnapshotGenerator.prototype.getXxdCommand = function (srcOutputDir,xxdLocation) {
251251
// https://github.com/NativeScript/docker-images/tree/master/v8-snapshot/bin
252-
return `/bin/xxd -i ${SNAPSHOT_BLOB_NAME}.blob > ${srcOutputDir}`;
252+
return `${xxdLocation||""}xxd -i ${SNAPSHOT_BLOB_NAME}.blob > ${srcOutputDir}`;
253253
}
254254

255255
SnapshotGenerator.prototype.getPathInDocker = function (mappedLocalDir, mappedDockerDir, targetPath) {
@@ -310,7 +310,7 @@ SnapshotGenerator.prototype.buildCSource = function (androidArch, blobInputDir,
310310
const blobsInputInDocker = `/blobs/${androidArch}`
311311
const srcOutputDirInDocker = `/dist/src/${androidArch}`;
312312
const outputPathInDocker = this.getPathInDocker(srcOutputDir, srcOutputDirInDocker, join(srcOutputDir, `${SNAPSHOT_BLOB_NAME}.c`));
313-
const buildCSourceCommand = this.getXxdCommand(outputPathInDocker);
313+
const buildCSourceCommand = this.getXxdCommand(outputPathInDocker,"/bin/");
314314
command = `docker run --rm -v "${blobInputDir}:${blobsInputInDocker}" -v "${srcOutputDir}:${srcOutputDirInDocker}" ${SNAPSHOTS_DOCKER_IMAGE} /bin/sh -c "cd ${blobsInputInDocker} && ${buildCSourceCommand}"`;
315315
}
316316
else {
@@ -377,6 +377,6 @@ SnapshotGenerator.prototype.runMksnapshotTool = function (tool, mksnapshotParams
377377
This is why the *.blob files are initially named TNSSnapshot.blob.
378378
After the xxd step, they must be renamed to snapshot.blob, because this is the filename that the Android runtime is looking for.
379379
*/
380-
shelljs.mv(join(blobOutputDir, `${SNAPSHOT_BLOB_NAME}.blob`), join(blobOutputDir, `snapshot.blob`));
380+
shelljs.mv(join(blobOutputDir, `${SNAPSHOT_BLOB_NAME}.blob`), join(blobOutputDir, `snapshot.blob`));
381381
});
382382
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /