mirror of
https://github.com/balena-io/etcher.git
synced 2025-11-10 18:59:27 +00:00
Compare commits
6 Commits
aethernet/
...
beaglebone
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e96129d857 | ||
|
|
cc9b063f16 | ||
|
|
079140a23b | ||
|
|
8e4473a14a | ||
|
|
81b5c67a3b | ||
|
|
e42debd183 |
@@ -6,15 +6,15 @@ const process = require('process');
|
||||
|
||||
// Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages
|
||||
exports.default = function(context) {
|
||||
if (context.platform.name === 'windows') {
|
||||
if (['windows', 'mac'].includes(context.platform.name)) {
|
||||
cp.execFileSync(
|
||||
'bash',
|
||||
['./node_modules/.bin/electron-rebuild', '--types', 'dev', '--arch', context.arch],
|
||||
'npx',
|
||||
['electron-rebuild', '--types', 'dev', '--arch', context.arch],
|
||||
);
|
||||
rimraf.sync('generated');
|
||||
cp.execFileSync(
|
||||
'bash',
|
||||
['./node_modules/.bin/webpack'],
|
||||
'npx',
|
||||
['webpack'],
|
||||
{
|
||||
env: {
|
||||
...process.env,
|
||||
|
||||
@@ -187,16 +187,16 @@ function prepareDrive(drive: Drive) {
|
||||
if (drive instanceof sdk.sourceDestination.BlockDevice) {
|
||||
// @ts-ignore (BlockDevice.drive is private)
|
||||
return drive.drive;
|
||||
} else if (drive instanceof sdk.sourceDestination.UsbbootDrive) {
|
||||
// This is a workaround etcher expecting a device string and a size
|
||||
} else if (
|
||||
drive instanceof sdk.sourceDestination.UsbbootDrive ||
|
||||
drive instanceof sdk.sourceDestination.UsbBBbootDrive
|
||||
) {
|
||||
// This is a workaround etcher expecting a device string
|
||||
// @ts-ignore
|
||||
drive.device = drive.usbDevice.portId;
|
||||
drive.size = null;
|
||||
// @ts-ignore
|
||||
drive.progress = 0;
|
||||
drive.disabled = true;
|
||||
const debouncedUpdateDriveProgress = _.throttle(updateDriveProgress, 100);
|
||||
drive.on('progress', (progress) => {
|
||||
updateDriveProgress(drive, progress);
|
||||
debouncedUpdateDriveProgress(drive, progress);
|
||||
});
|
||||
return drive;
|
||||
} else if (drive instanceof sdk.sourceDestination.DriverlessDevice) {
|
||||
@@ -266,7 +266,9 @@ function removeDrive(drive: Drive) {
|
||||
}
|
||||
|
||||
function updateDriveProgress(
|
||||
drive: sdk.sourceDestination.UsbbootDrive,
|
||||
drive:
|
||||
| sdk.sourceDestination.UsbbootDrive
|
||||
| sdk.sourceDestination.UsbBBbootDrive,
|
||||
progress: number,
|
||||
) {
|
||||
const drives = getDrives();
|
||||
|
||||
@@ -26,7 +26,10 @@ const adapters: sdk.scanner.adapters.Adapter[] = [
|
||||
// Can't use permissions.isElevated() here as it returns a promise and we need to set
|
||||
// module.exports = scanner right now.
|
||||
if (platform !== 'linux' || geteuid() === 0) {
|
||||
adapters.push(new sdk.scanner.adapters.UsbbootDeviceAdapter());
|
||||
adapters.push(
|
||||
new sdk.scanner.adapters.UsbbootDeviceAdapter(),
|
||||
new sdk.scanner.adapters.UsbBBbootDeviceAdapter(),
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
4101
npm-shrinkwrap.json
generated
4101
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@@ -46,6 +46,14 @@
|
||||
"author": "Balena Inc. <hello@etcher.io>",
|
||||
"license": "Apache-2.0",
|
||||
"platformSpecificDependencies": [
|
||||
"xmlbuilder",
|
||||
"xmldom",
|
||||
"@types/plist",
|
||||
"@types/verror",
|
||||
"crc",
|
||||
"iconv-corefoundation",
|
||||
"plist",
|
||||
"dmg-license",
|
||||
"fsevents",
|
||||
"winusb-driver-generator"
|
||||
],
|
||||
@@ -66,6 +74,7 @@
|
||||
"@types/terser-webpack-plugin": "^5.0.2",
|
||||
"@types/tmp": "^0.2.0",
|
||||
"@types/webpack-node-externals": "^2.5.0",
|
||||
"aws4-axios": "2.2.1",
|
||||
"chai": "^4.2.0",
|
||||
"copy-webpack-plugin": "^7.0.0",
|
||||
"css-loader": "^5.0.1",
|
||||
@@ -77,7 +86,7 @@
|
||||
"electron-notarize": "^1.0.0",
|
||||
"electron-rebuild": "^2.3.2",
|
||||
"electron-updater": "^4.3.5",
|
||||
"etcher-sdk": "^6.1.1",
|
||||
"etcher-sdk": "^6.2.0-beagle-bone-1e75cbc18fa680df8ca0647a145d2d9fd55570b0",
|
||||
"file-loader": "^6.2.0",
|
||||
"husky": "^4.2.5",
|
||||
"immutable": "^3.8.1",
|
||||
@@ -99,7 +108,7 @@
|
||||
"semver": "^7.3.2",
|
||||
"simple-progress-webpack-plugin": "^1.1.2",
|
||||
"sinon": "^9.0.2",
|
||||
"spectron": "^11.0.0",
|
||||
"spectron": "^13.0.0",
|
||||
"string-replace-loader": "^3.0.1",
|
||||
"styled-components": "^5.1.0",
|
||||
"sudo-prompt": "github:zvin/sudo-prompt#7cdede2f0da28fbcc2db48402d7d935f3a825c91",
|
||||
|
||||
@@ -29,6 +29,10 @@ const SHRINKWRAP_FILENAME = path.join(__dirname, '..', 'npm-shrinkwrap.json');
|
||||
async function main() {
|
||||
try {
|
||||
const cleaned = omit(shrinkwrap, packageInfo.platformSpecificDependencies);
|
||||
for (const item of Object.values(cleaned.dependencies)) {
|
||||
// @ts-ignore
|
||||
item.dev = true;
|
||||
}
|
||||
await writeFileAsync(
|
||||
SHRINKWRAP_FILENAME,
|
||||
JSON.stringify(cleaned, null, JSON_INDENT),
|
||||
|
||||
Submodule scripts/resin updated: 214ddc7e3d...fff07d303b
@@ -68,6 +68,8 @@ function renameNodeModules(resourcePath: string) {
|
||||
path
|
||||
.relative(__dirname, resourcePath)
|
||||
.replace('node_modules', 'modules')
|
||||
// use the same name on all architectures so electron-builder can build a universal dmg on mac
|
||||
.replace(LZMA_BINDINGS_FOLDER, 'binding')
|
||||
// file-loader expects posix paths, even on Windows
|
||||
.replace(/\\/g, '/')
|
||||
);
|
||||
@@ -190,12 +192,7 @@ const commonConfig = {
|
||||
// remove node-pre-gyp magic from lzma-native
|
||||
{
|
||||
search: 'require(binding_path)',
|
||||
replace: () => {
|
||||
return `require('./${path.posix.join(
|
||||
LZMA_BINDINGS_FOLDER,
|
||||
'lzma_native.node',
|
||||
)}')`;
|
||||
},
|
||||
replace: `require('./${LZMA_BINDINGS_FOLDER}/lzma_native.node')`,
|
||||
},
|
||||
// use regular stream module instead of readable-stream
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user