what code gets over-written exactly?

Started by Paul Breen, July 26, 2010, 07:52:47 PM

Previous topic - Next topic

Paul Breen

Hello:
I don't know where to put this question so it can be moved if it belongs somewhere else.
Now, I know the files prefixed with CODEGEN are made by fire fly, but I can edit those files and firefly does not overwrite my changes. At least not the changes I have made. Since there are no code tokens to delimit code sections, like pbforms uses, is there some way to know what will be overwritten in these files?
thanks,
pb

Brian Chirgwin


CODEGEN_ files get regenerated from FF. You don't want to modify them as the modifications will be lost.

There is the ability to add a User tool to FF that will execute just before compilation where you can have an tool (exe) modify the files before compilation.

Why you would want to modify the CODEGEN files? Just modify the source files in FF.




Paul Breen

I was experimenting with version control, (fossil) and trying various scenarios for restoring a project that had been changed. If I restore a codegen file it does no good if fire fly does not look at it? So, in other words, I am trying to figure out what files need to be checked into version control and what does not. The bottom line here is that codegen files are an output from fire fly and I want to restore the input to fire fly.
thanks,
Pb

Wilko Verweij

Quote from: Brian Chirgwin on July 26, 2010, 08:26:59 PM
There is the ability to add a User tool to FF that will execute just before compilation where you can have an tool (exe) modify the files before compilation.
This is new information for me. Where can I find this option?
Wilko

Cho Sing Kum

Quote from: Paul Breen on July 26, 2010, 07:52:47 PM
...
Since there are no code tokens to delimit code sections, like pbforms uses, is there some way to know what will be overwritten in these files?
...

All the CODEGEN files will be overwritten in their entirety. After they are compiled by PB, they are disposable. This is by design.

Notice that you can choose to "Delete generated code after compile" in Project Properties. If enabled, this will delete all CODEGEN files after compiled.

CODEGEN files should not be used for version control.

Cho Sing Kum

Quote from: Paul Breen on July 26, 2010, 08:47:48 PM
...
So, in other words, I am trying to figure out what files need to be checked into version control and what does not. The bottom line here is that codegen files are an output from fire fly and I want to restore the input to fire fly.
...

All the files in the forms, images, modules folders plus any dependencies in the release folder.

Paul Breen

ok, I have some place to start. This is not as easy as a single file pbedit-pbforms project, but doable. I think I need some utility programs that will detect new files (suppose I create a new form etc) and then execute fossil with a generated bat file. I could launch them using the 'tool' launch before compile idea. Time for console compiler to come to the rescue.

I will commit all files that DO NOT have the CODEGEN prefix in the file name, for now.

thanks,
PB