Skip to content

Commit

Permalink
Upgrade electron-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
NTag committed Feb 24, 2018
1 parent b88c4d1 commit 28b2710
Show file tree
Hide file tree
Showing 5 changed files with 562 additions and 798 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ cd app
npm install
cd ..
npm install
./node_modules/.bin/electron-rebuild
```

### Launching the app
Expand All @@ -32,7 +31,13 @@ Then, in another terminal, in the main folder execute `electron .` (it allows ho

### Building the app
In the `main.js` file, you must set the variable `DEV` (around line 12) to `false`, to deactivate the web inspector and turn on auto-updates.
Then simply run `npm run dist`. On macOS or Windows you will need a valid certificate so the application can be signed.
```
cd app/
./build.sh
cd ../
npm run dist
```
On macOS or Windows you will need a valid certificate so the application can be signed.

### Translations
The app is available in English, French and Arabic.
Expand Down
3 changes: 3 additions & 0 deletions app/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
rm -rf dist/
mkdir dist
ng build --aot --output-path dist/en --base-href './'
ng build --aot --output-path dist/fr --locale fr --i18n-format xlf --i18n-file src/locale/messages.fr.xlf --base-href './'
ng build --aot --output-path dist/ar --locale ar --i18n-format xlf --i18n-file src/locale/messages.ar.xlf --base-href './'
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ncp = require('ncp');
const request = require('request');
const alltomp3 = require('alltomp3');
const VERSION = app.getVersion();
const DEV = true;
const DEV = false;

// autoUpdater
if (!DEV && os.platform() != 'linux') {
Expand Down Expand Up @@ -327,7 +327,7 @@ function createWindow () {
} else {
alltomp3.relevanceLanguage = locale;
}
let supportedLocales = ['en', 'fr'];
let supportedLocales = ['en', 'fr', 'ar'];
let supportedLocale = 'en';
if (supportedLocales.indexOf(locale) > -1) {
supportedLocale = locale;
Expand Down
Loading

0 comments on commit 28b2710

Please sign in to comment.