jaypipes / pcidb

Small golang library for querying PCI database (pciids) information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Windows

jaypipes opened this issue · comments

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.

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.

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.

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.

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.

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?

This was done with PR #2.

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

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