CrewTimer Video Review is built using Electron, and specificlly the Electron React Boilerplate Project.
See the VSCode plugins suggested here.
Node version 18 or later is recommended.
- Visual Studio Code is the recommended IDE for editing code for this repo. If you don't have it installed, please do that first.
- The nvm node version manager is recommended to manage node versions. Node.js which includes npm is required for local development.
- Source code utilizes git. If you are unfamiliar with git, the Atlassian Sourcetree program provides a nice GUI as does Github Desktop.
nvm install 18
nvm use 18
nvm alias default v18
npm i -g node-gyp@latest
npm i -g yarn
npm i -g ts-node
git clone git@github.com:crewtimer/crewtimer-video-review.git
yarn install
yarn start
If the build fails with a node-gyp error, be sure node-gyp is installed globally.
The crewtimer_video_reader native module contains pre-built binaries for mac and win targets. If this repo is private, a github token is required to retrieve the pre-built binaries.
- Obtain your github token
- Add it to ~/.prebuild-installrc
- e.g.
token=ghp_8bh6rSO2EhGf3nVCgY4GrEvs1dqd324
- For firebase, edit webpack.config.renderer.dev.dll.ts and modify renderer field
entry: { renderer: Object.keys(dependencies || {}).filter((it) => it !== 'firebase'), },
. See stackoverflow for issue it resolves. - In resolve: section of , add
fallback: { path: require.resolve('path-browserify'), },
to make path available from the renderer.
A native module is used to read mp4 files from storage using the ffmpeg and opencv libraries. This code is prebuilt and stored on github.
To make updates to the native code, see Instructions for the native video reader. Access to both windows and Mac is required. Parallels Desktop on Mac works well as a windows VM.
Starting from VSCode seems broke. Try this command line
yarn "start:main" "--inspect=5858" "--remote-debugging-port=9223"
Open dev window with releases code:
yarn cross-env DEBUG_PROD=true yarn package
See also the Electron React Boilerplate page.
- CrewTimer.db No longer correct: C:\Users\glenne\AppData\Local\Programs\crewtimer-fl-connector\CrewTimer.db
- Images and assets C:\Users\glenne\AppData\Local\Programs\crewtimer-fl-connector\resources\assets
- config.json C:\Users\glenne\AppData\Roaming\CrewTimer Video Reviewor\config.json
- CrewTimer.db '/Users/glenne/Library/Application Support/Electron/CrewTimer.db'
- config.json debug: '/Users/glenne//Library/Application Support/Electron/config.json'
- config.json installed: '/Users/glenne//Library/Application Support/crewtimer-fl-connector/config.json'
- Edit release/app/package.json and adjust version info
- Execute
yarn macbuild && yarn winbuild
- Look in release/ for the dmg and exe files
- Copy the dmg and exe to a Releases set on github
- Blank screen at startup? Check to make sure packagse were added top level package.json
- Speedsoft Time Sync
- Use Meinberg NTP
In order to install apps downloaded outside the app store without diving into security exception settings, apps must be signed and notarized. This process takes several minutes as the binary must be uploaded to Apple to get notarized. To disable notariztion during development, set "notarize" : "false"
in the build.mac section of package.json
Requirements for signing:
- A 'Developer ID Application' signing identity certificate as well as it's associated private key to be in the keychain.
- Signing credentials with app specific password stored in the keychain.
You can verify you have a valid signing identity with command below. It should list a key such as "Developer ID Application: Entazza LLC (P87Q63DNL4)".
security find-identity -v -p codesigning
Once you have obtained an app specific password from your developer account, store it into the keychain with this command:
xcrun notarytool store-credentials "crewtimer-app-signing" --apple-id "glenne@engel.org" --team-id P87Q63DNL4 --password app-specific-passord-hash
Signing is configured by setting the env variable APPLE_KEYCHAIN_PROFILE to the name of the profile in the keychain that has the credentials. See macPackager.js and notarize for other options.
If notarization fails, add console.log info to macPackager.js.
Note: As of 12/2024 the notarize.js script in .erb/scripts is not utilized.