and yet another patch :)
as a respond to feature request #1507433,
http://sourceforge.net/tracker/index.php?func=detail&aid=1507433&group_id=22049&atid=373088
this patch adds a new command line parameter to makensis, that allows the user to set the compiler's process priority.
usage:
makensis /Px [other commands] file.nsi
where x can be one of the following:
0 - idle priority
1 - below normal (defaults to "idle" on windows 95/98/nt)
2 - normal
3 - above normal (defaults to "high" on windows 95/98/nt)
4 - high
5 - realtime (also outputs a warning)
for more information see these articles at msdn:
GetCurrentProcess function reference:
http://msdn2.microsoft.com/en-us/library/ms683179.aspx
SetPriorityClass function reference (and possible classes):
http://msdn2.microsoft.com/en-us/library/ms686219.aspx
patch notes:
* attached cvs patch file is against nsis cvs version from january 18, 2007 and affects makenssi.cpp only
* the patch adds the command line parameter and command line help string, but no line to the nsis help file.
Logged In: YES
user_id=584402
Originator: NO
Cool, thanks!
Can you add a menu item that sets this to MakeNSISw as well? I think it'd also be nice if you'd be able to pass the priorities by name and not only number.
A couple other things:
* The usage line is too long. It breaks and the second line is not indented.
* It should validate the numbers. Currently, it doesn't say anything if the number is invalid.
* Not something too important, but it would be nicer to have a table with the priorities, their matching number and a fallback priority for 9x instead of if-else-if-else-if-else...
Logged In: YES
user_id=970495
Originator: YES
* Can you add a menu item that sets this to MakeNSISw as well?
i'll try.
* I think it'd also be nice if you'd be able to pass the priorities by name and not only
number.
this is what i wanted to implement at first:
/PRIORITY idle/normal/high/...
then i had a look at /Vx and made it similar to this one :)
deal: if YOU change /Vx to support named aliases (error, script, info, ...) I'LL change /Px accordingly ;)
* The usage line is too long. It breaks and the second line is not
indented.
correct. but how to make it shorter? or rather break it by hand and indent it in the code?
* It should validate the numbers. Currently, it doesn't say anything if
the number is invalid.
correct, fixed, see updated attachment. :)
* Not something too important, but it would be nicer to have a table with
the priorities, their matching number and a fallback priority for 9x
instead of if-else-if-else-if-else...
of course it would be... :)
File Added: makensis_process_priority.patch
Logged In: YES
user_id=970495
Originator: YES
added documentation file patch.
removed "updated" patch file, as its erroneous.
File Added: process_priority_documentation.patch
patch for usage.but
Logged In: YES
user_id=584402
Originator: NO
Thanks, applied with some fixes. Namely, SetPriorityClass returns FALSE on faliure and not TRUE, the usage line breaking and the priority table.
Logged In: YES
user_id=584402
Originator: NO
Forgot to mention a patch for makensisw menu for this would be nice to have.
Logged In: YES
user_id=970495
Originator: YES
of course it would be ;)
and i worked on it.
but it seems to be a bit more difficult than i thought at first, so i stopped it for now.
maybe i'll work on it later, but if anyone else would do it, i'd appreciate it :)
what about the original makensisw contributors? ;)