Skip to content

Commit

Permalink
fix electron dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinariHex committed Mar 26, 2021
1 parent d72cf65 commit d158c98
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
23 changes: 15 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ const fetch = require('node-fetch')
const socket = require('socket.io')
const appexp = express()

const { app, BrowserWindow, Menu, Tray, autoUpdater } = require('electron');
const { app, BrowserWindow, Menu, Tray, globalShortcut } = require('electron');

require('update-electron-app')({
repo: 'AkinariHex/oTMD',
updateInterval: '1 hour',
logger: require('electron-log')
})
const { NsisUpdater } = require("electron-updater")

const options = {
provider: 'generic',
url: 'https://github.com/AkinariHex/oTMD/releases/latest'
}

const autoUpdater = new NsisUpdater(options)
autoUpdater.checkForUpdatesAndNotify()
autoUpdater.logger = require("electron-log")
autoUpdater.logger.transports.file.level = "info"

appexp.use(express.json())
appexp.use(cors())
Expand Down Expand Up @@ -141,7 +147,8 @@ app.on('ready', function() {
console.log(`Running on http://localhost:${server.address().port}`)
})


globalShortcut.unregister('Control+Shift+I')

/*let loading = new BrowserWindow({show: false, width: 1000, height: 600, frame: false})
var mainWindow = null;*/

Expand All @@ -154,7 +161,7 @@ app.on('ready', function() {
darkTheme: true,
frame: false,
webPreferences: {
devTools: true
devTools: false
},
titleBarStyle: 'hidden',
show: false,
Expand Down
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"name": "osu-tourney-match-displayer",
"version": "1.5.0",
"description": "osu! Tourney Match Displayer",
"description": "Displayer for osu! Tournament Matches",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/AkinariHex/oTMD.git"
},
"homepage": "https://github.com/AkinariHex/oTMD#otmd-project",
"build": {
"appId": "com.akinari.osu-tourney-match-displayer",
"productName": "osu! Tourney Match Displayer",
"copyright": "Copyright © 2021 Akinari",
"win": {
"target": [
"nsis",
"zip",
"portable"
"nsis",
"zip"
],
"artifactName": "otmd_v${version}_${arch}.${ext}"
},
Expand All @@ -20,7 +24,7 @@
"perMachine": true,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true,
"artifactName": "otmd_v${version}_${arch}_installer.${ext}"
"artifactName": "otmd_v${version}_${arch}_installer.${ext}"
},
"files": [
"frontend/**/*",
Expand All @@ -30,19 +34,19 @@
],
"directories": {
"buildResources": "resources"
},
"publish": null
}
},
"scripts": {
"build": "pkg index.js",
"server:dev": "nodemon index.js",
"server": "node index.js",
"electron": "electron .",
"builder": "electron-builder --x64"
"builder": "electron-builder --x64 -p always",
"pack": "electron-builder -w"
},
"keywords": [],
"keywords": ["osu", "displayer", "tournament", "match", "lobby", "score", "obs", "slobs", "osugame", "tourney", "tournament-match"],
"author": "Akinari",
"license": "MIT",
"license": "GPL-3.0",
"dependencies": {
"cors": "^2.8.5",
"electron-log": "^4.3.2",
Expand Down

0 comments on commit d158c98

Please sign in to comment.