\resources\app\node_modules\electron-edge-js\lib\native\win32文件夹下的ia32文件夹整个删除,X64下的文件夹除13.0外全部删除,外部几个dll文件也全删除,最只目录如下图所示
然后修改install.js文件
删除其中所有和ia32相关的内容,最终的文件如下
var fs = require('fs')
, path = require('path')
, spawn = require('child_process').spawn
, whereis = require('./whereis');
if (process.platform === 'win32') {
var dotnetPath = whereis('dotnet', 'dotnet.exe');
if (dotnetPath) {
spawn(dotnetPath, ['restore'], { stdio: 'inherit', cwd: path.resolve(__dirname, '..', 'lib', 'bootstrap') })
.on('close', function() {
spawn(dotnetPath, ['build', '--configuration', 'Release'], { stdio: 'inherit', cwd: path.resolve(__dirname, '..', 'lib', 'bootstrap') })
.on('close', function() {
require('./checkplatform');
});
});
}
else {
require('./checkplatform');
}
}
else {
if (process.platform === 'darwin') {
// Code from electron-prebuild: https://github.com/electron/electron-rebuild
const possibleModuleNames = ['electron', 'electron-prebuilt', 'electron-prebuilt-compile'];
function locateElectronPrebuilt () {
let electronPath;
// Attempt to locate modules by path
let foundModule = possibleModuleNames.some((moduleName) => {
electronPath = path.join(__dirname, '..', '..', moduleName);
return fs.existsSync(electronPath);
});
// Return a path if we found one
if (foundModule) return electronPath;
// Attempt to locate modules by require
foundModule = possibleModuleNames.some((moduleName) => {
try {
electronPath = path.join(require.resolve(moduleName), '..');
} catch (e) {
return false;
}
return fs.existsSync(electronPath);
});
// Return a path if we found one
if (foundModule) return electronPath;
return null;
}
location = locateElectronPrebuilt();
version = null;
electronPath = null;
if (location != null)
{
// NB: We assume here that electron-prebuilt is a sibling package of ours
pkg = null;
try {
let pkgJson = path.join(location, 'package.json');
pkg = require(pkgJson);
version = pkg.version;
} catch (e) {
console.error("Unable to find electron-prebuilt's version number, either install it or specify an explicit version");
}
}
if (version !== null)
{
spawn('node-gyp', ['configure', 'build', '--target='+version, '--disturl=https://atom.io/download/atom-shell'], { stdio: 'inherit' });
}
else
spawn('node-gyp', ['configure', 'build'], { stdio: 'inherit' });
}
else {
spawn('node-gyp', ['configure', 'build'], { stdio: 'inherit' });
}
}