Skip to content

Commit

Permalink
fixes for distribution builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TanninOne committed Feb 25, 2017
1 parent 9fb49cd commit 7a71312
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 17 deletions.
9 changes: 7 additions & 2 deletions BuildSubprojects.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Promise = require('bluebird');
const { spawn } = require('child_process');
const copyfiles = require('copyfiles');
const rebuild = require('electron-rebuild').default;
const fs = require('fs-extra-promise');
const glob = require('glob');
const minimist = require('minimist');
Expand All @@ -10,8 +11,10 @@ const vm = require('vm');

const projectGroups = fs.readJSONSync('./BuildSubprojects.json');

const packageJSON = fs.readJSONSync('./package.json');

const npmcli = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const rebuild = path.join('node_modules', '.bin', process.platform === 'win32' ? 'electron-rebuild.cmd' : 'electron-rebuild');
//const rebuild = path.join('node_modules', '.bin', process.platform === 'win32' ? 'electron-rebuild.cmd' : 'electron-rebuild');
const globOptions = { };

const copyfilesAsync = Promise.promisify(copyfiles);
Expand Down Expand Up @@ -187,7 +190,9 @@ function processRebuild(project, buildType, feedback) {
? __dirname
: path.join(__dirname, buildType);

return spawnAsync(rebuild, ['-w', project.module, '-m', moduleDir], {}, feedback);
return rebuild(moduleDir, packageJSON.engines.electron, process.arch, [project.module]);

//return spawnAsync(rebuild, ['-w', project.module, '-m', moduleDir], {}, feedback);
}

function evalCondition(condition, context) {
Expand Down
14 changes: 11 additions & 3 deletions InstallAssets.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,31 @@
"skipPaths": 1
},
{
"srcPath": "assets/fonts/*",
"srcPath": "locales/*/*",
"outPath": "",
"target": [
"out",
"app"
]
},
{
"srcPath": "locales/*/*",
"srcPath": "assets/images/",
"outPath": "",
"target": [
"out",
"app"
]
},
{
"srcPath": "assets/images/",
"srcPath": "assets/fonts/*",
"outPath": "",
"target": [
"out",
"app"
]
},
{
"srcPath": "assets/*.json",
"outPath": "",
"target": [
"out",
Expand Down
1 change: 1 addition & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"react-layout-pane": "TanninOne/react-layout-pane",
"react-redux": "^4.4.5",
"react-sortable-tree": "^0.1.8",
"react-tabs": "^0.8.2",
"recharts": "^0.20.8",
"redux": "^3.5.2",
"redux-act": "^0.5.0",
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion extensions/gamebryo-plugin-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"postinstall": "electron-rebuild -w esptk,loot",
"copy_esptk": "copyfiles -f ./node_modules/esptk/build/Release/nbind.node ./dist/esptk",
"copy_loot": "copyfiles -f ./node_modules/loot/build/Release/nbind.node ./dist/loot && copyfiles -f ./node_modules/loot/loot_api/loot_api.dll ./dist/loot",
"prebuild": "typings install",
"prebuild": "typings prune && typings install",
"build": "npm run tsc && npm run webpack && npm run copy_esptk && npm run copy_loot && copyfiles -f src/stylesheets/plugin_management.scss dist",
"installDev": "copyfiles -u 1 dist/**/* ../../out/bundledPlugins/gamebryo-plugin-management",
"buildDev": "npm run build && npm run installDev"
Expand Down
2 changes: 1 addition & 1 deletion extensions/gamebryo-savegame-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"webpack": "node ./node_modules/webpack/bin/webpack --config webpack.config.js --display-error-details --progress --profile --color",
"clear": "rm-local-modules",
"postinstall": "electron-rebuild -w gamebryo-savegame",
"prebuild": "typings install",
"prebuild": "typings prune && typings install",
"build": "npm run tsc && npm run webpack && copyfiles -f ./node_modules/gamebryo-savegame/dist/nbind.node ./dist/savegamelib && copyfiles -f ./node_modules/gamebryo-savegame/dist/liblz4.dll ./dist/savegamelib",
"installDev": "copyfiles -u 1 dist/**/* ../../out/bundledPlugins/gamebryo-savegame-management",
"buildDev": "npm run build && npm run installDev"
Expand Down
2 changes: 1 addition & 1 deletion extensions/meta-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tsc": "tsc -p .",
"webpack": "node ./node_modules/webpack/bin/webpack --config webpack.config.js --display-error-details --progress --profile --color",
"installDev": "copyfiles -f dist/* ../../out/bundledPlugins/meta-editor",
"prebuild": "typings install",
"prebuild": "typings prune && typings install",
"build": "npm run tsc && npm run webpack && copyfiles -f src/stylesheets/metaeditor.scss dist",
"buildDev": "npm run build && npm run installDev"
},
Expand Down
2 changes: 1 addition & 1 deletion external/modmeta-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Serves dependency and other meta information for mod files.",
"main": "lib/index.js",
"scripts": {
"typings": "typings install",
"typings": "typings prune && typings install",
"build": "tsc -p ."
},
"typings": "lib/index",
Expand Down
2 changes: 1 addition & 1 deletion lib/js/nexus-api/lib/Nexus.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/js/nexus-api/lib/Nexus.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/js/nexus-api/lib/types.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/js/nexus-api/lib/types.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7a71312

Please sign in to comment.