mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +00:00
patch: updated etcher-sdk to 7.2.0;
adjusted webpack config to updated lzma structure
This commit is contained in:
parent
5945ab1f50
commit
30c5175ddb
2842
package-lock.json
generated
2842
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,7 @@
|
|||||||
"electron-rebuild": "3.2.5",
|
"electron-rebuild": "3.2.5",
|
||||||
"electron-updater": "4.3.5",
|
"electron-updater": "4.3.5",
|
||||||
"esbuild-loader": "2.16.0",
|
"esbuild-loader": "2.16.0",
|
||||||
"etcher-sdk": "6.3.0",
|
"etcher-sdk": "7.2.0",
|
||||||
"file-loader": "6.2.0",
|
"file-loader": "6.2.0",
|
||||||
"husky": "4.2.5",
|
"husky": "4.2.5",
|
||||||
"immutable": "3.8.1",
|
"immutable": "3.8.1",
|
||||||
|
@ -78,10 +78,12 @@ function renameNodeModules(resourcePath: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function findLzmaNativeBindingsFolder(): string {
|
function findLzmaNativeBindingsFolder(): string {
|
||||||
const files = readdirSync(path.join('node_modules', 'lzma-native'));
|
const files = readdirSync(
|
||||||
|
path.join('node_modules', 'lzma-native', 'prebuilds'),
|
||||||
|
);
|
||||||
const bindingsFolder = files.find(
|
const bindingsFolder = files.find(
|
||||||
(f) =>
|
(f) =>
|
||||||
f.startsWith('binding-') &&
|
f.startsWith(os.platform()) &&
|
||||||
f.endsWith(env.npm_config_target_arch || os.arch()),
|
f.endsWith(env.npm_config_target_arch || os.arch()),
|
||||||
);
|
);
|
||||||
if (bindingsFolder === undefined) {
|
if (bindingsFolder === undefined) {
|
||||||
@ -210,8 +212,8 @@ const commonConfig = {
|
|||||||
/node_modules\/lzma-native\/index\.js$/,
|
/node_modules\/lzma-native\/index\.js$/,
|
||||||
// remove node-pre-gyp magic from lzma-native
|
// remove node-pre-gyp magic from lzma-native
|
||||||
{
|
{
|
||||||
search: 'require(binding_path)',
|
search: `require('node-gyp-build')(__dirname);`,
|
||||||
replace: `require('./${LZMA_BINDINGS_FOLDER}/lzma_native.node')`,
|
replace: `require('./prebuilds/${LZMA_BINDINGS_FOLDER}/electron.napi.node')`,
|
||||||
},
|
},
|
||||||
// use regular stream module instead of readable-stream
|
// use regular stream module instead of readable-stream
|
||||||
{
|
{
|
||||||
@ -348,8 +350,8 @@ const guiConfigCopyPatterns = [
|
|||||||
if (os.platform() === 'win32') {
|
if (os.platform() === 'win32') {
|
||||||
// liblzma.dll is required on Windows for lzma-native
|
// liblzma.dll is required on Windows for lzma-native
|
||||||
guiConfigCopyPatterns.push({
|
guiConfigCopyPatterns.push({
|
||||||
from: `node_modules/lzma-native/${LZMA_BINDINGS_FOLDER}/liblzma.dll`,
|
from: `node_modules/lzma-native/prebuilds/${LZMA_BINDINGS_FOLDER}/liblzma.dll`,
|
||||||
to: `modules/lzma-native/${LZMA_BINDINGS_FOLDER_RENAMED}/liblzma.dll`,
|
to: `modules/lzma-native/prebuilds/${LZMA_BINDINGS_FOLDER_RENAMED}/liblzma.dll`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user