Browse Source

Improve cross-platform (Windows)

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

2
build/_build.ts

@ -101,7 +101,7 @@ async function main() {
// run the func compiler to create a fif file // run the func compiler to create a fif file
console.log(` - Trying to compile '${mergedFuncArtifact}' with 'func' compiler..`); console.log(` - Trying to compile '${mergedFuncArtifact}' with 'func' compiler..`);
const buildErrors = child_process.execSync(`func -APS -o build/${contractName}.fif ${mergedFuncArtifact} 2>&1 >&-`).toString(); const buildErrors = child_process.execSync(`func -APS -o build/${contractName}.fif ${mergedFuncArtifact} 1>&3 2>&1`).toString();
if (buildErrors.length > 0) { if (buildErrors.length > 0) {
console.log(` - OH NO! Compilation Errors! The compiler output was:`); console.log(` - OH NO! Compilation Errors! The compiler output was:`);
console.log(`\n${buildErrors}`); console.log(`\n${buildErrors}`);

4
build/_setup.ts

@ -3,11 +3,11 @@
// We rely on this script for example to support Glitch.com (online IDE) and have it working in one click // 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 fs from "fs";
import path from "path";
import child_process from "child_process"; import child_process from "child_process";
// package ton-compiler brings its own func and fift executables which interfere with the system ones // 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 }); fs.unlinkSync(__dirname + "/../node_modules/.bin/func");
fs.unlinkSync(__dirname + "/../node_modules/.bin/fift");
// check if we're running on glitch.com (glitch is running Ubuntu 16) // check if we're running on glitch.com (glitch is running Ubuntu 16)
if (fs.existsSync("/app/.glitchdotcom.json")) { if (fs.existsSync("/app/.glitchdotcom.json")) {

Loading…
Cancel
Save