diff options
author | Jose <jose@zeroc.com> | 2016-02-26 20:46:27 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-02-26 20:46:27 +0100 |
commit | 62cba8cd46a535585a4422daab489f114feab6f3 (patch) | |
tree | c77e9cec24a570b06024a3c6a1552b8e6eb20ec6 /js/gulpfile.js | |
parent | updating changelog for ICE-6844 (diff) | |
download | ice-62cba8cd46a535585a4422daab489f114feab6f3.tar.bz2 ice-62cba8cd46a535585a4422daab489f114feab6f3.tar.xz ice-62cba8cd46a535585a4422daab489f114feab6f3.zip |
Windows msbuild build updates
Diffstat (limited to 'js/gulpfile.js')
-rw-r--r-- | js/gulpfile.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/js/gulpfile.js b/js/gulpfile.js index 94ea2a58cf9..28e7a2f7af9 100644 --- a/js/gulpfile.js +++ b/js/gulpfile.js @@ -30,14 +30,30 @@ var sliceDir = path.resolve(__dirname, '..', 'slice'); var useBinDist = process.env.USE_BIN_DIST == "yes"; +var platform = process.env.CPP_PLATFORM; +var configuration = process.env.CPP_CONFIGURATION; + function slice2js(options) { var defaults = {}; var opts = options || {}; - + if(process.platform == "win32" && !opts.exe) + { + if(!platform || (platform != "Win32" && platform != "x64")) + { + console.log("Error: CPP_PLATFORM environment variable must be set to `Win32' or `x64', in order to locate slice2js.exe"); + process.exit(1); + } + + if(!configuration || (configuration != "Debug" && configuration != "Release")) + { + console.log("Error: CPP_CONFIGURATION environment variable must be set to `Debug' or `Release', in order to locate slice2js.exe"); + process.exit(1); + } + } defaults.args = opts.args || []; defaults.dest = opts.dest; defaults.exe = useBinDist ? undefined : (opts.exe || path.resolve( - path.join("../cpp/bin", process.platform == "win32" ? "slice2js.exe" : "slice2js"))); + path.join("../cpp/bin", process.platform == "win32" ? path.join(platform, configuration, "slice2js.exe") : "slice2js"))); defaults.args = defaults.args.concat(useBinDist ? [] : ["-I" + sliceDir]); return iceBuilder.compile(defaults); } |