Skip to content

Commit

Permalink
Added auto-updater, customized installers
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary committed Dec 12, 2019
1 parent 5d74270 commit 2472170
Show file tree
Hide file tree
Showing 25 changed files with 1,181 additions and 1,098 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ cache:
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install yarn;
fi
script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
Expand All @@ -33,7 +27,7 @@ script:
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn install --link-duplicates --pure-lockfile && yarn release --win --linux"
/bin/bash -c "yarn install --link-duplicates --pure-lockfile; yarn release --win --linux"
else
yarn install;
yarn release;
Expand Down
32 changes: 16 additions & 16 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"args" : ["."],
"outputCapture": "std"
}
]
}
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch and Debug",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"dev"
],
"autoAttachChildProcesses": true,
"internalConsoleOptions": "openOnFirstSessionStart",
"console": "integratedTerminal"
}
]
}
Binary file added build/icon.ico
Binary file not shown.
Binary file modified build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icon_flat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/installerHeader.bmp
Binary file not shown.
Binary file added build/installerSidebar.bmp
Binary file not shown.
Binary file added build/uninstallerSidebar.bmp
Binary file not shown.
20 changes: 18 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"email": "[email protected]",
"url": "https://houby-studio.eu/"
},
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"copyright": "Copyright © 2020 Houby Studio",
"build": {
Expand All @@ -20,10 +20,25 @@
"target": [
"nsis",
"portable",
"msi"
"msi",
"zip"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true
},
"linux": {
"synopsis": "Open Gamers' Library",
"category": "Game",
"icon": "icons",
"desktop": {
"Type": "Application",
"Encoding": "UTF-8",
"Name": "OGL",
"Comment": "Open Gamers' Library",
"Terminal": "false"
},
"target": [
"AppImage",
"snap",
Expand All @@ -42,6 +57,7 @@
"postinstall": "electron-builder install-app-deps"
},
"dependencies": {
"electron-updater": "^4.2.0",
"source-map-support": "^0.5.12"
},
"devDependencies": {
Expand Down
Binary file removed src/assets/icons/1024x1024.png
Binary file not shown.
Binary file removed src/assets/icons/128x128.png
Binary file not shown.
Binary file removed src/assets/icons/16x16.png
Binary file not shown.
Binary file removed src/assets/icons/256x256.png
Binary file not shown.
Binary file removed src/assets/icons/32x32.png
Binary file not shown.
Binary file removed src/assets/icons/512x512.png
Binary file not shown.
Binary file removed src/assets/icons/64x64.png
Binary file not shown.
5 changes: 3 additions & 2 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { app, BrowserWindow } from 'electron'
import * as path from 'path'
import { format as formatUrl } from 'url'
import { autoUpdater } from 'electron-updater'

const isDevelopment = process.env.NODE_ENV !== 'production'

Expand All @@ -11,8 +12,7 @@ let mainWindow

function createMainWindow () {
const window = new BrowserWindow({
webPreferences: { nodeIntegration: true },
icon: path.join(__dirname, 'assets/icons/64x64.png')
webPreferences: { nodeIntegration: true }
})

if (isDevelopment) {
Expand Down Expand Up @@ -61,4 +61,5 @@ app.on('activate', () => {
// create main BrowserWindow when electron is ready
app.on('ready', () => {
mainWindow = createMainWindow()
autoUpdater.checkForUpdatesAndNotify()
})
Loading

0 comments on commit 2472170

Please sign in to comment.