blackbox-log-viewer icon indicating copy to clipboard operation
blackbox-log-viewer copied to clipboard

NWjs versioning depending on OS

Open nerdCopter opened this issue 1 year ago • 19 comments

  • NWjs versioning depending on OS; this is not preferred, but maybe necessary
  • fixes https://github.com/betaflight/blackbox-log-viewer/issues/696
  • proof-of-concept; DRAFT while in discussion/consideration
  • this PR will re-test historical failure of GitHub action for NWjs 0.72.0
  • win32 was not part of the issue, but added it as such is known to work.

nerdCopter avatar Jan 31 '24 20:01 nerdCopter

Seems to be still using 0.83 for osx:

image

haslinghuis avatar Jan 31 '24 20:01 haslinghuis

Yeah - working again - no 504

image

haslinghuis avatar Jan 31 '24 20:01 haslinghuis

  • i don't like this solution; however, it seems to work.
  • NW.js and ffmpeg may be un-syncronized with this.
  • @ctzsnooze , can you test the executable-package created by this PR?

nerdCopter avatar Jan 31 '24 20:01 nerdCopter

Do you want to test this code? Here you have an automated build: Betaflight-Blackbox-Explorer-Linux Betaflight-Blackbox-Explorer-macOS Betaflight-Blackbox-Explorer-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jan 31 '24 20:01 github-actions[bot]

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jan 31 '24 20:01 sonarqubecloud[bot]

One issue might be with the ffmpeg libraries - not sure if we could retrieve the exact OSX version used - so to minimize impact of this change only applying to older versions.

haslinghuis avatar Jan 31 '24 20:01 haslinghuis

Maybe https://www.npmjs.com/package/get-osx-version

haslinghuis avatar Jan 31 '24 20:01 haslinghuis

Do you want to test this code? Here you have an automated build: Betaflight-Blackbox-Explorer-Linux Betaflight-Blackbox-Explorer-macOS Betaflight-Blackbox-Explorer-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jan 31 '24 20:01 github-actions[bot]

i found some issue with any logic for when using gulpfile to retrieve the OS version (kernel). it is built on modern OSX (kernel), therefore will still choose modern NWjs, and thusly not be backward compatible. i tried os.release().startsWith('1') , where kernel is 1x.x.x for any OSX 10.x. kernel 2x.x.x for any OSX 11.x

nerdCopter avatar Jan 31 '24 20:01 nerdCopter

Can we have a macOSDeprecated strategy in the workflow matrix?

https://github.com/betaflight/blackbox-log-viewer/blob/a11ed062a2c9b851b8fcefaf511bd1309f5f11a6/.github/workflows/ci.yml#L16-L33

haslinghuis avatar Jan 31 '24 21:01 haslinghuis

But guess soon we won't be able to do so:

image

haslinghuis avatar Jan 31 '24 21:01 haslinghuis

the future is now :smile: :frowning_face:

nerdCopter avatar Jan 31 '24 21:01 nerdCopter

saw some NWjs issue tracker comments alluding to custom universal packages , but this is just more effort / maintenance :(

finding some more stuff. maybe [only] a newer nw-builder is required: https://github.com/nwutils/nw-builder/pull/783 basically this https://github.com/nwjs/nw.js/issues/8009 lead me down a rabbit-hole.

nerdCopter avatar Jan 31 '24 21:01 nerdCopter

Solves the problem on my older Mac. So long as newer Macs are OK, I'm happy! Thank you!

ctzsnooze avatar Feb 04 '24 20:02 ctzsnooze

looks and works as usual, no problems noticed. MacBook Air M2 13.6" 512/16 GB, macOS Sonoma 14.3

Do you want to test this code? Here you have an automated build: Betaflight-Blackbox-Explorer-macOS WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

ikherty avatar Feb 11 '24 07:02 ikherty

@ikherty did you also test ffmpeg part?

haslinghuis avatar Feb 11 '24 23:02 haslinghuis

@ikherty did you also test ffmpeg part?

oh, sorry, I didn't try to play the video file. now I tried to open it, but the app closes immediately after selecting the file. I tried with different files, the behaviour is the same..

ikherty avatar Feb 12 '24 04:02 ikherty

thank you @ikherty . sorry @haslinghuis @ctzsnooze , i don't know a way to import different ffmpeg versions depending on NWjs version :frowning_face: .

maybe a BASH script at build-time :frowning_face: .

nerdCopter avatar Feb 14 '24 15:02 nerdCopter

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

github-actions[bot] avatar Mar 16 '24 04:03 github-actions[bot]

Pull request closed automatically as inactive.

github-actions[bot] avatar Mar 24 '24 04:03 github-actions[bot]