mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
electron-is-dev is now useless, use our own copy.
This commit is contained in:
parent
b2e9223b10
commit
3acc213544
@ -21,7 +21,6 @@ const child_process = require('child_process')
|
|||||||
const crypto = require('crypto')
|
const crypto = require('crypto')
|
||||||
const EventEmitter = require('events')
|
const EventEmitter = require('events')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const isDev = require('electron-is-dev')
|
|
||||||
const mkpath = require('mkdirp')
|
const mkpath = require('mkdirp')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const Registry = require('winreg')
|
const Registry = require('winreg')
|
||||||
@ -31,6 +30,7 @@ const zlib = require('zlib')
|
|||||||
|
|
||||||
const ConfigManager = require('./configmanager')
|
const ConfigManager = require('./configmanager')
|
||||||
const DistroManager = require('./distromanager')
|
const DistroManager = require('./distromanager')
|
||||||
|
const isDev = require('./isdev')
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const PLATFORM_MAP = {
|
const PLATFORM_MAP = {
|
||||||
|
5
app/assets/js/isdev.js
Normal file
5
app/assets/js/isdev.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
'use strict'
|
||||||
|
const getFromEnv = parseInt(process.env.ELECTRON_IS_DEV, 10) === 1
|
||||||
|
const isEnvSet = 'ELECTRON_IS_DEV' in process.env
|
||||||
|
|
||||||
|
module.exports = isEnvSet ? getFromEnv : (process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath))
|
@ -7,7 +7,7 @@
|
|||||||
// Requirements
|
// Requirements
|
||||||
const $ = require('jquery')
|
const $ = require('jquery')
|
||||||
const {ipcRenderer, remote, shell, webFrame} = require('electron')
|
const {ipcRenderer, remote, shell, webFrame} = require('electron')
|
||||||
const isDev = require('electron-is-dev')
|
const isDev = require('./assets/js/isdev')
|
||||||
const LoggerUtil = require('./assets/js/loggerutil')
|
const LoggerUtil = require('./assets/js/loggerutil')
|
||||||
|
|
||||||
const loggerUICore = LoggerUtil('%c[UICore]', 'color: #000668; font-weight: bold')
|
const loggerUICore = LoggerUtil('%c[UICore]', 'color: #000668; font-weight: bold')
|
||||||
|
2
index.js
2
index.js
@ -3,7 +3,7 @@ const {app, BrowserWindow, ipcMain} = require('electron')
|
|||||||
const autoUpdater = require('electron-updater').autoUpdater
|
const autoUpdater = require('electron-updater').autoUpdater
|
||||||
const ejse = require('ejs-electron')
|
const ejse = require('ejs-electron')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const isDev = require('electron-is-dev')
|
const isDev = require('./app/assets/js/isdev')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const semver = require('semver')
|
const semver = require('semver')
|
||||||
const url = require('url')
|
const url = require('url')
|
||||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -993,11 +993,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron-is-dev": {
|
|
||||||
"version": "0.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz",
|
|
||||||
"integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4="
|
|
||||||
},
|
|
||||||
"electron-osx-sign": {
|
"electron-osx-sign": {
|
||||||
"version": "0.4.10",
|
"version": "0.4.10",
|
||||||
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz",
|
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz",
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"discord-rpc": "^3.0.0",
|
"discord-rpc": "^3.0.0",
|
||||||
"ejs": "^2.6.1",
|
"ejs": "^2.6.1",
|
||||||
"ejs-electron": "^2.0.3",
|
"ejs-electron": "^2.0.3",
|
||||||
"electron-is-dev": "=0.3.0",
|
|
||||||
"electron-updater": "^3.1.2",
|
"electron-updater": "^3.1.2",
|
||||||
"github-syntax-dark": "^0.5.0",
|
"github-syntax-dark": "^0.5.0",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user