Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   Restore read-only attribute for .rc or .vbp files after set version option (https://www.kinook.com/Forum/showthread.php?t=268)

AlexB 12-16-2003 04:05 AM

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?

kinook 12-16-2003 03:05 PM

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):


%DOSCMD% attrib +r *.rc /s
Recursively sets all .rc files to read-only in the current .bld project dir
1
reset read-only
1
%PROJDIR%

AlexB 12-17-2003 02:20 AM

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.

pjaquiery 12-17-2003 01:41 PM

This sounds like a user configuration option in an up comming version.

Even nicer would be a check box in the action's dialog

AlexB 01-04-2004 06:43 AM

So, can you add this CR for the next VBP release?

Thnx.


All times are GMT -5. The time now is 10:38 AM.


Copyright © 1999-2023 Kinook Software, Inc.