[wpkg-users] Just running one package at each run

simplesi siwalters at hotmail.com
Sat Nov 14 11:30:28 CET 2009



David Abilleira wrote:
> 
> Perhaps you could make a couple of simple scripts:
> · One that writes today's date on a registry key
> · One that checks that registry key to see if matches today's date
> 
> You can add *the first as a <install> command to all* installation tasks ,
> and the second as a <install> command to the tasks you want to stop if
> other
> package was installed already today. If that second install cmd returns a
> not sucessfull exit code, installation of that package will fail.
> 

Great idea and it helped me come up with another method :)
All we need is for WPKG to end execution early once its processed one
package.
I added the code marked +++ to the addSettingsNode function and it seems to
do the job very nicely

function addSettingsNode(packageNode, saveImmediately) {
...
	if (success && saveImmediately) {
		saveSettings();
+++		dinfo("Package Execute Parameter: '" + getPackageExecute(packageNode) +
"'");
+++		if (getPackageExecute(packageNode) != "always") {
+++			dinfo("Ending this run early");
+++			WScript.Quit(0);
+++		}
	}

I'm not sure whether this is the best way to code it and it needs a
parameter check adding but it seems to do the job very simply.

regards

Simon





-- 
View this message in context: http://old.nabble.com/Just-running-one-package-at-each-run-tp26306054p26348879.html
Sent from the WPKG - Users mailing list archive at Nabble.com.




More information about the wpkg-users mailing list