IPB

Welcome Guest ( Log In | Register )

Recommended
BootDisk.com

Active Users

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
[Solved] Winbuilder does not refresh the values from script.project
ctmag
post Oct 6 2008, 07:04 AM
Post #1


Advanced Member
***

Group: .script developer
Posts: 364
Thank(s): 14
Joined: 19-May 08
Member No.: 15,320


Germany


Hi all,

As vistape can use different sourcetypes (WAIK downloaded from the web, Server2008 downloaded from the web and a local Vista DVD) I want to use a script that can download the needed files and then sets the source folder depending on the users selection.
(I know this is not the way WB normally does it, but i found it easier to have all possible options with explaination in a script, as the user is used to work with the script interfaces, rather than directing the user to the Source tab and ask him to select the right folder...)

This already works fine, but:

Winbuilder does not refresh the values from script.project ([Main] SourceDir="Z:\vista32de-sp1") during build, so i can not set a sourcedir depending on the user selection in a script that is executed during the build process.

When i found that, i thought about saving the user selection to the project file when setting it (with a save button), but WB also does not refresh the script.project values when starting the build.

They are only refreshed when i
  • close and restart WB
  • click refresh
  • select another script (not sure if this always works)

Can someone come up with any idea how to make wb use the sourcedir that i set in the very first script?

Or at least how to make sure WB uses the correct setting from script.project when a new build is started?

Or could one of the developers add something like "System,refreshproject" to make something like this work?


Thanks for all ideas...
Go to the top of the page
 
+Quote Post
Lancelot
post Oct 6 2008, 08:16 AM
Post #2


Bug Catcher
***

Group: Advanced user
Posts: 675
Thank(s): 48
Joined: 8-May 08
Member No.: 15,072


Turkey


I dont use vistape project, but here is an idea (as far as i understand):

With LiveXP, thanks to galapo (IMG:../forums/style_emoticons/default/cool.gif) , we have "Clean Temporary files" button with option "Also delete SourceDir info"
I uncheck "Also delete SourceDir info" option (it is checked default), i dont want to loose my source directory location(s) when i click "Clean Temporary files" button.


Before everybuild, i click "Clean Temporary files" button, which cleans temporary files and restarts winbuilder. As i use different sources from time to time (sp2eng, sp2tr, 2k3sp2eng, 2k3sp2tr, 2k3sp1eng) i can say this button works nice for me (IMG:../forums/style_emoticons/default/smile.gif) Maybe if there not exists sth like that can be added to vistape project too?

http://img513.imageshack.us/img513/7208/snap6dv8.png
Go to the top of the page
 
+Quote Post
The Following 1 Users Say Thank You to Lancelot For This Useful Post:
ctmag
ctmag
post Oct 6 2008, 08:47 AM
Post #3


Advanced Member
***

Group: .script developer
Posts: 364
Thank(s): 14
Joined: 19-May 08
Member No.: 15,320


Germany


thanks, i will take a look at this...
Go to the top of the page
 
+Quote Post
ctmag
post Oct 6 2008, 09:44 AM
Post #4


Advanced Member
***

Group: .script developer
Posts: 364
Thank(s): 14
Joined: 19-May 08
Member No.: 15,320


Germany


Lancelot (Thanks!) pointed me to LiveXP and there i found that the script uses

System,ReScanScripts

This works fine when i want to save my changes with a save button, but it can not be used while building as it restarts WB and so interrupts the buildprocess.

So to make it perfect i am still looking for a way to do the same while building...any ideas?


Go to the top of the page
 
+Quote Post
Galapo
post Oct 6 2008, 09:47 AM
Post #5


Advanced Member
***

Group: .script developer
Posts: 1,783
Thank(s): 86
Joined: 16-July 06
From: Sydney
Member No.: 11


Australia


What about: System,REBUILDVARS.

Regards,
Galapo.
Go to the top of the page
 
+Quote Post
ctmag
post Oct 6 2008, 09:56 AM
Post #6


Advanced Member
***

Group: .script developer
Posts: 364
Thank(s): 14
Joined: 19-May 08
Member No.: 15,320


Germany


From the release notes (as i understand them) this should not work...but i will try anyway...
Go to the top of the page
 
+Quote Post
Nuno Brito
post Oct 6 2008, 12:45 PM
Post #7


Advanced Member
***

Group: .script developer
Posts: 6,137
Thank(s): 127
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


On wb074 you could overwrite this value by changing the variable value on the script.project file.

Peter has introduced a new variable handling system.

Have you already tried a regular SetVar and then use the same command mentioned by Galapo?

This is all very beta - no documentation produced as it might change in the final version.

(IMG:../forums/style_emoticons/default/smile.gif)
Go to the top of the page
 
+Quote Post
ctmag
post Oct 6 2008, 01:27 PM
Post #8


Advanced Member
***

Group: .script developer
Posts: 364
Thank(s): 14
Joined: 19-May 08
Member No.: 15,320


Germany


Thanks Nuno, yes i know it is beta, but for now all that counts is that it works...i will probably do a release based on the beta as about 20 of my scripts will not work with the current stable:-)

I really hope most of the beta changes will stay in, as they are very helpful, some things would not have been possiblem without those changes:-)

I tried again what you suggested and it does not work...
Go to the top of the page
 
+Quote Post
Galapo
post Oct 6 2008, 08:33 PM
Post #9


Advanced Member
***

Group: .script developer
Posts: 1,783
Thank(s): 86
Joined: 16-July 06
From: Sydney
Member No.: 11


Australia


QUOTE (ctmag @ Oct 6 2008, 08:56 PM) *
From the release notes (as i understand them) this should not work...but i will try anyway...


Works for me:

CODE
[Process]
Message,"Var will be set to: 'testing...'",INFORMATION
IniWrite,%projectdir%\script.project,Variables,#$ptest#$p,testing...
Set,%first%,%test%
Message,"Var before REBUILDVARS: %first%",INFORMATION
System,REBUILDVARS
Set,%second%,%test%
Message,"Var before REBUILDVARS: %first%",INFORMATION
IniDelete,%projectdir%\script.project,Variables,#$ptest#$p


Regards,
Galapo.
Go to the top of the page
 
+Quote Post
The Following 1 Users Say Thank You to Galapo For This Useful Post:
ctmag
ctmag
post Oct 7 2008, 07:17 AM
Post #10


Advanced Member
***

Group: .script developer
Posts: 364
Thank(s): 14
Joined: 19-May 08
Member No.: 15,320


Germany


Thanks Galapo !

After playing a bit with you example this (hopefully) fixed my problem...

IniWrite,%projectdir%\script.project,Variables,#$pSourceDir#$p,"Path to selected source"
System,REBUILDVARS

the changed contents of %SourceDir% is vaild for all scripts that run after this..

Now the user no longer has to save his selection, he can just change it in the interface and it will be set during the next build...

Thanks to all for the help!
Go to the top of the page
 
+Quote Post
« Next Oldest · Support and Bug reporting · Next Newest »
 

3 Pages V   1 2 3 >
Fast ReplyReply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

RSS Lo-Fi Version Time is now: 12th October 2008 - 09:06 AM

W3C XHTML • © 2008 Boot Land • All rights reserved • W3C CSS