attrib -r or %(ATTRIB... on a VBP bld file
Hi,
In order to get my nightly builds to run and NOT leave VBP up with the save dialog, the VBP build saves out the bld file. (http://www.kinook.com/Forum/showthre...&threadid=2655) The wrinkle is that often the build scripts are read only at the start of the build. So, I would like to remove the read-only file attribute with the DOS command "attrib -r *.bld". I added the "Run program" step with the dos command and the VBP pro command, but both fail if the scritp is flagged read only. I am using the DOS command %DOSCMD% attrib -r c:\mybuildtest\*.bld I am using the VBP attrib command %ATTRIB(%PROJDIR%\*.bld, R)% BUT... when the file is read only and I test the step from the VBP IDE, the 'save script' dialog is immedialy displayed. (Thi of couse happend when building too.) It appears the VBP before shelling out attempts to save the current script. Since the script is read only, the save fails and the dialog is displayed. Any way to 'turn off' auto save before running a DOS command? Thanks, Sheryl |
1 Attachment(s)
As long as the project file is made writeable before saving, it will save without any prompting (see attached sample [requires VBP v6]).
|
1 Attachment(s)
Thanks for the reply.
The build script sample doesn't work as there is a red X thru the build step. To reproduce what I'm seeing, I modifed the script and have reuploaded it. To reproduce the attrib problem: Test 1 1. At the DOS prompt set the file attributes to Read only. attrib +r save.bld 2. Open the save.bld in VPB 5.7. 3. Left click the step "remove read only flag" 4. Click "Run Selected" 5. See the save dialog. [This save dialog is assocated with the attrib command, not the next save command as we didn't even select the 'save' step to run. Thus the original question.] Interestingly this seems to work: Test 2 1. At the DOS prompt set the file attributes to read only. attrib +r save.bld 2. Open the save.bld in VBP 5.7 3. Left click the stepS "add read only flag" AND "remove read only flag" 4. Click Run Selected 5. The save dialog does not appear (as expected) and the file attributes are changed to read/write. Again, the save dialog from test 1 is assocated with the attrib -r command. -Sheryl |
Quote:
|
Thanks.
Did you try the test script in 5.7 and then 6.0 to see if the steps I use are 'fixed?' Again, the error is a VBP error. I would be interested to know if it is fixed in 6.0 using the steps I have outlined. Thanks, Sheryl |
In v5 or v6, if you have 'Tools | User Options | Build | Save project before building' (this option could be on a different tab in v5, I don't recall) and you modify the project in the GUI and then initiate a build, it is by design that VBP will prompt about saving the file if it is read-only on disk.
The reason for this thread seemed to be regarding nightly builds, which implicitly are started in an automated fashion (i.e., no modifying of the .bld file interactively before starting the build), so I thought the question was in reference to that. |
All times are GMT -5. The time now is 06:17 PM. |
Copyright © 1999-2023 Kinook Software, Inc.