mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-15 23:36:32 +00:00
Don't use electron-is-running-in-asar, fix AppImage builds
Change-type: patch
This commit is contained in:
parent
d494cee0da
commit
f372fba1fd
@ -21,7 +21,6 @@ const _ = require('lodash')
|
||||
const path = require('path')
|
||||
const os = require('os')
|
||||
const ipc = require('node-ipc')
|
||||
const isRunningInAsar = require('electron-is-running-in-asar')
|
||||
const electron = require('electron')
|
||||
const store = require('../models/store')
|
||||
const settings = require('../models/settings')
|
||||
@ -41,26 +40,6 @@ const selectionState = require('../models/selection-state')
|
||||
*/
|
||||
const THREADS_PER_CPU = 16
|
||||
|
||||
/**
|
||||
* @summary Get application entry point
|
||||
* @function
|
||||
* @private
|
||||
*
|
||||
* @returns {String} entry point
|
||||
*
|
||||
* @example
|
||||
* const entryPoint = imageWriter.getApplicationEntryPoint()
|
||||
*/
|
||||
const getApplicationEntryPoint = () => {
|
||||
if (isRunningInAsar()) {
|
||||
return path.join(process.resourcesPath, 'app.asar')
|
||||
}
|
||||
const relativeEntryPoint = _.last(electron.remote.process.argv)
|
||||
|
||||
const PROJECT_ROOT = path.join(__dirname, '..', '..', '..', '..')
|
||||
return path.resolve(PROJECT_ROOT, relativeEntryPoint)
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Handle a flash error and log it to analytics
|
||||
* @function
|
||||
@ -205,7 +184,7 @@ exports.performWrite = (image, drives, onProgress) => {
|
||||
})
|
||||
|
||||
const argv = _.attempt(() => {
|
||||
let entryPoint = getApplicationEntryPoint()
|
||||
let entryPoint = electron.remote.app.getAppPath()
|
||||
|
||||
// AppImages run over FUSE, so the files inside the mount point
|
||||
// can only be accessed by the user that mounted the AppImage.
|
||||
|
@ -52,7 +52,6 @@
|
||||
"color": "^2.0.1",
|
||||
"d3": "^4.13.0",
|
||||
"debug": "^3.1.0",
|
||||
"electron-is-running-in-asar": "^1.0.0",
|
||||
"electron-updater": "4.0.6",
|
||||
"etcher-sdk": "^2.0.13",
|
||||
"flexboxgrid": "^6.3.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user