Fix windows build #830

Merged
IGassmann merged 2 commits from fix-windows-build into master 2017-12-09 16:09:47 +01:00
3 changed files with 9 additions and 14 deletions

View file

@ -24,9 +24,6 @@ rm daemon.zip
# build electron app
yarn dist
$binary_name = Get-ChildItem -Path dist -Filter 'LBRY Setup*.exe' -Name
$new_name = $binary_name -replace '^LBRY Setup (.*)\.exe$', 'LBRY_$1.exe'
Rename-Item -Path "dist\$binary_name" -NewName $new_name
dir dist # verify that binary was built/named correctly

View file

@ -79,12 +79,6 @@ if [ "$FULL_BUILD" == "true" ]; then
yarn dist
if $OSX; then
binary_name=$(find "$ROOT/dist" -iname "*dmg")
new_name=$(basename "$binary_name" | sed 's/-/_/')
mv "$binary_name" "$(dirname "$binary_name")/$new_name"
fi
# electron-build has a publish feature, but I had a hard time getting
# it to reliably work and it also seemed difficult to configure. Not proud of
# this, but it seemed better to write my own.

View file

@ -1,5 +1,4 @@
const path = require('path');
const FlowBabelWebpackPlugin = require('./src/renderer/flowtype-plugin');
const ELECTRON_RENDERER_PROCESS_ROOT = path.resolve(__dirname, 'src/renderer/');
@ -20,10 +19,15 @@ module.exports = {
resolve: {
modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
extensions: ['.js', '.jsx', '.scss']
},
plugins: [
new FlowBabelWebpackPlugin({
}
};
if (process.env.NODE_ENV === 'development') {
const FLOW_BABEL_WEBPACK_PLUGIN = require('./src/renderer/flowtype-plugin');
module.exports.plugins = [
new FLOW_BABEL_WEBPACK_PLUGIN({
warn: true
})
]
};
}