mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +00:00
this is no longer necessary, and breaks with new electron
This commit is contained in:
parent
df7854111a
commit
6834dae281
@ -276,28 +276,6 @@ const commonConfig = {
|
||||
`,
|
||||
replace: "require('./build/Release/Generator.node')",
|
||||
}),
|
||||
// Use the copy of blobs in the generated folder and rename node_modules -> modules
|
||||
// See the renameNodeModules function above
|
||||
replace(/node_modules\/node-raspberrypi-usbboot\/build\/index\.js$/, {
|
||||
search:
|
||||
"return await readFile(Path.join(__dirname, '..', 'blobs', filename));",
|
||||
replace: outdent`
|
||||
const { app, remote } = require('electron');
|
||||
return await readFile(
|
||||
Path.join(
|
||||
// With macOS universal builds, getAppPath() returns the path to an app.asar file containing an index.js file which will
|
||||
// include the app-x64 or app-arm64 folder depending on the arch.
|
||||
// We don't care about the app.asar file, we want the actual folder.
|
||||
(app || remote.app).getAppPath().replace(/\\.asar$/, () => process.platform === 'darwin' ? '-' + process.arch : ''),
|
||||
'generated',
|
||||
__dirname.replace('node_modules', 'modules'),
|
||||
'..',
|
||||
'blobs',
|
||||
filename
|
||||
)
|
||||
);
|
||||
`,
|
||||
}),
|
||||
// Copy native modules to generated folder
|
||||
{
|
||||
test: /\.node$/,
|
||||
|
Loading…
x
Reference in New Issue
Block a user