Skip to content

Commit 730d92c

Browse files
authored
Merge pull request #12 from RecordEvolution/ironflock
Support for .flock / IronFlock rebranding
2 parents 01977cd + b495d34 commit 730d92c

32 files changed

Lines changed: 276 additions & 94 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
dist
44
out
55
*.log*
6+
.DS_Store

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Reflasher
1+
# FlockFlasher
22

33
All you need to debug the application is:
44

@@ -16,7 +16,7 @@ The machine itself should do the rest.
1616

1717
On Github, it should automatically create a release entry in the list with the latest version string.
1818

19-
[Releases](https://github.com/RecordEvolution/Reflasher/releases)
19+
[Releases](https://github.com/RecordEvolution/FlockFlasher/releases)
2020

2121
Before putting the release public, make sure that all releases have been pushed for all devices.
2222

@@ -29,19 +29,19 @@ In other words, you have to manually stitch both files together as follows:
2929
```
3030
version: 2.0.3
3131
files:
32-
- url: Reflasher-2.0.3-mac.zip
32+
- url: FlockFlasher-2.0.3-mac.zip
3333
sha512: pfNijx9AZuFEzN7/UTDhoKlKeG72A+c3EdGoBE+X6fyn7nO1ZO8McNcZFaExbO0RhN+svnqF6JrWPenIKEfdSQ==
3434
size: 133448877
35-
- url: Reflasher-2.0.3-arm64-mac.zip
35+
- url: FlockFlasher-2.0.3-arm64-mac.zip
3636
sha512: 8XOTrqvnGfmM1V9MAivyQ9BPbWyqtkTQ16pZAzSCRUwgLTtRswJZJ0cHIqYw1+6+yRWFdIgQXt1cu6YWkUpWzg==
3737
size: 128751915
38-
- url: reflasher-x64.dmg
38+
- url: flockflasher-x64.dmg
3939
sha512: b9XzDuF/+c3JCA/LLFciLUqyOw12xHmh0vZkZpvS6V8GCzFmz1maEXOkBYAYv9YQLcxhGaM0aMMVuQNiWHgjGg==
4040
size: 138481744
41-
- url: reflasher-arm64.dmg
41+
- url: flockflasher-arm64.dmg
4242
sha512: jFZIxhz615EI2autjm4wnKOLGZchSKNOd3zmlRMFXdQjFEIZz6C8szgzjlYyzCfYH5hPOc+EQgbDVPIOla3Zew==
4343
size: 133845710
44-
path: Reflasher-2.0.3-mac.zip
44+
path: FlockFlasher-2.0.3-mac.zip
4545
sha512: pfNijx9AZuFEzN7/UTDhoKlKeG72A+c3EdGoBE+X6fyn7nO1ZO8McNcZFaExbO0RhN+svnqF6JrWPenIKEfdSQ==
4646
releaseDate: '2024-01-10T13:54:20.948Z'
4747
```
@@ -58,15 +58,15 @@ After that, the `npm run release` process will automatically notarize the app fo
5858

5959
## EtcherSDK
6060

61-
Reflasher uses the etcher-sdk to flash and mount drives.
61+
FlockFlasher uses the etcher-sdk to flash and mount drives.
6262

6363
The `etcher-sdk` requires root permissions to access drives and flash drives.
6464

65-
In the current build for MacOS and Linux, we must spawn a subprocess within the Reflasher that gets elevated.
65+
In the current build for MacOS and Linux, we must spawn a subprocess within the FlockFlasher that gets elevated.
6666

6767
The easiest way to do that is to spawn a root process using sudo. This process will be a node process that runs the `etcher-sdk` code.
6868

69-
To do so, we create an external JavaScript script that uses the `etcher-sdk`. This script needs to point to the node_modules that are contained within the application (for production). To do so, we point to the compressed (ASAR) node_modules [in the code](https://github.com/RecordEvolution/Reflasher/blob/3400ca34a438af2653ee1dfc364cd3f066cdc7fd/src/main/api/flash.ts#L121).
69+
To do so, we create an external JavaScript script that uses the `etcher-sdk`. This script needs to point to the node_modules that are contained within the application (for production). To do so, we point to the compressed (ASAR) node_modules [in the code](https://github.com/RecordEvolution/FlockFlasher/blob/3400ca34a438af2653ee1dfc364cd3f066cdc7fd/src/main/api/flash.ts#L121).
7070

7171

7272
To learn more about the compressed ASAR package: https://www.electronjs.org/docs/latest/tutorial/asar-archives
@@ -76,22 +76,22 @@ Since we don't want to rely on the user having the `node` binary installed, we c
7676

7777
The electron binary can be accessed on `process.execPath` within the application and can be put into 'node mode' using the `ELECTRON_RUN_AS_NODE` environment variable.
7878

79-
Since we spawn a subprocess, we need to be able to read back the flashing progress of this subprocess. To do so, we print the progress data to the stdout in JSON string, which is then read and parsed in the frontend. ([Line in code](https://github.com/RecordEvolution/Reflasher/blob/3400ca34a438af2653ee1dfc364cd3f066cdc7fd/src/main/api/flash.ts#L154))
79+
Since we spawn a subprocess, we need to be able to read back the flashing progress of this subprocess. To do so, we print the progress data to the stdout in JSON string, which is then read and parsed in the frontend. ([Line in code](https://github.com/RecordEvolution/FlockFlasher/blob/3400ca34a438af2653ee1dfc364cd3f066cdc7fd/src/main/api/flash.ts#L154))
8080

8181

8282
### Windows
8383

8484
In order to access the USB drives in Windows, the `etcher-sdk` must include the `winusb-driver-generator` package. When running the `npm i` command on Windows, it will automatically and temporarily add this package using the `scripts/windows.js` script.
8585

86-
In order for Gulp to be able to build the Reflasher on Windows, it must compile the underlying winusb driver.
86+
In order for Gulp to be able to build FlockFlasher on Windows, it must compile the underlying winusb driver.
8787

8888
Before you can do this, you must have the [Windows Driver Kit](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk) (WDK) installed.
8989

9090
There's a known issue where the `WDF redistributable co-installers don't work`, which is required in order to build the windows usb driver. Solutions can be found [here](https://learn.microsoft.com/en-us/windows-hardware/drivers/wdk-known-issues).
9191

9292
### AppImages (Linux)
9393

94-
For AppImages, it is sadly not straightforward to access the packaged node_modules within the application. Since the AppImage is technically a drive, we must first mount it to a temporary folder ([link to code](https://github.com/RecordEvolution/Reflasher/blob/3400ca34a438af2653ee1dfc364cd3f066cdc7fd/src/main/api/permissions.ts#L169)) and then access the packaged node modules within.
94+
For AppImages, it is sadly not straightforward to access the packaged node_modules within the application. Since the AppImage is technically a drive, we must first mount it to a temporary folder ([link to code](https://github.com/RecordEvolution/FlockFlasher/blob/3400ca34a438af2653ee1dfc364cd3f066cdc7fd/src/main/api/permissions.ts#L169)) and then access the packaged node modules within.
9595

9696

9797
## Electron / Vue

build/icon.icns

-162 KB
Binary file not shown.

build/icon.ico

-105 KB
Binary file not shown.

build/icon.png

-8.34 KB
Loading

dev-app-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
provider: github
22
owner: RecordEvolution
3-
repo: Reflasher
4-
updaterCacheDirName: reflasher-updater
3+
repo: FlockFlasher
4+
updaterCacheDirName: flockflasher-updater

electron-builder.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
appId: com.recordevolution.reflasher
2-
productName: Reflasher
1+
appId: com.recordevolution.flockflasher
2+
productName: FlockFlasher
33
afterSign: './scripts/notarize.js'
44
directories:
55
buildResources: build
@@ -13,13 +13,13 @@ files:
1313
asarUnpack:
1414
- resources/**
1515
win:
16-
executableName: Reflasher
16+
executableName: FlockFlasher
1717
requestedExecutionLevel: requireAdministrator
1818
publish:
1919
provider: github
2020
owner: RecordEvolution
21-
repo: Reflasher
22-
updaterCacheDirName: reflasher-updater
21+
repo: FlockFlasher
22+
updaterCacheDirName: flockflasher-updater
2323
nsis:
2424
artifactName: ${name}-setup.${ext}
2525
shortcutName: ${productName}
@@ -38,8 +38,8 @@ mac:
3838
publish:
3939
provider: github
4040
owner: RecordEvolution
41-
repo: Reflasher
42-
updaterCacheDirName: reflasher-updater
41+
repo: FlockFlasher
42+
updaterCacheDirName: flockflasher-updater
4343
dmg:
4444
artifactName: ${name}-${arch}.${ext}
4545
linux:
@@ -48,16 +48,24 @@ linux:
4848
publish:
4949
provider: github
5050
owner: RecordEvolution
51-
repo: Reflasher
52-
updaterCacheDirName: reflasher-updater
51+
repo: FlockFlasher
52+
updaterCacheDirName: flockflasher-updater
5353
appImage:
5454
artifactName: ${name}.${ext}
5555
npmRebuild: false
5656
protocols:
57+
- name: ironflock-protocol
58+
schemes:
59+
- flock
5760
- name: reswarm-protocol
5861
schemes:
5962
- reswarm
6063
fileAssociations:
64+
- ext: flock
65+
description: IronFlock Device File
66+
icon: src/assets/icons/icon.icns
67+
mimeType: text/x-reswarm
68+
role: Viewer
6169
- ext: reswarm
6270
description: Reswarm Device File
6371
icon: src/assets/icons/icon.icns

package-lock.json

Lines changed: 37 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "reflasher",
3-
"version": "2.0.3",
2+
"name": "flockflasher",
3+
"version": "2.1.0",
44
"description": "An efficient, modern and reliable flashing tool for IoT applications",
55
"author": "Record Evolution GmbH",
66
"publisher": "Record Evolution GmbH",
@@ -19,7 +19,8 @@
1919
"release": "electron-builder",
2020
"build": "npm run typecheck && electron-vite build",
2121
"build:win": "npm run build && electron-builder --win --config",
22-
"build:mac": "npm run build && electron-builder --mac --config",
22+
"build:mac": "npm run build && electron-builder --mac --config --x64",
23+
"build:macm1": "npm run build && electron-builder --mac --config",
2324
"build:linux": "npm run build && electron-builder --linux --config"
2425
},
2526
"dependencies": {

resources/icon.png

-17.4 KB
Loading

0 commit comments

Comments
 (0)