Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit f63d493

Browse files
committed
fix: fix xxd path for local snapshots generation
1 parent 2e9b753 commit f63d493

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: snapshot/android/snapshot-generator.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ SnapshotGenerator.prototype.getSnapshotToolCommand = function (snapshotToolPath,
249249

250250
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)