Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-03-01 Thread Marcos Douglas
On Fri, Mar 1, 2013 at 11:34 AM, Graeme Geldenhuys
 wrote:
> On 2013-03-01 14:09, Marcos Douglas wrote:
>>
>> You probably right, but problems can happen -- little problems -- like
>> a file deleted, file renamed, etc. So I'll have to change the lpk
>> anyway, manually.
>
> You should still not get any conflicts in the *.lpk files even if files
> was added, renamed or deleted. The only time you will get a conflict
> (and changes are very slim) is if upstream they changed the Unit Output
> Directory - something that pretty much never happens after it was set.
> They are different areas of the xml file (*.lpk file), so will not conflict.
>
> Conflicts only occur if the same lines of code has changed locally and
> upstream.
>
>
> Anyway, it's your choice.

Thanks for the good explanation. Well, I can change my choices...  ;-)

Regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-03-01 Thread Graeme Geldenhuys
On 2013-03-01 14:09, Marcos Douglas wrote:
> 
> You probably right, but problems can happen -- little problems -- like
> a file deleted, file renamed, etc. So I'll have to change the lpk
> anyway, manually.

You should still not get any conflicts in the *.lpk files even if files
was added, renamed or deleted. The only time you will get a conflict
(and changes are very slim) is if upstream they changed the Unit Output
Directory - something that pretty much never happens after it was set.
They are different areas of the xml file (*.lpk file), so will not conflict.

Conflicts only occur if the same lines of code has changed locally and
upstream.


Anyway, it's your choice.


Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-03-01 Thread Marcos Douglas
On Thu, Feb 28, 2013 at 5:51 PM, Graeme Geldenhuys
 wrote:
> On 2013-02-28 18:31, Marcos Douglas wrote:
>>> You can change the output directory of the third party package to use
>>> > the $(FPCVer) macro. For example
>>> > "lib/$(FPCVer)/$(TargetCPU)-$($TargetOS)".
>> Yep, but for this I need to change lib's sources. I won't to not
>> missing the updates, but thanks anyway.
>
>
> I fail to understand what you mean by that? You simply need to change
> the Unit Output Directory in each *.lpk you use, and add the $(FPCVer)
> part to the path. No other "source code" needs to be changed.

I know. When I said source I mean *.lpk - it is a source too, not?

On Thu, Feb 28, 2013 at 5:55 PM, Graeme Geldenhuys
 wrote:
> On 2013-02-28 19:08, Marcos Douglas wrote:
>>
>> Yes, but as I said, to do this you need to change the lib package
>> (source) to set the output files.
>> I do not want change the original libs sources.
>
> But why not? The *.lpk files hardly change. So if you get repository
> updates for those packages, there will not be any conflicts. Even if the
> *.lpk package changes (eg: new units was added), it should still not
> cause a conflict.

You probably right, but problems can happen -- little problems -- like
a file deleted, file renamed, etc. So I'll have to change the lpk
anyway, manually.

> You have to change something, otherwise you will not be able to find a
> solution to your issue. The above is the bare minimum and least invasive
> change you can make.

In that case I will prefer the  Mattias' tip "Compiling a project will
automatically rebuild the packages." so, I can use the original *.lpk
and one output directory for each package, but if I compile them using
other FPC version, they will automatically rebuild.

Regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Frank Church
On 28 February 2013 19:08, Marcos Douglas  wrote:
> On Thu, Feb 28, 2013 at 4:02 PM, Frank Church  wrote:
>> On 28 February 2013 17:27, Marcos Douglas  wrote:
>>> Hi,
>>>
>>> I would like to know what the best way to work with FPC, Lazarus and
>>> 3rd libs. I will try explain myself:
>>>
>>> Today I have three FPC versions (2.6.0, 2.6.3 and 2.8.1) and two
>>> Lazarus versions (1.0.1 and 1.1 (trunk))
>>> The FPC trunk is only for test, so doesn't count.
>>> Both Lazarus were compiled using FPC 2.6.3 and everything works.
>>> I have many 3rd libs (components) and they are compiled using FPC 2.6.3 too.
>>>
>>> My "problem" is:
>>> 1- I want to have a stable Lazarus (1.0), compiled with FPC 2.6.2 and
>>> stable Libs too (compiled with the same FPC version, ie. 2.6.2);
>>> 2- I want to have a Lazarus trunk, compiled with FPC 2.6.3 and Libs
>>> too compiled compiled with the same FPC version;
>>> 3- I wont to change the libs package sources;
>>>
>>> How can I have libs, compiled with different FPC version, but without
>>> change the output sources of libs and without have more than one copy
>>> of them?
>>>
>>> Best regards,
>>> Marcos Douglas
>>>
>>
>> For my own libraries and other third party libs this is what I use
>>
>> $(ConfDir)/lib/{LibraryName}/lib/$(TargetCPU)-$(TargetOS). Because I
>> use a different -pcp directory it works very well me.
>
> Yes, but as I said, to do this you need to change the lib package
> (source) to set the output files.
> I do not want change the original libs sources.
>
> Marcos Douglas
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

I think the way I described should be made the default for all 3rd
party libraries unless other more experienced developers think
otherwise from their experience. Given the strictness of FPC with
regards to compiler and build versions, I find it very useful and disk
space is not so expensive now on general purpose computers.

Do you need to track some remote repositories that change often?

That is one reason for not wanting to use that method. I am sure
Graeme can help you with some Git hook mojo when upstream changes :)


-- 
Frank Church

===
http://devblog.brahmancreations.com

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Graeme Geldenhuys
On 2013-02-28 19:08, Marcos Douglas wrote:
> 
> Yes, but as I said, to do this you need to change the lib package
> (source) to set the output files.
> I do not want change the original libs sources.

But why not? The *.lpk files hardly change. So if you get repository
updates for those packages, there will not be any conflicts. Even if the
*.lpk package changes (eg: new units was added), it should still not
cause a conflict.

You have to change something, otherwise you will not be able to find a
solution to your issue. The above is the bare minimum and least invasive
change you can make.


Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Graeme Geldenhuys
On 2013-02-28 18:31, Marcos Douglas wrote:
>> You can change the output directory of the third party package to use
>> > the $(FPCVer) macro. For example
>> > "lib/$(FPCVer)/$(TargetCPU)-$($TargetOS)".
> Yep, but for this I need to change lib's sources. I won't to not
> missing the updates, but thanks anyway.


I fail to understand what you mean by that? You simply need to change
the Unit Output Directory in each *.lpk you use, and add the $(FPCVer)
part to the path. No other "source code" needs to be changed.


Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Marcos Douglas
On Thu, Feb 28, 2013 at 4:02 PM, Frank Church  wrote:
> On 28 February 2013 17:27, Marcos Douglas  wrote:
>> Hi,
>>
>> I would like to know what the best way to work with FPC, Lazarus and
>> 3rd libs. I will try explain myself:
>>
>> Today I have three FPC versions (2.6.0, 2.6.3 and 2.8.1) and two
>> Lazarus versions (1.0.1 and 1.1 (trunk))
>> The FPC trunk is only for test, so doesn't count.
>> Both Lazarus were compiled using FPC 2.6.3 and everything works.
>> I have many 3rd libs (components) and they are compiled using FPC 2.6.3 too.
>>
>> My "problem" is:
>> 1- I want to have a stable Lazarus (1.0), compiled with FPC 2.6.2 and
>> stable Libs too (compiled with the same FPC version, ie. 2.6.2);
>> 2- I want to have a Lazarus trunk, compiled with FPC 2.6.3 and Libs
>> too compiled compiled with the same FPC version;
>> 3- I wont to change the libs package sources;
>>
>> How can I have libs, compiled with different FPC version, but without
>> change the output sources of libs and without have more than one copy
>> of them?
>>
>> Best regards,
>> Marcos Douglas
>>
>
> For my own libraries and other third party libs this is what I use
>
> $(ConfDir)/lib/{LibraryName}/lib/$(TargetCPU)-$(TargetOS). Because I
> use a different -pcp directory it works very well me.

Yes, but as I said, to do this you need to change the lib package
(source) to set the output files.
I do not want change the original libs sources.

Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Frank Church
On 28 February 2013 17:27, Marcos Douglas  wrote:
> Hi,
>
> I would like to know what the best way to work with FPC, Lazarus and
> 3rd libs. I will try explain myself:
>
> Today I have three FPC versions (2.6.0, 2.6.3 and 2.8.1) and two
> Lazarus versions (1.0.1 and 1.1 (trunk))
> The FPC trunk is only for test, so doesn't count.
> Both Lazarus were compiled using FPC 2.6.3 and everything works.
> I have many 3rd libs (components) and they are compiled using FPC 2.6.3 too.
>
> My "problem" is:
> 1- I want to have a stable Lazarus (1.0), compiled with FPC 2.6.2 and
> stable Libs too (compiled with the same FPC version, ie. 2.6.2);
> 2- I want to have a Lazarus trunk, compiled with FPC 2.6.3 and Libs
> too compiled compiled with the same FPC version;
> 3- I wont to change the libs package sources;
>
> How can I have libs, compiled with different FPC version, but without
> change the output sources of libs and without have more than one copy
> of them?
>
> Best regards,
> Marcos Douglas
>

For my own libraries and other third party libs this is what I use

$(ConfDir)/lib/{LibraryName}/lib/$(TargetCPU)-$(TargetOS). Because I
use a different -pcp directory it works very well me.


> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



-- 
Frank Church

===
http://devblog.brahmancreations.com

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Marcos Douglas
On Thu, Feb 28, 2013 at 2:59 PM, Mattias Gaertner
 wrote:
> On Thu, 28 Feb 2013 14:27:37 -0300
> Marcos Douglas  wrote:
>
>> Hi,
>>
>> I would like to know what the best way to work with FPC, Lazarus and
>> 3rd libs. I will try explain myself:
>>
>> Today I have three FPC versions (2.6.0, 2.6.3 and 2.8.1) and two
>> Lazarus versions (1.0.1 and 1.1 (trunk))
>> The FPC trunk is only for test, so doesn't count.
>> Both Lazarus were compiled using FPC 2.6.3 and everything works.
>> I have many 3rd libs (components) and they are compiled using FPC 2.6.3 too.
>>
>> My "problem" is:
>> 1- I want to have a stable Lazarus (1.0), compiled with FPC 2.6.2 and
>> stable Libs too (compiled with the same FPC version, ie. 2.6.2);
>> 2- I want to have a Lazarus trunk, compiled with FPC 2.6.3 and Libs
>> too compiled compiled with the same FPC version;
>> 3- I wont to change the libs package sources;
>>
>> How can I have libs, compiled with different FPC version, but without
>> change the output sources of libs and without have more than one copy
>> of them?
>
> The second Lazarus must be started with another primary config path
> (command line parameter --pcp).

I already use the --pcp parameter to pass different configurations
(packages, environment, etc).

> The second can use another compiler.
> Compiling a project will automatically rebuild the packages.

Yep. Well, I thought there was a way to not recompile the libs to
compile more faster, but Ok.

> You can change the output directory of the third party package to use
> the $(FPCVer) macro. For example
> "lib/$(FPCVer)/$(TargetCPU)-$($TargetOS)".

Yep, but for this I need to change lib's sources. I won't to not
missing the updates, but thanks anyway.

Regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FPC, Lazarus and 3rd libs

2013-02-28 Thread Mattias Gaertner
On Thu, 28 Feb 2013 14:27:37 -0300
Marcos Douglas  wrote:

> Hi,
> 
> I would like to know what the best way to work with FPC, Lazarus and
> 3rd libs. I will try explain myself:
> 
> Today I have three FPC versions (2.6.0, 2.6.3 and 2.8.1) and two
> Lazarus versions (1.0.1 and 1.1 (trunk))
> The FPC trunk is only for test, so doesn't count.
> Both Lazarus were compiled using FPC 2.6.3 and everything works.
> I have many 3rd libs (components) and they are compiled using FPC 2.6.3 too.
> 
> My "problem" is:
> 1- I want to have a stable Lazarus (1.0), compiled with FPC 2.6.2 and
> stable Libs too (compiled with the same FPC version, ie. 2.6.2);
> 2- I want to have a Lazarus trunk, compiled with FPC 2.6.3 and Libs
> too compiled compiled with the same FPC version;
> 3- I wont to change the libs package sources;
> 
> How can I have libs, compiled with different FPC version, but without
> change the output sources of libs and without have more than one copy
> of them?

The second Lazarus must be started with another primary config path
(command line parameter --pcp).
The second can use another compiler.
Compiling a project will automatically rebuild the packages.

You can change the output directory of the third party package to use
the $(FPCVer) macro. For example
"lib/$(FPCVer)/$(TargetCPU)-$($TargetOS)".

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus