Re: [Lazarus] Difference between Lazarus 1.4.2 and 1.5 of i18n

2015-09-20 Thread Michael W. Vogel

Am 20.09.2015 um 17:11 schrieb Mattias Gaertner:
Someone broke the layout of the i18n frame of the project options. The 
checkbox was hidden below the bottom. I fixed it.


Thank you,

I've tested revision 49855 and it works fine now :)

kind regards

Michael

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


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

2015-09-20 Thread Mark Morgan Lloyd

Mattias Gaertner wrote:

On Sun, 20 Sep 2015 11:42:51 +
Mark Morgan Lloyd  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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Project options lock IDE

2015-09-20 Thread FreeMan

Hello,
fpc svn r31772 lazarus r49851 (Option -dDisableWrapperFunctions) osx 
yosemite qtx64

When I change target cpu, os and witget set then click ok button IDE lock.
I added gdb bt result


RunTool /usr/local/bin/fpc "-iWTOTP" "-Pi386" "-Twin32" 
"-Fr/opt/lazarus/components/codetools/fpc.errore.msg"

[New Thread 0x1c17 of process 99024]
[New Thread 0x1d0b of process 99024]
RunTool /usr/local/bin/fpc "-va" "-Pi386" "-Twin32" 
"-Fr/opt/lazarus/components/codetools/fpc.errore.msg" "compilertest.pas"

Hint: [TFPCTargetConfigCache.Update] has changed
^C
Program received signal SIGINT, Interrupt.
0x00013f7f in fpc_varset_add_sets ()
(gdb) bt
#0  0x00013f7f in fpc_varset_add_sets ()
#1  0x0001000297a3 in 
SYSUTILS_$$_EXTRACTFILEPATH$RAWBYTESTRING$$RAWBYTESTRING ()

#2  0x0001085a8540 in ?? ()
#3  0x0001000173ab in SYSTEM_$$_FREEMEM$POINTER$$QWORD ()
#4  0x0001085a81c0 in ?? ()
#5  0x0001b033 in fpc_ansistr_decr_ref ()
#6  0x8000 in ?? ()
#7  0x in ?? ()

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


Re: [Lazarus] laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread Jesus Reyes A.
En Sun, 20 Sep 2015 10:43:30 -0500, FreeMan   
escribió:



Hi Jesus,
I get this error, not while make or building lazarus in terminal. In  
terminal, download svn lazarus, then make, then run lazbuild, every  
think is normal, when I try run IDE, then crash. I sended bash script, I  
run this script then rebuild lazarus from terminal, now working normal.  
I'm not test other os.

Thank you



I always had the .sh file, I probably added it locally and forgot to  
commit it. It's done in r49855.


Anyway there seems to be a compiler error under OSX that sometimes it  
fails to link in the .res files, it sometimes happen here when I modify  
LazReport (when I forgot to clean it first) and recompile Lazarus. I was  
not able to reproduce it in a simpler project so I have not reported it.


Jesus Reyes A.




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


Re: [Lazarus] laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread FreeMan

Hi Jesus,
I get this error, not while make or building lazarus in terminal. In 
terminal, download svn lazarus, then make, then run lazbuild, every 
think is normal, when I try run IDE, then crash. I sended bash script, I 
run this script then rebuild lazarus from terminal, now working normal. 
I'm not test other os.

Thank you

On 20.09.2015 18:36, Jesus Reyes wrote:

It happens here too, only under OS X.

Recompiling LazReport clean (LazReport package More>>Recompile clean) and then 
recompiling Lazarus fix it for me.

Jesus Reyes A.



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


Re: [Lazarus] laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread Jesus Reyes
It happens here too, only under OS X.

Recompiling LazReport clean (LazReport package More>>Recompile clean) and then 
recompiling Lazarus fix it for me.

Jesus Reyes A.


El dom 20-sep-15, FreeMan  escribió:

 crashed. I get This lines from terminal.
 /opt/lazarus/components/lazreport/source/lr_desgn.pas   line
 8146
 
 [FORMS.PP] ExceptionOccurred
    Sender=EResNotFound
    Exception=Resource "lrd_ins_fields" not
 found
    Stack trace:
    $0001000BF3B1
    $0001000BF5E1
    $00010101CD81
    $00010101D026
 TApplication.HandleException Resource "lrd_ins_fields" not
 found
    Stack trace:
    $0001000BF3B1
    $0001000BF5E1
    $00010101CD81
    $00010101D026
 Exception at 0001000BF3B1: EResNotFound:
 Resource "lrd_ins_fields" not found.
 
 --

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


Re: [Lazarus] Option -dDisableWrapperFunctions need "LazFileUtils" in two files

2015-09-20 Thread Mattias Gaertner
On Sun, 20 Sep 2015 17:07:20 +0300
FreeMan  wrote:

> Hello,
> when try use Option -dDisableWrapperFunctions, this two files need  add 
> "LazFileUtils" to uses section.
> 
> /lazarus/components/chmhelp/packages/help/lhelpcontrol.pasline 226
> /lazarus/components/macfiles/macapplicationres.pasline 179

Thanks for the hint.
Fixed.

Mattias

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


Re: [Lazarus] Difference between Lazarus 1.4.2 and 1.5 of i18n

2015-09-20 Thread Mattias Gaertner
On Sun, 20 Sep 2015 13:26:55 +0200
"Michael W. Vogel"  wrote:

> Hi,
> 
> In Lazarus 1.4.2, ifIactivateintheproject 
> optionsi18n,thecaptionsofthecontrolsare inserted intothe.po.
> If I do the same in Lazarus 1.5, only resourcestrings, not the captions 
> are inserted.
> 
> I checked the project.lpi and see following lines:
>  
>
>
>  
> 
> If I remove LFM="False" then also the control captions are saved in the 
> .po. So I think there is a new project option to activate / deactivate 
> the saving of the captions into the .po, but I din't find such a option.

Someone broke the layout of the i18n frame of the project options. The
checkbox was hidden below the bottom.
I fixed it.

 
> Can you tell me, where to find this project option in Lazarus 1.5? If 
> there isn't such a option, can you tell me, why LFM="False" is inserted 
> in the project.lpi?

The default is true, i.e. normally it is not inserted.

Mattias

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


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

2015-09-20 Thread Mattias Gaertner
On Sun, 20 Sep 2015 11:42:51 +
Mark Morgan Lloyd  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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (FIXED) laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread FreeMan

/opt/lazarus/components/lazreport/images/package_images.bat
rename to "package_images.sh" and path delimeter "\" to "/" and delete 
last win command "pause". Give execute permission this file and run in 
terminal then rebuild lazarus.

I get this error just when try use "-dDisableWrapperFunctions"


On 20.09.2015 17:19, FreeMan wrote:

Hello,
svn fpc r31772 & lazarus r49851 osx 10.10.4 qtx64

I builded IDE -dDisableWrapperFunctions param, when start IDE, IDE 
crashed. I get This lines from terminal.

/opt/lazarus/components/lazreport/source/lr_desgn.pas   line 8146

[FORMS.PP] ExceptionOccurred
  Sender=EResNotFound
  Exception=Resource "lrd_ins_fields" not found
  Stack trace:
  $0001000BF3B1
  $0001000BF5E1
  $00010101CD81
  $00010101D026
TApplication.HandleException Resource "lrd_ins_fields" not found
  Stack trace:
  $0001000BF3B1
  $0001000BF5E1
  $00010101CD81
  $00010101D026
Exception at 0001000BF3B1: EResNotFound:
Resource "lrd_ins_fields" not found.

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





package_images.sh
Description: Bourne shell script
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] laz report crash IDE on startup with builded Option -dDisableWrapperFunctions

2015-09-20 Thread FreeMan

Hello,
svn fpc r31772 & lazarus r49851 osx 10.10.4 qtx64

I builded IDE -dDisableWrapperFunctions param, when start IDE, IDE 
crashed. I get This lines from terminal.

/opt/lazarus/components/lazreport/source/lr_desgn.pas   line 8146

[FORMS.PP] ExceptionOccurred
  Sender=EResNotFound
  Exception=Resource "lrd_ins_fields" not found
  Stack trace:
  $0001000BF3B1
  $0001000BF5E1
  $00010101CD81
  $00010101D026
TApplication.HandleException Resource "lrd_ins_fields" not found
  Stack trace:
  $0001000BF3B1
  $0001000BF5E1
  $00010101CD81
  $00010101D026
Exception at 0001000BF3B1: EResNotFound:
Resource "lrd_ins_fields" not found.

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


[Lazarus] Option -dDisableWrapperFunctions need "LazFileUtils" in two files

2015-09-20 Thread FreeMan

Hello,
when try use Option -dDisableWrapperFunctions, this two files need  add 
"LazFileUtils" to uses section.


/lazarus/components/chmhelp/packages/help/lhelpcontrol.pasline 226
/lazarus/components/macfiles/macapplicationres.pasline 179
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Difference between Lazarus 1.4.2 and 1.5 of i18n

2015-09-20 Thread Michael W. Vogel

Am 20.09.2015 um 14:22 schrieb Bart:

On 9/20/15, Michael W. Vogel  wrote:

In Lazarus 1.4.2, ifIactivateintheproject
optionsi18n,thecaptionsofthecontrolsare inserted intothe.po.

Problems with space bar ;-) ?

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
;) ;) ...no, I've copied a bing translated text, the rest was tipped (my 
english isn't the best)


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


Re: [Lazarus] Difference between Lazarus 1.4.2 and 1.5 of i18n

2015-09-20 Thread Bart
On 9/20/15, Michael W. Vogel  wrote:
> In Lazarus 1.4.2, ifIactivateintheproject
> optionsi18n,thecaptionsofthecontrolsare inserted intothe.po.

Problems with space bar ;-) ?

Bart

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


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

2015-09-20 Thread Mark Morgan Lloyd

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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-09-20 Thread Mark Morgan Lloyd

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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Difference between Lazarus 1.4.2 and 1.5 of i18n

2015-09-20 Thread Michael W. Vogel

Hi,

In Lazarus 1.4.2, ifIactivateintheproject 
optionsi18n,thecaptionsofthecontrolsare inserted intothe.po.
If I do the same in Lazarus 1.5, only resourcestrings, not the captions 
are inserted.


I checked the project.lpi and see following lines:

  
  


If I remove LFM="False" then also the control captions are saved in the 
.po. So I think there is a new project option to activate / deactivate 
the saving of the captions into the .po, but I din't find such a option.


Can you tell me, where to find this project option in Lazarus 1.5? If 
there isn't such a option, can you tell me, why LFM="False" is inserted 
in the project.lpi?


I also asked in the German Lazarusforum with no answer till now: 
http://www.lazarusforum.de/viewtopic.php?f=19&t=9041



Thank you

Michael

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


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

2015-09-20 Thread leledumbo
> 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.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Storing-projects-in-subversion-or-git-etc-tp4044037p4044043.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


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

2015-09-20 Thread 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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-09-20 Thread Mark Morgan Lloyd

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 |uniqreturns


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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-09-20 Thread 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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-09-20 Thread Graeme Geldenhuys
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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-09-20 Thread 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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-09-20 Thread 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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Equivalent of a Windows DLL on RPi?

2015-09-20 Thread Mark Morgan Lloyd

Bo Berglund wrote:

I am investigating programming for the Raspberry Pi as described in my
other thread. Could someone please outline if there is a concept like
a Windows DLL also in Raspbian for the Pi?

I have a DLL written in Delphi7 (or 2007), which implements a whole
bunch of basic functions and I am wondering if a similar file as a DLL
is used in Linux. If so could I port the existing DLL from Windows to
freepascal and then to Linux on the Pi?

I got some advice on the porting process in my other thread but in
this case it involves the creation of a DLL equivalent so that the
main programming could be done in for example Python while using the
functions from the DLL code?


It's a .so file. I think Lazarus has the same restrictions for both 
Windows and unix: by default, there's a separate heap in the main 
executable and in each separately-linked .so library which means that 
you can't pass anything dynamically-allocated (strings, objects etc.) as 
parameters or (in particular) return them as results. The way round this 
is to use this at the start of each .lpr:


uses
  cmem, { HeapTrc, } Classes, interfaces
  { you can add units after this }

Then in the library .lpr you have an exports list for entry points.

--
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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Equivalent of a Windows DLL on RPi?

2015-09-20 Thread leledumbo
> Could someone please outline if there is a concept like a Windows DLL also
in Raspbian for the Pi?

Get yourself a bunch of basic Linux (or *nix in general) concept and
implementation first. Don't jump in to the world you don't know about.

> If so could I port the existing DLL from Windows to freepascal and then to
> Linux on the Pi?

Depends on a lot of factor.
http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide applies.

> I got some advice on the porting process in my other thread but in 
this case it involves the creation of a DLL equivalent so that the 
main programming could be done in for example Python while using the 
functions from the DLL code?

As long as you know how Python convention for dynamic libraries, this can of
course be done.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Equivalent-of-a-Windows-DLL-on-RPi-tp4044033p4044035.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


Re: [Lazarus] Equivalent of a Windows DLL on RPi?

2015-09-20 Thread Sven Barth
Am 20.09.2015 07:03 schrieb "Bo Berglund" :
>
> I am investigating programming for the Raspberry Pi as described in my
> other thread. Could someone please outline if there is a concept like
> a Windows DLL also in Raspbian for the Pi?
>
> I have a DLL written in Delphi7 (or 2007), which implements a whole
> bunch of basic functions and I am wondering if a similar file as a DLL
> is used in Linux. If so could I port the existing DLL from Windows to
> freepascal and then to Linux on the Pi?
>
> I got some advice on the porting process in my other thread but in
> this case it involves the creation of a DLL equivalent so that the
> main programming could be done in for example Python while using the
> functions from the DLL code?

As the RPi uses a Linux (at least in normal cases) it also supports shared
libraries. They are written in FPC the same way as they are in Delphi (by
having a "library xyz" main file with an "exports" clause). This will
result in a ".so" file that you can load in FPC using the DynLibs unit with
LoadModule() and GetProcAddress() and in C-based languages using
dlopen()/dlsym() (don't know what Python uses, but I bet it's the same
across platforms ;) ).
Things to keep in mind though:
- declare exported functions as "cdecl"
- WideString is - unlike on Windows - not cross-library-safe
- and of course the usual points regarding strings, objects, etc. apply

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