Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-16-2003, 04:05 AM
AlexB AlexB is online now
Registered User
 
Join Date: 10-28-2003
Posts: 11
Send a message via ICQ to AlexB
Restore read-only attribute for .rc or .vbp files after set version option

I use "Set the project version..." option in the Version tab for the VisualC and VisualBasic steps.
This feature deletes read-only flag for .rc (VC resource) or .vbp (VisualBasic project) file and set the version.
The problem is that VisualBuild does not restore the read-only flag for these files.

Is there any workaround for this bug?

Last edited by AlexB; 12-16-2003 at 04:09 AM.
Reply With Quote
  #2  
Old 12-16-2003, 03:05 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
That behavior is by design. If the action modifies a file, it leaves it writeable so that it's clear that it has been modified. Typically, you would want to commit the version change to a source control system as part of the automated build, which would also usually set the file back to read-only when checked in / committed.

You can set the file(s) back to read-only manually if necessary via a Run Program step like (this can be copied/pasted into VBP):

<step action='Run Program' type='0'>
<command>%DOSCMD% attrib +r *.rc /s</command>
<description>Recursively sets all .rc files to read-only in the current .bld project dir</description>
<indent type='3'>1</indent>
<name>reset read-only</name>
<outputfrom type='3'>1</outputfrom>
<startin>%PROJDIR%</startin>
</step>
Reply With Quote
  #3  
Old 12-17-2003, 02:20 AM
AlexB AlexB is online now
Registered User
 
Join Date: 10-28-2003
Posts: 11
Send a message via ICQ to AlexB
I can't agree with it.
If I want to commit the version change I have to check the file out before (and delete read-only attribute) and check it in after compilation.

And I can't reset read-only attribute because I don't know if this file was writeable or no before (or I need to save the attribute before).

In my case I don't want to commit version change to source control.

In all cases it is dangerous to modify readonly attribute outside of source control system. Now I get situation when there is writeable checked in file.

IMHO VBP must restore readonly (in other words - doesn't change readonly attribute).
Thanks.
Reply With Quote
  #4  
Old 12-17-2003, 01:41 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-19-2003
Location: Dunedin, New Zealand
Posts: 114
This sounds like a user configuration option in an up comming version.

Even nicer would be a check box in the action's dialog
Reply With Quote
  #5  
Old 01-04-2004, 06:43 AM
AlexB AlexB is online now
Registered User
 
Join Date: 10-28-2003
Posts: 11
Send a message via ICQ to AlexB
So, can you add this CR for the next VBP release?

Thnx.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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:51 AM.


Copyright © 1999-2023 Kinook Software, Inc.