Skip to content

Commit

Permalink
Multi-Plattform-Build
Browse files Browse the repository at this point in the history
+ Bugfix: Selected Header
+ auto-update feature
  • Loading branch information
jotron committed Mar 4, 2018
1 parent 0e1447b commit 2671b6e
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 106 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules

yarn-error.log
yarn.lock
out/
dist/
6 changes: 5 additions & 1 deletion build/electron.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const electron = require('electron')
//const {autoUpdater} = require("electron-updater");

// Module to control application life.
const app = electron.app
Expand Down Expand Up @@ -44,7 +45,10 @@ function createWindow () {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
app.on('ready', function () {
createWindow()
//autoUpdater.checkForUpdatesAndNotify()
})

// Quit when all windows are closed.
app.on('window-all-closed', function () {
Expand Down
31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "StudyMD",
"description": "A small app for studying",
"author": "jotron",
"version": "0.3.0",
"version": "0.3.1",
"private": false,
"dependencies": {
"electron-compile": "^6.4.2",
Expand Down Expand Up @@ -30,29 +30,34 @@
"react-start": "react-scripts start",
"pack": "build --dir",
"dist": "npm run build && build",
"stop": "killall node"
"stop": "killall node",
"dist-all": "npm run build && electron-builder -mwl",
"publish": "npm run build && electron-builder -mwl -p always"
},
"build": {
"appId": "com.electron.StudyMD",
"nodeGypRebuild": false,
"win": {
"icon": "src/ressources/icons/win/icon.ico",
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
"icon": "src/ressources/icons/win/icon.ico",
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
},
"mac": {
"category": "public.app-category.productivity",
"target": "dmg",
"icon": "src/ressources/icons/mac/icon.icns",
"type": "development"
},
"linux": {
"icon": "src/ressources/icons/png"
},
"directories": {
"buildResources": "public"
}
Expand All @@ -61,7 +66,7 @@
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"electron-builder": "^19.49.0",
"electron-builder": "^20.2.0",
"electron-prebuilt-compile": "1.8.2-beta.3"
}
}
6 changes: 5 additions & 1 deletion public/electron.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const electron = require('electron')
//const {autoUpdater} = require("electron-updater");

// Module to control application life.
const app = electron.app
Expand Down Expand Up @@ -44,7 +45,10 @@ function createWindow () {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
app.on('ready', function () {
createWindow()
//autoUpdater.checkForUpdatesAndNotify()
})

// Quit when all windows are closed.
app.on('window-all-closed', function () {
Expand Down
Loading

0 comments on commit 2671b6e

Please sign in to comment.