{"id":15007205,"url":"https://github.com/recordevolution/flockflasher","last_synced_at":"2026-03-10T11:31:15.932Z","repository":{"id":215469428,"uuid":"730595762","full_name":"RecordEvolution/FlockFlasher","owner":"RecordEvolution","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T14:39:28.000Z","size":8033,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T14:11:35.916Z","etag":null,"topics":["flashdrive","flashdrive-explorer","installer","iot","linux-distribution","raspberry-pi","sdcard"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RecordEvolution.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-12T09:13:41.000Z","updated_at":"2025-03-26T14:39:32.000Z","dependencies_parsed_at":"2024-06-12T15:29:47.312Z","dependency_job_id":"9ea5aa46-c30b-4dca-a97d-46617353351e","html_url":"https://github.com/RecordEvolution/FlockFlasher","commit_stats":{"total_commits":81,"total_committers":3,"mean_commits":27.0,"dds":0.06172839506172845,"last_synced_commit":"370bcbee1a7e1decdb2e9ab5da8eb63ef3460747"},"previous_names":["recordevolution/reflasher","recordevolution/flockflasher"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecordEvolution%2FFlockFlasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecordEvolution%2FFlockFlasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecordEvolution%2FFlockFlasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecordEvolution%2FFlockFlasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RecordEvolution","download_url":"https://codeload.github.com/RecordEvolution/FlockFlasher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892504,"owners_count":21820648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flashdrive","flashdrive-explorer","installer","iot","linux-distribution","raspberry-pi","sdcard"],"created_at":"2024-09-24T19:05:27.422Z","updated_at":"2026-03-10T11:31:15.879Z","avatar_url":"https://github.com/RecordEvolution.png","language":"TypeScript","readme":"# FlockFlasher\n\nAll you need to debug the application is:\n\n`npm run dev`\n\n## Rolling out a new version\n\nMake sure to replace the version string in the `package.json` and `package-lock.json`.\n\nNext to that, you also need to set your `GH_TOKEN` as an environment variable in the terminal that you wish to release the application. This token can be created from your own Github account; this token gives the application access to your Github account.\n\nAfter that, run `npm run build` followed by `npm run release` on every machine that you wish to create a version on.\n\nThe machine itself should do the rest.\n\nOn Github, it should automatically create a release entry in the list with the latest version string.\n\n[Releases](https://github.com/RecordEvolution/FlockFlasher/releases)\n\nBefore putting the release public, make sure that all releases have been pushed for all devices.\n\n### MacOS  - ! IMPORTANT !\n\nThe electron builder release system currently does NOT support automatically combining the `latest-mac.yml` files when releasing the amd64 AND arm versions.\n\nIn other words, you have to manually stitch both files together as follows:\n\n```\nversion: 2.0.3\nfiles:\n  - url: FlockFlasher-2.0.3-mac.zip\n    sha512: pfNijx9AZuFEzN7/UTDhoKlKeG72A+c3EdGoBE+X6fyn7nO1ZO8McNcZFaExbO0RhN+svnqF6JrWPenIKEfdSQ==\n    size: 133448877\n  - url: FlockFlasher-2.0.3-arm64-mac.zip\n    sha512: 8XOTrqvnGfmM1V9MAivyQ9BPbWyqtkTQ16pZAzSCRUwgLTtRswJZJ0cHIqYw1+6+yRWFdIgQXt1cu6YWkUpWzg==\n    size: 128751915\n  - url: flockflasher-x64.dmg\n    sha512: b9XzDuF/+c3JCA/LLFciLUqyOw12xHmh0vZkZpvS6V8GCzFmz1maEXOkBYAYv9YQLcxhGaM0aMMVuQNiWHgjGg==\n    size: 138481744\n  - url: flockflasher-arm64.dmg\n    sha512: jFZIxhz615EI2autjm4wnKOLGZchSKNOd3zmlRMFXdQjFEIZz6C8szgzjlYyzCfYH5hPOc+EQgbDVPIOla3Zew==\n    size: 133845710\npath: FlockFlasher-2.0.3-mac.zip\nsha512: pfNijx9AZuFEzN7/UTDhoKlKeG72A+c3EdGoBE+X6fyn7nO1ZO8McNcZFaExbO0RhN+svnqF6JrWPenIKEfdSQ==\nreleaseDate: '2024-01-10T13:54:20.948Z'\n```\n\n#### Notarization\n\nIn order to notarize the app for MacOS, you need to have the correct keys installed (see specific laptops).\n\nAfter that, you need to supply a .env file which includes the correct `APPLEID` and `APPLEIDPASS` variables.\n\nThe APPLEID would be the email you use to login, and the APPLEIDPASS is the app-specific password that you can generate on your account. ([How to](https://support.apple.com/en-us/102654))\n\nAfter that, the `npm run release` process will automatically notarize the app for you.\n\n## EtcherSDK\n\nFlockFlasher uses the etcher-sdk to flash and mount drives.\n\nThe `etcher-sdk` requires root permissions to access drives and flash drives.\n\nIn the current build for MacOS and Linux, we must spawn a subprocess within the FlockFlasher that gets elevated.\n\nThe 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.\n\nTo 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).\n\n\nTo learn more about the compressed ASAR package: https://www.electronjs.org/docs/latest/tutorial/asar-archives\n\n\nSince we don't want to rely on the user having the `node` binary installed, we can use the `electron` binary that comes with the application and run that as a node process to spawn an elevated process.\n\nThe 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.\n\nSince 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))\n\n\n### Windows\n\nIn 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.\n\nIn order for Gulp to be able to build FlockFlasher on Windows, it must compile the underlying winusb driver.\n\nBefore 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. This can also be installed as a component during the Visual Studio installation process.\n\nI \n\nThere'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).\n\nInstall python and the Visual Studio Build Tools as well. Install `pip install setuptools`. Also I ended up finding and copying two files into this path:\nC:\\Program Files (x86)\\Windows Kits\\10\\Redist\\wdf\\x64\n\nWdfCoInstaller01011.dll\nwinusbcoinstaller2.dll\n\n\n### AppImages (Linux)\n\nFor 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.\n\n\n## Electron / Vue\n\n### API\n\nElectron uses an RPC API to facilitate communication between frontend and backend tasks. All operations requiring system API calls must be executed on the Electron backend.\n\nTo streamline this process, we have defined a types file (`types/index.ts`) that contains all the RPC endpoints. These endpoints can be called from the frontend and are executed on the backend.\n\nThe RPCs that are executed on the backend are defined in `main/ipcHandlers.ts`, while the frontend RPCs, defined in `preload/index.ts`, simply call the RPCs registered on the backend.\n\n### Store\n\nWe use [Pinia](https://github.com/vuejs/pinia), a straightforward and simple global state management tool, to manage global state in the Vue frontend. Event listeners and backend API calls are made and registered within Pinia. All stores are located in the `renderer/src/store` folder.\n\n### Translations\n\nFor app-wide translations, we utilize the `I18next` internationalization framework. Adding, updating, creating, and deleting translations is as simple as creating or editing a file in the `renderer/locales` folder and then registering the new languages in the `renderer/src/main.ts` file.\n\n### Extra binaries\n\nTo rebuild the `.iso` image, we use the `xorriso` binary. Unfortunately, this binary is not available on macOS and Windows. Therefore, we provide a statically cross-compiled binary for both Windows and Linux.\n\nThese binaries are distributed using the [extraResources](https://www.electron.build/configuration/contents.html#extraresources) property of Electron Builder and are utilized during the flashing process.\n\nYou can find the binaries in the `resources/binaries` folder.\n\n## Important notes:\n\nThe etcher-sdk only works up to electron 19 due to security changes made in electron 20+\n- https://github.com/balena-io/etcher/issues/4087\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecordevolution%2Fflockflasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecordevolution%2Fflockflasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecordevolution%2Fflockflasher/lists"}