Archive: Minimum Requirements Dialog


Minimum Requirements Dialog
I've been trying to figure out how to do RAM checks and hard disk checks followed by displaying a dialog detailing the failure to meet minimum requirements if they are not met. First off, so far I've only found one way to check RAM which is
System::Alloc 32
Pop $1
System::Call "Kernel32::GlobalMemoryStatus(i) v (r1)"
System::Call "*$1(&i4 .r2, &i4 .r3, &i4 .r4, &i4 .r5, \
&i4 .r6, &i4.r7, &i4 .r8, &i4 .r9)"
System::Free $1
DetailPrint "Structure size (useless): $2 Bytes"
DetailPrint "Memory load: $3%"
DetailPrint "Total physical memory: $4 Bytes"
DetailPrint "Free physical memory: $5 Bytes"
DetailPrint "Total page file: $6 Bytes"
DetailPrint "Free page file: $7 Bytes"
DetailPrint "Total virtual: $8 Bytes"
DetailPrint "Free virtual: $9 Bytes"

Does NSIS really not have a cleaner way to check this? I've also seen the CPUDesc plug-in at http://nsis.sourceforge.net/CPUDesc_plug-in but am a bit cautious of consuming plugins not in the core product.

The free disk space checking at http://nsis.sourceforge.net/FreeDiskSpace is fine for disk space.

My REAL question is, what is the best way to display a failure to meet minimum requirements? I don't see such a dialog in http://nsis.sourceforge.net/Docs/Mod...02/Readme.html. I need one that is translated and all that jazz. Anyone know of an existing min req check failed dialog?

Also, sorry if this has already been asked. Searching the forums for minimum requirements always seems to get me to Winamp minimum requirements or shoutcast.


There is a plugin called HwInfo (http://nsis.sourceforge.net/HwInfo_plug-in) which is described as

excellent for running a hardware check before installing files and comparing the results against the requirements for running you're program. If the results are below you're spec you can display a warning message or take other appropriate action..
A forum search for "HwInfo" found the original thread about this plugin: http://forums.winamp.com/showthread.php?threadid=139639

There are some screenshots in that thread - the screenshot called 'hardwarecheck.jpg' seems to be the sort of thing you are looking for.

Most of the plugins listed in the wiki come with source code so you can, at least in theory, check the plugin code before using it.