See also below. I don't have very much time available, so I hope you don't expect it to be ready in the very near future.... Jouke Mattias Gaertner writes:
On Thu, 02 Feb 2006 09:41:51 +0100
"Jouke Rensma" <[EMAIL PROTECTED]> wrote:
Thanks for the positive reactions!
As I said in my initial mail, I have some things already setup and
working. For this I kept things as much as possible the way they are.
Right now I have a routine that checks for existance of <project>.rc and
if it finds one, it updates the versionInfo (auto incrementing the build number). Next it calls windres via a tprocess. I hooked the routine in immedialtely after DoSaveForBuild (main.pp).
Where I'm stuck right now is two things:
- I need the check the main program code, toe see if the "{$R <project>.rex}"

Do you mean {$R *.res} ?

Yes, I mean *.res. Sorry for my typos. Maybe I should read back what I typed before hitting the send button??? :-)
sentence is already there and if not add it. I can read/write to the .lpr file directly offcourse, but I'm sure there is a better way, but how???

I will add a function to the codetools. Where should it be placed in the
source?

It should be placed just before the 'begin'.
-- snip --
uses
Interfaces, // this includes the LCL widgetset
Forms
{ add your units here }, Unit1; {$R project1.res}
begin
-- end snip --
- More or less the same goes for the .lpi file. I want to have a few parameters in that one. At the moment I'm thinking of:
          - a parameter if whether we should include versionInfo or not
- a parameter for whether auto-incementing the build number or not.

It seems, we need:
TAutoIncProjectVersion = (
  aipvNo,  // do not auto increment
  aipvBeforeBuild, // before building and last build was successful
  aipvAfterBuild   // after successful build
); AutoIncrementingVersion: TAutoIncProjectVersion

How do I access the .lpi file in a smart way???

Add new property to ideintf/projectintf.pas TLazProject
Add to ide/project.pp ReadProject and WriteProject.

Ok, thanks!

Mattias

Thanks for your help!
ttyl,
Jouke Marc Weustink writes:
> Mattias Gaertner wrote:
>> On Wed, 01 Feb 2006 13:53:27 +0100
>> Micha Nelissen <[EMAIL PROTECTED]> wrote: >> >> >>> Jouke Rensma wrote: >>> >>>> automatically. At this moment you have to arrange this by hand.
>>>> As said before I would first like to know:
>>>> - am I inventing a wheel?
>>>> - is somebody else working on this also? If yes, maybe we can
>>>> cooperate??? - since this is very windows specific, should I continue
>>>> anyway or maybe just forget about it? >>>> >>>> If you think I should continue, then I have some problems I would to >>>> discuss, but first your ideas please. >>> >>> I think you'll have to write/modify these things into a
><projectname>.rc  >> and then run windres to compile it to .res ? I think
>keeping the  >> buildnumber in the project file and automatically
>incrementing it upon  >> succesfull build isn't a big problem (Mattias
>usually does these kind of  >> things in the IDE...) ?
>> >> >> At the moment the IDE saves all files, before building a project. So
>that > all build tools have all data.
>> If we increase the number *after* a successful build, then the the .lpi
>
>> file
>> must be saved again and the executable will have the old version.
>> I'm not sure, if this is what we want.
> > This is the delphi behaviour which is imo annoying. > To get the numbers the same, here we always do a build + compile > > >> Maybe better:
>> If the last build was successful, increase build number *before*
>> save+building.
> > That might be better. > > Marc > > _________________________________________________________________
>     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

_________________________________________________________________
     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

Reply via email to