Skip to content

Conversation

@gonX
Copy link
Member

@gonX gonX commented Sep 30, 2023

Closes #2744
Supersedes #2819

Pre-PR diagnostics on Linux:

  "OperatingSystem": {
    "Platform": 4,
    "ServicePack": "",
    "Version": "6.5.5.273",
    "VersionString": "Unix 6.5.5.273"
  }

See #2944 (comment) for updated changes

Post-PR diagnostics on Arch Linux removed

All os-release pairs are added, except for a (small) key blacklist (currently LOGO and ANSI_COLOR) as well as any key containing URL.

On non-Linux there is a very small (likely wanted) side-effect of having the Platform field be correctly stringified - previously it would post e.g. "Platform": 4 but now it posts "Platform": "Unix"

Code or naming is probably messy, reviews are very welcome in those areas.

@gonX gonX added desktop OpenTabletDriver.Desktop library, UX and Daemon use this as the core implementation. linux/gtk Affects the Linux platform enhancement New feature or request labels Sep 30, 2023
Copy link
Contributor

@vedxyz vedxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've intended to make a PR for the parent issue several times but still haven't gotten around to it. I would've liked to say I can help with the stuff I've left reviews for here, but not trusting myself on that currently.

@gonX gonX force-pushed the better-linux-OS-info-in-diags branch from a85c362 to 083ba5e Compare October 2, 2023 12:45
@gonX
Copy link
Member Author

gonX commented Oct 2, 2023

I sadly had to butcher the history (a lot of overlapping changes), but thanks for the review @vedxyz

Copy link
Contributor

@vedxyz vedxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just two small style suggestions.


I'm still of the same opinion as my earlier comment regarding dictionary vs class, but no biggie. @X9VoiD said he might have another look anyway so he might go for it if he sees fit.

Co-authored-by: Ved <dev@vedat.xyz>
@gonX
Copy link
Member Author

gonX commented Oct 2, 2023

I'm still of the same opinion as my earlier comment regarding dictionary vs class, but no biggie. @X9VoiD said he might have another look anyway so he might go for it if he sees fit.

There is nothing particularly interesting in the OperatingSystem struct at the moment, so I see no need to complicate the class with a serialization function.

@X9VoiD
Copy link
Member

X9VoiD commented Oct 17, 2023

Pushed commits to this PR. It looks like this now on Linux:

  "OperatingSystem": {
    "Name": "Fedora Linux",
    "Version": "38 (Workstation Edition)",
    "Attributes": {
      "ID": "fedora",
      "VERSION_ID": "38",
      "VERSION_CODENAME": "",
      "PRETTY_NAME": "Fedora Linux 38 (Workstation Edition)",
      "SUPPORT_END": "2024-05-14",
      "VARIANT": "Workstation Edition",
      "VARIANT_ID": "workstation",
      "KERNEL_VERSION": "6.4.12-200.fc38.x86_64"
    }
  },

and this on Windows:

  "OperatingSystem": {
    "Name": "Win32NT",
    "Version": "10.0.22621.0",
    "Attributes": {
      "ServicePack": ""
    }
  },

@X9VoiD X9VoiD merged commit da914a1 into OpenTabletDriver:master Oct 17, 2023
@gonX gonX deleted the better-linux-OS-info-in-diags branch October 17, 2023 19:43
@X9VoiD X9VoiD added the needs-backport PR or its features needs to be backported to stable branch label Dec 10, 2023
@X9VoiD X9VoiD removed the needs-backport PR or its features needs to be backported to stable branch label Dec 10, 2023
@gonX gonX added the backport-added A backport is already merged label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-added A backport is already merged desktop OpenTabletDriver.Desktop library, UX and Daemon use this as the core implementation. enhancement New feature or request linux/gtk Affects the Linux platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Linux distribution info to exported diagnostics

3 participants