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

Commit 08ee1c9

Browse files
committed
fix: fix xxd path for local snapshots generation
1 parent 1bdfbb2 commit 08ee1c9

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
@@ -247,9 +247,9 @@ SnapshotGenerator.prototype.getSnapshotToolCommand = function (snapshotToolPath,
247247
return `${snapshotToolPath} ${inputFilePath} --startup_blob ${join(outputPath, `${SNAPSHOT_BLOB_NAME}.blob`)} ${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 > ${join(srcOutputDir, `${SNAPSHOT_BLOB_NAME}.c`)}`;
252+
return `${xxdLocation || ""}xxd -i ${SNAPSHOT_BLOB_NAME}.blob > ${join(srcOutputDir, `${SNAPSHOT_BLOB_NAME}.c`)}`;
253253
}
254254

255255
SnapshotGenerator.prototype.getPathInDocker = function (mappedLocalDir, mappedDockerDir, targetPath) {
@@ -309,7 +309,7 @@ SnapshotGenerator.prototype.buildCSource = function (androidArch, blobInputDir,
309309
if (snapshotInDocker) {
310310
const blobsInputInDocker = `/blobs/${androidArch}`
311311
const srcOutputDirInDocker = `/dist/src/${androidArch}`;
312-
const buildCSourceCommand = this.getXxdCommand(srcOutputDirInDocker);
312+
const buildCSourceCommand = this.getXxdCommand(srcOutputDirInDocker, "/bin/");
313313
command = `docker run --rm -v "${blobInputDir}:${blobsInputInDocker}" -v "${srcOutputDir}:${srcOutputDirInDocker}" ${SNAPSHOTS_DOCKER_IMAGE} /bin/sh -c "cd ${blobsInputInDocker} && ${buildCSourceCommand}"`;
314314
}
315315
else {

0 commit comments

Comments
 (0)