CrewTimer FinishLynx Connect is built using Electron, and specificlly the Electron React Boilerplate Project.
See the VSCode plugins suggested here.
MacOS can build for all targets - mac, win, linux
To build native libs (sqlite3) a recent version of npm is needed.
These versions are known to work together:
node 14.17.0 npm 6.14.13 node-gyp 9.1.0
- Run
nvm ls-remote --lts
and pick a version. e.g. 15.11.0 - Install
nvm install 15.11.0
- Use it
nvm use 15.11.0
- Make it default
nvm alias default v15.11.0
- Update node-gyp
npm i -g node-gyp@latest"
. Required to build sqlite3. - Some report needing this:
npm config set node_gyp "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
- Add sqlite3 to release/app/package.json instead of top level.
cd release/app && npm i --save sqlite3
- 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.
Update Node 18 fails when building native support. Node 16 is currently working and has several workarounds in place:
- Added an explicity dependency forcing of "isbinaryfile": "4.0.8" in resolutions section of package.json.
- Manually create src/node_modules symbolic link to release/app/node_modules in postinstall script. This should be done as one of the build automation steps but for some reason is not.
node 16 is known to work. node 18 may be problematic. Try one or the other if issues.
# Verify using npm 16. 18 does not work
npm --version
# Clone the repo
git clone git@github.com:crewtimer/crewtimer-fl-connect.git
# Build
cd crewtimer-fl-connect
yarn install
# Run
yarn start
To create a notarized macos build, create a .env file with the following contents. Do not commit this file to the repo
APPLE_ID=glenne@engel.org
APPLE_APP_SPECIFIC_PASSWORD=xxxx-xxxx-xxxx-xxxx
TEAM_ID=P<snip>4
If the build fails with a node-gyp error, be sure node-gyp is installed globally.
If the run fails with 'cannot locate sqlite', remove the src/node_modules symbolic link and yarn install
again.
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 FinishLynx Connector\config.json
- CrewTimer.db '/Users/glenne/Library/Application Support/Electron/CrewTimer.db'
FL connects via TCP/IP to the CrewTimer FL Connect app. When running with parallels the scoreboard must be provided with the IP address where CrewTimer FL Connect is running.
- Find the macOS IP Address for the Parallels container. Issue
ifconfig
and look for the IP address associated with the vnic1 interface. E.g. 10.37.129.2. This will be used within FinishLynx. - Run FinishLynx within Parallels and configure a scoreboard with the IP address found in the prior step.
- Run CrewTimer FL Connect on macOS:
npm start
- Go to File|Options|General and set the Hardware Type = None.
- Set Camera Settings -> Input -> Wired Sensor = Open if not using a start sensor.
- Go to LapTime options and click New.
- Restart FL
- Edit release/app/package.json and src/renderer/Nav.tsx and adjust version info
- Execute
npm run winbuild
- Look in release/ for the exe file
- Copy the exe to the 'CrewTimer Installers' google drive folder.
- Make a copy of the installer and rename it without a version:
CrewTimerConnect Setup.exe
.
- Blank screen at startup? Check to make sure packagse were added top level package.json
- Speedsoft Time Sync
- Use Meinberg NTP