-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
73 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
// See the Electron documentation for details on how to use preload scripts: | ||
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts | ||
|
||
import * as webapi from '../webapi'; | ||
|
||
declare global { | ||
interface Window { | ||
etcher: typeof webapi; | ||
} | ||
} | ||
|
||
window['etcher'] = webapi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// Anything exported from this module will become available to the | ||
// renderer process via preload. They're accessible as `window.etcher.foo()`. | ||
// | ||
|
||
import { ipcRenderer } from 'electron'; | ||
|
||
// FIXME: this is a workaround for the renderer to be able to find the etcher-util | ||
// binary. We should instead export a function that asks the main process to launch | ||
// the binary itself. | ||
export async function getEtcherUtilPath(): Promise<string> { | ||
return await ipcRenderer.invoke('get-util-path'); | ||
} |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,6 @@ | |
"url": "[email protected]:balena-io/etcher.git" | ||
}, | ||
"scripts": { | ||
"build:rebuild-mountutils": "cd node_modules/mountutils && npm rebuild", | ||
"build:sidecar": "npm run build:rebuild-mountutils && tsc --project tsconfig.sidecar.json && pkg build/util/api.js -c pkg-sidecar.json --target node18 --output generated/etcher-util", | ||
"flowzone-preinstall-linux": "sudo apt-get update && sudo apt-get install -y xvfb libudev-dev && cat < electron-builder.yml | yq e .deb.depends[] - | xargs -L1 echo | sed 's/|//g' | xargs -L1 sudo apt-get --ignore-missing install || true", | ||
"flowzone-preinstall-macos": "true", | ||
"flowzone-preinstall-windows": "npx node-gyp install", | ||
|
@@ -106,6 +104,7 @@ | |
"chai": "4.3.7", | ||
"css-loader": "5.2.7", | ||
"electron": "^25.8.2", | ||
"electron-forge-resource-plugin": "^1.0.0-alpha.6", | ||
"electron-mocha": "^11.0.2", | ||
"electron-notarize": "1.2.2", | ||
"electron-rebuild": "^3.2.9", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters