Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Windows #1

Closed
jaypipes opened this issue Aug 31, 2018 · 8 comments
Closed

Support for Windows #1

jaypipes opened this issue Aug 31, 2018 · 8 comments
Labels
Milestone

Comments

@jaypipes
Copy link
Owner

Since ghw is a Linux-centric library (for now at least) and the pcidb library originated from ghw, there is no support for pcidb on Windows.

This should be a relatively easy problem to solve. Just need to figure out where Windows stores its local copies of the pciids database files and if not, download them from the Internet at known locations.

@jaypipes jaypipes added this to the 0.2 milestone Aug 31, 2018
@jaypipes
Copy link
Owner Author

Doesn't seem like Windows has a local pciids database file cache. So, we'll need to download a copy of https://pci-ids.ucw.cz/v2.2/pci.ids.gz to a cache folder in Windows, gunzip it and use that.

@charles-dawes
Copy link

I threw together a quick script that scrapes that list and saves it to the filesystem on Win10. I tested it using some of the code from the current library and it seems to work with the scraped file. I'm no good at this whole GitHub thing so I'm not sure how to get that to you.

@jaypipes
Copy link
Owner Author

No worries @charles-dawes, I'll probably have something up for you to test out later tonight or this weekend. I'll give you instructions for how to pull the code and test it.

@charles-dawes
Copy link

https://github.com/charles-dawes/pcidb/blob/master/pci_list_windows.go If this is at all useful to you, feel free to use it.

jaypipes added a commit that referenced this issue Sep 2, 2018
Adds support for non-Linux operating systems. When we don't find a local
copy of the pci.ids database file, we instead fetch a gzipped copy from
the network, store it in $HOMEDIR/.cache/pci.ids and parse that cached
file.

Closes Issue #1
@jaypipes
Copy link
Owner Author

jaypipes commented Sep 2, 2018

OK, @charles-dawes, I believe I've got this working for Windows (and any non-Linux platform) with this pull request:

#2

Can you pull the code to your Windows host and see if all is OK now?

@jaypipes
Copy link
Owner Author

This was done with PR #2.

@jaypipes
Copy link
Owner Author

Currently playing around with Travis building on a Windows build env... re-opening and will close when that is all gating master.

@jaypipes jaypipes reopened this Oct 21, 2018
@jaypipes
Copy link
Owner Author

OK, with PR #7 we're now gating on Windows and Linux. :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants