summary refs log tree commit diff stats
path: root/win32
AgeCommit message (Expand)Author
2017-06-13build: Replace Autotools with MesonPatrick Griffis
2016-12-23win32: Update Python to 3.6tomek
2016-12-10Bump version to 2.12.4tomek
2016-11-09Convert doat to an internal commandPatrick Griffis
2016-10-22Bump version to 2.12.3tomek
2016-10-09Bump version to 2.12.2tomek
2016-07-02win32: Update Python to 2.7.12 and 3.5.2tomek
2016-07-02win32: Download redist for Perl if neededPatrick Griffis
2016-06-05Bump version to 2.12.1-2tomek
2016-05-01Bump version to 2.12.1tomek
2016-04-27installer project needs to depend on lua plugin project.Arnavion
2016-04-26win32: Install doat by defaultPatrick Griffis
2016-04-09win32: Reflect lua path changes in gtk-win32Patrick Griffis
2016-04-07win32: Install lgi with lua pluginPatrick Griffis
2016-04-03lua: Build on win32Patrick Griffis
2016-03-28installer: Use https for Python downloadsPatrick Griffis
2016-03-12Bump version to 2.12.0tomek
2016-03-11Updated location of GTK theme engines in 2.24.30.Arnavion
2016-03-06win32: Update Python to 3.5tomek
2015-11-26installer: Fixed VS2015 CRT DLL name.Arnavion
2015-10-12win32: Fix installertomek
2015-10-11win32: Update Visual Studio 2015 redist links in installertomek
2015-10-11win32: Add Windows 10 ID to manifesttomek
2015-10-10Use VS 2015Arnavion
2015-03-15Switch from mozilla-build to msys2.Arnavion
2015-03-08libenchant_win8 needs to depend on common to be able to use config.hArnavion
2015-02-27Remove unused win32 filesTingPing
2015-02-22Don't install spelling dicts if win8+TingPing
2015-02-21Fixed installer not actually bundling libenchant_win8.dll because it wasn't m...Arnavion
2015-02-21Win8+ native spell checking requires compiling with Win8 target.Arnavion
2015-02-21Add support for native win8+ spell checkingTingPing
2015-02-12win32: Use WinSparkle for handling updatesTingPing
2015-02-11Better project files.Arnavion
2015-02-11win32: Use https for installer downloadsTingPing
2015-02-04Implement windows 8.1+ notificationsTingPing
2014-12-28Remove option to disable ipv6TingPing
2014-12-17More consistently include config.hTingPing
2014-12-02Add missing dependencies for glib's g_spawn on windowsIvan
2014-11-25Bump updater version to 2.10.2TingPing
2014-07-28Stupid github editor adding newlinesTingPing
2014-07-28Bump updater version on WindowsTingPing
2014-07-19win32: Update Python linksTingPing
2014-07-19win32: Don't allow installing on VistaTingPing
2014-06-27win32: Silent installer improvementsTingPing
2014-06-25win32: Use theme shipped with gtkTingPing
2014-06-13We don't ship DNS as a plugin anymoreBerke Viktor
2014-06-13Fix GTK+ bundle licenses missing from installerBerke Viktor
2014-06-04win32: Fix path in installer projectTingPing
2014-06-04win32: Use config.h instead of config-win32.hTingPing
2014-06-03win32: Don't auto-generate version.txtTingPing
"cp">#include <ctype.h> #include <pci/pci.h> #include <glib.h> #include "sysinfo.h" static struct pci_filter filter; /* Device filter */ static struct pci_access *pacc; int bus, dev, func; /* Location of the card */ struct device { struct device *next; struct pci_dev *dev; unsigned int config_cnt; u8 config[256]; }; static struct device *first_dev; static struct device *scan_device(struct pci_dev *p) { int how_much = 64; struct device *d; if (!pci_filter_match(&filter, p)) return NULL; d = g_new0 (struct device, 1); d->dev = p; if (!pci_read_block(p, 0, d->config, how_much)) exit(1); if (how_much < 128 && (d->config[PCI_HEADER_TYPE] & 0x7f) == PCI_HEADER_TYPE_CARDBUS) { /* For cardbus bridges, we need to fetch 64 bytes more to get the full standard header... */ if (!pci_read_block(p, 64, d->config+64, 64)) exit(1); how_much = 128; } d->config_cnt = how_much; pci_setup_cache(p, d->config, d->config_cnt); pci_fill_info(p, PCI_FILL_IDENT); return d; } static void scan_devices(void) { struct device *d; struct pci_dev *p; pci_scan_bus(pacc); for(p=pacc->devices; p; p=p->next) { if ((d = scan_device(p))) { d->next = first_dev; first_dev = d; } } } static u16 get_conf_word(struct device *d, unsigned int pos) { return d->config[pos] | (d->config[pos+1] << 8); } int pci_find_by_class(u16 *class, char *vendor, char *device) { struct device *d; struct pci_dev *p; int nomatch = 1; pacc = pci_alloc(); pci_filter_init(pacc, &filter); pci_init(pacc); scan_devices(); for(d=first_dev; d; d=d->next) { p = d->dev; /* Acquire vendor & device ID if the class matches */ if(get_conf_word(d, PCI_CLASS_DEVICE) == *class) { nomatch = 0; g_snprintf(vendor,7,"%04x",p->vendor_id); g_snprintf(device,7,"%04x",p->device_id); break; } } pci_cleanup(pacc); return nomatch; } void pci_find_fullname(char *fullname, char *vendor, char *device) { char buffer[bsize]; char vendorname[bsize/2] = ""; char devicename[bsize/2] = ""; char *position; int cardfound = 0; FILE *fp; if (!sysinfo_get_str_pref ("pciids", buffer)) strcpy (buffer, DEFAULT_PCIIDS); fp = fopen (buffer, "r"); if(fp == NULL) { g_snprintf(fullname, bsize, "%s:%s", vendor, device); //sysinfo_print_error ("pci.ids file not found! You might want to adjust your pciids setting with /SYSINFO SET pciids (you can query its current value with /SYSINFO LIST).\n"); return; } while(fgets(buffer, bsize, fp) != NULL) { if (!isspace(buffer[0]) && strstr(buffer, vendor) != NULL) { position = strstr(buffer, vendor); position += 6; strncpy(vendorname, position, bsize/2); position = strstr(vendorname, "\n"); *(position) = '\0'; break; } } while(fgets(buffer, bsize, fp) != NULL) { if(strstr(buffer, device) != NULL) { position = strstr(buffer, device); position += 6; strncpy(devicename, position, bsize/2); position = strstr(devicename, " ("); if (position == NULL) position = strstr(devicename, "\n"); *(position) = '\0'; cardfound = 1; break; } } if (cardfound == 1) g_snprintf(fullname, bsize, "%s %s", vendorname, devicename); else g_snprintf(fullname, bsize, "%s:%s", vendor, device); fclose(fp); }