Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
796 stars 100 forks source link

Compare semantic versions #1542

Closed felipeerias closed 1 week ago

felipeerias commented 1 week ago

Add a method StringUtils.compareVersions() that compares semantic versions. We assume that versions are defined as integer numbers separated by periods (.), but the method also takes into account empty strings and the possibility that some components can not be parsed as integers.

Use StringUtils.compareVersions() to check the version of the PICO operating system when enabling passthrough.

Tests are included.

javifernandez commented 1 week ago

Hold on, perhaps we should replace the CompareBuildStrings with your new function. There are a few codepaths that depend on the OS version that are being applied incorrectly now.

Nevermind, it's not that simple; we would need something else for the native code.

svillar commented 1 week ago

After #1541 this is no longer needed