Skip to content

Commit

Permalink
show app info for electron build
Browse files Browse the repository at this point in the history
  • Loading branch information
acharl authored and godenzim committed May 24, 2021
1 parent cea9086 commit 078b7f0
Show file tree
Hide file tree
Showing 6 changed files with 497 additions and 148 deletions.
12 changes: 12 additions & 0 deletions electron/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const { app, BrowserWindow, Menu, ipcMain, globalShortcut } = require('electron')
const isDevMode = require('electron-is-dev')
const { CapacitorSplashScreen, configCapacitor } = require('@capacitor/electron')
const electronVersion = require('electron-version')

const pjson = require('./package.json')
const childProcess = require('child_process')
const path = require('path')

Expand All @@ -14,6 +16,16 @@ let splashScreen = null
// Change this if you do not wish to have a splash screen
let useSplashScreen = false

ipcMain.on('AppInfo', (event, arg) => {
electronVersion((_err, v) => {
const appName = app.getName()
const versionName = app.getVersion()
const packageName = 'it.airgap.wallet'
const versionCode = v
event.returnValue = { appName: appName, versionName: versionName, packageName: packageName, versionCode: versionCode }
})
})

// Create simple menu for easy devtools access, and for demo
const menuTemplate = [
{ role: 'appMenu', submenu: [{ role: 'quit' }] },
Expand Down
159 changes: 92 additions & 67 deletions electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"@ledgerhq/hw-transport": "^5.23.0",
"@ledgerhq/hw-transport-node-ble": "^5.23.0",
"@ledgerhq/hw-transport-node-hid-singleton": "^5.23.0",
"electron-is-dev": "^1.2.0"
"electron-is-dev": "^1.2.0",
"electron-version": "^2.0.1"
},
"devDependencies": {
"electron": "^8.0.0",
Expand Down
Loading

0 comments on commit 078b7f0

Please sign in to comment.