ubsicap / sltt-app

0 stars 0 forks source link

feat: release signed win installer for sltt-app with auto-updates #1

Closed ericpyle closed 6 months ago

ericpyle commented 7 months ago
  1. I obtained a UBS csc pfx file from Jeff Klassen, and its csc password.
  2. Then I used the electron-builder environment variables to set CSC_LINK and CSC_KEY_PASSWORD (according to their documentation https://www.electron.build/code-signing
  3. Then I ran yarn build:win in the sltt-electron directory to produce v1.0.3 of the sltt-electron app (which I posted here https://signlanguaget-nfl9249.slack.com/files/U04QB2E53HB/F06TWQT4VV0/sltt-electron-1.0.3-setup.exe):
ubsicap\sltt-electron>yarn build:win
yarn run v1.22.19
warning package.json: No license field
$ npm run build && electron-builder --win --config

> sltt-electron@1.0.3 build
> npm run typecheck && electron-vite build

> sltt-electron@1.0.3 typecheck
> npm run typecheck:node && npm run typecheck:web

> sltt-electron@1.0.3 typecheck:node
> tsc --noEmit -p tsconfig.node.json --composite false

> sltt-electron@1.0.3 typecheck:web
> tsc --noEmit -p tsconfig.web.json --composite false

vite v4.3.3 building for production...
✓ 2 modules transformed.
out/main/index.js  1.48 kB
✓ built in 80ms
vite v4.3.3 building for production...
✓ 1 modules transformed.
out/preload/index.js  0.42 kB
✓ built in 11ms
vite v4.3.3 building for production...
✓ 33 modules transformed.
../../out/renderer/index.html                   0.53 kB
../../out/renderer/assets/icons-6e56aee6.svg    9.10 kB
../../out/renderer/assets/index-3d722ea0.css    3.00 kB
../../out/renderer/assets/index-45827464.js   227.91 kB
✓ built in 464ms
  • loaded configuration  file=C:\Users\ericd\repos\ubsicap\sltt-electron\electron-builder.yml
  • writing effective config  file=dist\builder-effective-config.yaml
  • skipped dependencies rebuild  reason=npmRebuild is set to false
  • packaging       platform=win32 arch=x64 electron=22.3.7 appOutDir=dist\win-unpacked
  • signing         file=dist\win-unpacked\resources\node_modules\ffprobe-static\bin\win32\x64\ffprobe.exe certificateFile=C:\Users\ericd\.sltt-electron\united_bible_societies_association.pfx
  • signing         file=dist\win-unpacked\resources\node_modules\ffmpeg-static\ffmpeg.exe certificateFile=C:\Users\ericd\.sltt-electron\united_bible_societies_association.pfx
  • cannot decode PKCS 12 data using Go pure implementation, openssl will be used  error=pkcs12: unknown digest algorithm: 2.16.840.1.101.3.4.2.1
  • signing         file=dist\win-unpacked\sltt-electron.exe certificateFile=C:\Users\ericd\.sltt-electron\united_bible_societies_association.pfx
  • building        target=nsis file=dist\sltt-electron-1.0.3-setup.exe archs=x64 oneClick=true perMachine=false
  • signing         file=dist\win-unpacked\resources\elevate.exe certificateFile=C:\Users\ericd\.sltt-electron\united_bible_societies_association.pfx
  •   Signing NSIS uninstaller  file=dist\__uninstaller-nsis-sltt-electron.exe certificateFile=C:\Users\ericd\.sltt-electron\united_bible_societies_association.pfx
  • signing         file=dist\sltt-electron-1.0.3-setup.exe certificateFile=C:\Users\ericd\.sltt-electron\united_bible_societies_association.pfx
  • building block map  blockMapFile=dist\sltt-electron-1.0.3-setup.exe.blockmap
Done in 38.53s.
ericpyle commented 7 months ago

See demo video at https://signlanguaget-nfl9249.slack.com/files/U06NXB7SRTL/F06UA5DS9QR/installer_demo.mp4

ericpyle commented 7 months ago

Overall, I made the following changes which can be seen with the comparison of these commits: https://github.com/ubsicap/sltt-app/compare/e0f9fe77be9c3e9a856fef2831c9075c6319977c...078a5d809dbfc2675ef23014e2159594537be135

ericpyle commented 7 months ago

Allison, To test auto-updater:

  1. Install previous release: https://github.com/ubsicap/sltt-app/releases/download/v1.0.15/sltt-app-Setup-1.0.15.exe should say version 2.44.1
  2. Wait until you see a notification that says a new update has been downloaded
  3. Close and restart app and verify at the version 2.45.0

To test offline:

  1. load a project
  2. close down sltt-app
  3. disconnect from internet
  4. open sltt-app
  5. verify that it still loads all the way
weagale commented 6 months ago

@ericpyle @deafjava Please review my testing steps and let me know if they are adequate to pass this to Done....

Testing Steps:

  1. Uninstalled version 1.0.3 from the Control Panel (Eric and I had installed that for the demo video).
  2. Downloaded and installed
  3. Clicked the sltt-app icon to launch > logged in/authenticated.
  4. Resized the browser to see the version number.
  5. Verified version 2.44.1 is on the parentheses after "Sign Language Translation Tool".
  6. Did not wait long enough for update to happen, but Clicked "Sign Out" UNEXPECTEDLY, errors began to happen and at first the desktop icon would not work immediately.
  7. Waited about 30 seconds and the icon restored and launched SLTT again.
  8. Resized the browser to see the version number after "Sign Language Translation Tool". AS EXPECTED, the app has been updated to version 2.46.4
  9. Loaded Project "TESTnm"
  10. Disconnected from the internet AS EXPECTED, I can still navigate through the PORTIONS. THERE is no browser (this is a desktop client/app) so I cannot hit "Refresh" on the browser.
ericpyle commented 6 months ago

@ericpyle @deafjava Please review my testing steps and let me know if they are adequate to pass this to Done....

  1. Disconnected from the internet AS EXPECTED, I can still navigate through the PORTIONS. THERE is no browser (this is a desktop client/app) so I cannot hit "Refresh" on the browser.

Good point: revised steps:

To test offline:

  1. load a project
  2. close down sltt-app
  3. disconnect from internet
  4. open sltt-app
  5. verify that it still loads all the way
ericpyle commented 6 months ago

@weagale wrote "UNEXPECTEDLY, errors began to happen and at first the desktop icon would not work immediately."

I'm not sure what you mean by "errors began to happen". Maybe a screen/video capture would be helpful.

weagale commented 6 months ago

@ericpyle IT seems the errors only happened on the version 2.44.1 and are not repeatable in version 2.46.4. So I think that's ok. I backed up to version 2.44.1 to repeat it:

Working on a video compressed enough to load.

The video was too long to upload but here was the error and it only happended for t he earlier version which Caio implies is fine.

Image

deafjava commented 6 months ago

Unless @ericpyle objects, I think tests should be conducted always on newer versions

weagale commented 6 months ago

Marking Done because it all passes for the later version...

ericpyle commented 6 months ago

Marking Done because it all passes for the later version...

This error should no longer happen after my fix for https://github.com/ubsicap/sltt-app/issues/2

ericpyle commented 6 months ago

Unless @ericpyle objects, I think tests should be conducted always on newer versions

I agree in general, however, the testing steps for this, did involve an older version so she could test the auto-update to new version worked. Fortunately, I think the latest version should not have this issue since we're only launching one version of the compressor. It does remind me however, that existing users who have a separate installed compressor may try to run that compressor alongside the sltt-app, in which case we'll encounter this error again. So, I should probably change the port number for the sltt-app so that it is separate from the old compressor install.

ericpyle commented 6 months ago

Created https://github.com/ubsicap/sltt-app/issues/4 to address the conflicting port