فهرست منبع

Correctly determine arch for windows builds

Torkel Odegaard 10 سال پیش
والد
کامیت
5bddf79d09
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      Gruntfile.js

+ 4 - 2
Gruntfile.js

@@ -1,7 +1,6 @@
 /* jshint node:true */
 'use strict';
 module.exports = function (grunt) {
-
   var os = require('os');
   var config = {
     pkg: grunt.file.readJSON('package.json'),
@@ -13,6 +12,10 @@ module.exports = function (grunt) {
     platform: process.platform.replace('win32', 'windows'),
   };
 
+  if (process.platform.match(/^win/)) {
+    config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86';
+  }
+
   config.pkg.version = grunt.option('pkgVer') || config.pkg.version;
 
   // load plugins
@@ -35,7 +38,6 @@ module.exports = function (grunt) {
 
   // Merge that object with what with whatever we have here
   loadConfig(config,'./tasks/options/');
-
   // pass the config to grunt
   grunt.initConfig(config);
 };