mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-17 05:58:41 -09:00
Support non-darwin
This commit is contained in:
parent
a7073df7d8
commit
827003cdd4
1 changed files with 15 additions and 6 deletions
19
bin/mk-snapshot.js
vendored
19
bin/mk-snapshot.js
vendored
|
|
@ -41,13 +41,22 @@ async function main() {
|
||||||
const outputBlobPath = `${baseDirPath}/cache/${npmConfigArch}`;
|
const outputBlobPath = `${baseDirPath}/cache/${npmConfigArch}`;
|
||||||
await mkdirp(outputBlobPath);
|
await mkdirp(outputBlobPath);
|
||||||
|
|
||||||
const mksnapshotBinPath =
|
let mksnapshotBinPath
|
||||||
require.resolve(
|
if (process.platform === 'win32') {
|
||||||
path.join("electron-mksnapshot", "bin", "mksnapshot" + (process.platform === "win32" ? ".exe" : ""))
|
mksnapshotBinPath =
|
||||||
);
|
require.resolve(
|
||||||
|
path.join("electron-mksnapshot", "bin", "mksnapshot.exe")
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
mksnapshotBinPath =
|
||||||
|
require.resolve(
|
||||||
|
path.join("electron-mksnapshot", "bin", "mksnapshot")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mksnapshotBinPath = path.dirname(mksnapshotBinPath);
|
||||||
|
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
// TODO non-darwin
|
|
||||||
const matchingDirs = crossArchDirs.map((dir) => `${mksnapshotBinPath}/${dir}`).filter((dir) => fs.existsSync(dir));
|
const matchingDirs = crossArchDirs.map((dir) => `${mksnapshotBinPath}/${dir}`).filter((dir) => fs.existsSync(dir));
|
||||||
for (const dir of matchingDirs) {
|
for (const dir of matchingDirs) {
|
||||||
if (fs.existsSync(`${mksnapshotBinPath}/gen/v8/embedded.S`)) {
|
if (fs.existsSync(`${mksnapshotBinPath}/gen/v8/embedded.S`)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue