Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » SysInfo package
SysInfo package [message #28247] Wed, 25 August 2010 09:19 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Ho Koldo,

I added an ifdef PLATFORM_POSIX to your package, it didn't compile otherwise on my ubuntu 10.

Ciao

Max
Re: SysInfo package [message #28255 is a reply to message #28247] Wed, 25 August 2010 11:07 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
mdelfede wrote on Wed, 25 August 2010 09:19

Ho Koldo,

I added an ifdef PLATFORM_POSIX to your package, it didn't compile otherwise on my ubuntu 10.

Ciao

Max


Hello Massimo

Thank you Smile.

Where did you include it?


Best regards
Iñaki

[Updated on: Wed, 25 August 2010 11:38]

Report message to a moderator

Re: SysInfo package [message #28268 is a reply to message #28255] Wed, 25 August 2010 13:33 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
#if defined(PLATFORM_WIN32) <------- HERE, IIRC....
bool GetMemoryInfo(
	int &memoryLoad, 			// percent of memory in use		
	uint64 &totalPhys, 			// physical memory				
	uint64 &freePhys, 			// free physical memory			
	uint64 &totalPageFile,		// total paging file			
	uint64 &freePageFile,		// free paging file				
	uint64 &totalVirtual,		// total virtual memory			
	uint64 &freeVirtual)		// free virtual memory			
{
	MEMORYSTATUSEX status;	
	status.dwLength = sizeof (status);
	if (!GlobalMemoryStatusEx(&status))
		return false;
	memoryLoad          = status.dwMemoryLoad;
	totalPhys			= status.ullTotalPhys;
	freePhys			= status.ullAvailPhys;
	totalPageFile		= status.ullTotalPageFile;
	freePageFile		= status.ullAvailPageFile;
	totalVirtual		= status.ullTotalVirtual;
	freeVirtual	    	= status.ullAvailVirtual;
	
	return true;
}
#endif


IIRC the place is the one above. Compiler was complaining about missing MEMORYSTATUSEX.
I guess it can be combined with previous flag, mine was just a quick addition.

Ciao

Max
Re: SysInfo package [message #28276 is a reply to message #28268] Wed, 25 August 2010 14:37 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
You are right Smile.

Best regards
Iñaki
Re: SysInfo package [message #34684 is a reply to message #28268] Tue, 06 December 2011 02:20 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Koldo,

When I run GetSystemInfo and GetBiosInfo I get the following results:

manufacturer = System manufacturer
productName = System Product Name
version = System Version
numProc = 12
mbSerial = MS1C8CBKF617632

biosVersion = 1003
biosSerial = System Serial Number

So it is useful to me as I am just looking fro stuff to hash and so the mb serial number is great. However, it looks like most of this stuff is not really working. When I run CPUID I get ASUS, P6T deluxe v2.

I am running Windows 7 x64 and compiling with MSC10 and MSC10x64.

I am about to upgrade my UPP to latest release.

Nick

EDIT: I've updated to the latest release and now Functions4U is stopping SysInfo from working. Not sure why SysInfo is in the Bazaar as it seems pretty essential to me. Does anyone have a fix for this please? Under 3211 I could do what I needed but now, even after fixing several glitches I appear to have broken code which is not mine although it is true that usually these errors end up being something I have done Very Happy .


[Updated on: Tue, 06 December 2011 21:58]

Report message to a moderator

Re: SysInfo package [message #34705 is a reply to message #34684] Tue, 06 December 2011 22:41 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello nixnixnix

I cannot use a W7-64 bits and now I have not found problems in these packages.

Could you please debug the code to see if there is something strange?



Best regards
Iñaki
Re: SysInfo package [message #34706 is a reply to message #34705] Tue, 06 December 2011 22:45 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Koldo,

I can't debug it if I can't build it or am I missing something?

I am gonna build it on Vista x64 and come back with results.

(my strange CtrlFrame build error went away by copying my code into Ubuntu, getting rid of all the weirdness in there and then copying it back into Windows but am not sure that will help me here).
Re: SysInfo package [message #34707 is a reply to message #34706] Tue, 06 December 2011 23:07 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Koldo,

When I try to build on Ubuntu 11.04 64bit I get the following error

SysInfo.cpp
/home/nick/upp/bazaar/SysInfo/SysInfo.cpp:43:35: fatal error: X11/extensions/XTest.h: No such file or directory
Re: SysInfo package [message #34708 is a reply to message #34707] Tue, 06 December 2011 23:27 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello nixnixnix

This because the package requires XTest Linux package to be included.

(It is commented here http://www.ultimatepp.org/srcimp$SysInfo$SysInfo$en-us.html)


Best regards
Iñaki
Re: SysInfo package [message #34711 is a reply to message #34708] Wed, 07 December 2011 00:23 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
OK cool! - will check that out.

I just compiled using MSC10 under windows Vista x64 and got the same errors as with Windows 7.

Anything else I can try?

Nick
Previous Topic: Squirrel - the programming language
Next Topic: sysinfo gets error
Goto Forum:
  


Current Time: Thu Mar 28 09:58:48 CET 2024

Total time taken to generate the page: 0.01022 seconds