On Thu, 14 Sep 2006 11:19:51 +0200
Jouke Rensma <[EMAIL PROTECTED]> wrote:
> This patch solves the problem! The main source is now updated when
> clicking the OK button in the project options. While the default
> setting for UseVersionInfo is false, it is not needed to update the
> main source on project creation.
Thanks. Applied.
> Outstanding todo's:
> - wrap the {$R ...} in {IFDEF} {ENDIF}. Can
> CodeToolBoss.AddResourceDirective handle this somehow?
Not yet.
> - verify which os's can use VersionInfo: win32 does, but what about
> wince, win64?
I leave this question for the windows experts.
> - when you don't want to include VersionInfo anymore, the {$R...}
> line should be deleted from the main source. Is there something like
> CodeToolBoss.DeleteResourceDirective?
Not yet.
I will add this soon. We are currently preparing lazarus 0.9.18.
Mattias
>
> Jouke
>
>
> Mattias Gaertner writes:
>
> > On Wed, 13 Sep 2006 20:54:05 +0200
> > Jouke Rensma <[EMAIL PROTECTED]> wrote:
> >
> >> Mattias,
> >>
> >> When you use the VersionInfo for the first time, the main source is
> >> not updated with a $R <projectname>.res} line. The code as it is
> >> now, updates this using the codetools. However, this happens after
> >> all files have been saved for compilation. This results in that
> >> main source is updated, but the compiler uses the file from disk
> >> without the updated line.
> >>
> >> Saving the file can be easily done using TCodeBuffer.SaveToFile.
> >> However this does not reset the modified flag. Result will be that
> >> lazarus asks to save the file, while the file on disk is already up
> >> to date.
> >>
> >> I searched trough the codetools, but could not find out how to
> >> solve this problem. What should I use???
> >
> > The $R should be added, when the project is created or the version
> > info is enabled (when clicking the ok button of the project
> > options). Not on build and not on saving project.
> >
> > BTW,
> > How do you make sure, that the $R is only used under windows?
> > If you create a project under windows with version info and compile
> > it under linux, the same source must compile without changing the
> > source. With {$IFDEF MSWindows}{$R projectname.res}{$ENDIF} ?
> >
> >
> > Mattias
> >
> > _________________________________________________________________
> > To unsubscribe: mail [EMAIL PROTECTED] with
> > "unsubscribe" as the Subject
> > archives at http://www.lazarus.freepascal.org/mailarchives
>
>
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives