Commit Graph

77 Commits

Author SHA1 Message Date
Patrick Griffis e9b9ff9f38 Various fixes for mingw 2018-03-09 18:23:25 +00:00
Patrick Griffis 228e08543a build: Force pkg-config lookup method for libpci
This is some meson bug but this solution works for now.
2017-11-18 21:29:56 -05:00
Patrick Griffis 38f8cc8e0c sysinfo: Fix libpci detection
For some reason on my system `libpci` is found even though its not
installed...? Plus I forgot a few headers being included.
2017-11-18 21:06:21 -05:00
Patrick Griffis 3e53635dfb sysinfo: Make libpci an optional dependency 2017-11-18 20:47:32 -05:00
Patrick Griffis 47b653cc7c sysinfo: Avoid libpci crash when pci not available
Turns out libpci is an awful library that on any error calls
exit() and has no way of indicating an error otherwise...
2017-11-18 00:22:48 -05:00
Patrick Griffis 99e16110bc sysinfo: Simplify finding pci.ids file on Unix
There is probably no reason to make this user configurable just
get the correct one at build time...
2017-06-20 16:26:28 -04:00
Patrick Griffis 628100c19f build: Replace Autotools with Meson
Quick rundown of benefits:

- Much faster:
  - Autotools (with autogen): 22 seconds
  - Meson: 7 seconds
  - Meson (with ccache): 2 seconds

- Simpler:
  - ~1000 lines smaller
  - Single simple language

- Potentially better Windows (Visual Studio) support

What is not done:

- Complete Windows support
- OSX support (easy)

Closes #2013
Closes #1937
Closes #1803
2017-06-13 23:54:51 -04:00
Lance Poore 92496b183e sysinfo: Lower priority of make.conf for distro name
This is used elsewhere other than Gentoo so it is a rather
unreliable check compared to lsb-release.
2017-04-28 07:44:55 -04:00
Mihai Moldovan 65abf5c532 sysinfo: fixup 49758cafba. (#1827)
MAC_OS_X_VERSION_MAX_ALLOWED reflects the currently running OS X version
more closely than MAC_OS_X_VERSION_MIN_REQUIRED, given it's defined as
max(current_version, MAC_OS_X_VERSION_MIN_REQUIRED).

Additionally, we should check if MAC_OS_X_VERSION_10_9 is actually
defined, otherwise the whole macro logic breaks apart.
2016-09-30 01:23:59 -04:00
Rainer Müller c79ce843f4 build: Reorder includes to avoid installed plugin header
When hexchat is already installed into a non-default prefix, a new build
could pick up ${prefix}/include/hexchat-plugin.h from the installed
version instead of the local header, as configuration variables such as
$(GLIB_CFLAGS) would point to -I${prefix}/include.

Reordering the includes and moving -I arguments to CPPFLAGS prevents
this, as it ensures the local directories are always searched first.

This was no problem when compiling for /usr or /usr/local as these
directories in the compiler search path are always searched last.

Closes #1822
2016-09-26 19:16:42 -04:00
Mihai Moldovan 49758cafba sysinfo: fix compilation on OS X 10.9 and lower. (#1821)
Use the (deprecated) Gestalt functionality for fetching the fine-grained
OS X version number on 10.9 and lower.

The newer NSOperatingSystemVersion structure is only available on
10.10+.
2016-09-25 23:49:56 -07:00
Patrick Griffis 737f87fa16 sysinfo: Fix leak 2016-09-03 12:29:01 -04:00
Patrick Griffis 4658c5d4e5 sysinfo: Don't print swap if 0 2016-09-03 12:24:15 -04:00
Patrick Griffis ed029357d1 sysinfo: Clean up ifdefs and handle unsupported CPU
Mentioned in #1624
2016-03-06 23:10:04 -05:00
Arnavion 7f1ee9dad0 common: Moved some functions over from plugins/sysinfo that are useful for the rest of HC.
OS name, CPU, GPU, HDD info and build arch are now all available within core HC. OS name and build arch are used in the About dialog.
2015-10-12 19:20:53 +02:00
Arnavion f7e3d3f32c Use VS 2015 2015-10-10 16:14:12 -07:00
TingPing e313a82ab4 sysinfo: Strip trailing space on video card 2015-03-20 05:38:22 -04:00
TingPing 7e7e87600e More type issues/warnings 2015-02-21 21:01:14 -05:00
TingPing c36d4859d7 Fix type mismatch 2015-02-21 20:52:43 -05:00
Arnavion c1d06c7d63 Fixed cast warning, use of uninitialized buffer and whitespace. 2015-02-21 17:28:56 -08:00
TingPing 5e3355a6c3 Unify sysinfo plugins and add osx support
This does remove the net* commands from the
Unix version that may return at a later date
with OSX and Windows support.

This commit also makes numerious other changes
such as code cleanup, reformatting, etc.

Closes #829
2015-02-21 20:09:15 -05:00
Arnavion 9858784eb6 Better project files.
- Output directly to rel\ instead of to bin\ and then copying files over.
- Deduped Win32 vs x64 configs
- Moved some common properties to hexchat.props
- All build intermediates (except htm's intermediates) are no longer emitted in the source directory
2015-02-11 10:01:29 -08:00
Arnavion 5a87d814cf Call CoInitialize, CoInitializeSecurity and CoUninitialize from the main process, not from a DLL.
They're process-level functions and aren't meant to be called from DLLs. CoInitSecurity in particular fails with RPC_E_TOO_LATE even if no other call to CoCreateInstance has been made yet.

Fixes sysinfo's WMI calls on Windows 8.1 and above.
2015-02-10 22:14:22 -08:00
Arnavion dc9a7d3a59 sysinfo: Fix braindead logic for stripping spaces from the end of the OS name. 2015-01-31 21:29:10 -08:00
Arnavion 9968bb31a4 sysinfo: Strip spaces from the end of the OS name, if any, and ensure a space between name and arch. 2015-01-31 00:52:30 -08:00
Arnavion 62df565190 sysinfo: Also show HDD information. 2015-01-05 03:57:59 -08:00
Arnavion 4f08b0b386 sysinfo: Don't confuse build architecture with CPU architecture. 2015-01-04 16:54:15 -08:00
Arnavion 5b8cc683f3 sysinfo: Refactored out individual WMI parsing methods. 2015-01-04 15:08:45 -08:00
Arnavion e758da5d28 Bring the sysinfo plugin to the 21st century.
- Support multiple CPUs and graphics adapters in the WMI responses.
- Query max CPU frequency from WMI instead of registry.
- Support uptimes longer than 50 days.
- Don't report using /ME in notice and server notice tabs.
- Convert to C
2015-01-03 15:26:05 -08:00
TingPing 95febd978c Fix building as c89 2014-12-28 06:47:23 -05:00
TingPing 3f855f07f5 Use glib for allocations in all plugins
Continuation of 83032b1aa
2014-12-28 06:47:07 -05:00
TingPing aeb5d15871 More consistently include config.h 2014-12-17 18:21:10 -05:00
TingPing 0e4164ad0c configure: Improve various build flags
- Store openssl flags in own vars
- Share some common flags for plugins
- Fix building plugins on win32
- Store all glib flags in one var
- Don't link against every lib for each plugin
- Don't hardcode ldflags for sysinfo
2014-12-15 11:07:46 -05:00
TingPing a537fa3ca7 sysinfo: Simplify remove_leading_whitespace()
Also fixes a possible overflow
2014-12-11 14:17:12 -05:00
TingPing 72f82d096c Fix some warnings in xsys
- Remove unused code
- Fix leak
2014-12-11 10:05:05 -05:00
Campbell Barton f83d78dd28 Warning cleanup
- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)

Closes #1064
2014-11-02 14:41:20 -05:00
Arnavion e8fb2dde56 Fixed instances of hexchat_printf that unsafely used a string parameter as a format string.
Fixes #1153
2014-09-25 00:54:38 -07:00
Max Zerzouri 231590f71e sysinfo: Use less ambiguous IEC prefixes in storage measurements
Closes #922
2014-04-19 22:49:45 -04:00
TingPing 62735c54fb sysinfo: Fix showing debian version on ubuntu 2013-10-20 21:15:12 -04:00
XhmikosR c226f4089a Fix a few cppcheck warnings.
Use the proper data type in format functions and fix a resource leak.
2013-10-10 00:05:22 -04:00
Alf Gaida cc6de3f665 some Typos causing lintian moaning: {R,r}eciev.. -> {R,r}eceiv.. 2013-10-05 18:26:55 +02:00
Eustachy Kapusta b658fca4a7 Convert project files to vs2013 2013-09-15 15:07:46 -07:00
TingPing b3369a4bc4 Sysinfo: Add announce option 2013-08-26 04:31:45 -04:00
hasufell b5b547abb6 Sysinfo: Fix gentoo detection 2013-08-26 03:58:36 -04:00
Joshua Theze 721a9965aa Fixed munging of whitespace in sysinfo's matching functions
Closes #712
2013-08-12 23:41:37 -04:00
Eustachy Kapusta 715a520c0e Move optimization settings from all subsequent projects to hexchat.props 2013-07-24 20:56:36 +02:00
TingPing 1277b4c30f be more specific about sysinfo menu entry 2013-06-01 19:06:58 -04:00
Richard Hitt 73badc67ff Fix warning from hwmon.c in plugins/sysinfo 2013-05-17 21:51:34 -07:00
Rahat Ahmed be35154376 Added help text for sysinfo plugin. 2013-05-10 23:32:29 -05:00
Christoph J. Thompson 77cad8e716 Don't hardcode "plugins" as the subdirectory for plugins in many
places.

	modified:   config-win32.h
	modified:   configure.ac
	modified:   plugins/checksum/Makefile.am
	modified:   plugins/doat/Makefile.am
	modified:   plugins/fishlim/Makefile.am
	modified:   plugins/perl/Makefile.am
	modified:   plugins/python/Makefile.am
	modified:   plugins/sysinfo/Makefile.am
	modified:   plugins/xdcc/Makefile.am
	modified:   src/common/plugin.c
	modified:   src/fe-text/fe-text.c
2013-04-28 16:42:48 +02:00