Browse Source

Improve cross-platform on Windows

master
Tal Kol 3 years ago
parent
commit
40ae1c3ff6
  1. 4
      build/_build.ts
  2. 4
      build/_setup.ts

4
build/_build.ts

@ -18,8 +18,8 @@ async function main() {
// if we have an explicit bin directory, use the executables there (needed for glitch.com)
if (fs.existsSync("bin")) {
process.env.PATH = __dirname + "/../bin/:" + process.env.PATH;
process.env.FIFTPATH = __dirname + "/../bin/fiftlib";
process.env.PATH = path.join(__dirname, "..", "bin") + path.delimiter + process.env.PATH;
process.env.FIFTPATH = path.join(__dirname, "..", "bin", "fiftlib");
}
// make sure func compiler is available

4
build/_setup.ts

@ -3,8 +3,12 @@
// We rely on this script for example to support Glitch.com (online IDE) and have it working in one click
import fs from "fs";
import path from "path";
import child_process from "child_process";
// package ton-compiler brings its own func and fift executables which interfere with the system ones
fs.rmSync(path.join(__dirname, "..", "node_modules", "ton-compiler", "bin"), { recursive: true, force: true });
// check if we're running on glitch.com (glitch is running Ubuntu 16)
if (fs.existsSync("/app/.glitchdotcom.json")) {
// make sure we're installed once

Loading…
Cancel
Save