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

fix-patch: fix xxd path for local snapshots generation #1057

Merged
merged 1 commit into from
Sep 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions snapshot/android/snapshot-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ SnapshotGenerator.prototype.getSnapshotToolCommand = function (snapshotToolPath,
return `${snapshotToolPath} ${inputFilePath} --startup_blob ${join(outputPath, `${SNAPSHOT_BLOB_NAME}.blob`)} ${toolParams}`;
}

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

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