[Lazarus] Storing projects in subversion (or git etc.)

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
Looking at some projects filed away here, I find I've been inconsistent
so would appreciate it if somebody could say authoritatively: what types
of file should be put in a repository, and what is regenerated reliably?

Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any
static .inc files.

I presume that anything machine-generated and usually put into the lib
directory shouldn't be stored even if it ends up elsewhere: .ppu, .o,
.a, .res, .or.

What about things like .lrs and .rst?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Michael Van Canneyt


On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote:

> Looking at some projects filed away here, I find I've been inconsistent so
> would appreciate it if somebody could say authoritatively: what types of file
> should be put in a repository, and what is regenerated reliably?
>
> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any static
> .inc files.
>
> I presume that anything machine-generated and usually put into the lib
> directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, .a,
> .res, .or.
>
> What about things like .lrs and .rst?

.rst is also regenerated, no need to store them.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Graeme Geldenhuys-3
In reply to this post by Mark Morgan Lloyd
On 2015-09-20 09:49, Mark Morgan Lloyd wrote:
> What about things like .lrs and .rst?

I have the following in my .gitignore file.

*.[oa]
*.ppu
*.dcu
*.lps
*.compiled
*.bak*
*.rst
*.lrs


There is a Github project which collects all such .gitignore settings
for every language you can think of. Very useful.

  https://github.com/github/gitignore


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
Graeme Geldenhuys wrote:

> On 2015-09-20 09:49, Mark Morgan Lloyd wrote:
>> What about things like .lrs and .rst?
>
> I have the following in my .gitignore file.
>
> *.[oa]
> *.ppu
> *.dcu
> *.lps
> *.compiled
> *.bak*
> *.rst
> *.lrs
>
>
> There is a Github project which collects all such .gitignore settings
> for every language you can think of. Very useful.
>
>   https://github.com/github/gitignore

Although I'd point out that this is an implementation issue rather than
a language one, since ISTM feasible for Lazarus to support a language
other than pascal with the same form etc. structure.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
In reply to this post by Michael Van Canneyt
Michael Van Canneyt wrote:

> On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote:
>
>> Looking at some projects filed away here, I find I've been
>> inconsistent so would appreciate it if somebody could say
>> authoritatively: what types of file should be put in a repository, and
>> what is regenerated reliably?
>>
>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any
>> static .inc files.
>>
>> I presume that anything machine-generated and usually put into the lib
>> directory shouldn't be stored even if it ends up elsewhere: .ppu, .o,
>> .a, .res, .or.
>>
>> What about things like .lrs and .rst?
>
> .rst is also regenerated, no need to store them.

Thanks Michael, it was your comment about ResourceStrings that reminded
me to ask this.

What about .lrs, since it looks as though it's generated from .lfm?

It's actually .lrs that I find I'm storing inconsistently :-)

svn ls http://svn.freepascal.org/svn/lazarus/trunk/ide | cut -d . -f 2
|sort |uniq    returns

dci
fpc
ico
inc
lfm
lpi
lpr
pas
pp
rc
res
xml

i.e. specifically includes .rc and .res but not .lrs.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Michael Van Canneyt


On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote:

> Michael Van Canneyt wrote:
>> On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote:
>>
>>> Looking at some projects filed away here, I find I've been inconsistent so
>>> would appreciate it if somebody could say authoritatively: what types of
>>> file should be put in a repository, and what is regenerated reliably?
>>>
>>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any static
>>> .inc files.
>>>
>>> I presume that anything machine-generated and usually put into the lib
>>> directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, .a,
>>> .res, .or.
>>>
>>> What about things like .lrs and .rst?
>>
>> .rst is also regenerated, no need to store them.
>
> Thanks Michael, it was your comment about ResourceStrings that reminded me to
> ask this.
>
> What about .lrs, since it looks as though it's generated from .lfm?

It depends.

For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm files directly for new projects.

If you have {$i something.lrs} in your sources, you'd probably better still store the .lrs in svn.

I got rid of the .lrs files a long time ago. Just a matter of replacing

{$i something.lrs}

with

{$r something.lfm}

Michael.


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

leledumbo
Administrator
> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm files directly for new projects.

and even in older lazarus, only .lfm is used for streaming. you can regenerate .lrs simply by either compiling it with lazres or make a trivial change in the form designer.
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
In reply to this post by Michael Van Canneyt
Michael Van Canneyt wrote:

> On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote:
>
>> Michael Van Canneyt wrote:
>>> On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote:
>>>
>>>> Looking at some projects filed away here, I find I've been
>>>> inconsistent so would appreciate it if somebody could say
>>>> authoritatively: what types of file should be put in a repository,
>>>> and what is regenerated reliably?
>>>>
>>>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any
>>>> static .inc files.
>>>>
>>>> I presume that anything machine-generated and usually put into the
>>>> lib directory shouldn't be stored even if it ends up elsewhere:
>>>> .ppu, .o, .a, .res, .or.
>>>>
>>>> What about things like .lrs and .rst?
>>>
>>> .rst is also regenerated, no need to store them.
>>
>> Thanks Michael, it was your comment about ResourceStrings that
>> reminded me to ask this.
>>
>> What about .lrs, since it looks as though it's generated from .lfm?
>
> It depends.
>
> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm
> files directly for new projects.
>
> If you have {$i something.lrs} in your sources, you'd probably better
> still store the .lrs in svn.
>
> I got rid of the .lrs files a long time ago. Just a matter of replacing
>
> {$i something.lrs}
>
> with
>
> {$r something.lfm}
>
> Michael.

Thanks very much, I think I did as well but I'll check. I've got one or
two things that I'm trying to keep running for sufficiently-old versions
of the compiler and IDE that they can generate a GTK1- or NT-compatible
binary, which means carefully avoiding things like frames in the user
interface.

The rationale here is not so much for local use, but because they're of
potential use to a small number of niche hackers and at all costs I want
to avoid giving them cause to grumble because a particular OS or
compiler version is required. I'm talking about the likes of mainframe
programmers here, many of whom have had sufficient time to elevate
curmudgeonliness to an artform :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
In reply to this post by leledumbo
leledumbo wrote:
>> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm
> files directly for new projects.
>
> and even in older lazarus, only .lfm is used for streaming. you can
> regenerate .lrs simply by either compiling it with lazres or make a trivial
> change in the form designer.

Would lazres be automatically invoked by lazarus or lazbuild is the .lsr
was missing?

The trouble with making a change to the .lfm is that some very old
versions of Lazarus (approx 0.9.24) can add properties that give newer
ones problems, and you obviously have to be careful about getting that
sort of thing into a repository. I can't give an example off the top of
my head, but I'm not just talking about TNotebook which was obviously a
significant glitch.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mattias Gaertner
On Sun, 20 Sep 2015 11:42:51 +0000
Mark Morgan Lloyd <[hidden email]> wrote:

> leledumbo wrote:
> >> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm
> > files directly for new projects.
> >
> > and even in older lazarus, only .lfm is used for streaming. you can
> > regenerate .lrs simply by either compiling it with lazres or make a trivial
> > change in the form designer.
>
> Would lazres be automatically invoked by lazarus or lazbuild is the .lsr
> was missing?

No.
They share the code, so they call the same procedure.
Lazarus and lazbuild auto generate the lrs files.

Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
Mattias Gaertner wrote:

> On Sun, 20 Sep 2015 11:42:51 +0000
> Mark Morgan Lloyd <[hidden email]> wrote:
>
>> leledumbo wrote:
>>>> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm
>>> files directly for new projects.
>>>
>>> and even in older lazarus, only .lfm is used for streaming. you can
>>> regenerate .lrs simply by either compiling it with lazres or make a trivial
>>> change in the form designer.
>> Would lazres be automatically invoked by lazarus or lazbuild is the .lsr
>> was missing?
>
> No.
> They share the code, so they call the same procedure.
> Lazarus and lazbuild auto generate the lrs files.

That's the important thing, and what I actually meant. So in practical
terms, a .lrs is rebuilt when needed in all cases.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Lukasz Sokol
In reply to this post by Graeme Geldenhuys-3
On 20/09/15 10:14, Graeme Geldenhuys wrote:
[...]
> There is a Github project which collects all such .gitignore settings
> for every language you can think of. Very useful.
>
>   https://github.com/github/gitignore
>

No FreePascal or Lazarus entries there... ?

>
> Regards,
>   - Graeme -
>
K-R

el es


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
Lukasz Sokol wrote:
> On 20/09/15 10:14, Graeme Geldenhuys wrote:
> [...]
>> There is a Github project which collects all such .gitignore settings
>> for every language you can think of. Very useful.
>>
>>   https://github.com/github/gitignore
>>
>
> No FreePascal or Lazarus entries there... ?

No, but I had visions of Graeme typing feverishly before anybody noticed ;-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Patrick Chevalley-2
In reply to this post by Mark Morgan Lloyd
>  
 >  No FreePascal or Lazarus entries there... ?

https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore


 


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Lukasz Sokol
On 21/09/15 09:23, Patrick Chevalley wrote:
>>  
>  >  No FreePascal or Lazarus entries there... ?
>
> https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore
>
>

Oh,
I did not even think to dive into the Global sub dir ;)
thx ;)

el es



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Lukasz Sokol
In reply to this post by Mark Morgan Lloyd
On 21/09/15 09:21, Mark Morgan Lloyd wrote:

> Lukasz Sokol wrote:
>> On 20/09/15 10:14, Graeme Geldenhuys wrote:
>> [...]
>>> There is a Github project which collects all such .gitignore settings
>>> for every language you can think of. Very useful.
>>>
>>>   https://github.com/github/gitignore
>>>
>>
>> No FreePascal or Lazarus entries there... ?
>
> No, but I had visions of Graeme typing feverishly before anybody noticed ;-)
>
Seems there is one in gitignore/Global sub dir (as Patrick pointed out, thanks again ;) )

el es


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Marco van de Voort
In reply to this post by Mark Morgan Lloyd
On Sun, Sep 20, 2015 at 08:49:14AM +0000, Mark Morgan Lloyd wrote:
> Looking at some projects filed away here, I find I've been inconsistent
> so would appreciate it if somebody could say authoritatively: what types
> of file should be put in a repository, and what is regenerated reliably?
>
> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any
> static .inc files.

.rc
 
> I presume that anything machine-generated and usually put into the lib
> directory shouldn't be stored even if it ends up elsewhere: .ppu, .o,
> .a, .res, .or.

3rd party .res might need to be stored (e.g. a windows icon).

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
In reply to this post by Lukasz Sokol
Lukasz Sokol wrote:

> On 21/09/15 09:21, Mark Morgan Lloyd wrote:
>> Lukasz Sokol wrote:
>>> On 20/09/15 10:14, Graeme Geldenhuys wrote:
>>> [...]
>>>> There is a Github project which collects all such .gitignore settings
>>>> for every language you can think of. Very useful.
>>>>
>>>>   https://github.com/github/gitignore
>>>>
>>> No FreePascal or Lazarus entries there... ?
>> No, but I had visions of Graeme typing feverishly before anybody noticed ;-)
>>
> Seems there is one in gitignore/Global sub dir (as Patrick pointed out, thanks again ;) )

I wish whoever wrote that had put in a URL for the wiki page, since
searching for "gitignore" doesn't seem to bring up anything useful.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Mark Morgan Lloyd
In reply to this post by Marco van de Voort
Marco van de Voort wrote:
> On Sun, Sep 20, 2015 at 08:49:14AM +0000, Mark Morgan Lloyd wrote:
>> Looking at some projects filed away here, I find I've been inconsistent
>> so would appreciate it if somebody could say authoritatively: what types
>> of file should be put in a repository, and what is regenerated reliably?
>>
>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any
>> static .inc files.
>
> .rc

Should that be stored in all cases or is it version-specific?

>> I presume that anything machine-generated and usually put into the lib
>> directory shouldn't be stored even if it ends up elsewhere: .ppu, .o,
>> .a, .res, .or.
>
> 3rd party .res might need to be stored (e.g. a windows icon).

[Nod] although these will usually stand out since they won't have the
same basename as a form or unit.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Storing projects in subversion (or git etc.)

Graeme Geldenhuys-3
In reply to this post by Michael Van Canneyt
On 2015-09-20 11:52, Michael Van Canneyt wrote:
> {$i something.lrs}
>
> with
>
> {$r something.lfm}


Plus you can remove the LResources unit in the uses clause?


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
12