Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-16-2007, 06:52 PM
smckeown smckeown is online now
Registered User
 
Join Date: 05-01-2007
Posts: 18
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
Reply With Quote
  #2  
Old 07-17-2007, 10:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
As long as the project file is made writeable before saving, it will save without any prompting (see attached sample [requires VBP v6]).
Attached Files
File Type: bld save.bld (950 Bytes, 1750 views)
Reply With Quote
  #3  
Old 07-17-2007, 11:33 AM
smckeown smckeown is online now
Registered User
 
Join Date: 05-01-2007
Posts: 18
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
Attached Files
File Type: bld save.bld (1.4 KB, 1598 views)
Reply With Quote
  #4  
Old 07-17-2007, 11:54 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Quote:
Originally posted by smckeown
Thanks for the reply.

The build script sample doesn't work as there is a red X thru the build step.
It requires VBP v6 (v5 is no longer being supported or enhanced).
Reply With Quote
  #5  
Old 07-17-2007, 11:59 AM
smckeown smckeown is online now
Registered User
 
Join Date: 05-01-2007
Posts: 18
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
Reply With Quote
  #6  
Old 07-17-2007, 12:30 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:31 PM.


Copyright © 1999-2023 Kinook Software, Inc.