[fpc-devel] Streaming readonly properties
As said in an earlier mail I have problems streaming the property EditLabel: TBoundLabel read FEditLabel; of a TLabeledEdit with fpc 2.1.1. Some discussion on #fpc led to the conclusion that streaming a readonly persistant should be allowed, because you write to the properties of the readonly persistant property. Attached is a proposal to fix it. Vincent Index: writer.inc === --- writer.inc (revision 5577) +++ writer.inc (working copy) @@ -633,8 +633,9 @@ Handled: Boolean; begin - - if (not Assigned(PPropInfo(PropInfo)^.SetProc)) or + // SetProc is not required for class properties + if (not Assigned(PPropInfo(PropInfo)^.SetProc) and +(PPropInfo(PropInfo)^.PropType^.Kind<>tkClass)) or (not Assigned(PPropInfo(PropInfo)^.GetProc)) then exit; ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Growing a memory stream
Attached patch grows a memory stream by at least a quarter of its original capacity. Vincent Index: streams.inc === --- streams.inc (revision 5577) +++ streams.inc (working copy) @@ -535,11 +535,17 @@ function TMemoryStream.Realloc(var NewCapacity: Longint): Pointer; begin - // round off to block size. + If NewCapacity<0 Then NewCapacity:=0 else -NewCapacity := (NewCapacity + (TMSGrow-1)) and not (TMSGROW-1); +begin + // if growing, grow at least a quarter + if (NewCapacity>FCapacity) and (NewCapacity < (5*FCapacity) div 4) then +NewCapacity := (5*FCapacity) div 4; + // round off to block size. + NewCapacity := (NewCapacity + (TMSGrow-1)) and not (TMSGROW-1); +end; // Only now check ! If NewCapacity=FCapacity then Result:=FMemory ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] FPCUnit as a separate project from FPC?
- Original Message - From: Joost van der Sluis <[EMAIL PROTECTED]> Date: Tuesday, May 22, 2007 12:55 pm Subject: Re: [fpc-devel] FPCUnit as a separate project from FPC? > On Tue, 2007-05-22 at 12:29 +0200, Graeme Geldenhuys wrote: > > Darius Blaszijk, Vincent Snijders and myself had a discussion off > the> mailing list about the possibility of moving FPCUnit out of > FPC as a > > separate project. I thought it to be important that we get the > > opinions of others as well. > > > > In summary: > > Darius is all for it. > > Vincent is against it. > > I'm on the wire, but leaning towards the move. :-) > > I think that most fpc-core developers aggree with Vincent. (On exactly > the same reasons, but I could be wrong) > > > Some points that where raised in our discussion (please add more > if I > > left some out): > > > > * As it stands now, FPCUnit is split between two repositories. > The FPC > > one and the Lazarus one. This make it really hard to submit updates. > > The FPC one must be done first otherwise it breaks the Lazarus GUI > > TestRunner (or Console TestRunner). > > This is the same for all of the LCL. Clearest example is maybe the > DB- > components. But it holds for all of the LCL, which depends on the FCL > and RTL. The LCL is full of version-checks to avoid problems with > different fpc-releases. > > Second there's no problem if FPCUnit is broken in svn. Those are > _development_ versions. If people have problems with them, because > theydo not update enough (fpc or lazarus), that's their problem. > > > * FPC versions are a issue as the release cycles is very > different for > > the FPC and Lazarus projects. Apparently the FPCUnit is broken in > the> previous release of Lazarus, due to this. > > Which holds dor the complete LCL. That's why there are ifdefs all over > the place, see above. > > > * Vincent likes the idea of the testing framework being part of FPC. > > One simple checkout. I think this point is moot because SubVersion > > support Externals Definitions for exactly this purpose and I think > > will actually work better than the current setup. We can link > FPCUnit> to FPC as an external link - and even link it to a > specific revision > > of FPCUnit to always guarantee it pulls in a stable version of > FPCUnit> for use in FPC's test cases. > > You don't want to pull in any LCL-dependencies to test the FCL or > otherfpc-things. So you still need to keep them separate. > Besides, I see the graphical-features of fpcunit as a nice add-on, > but I > don't use them. You can use FPCUnit as it's provided by fpc, > without the > tools in Lazarus. I think there are a lot of ppl who actually do that. > (Just like you can use the db-unit without the db-components from > Lazarus) > What I did (wrong) was that I created a TCustomApplication descendant that could be a base for all console testrunners (see lazarus\components\fpcunit\console) and made that only for fpc 2.1.1 and later in mind, because that is what I used and left that in the lazarus repository. Instead I should have donated that to the fpc team, so that it is clear that it is not part of fpc 2.0.4. Now people see this in Lazarus and wonder why it doesn't work with fpc 2.0.4. If the consoletestrunner.pas is part of fcl-fpcunit, then the runtime package is not necessary anymore and that complete directory can be removed. I could add an {$ifndef ver_2_0} to disable the "create new console testrunner" in the fpcunitide package. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Can somebody repair the daily snaphot please?
- Original Message - From: [EMAIL PROTECTED] Date: Wednesday, May 23, 2007 8:46 pm Subject: [fpc-devel] Can somebody repair the daily snaphot please? > Can somebody repair the daily lazarus snaphot please? > If you are talking about the win32 snapshots, that you have bad luck unless you can repair my laptop. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] linking resources on win64
Hi, I am experimenting with the gorc resource compile, which suposedly can create coff object files for win64 from .rc files. See http://www.jorgon.freeserve.co.uk/Resource.htm#int fifth paragraph. I created lazarus.obj with the following command line: C:\lazarus\source\lazarus\ide>c:\lazarus\downloads\Gorcjorg\GoRC.exe /machine X64 /fo lazarus.obj lazarus.rc GoRC.Exe Version 0.90.2 - Copyright Jeremy Gordon 1998/2006 - [EMAIL PROTECTED] Output file: lazarus.obj format: X64 Then I added this line to my program: {$LINK lazarus.obj} I got this error message C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error reading COFF Symtable while reading lazarus.obj Thne I tried something else and add the line {$R lazarus.obj} I starts to look for lazarus.or and I renamed the file. Then I got this error message C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error reading COFF Symtable while reading ..\units\x86_64-win64\lazarus.or I attached object file that gorc created. And now the questions: Am I taking the right steps to includes a resource file that won't be compiled by windres? Is using gorc a possible way to create resource files for inclusion in win64 programs compiled with fpc? Why does fpc complain about the COFF Symtable? Vincent lazarus.obj Description: Binary data ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] using gorc on win64 as resource compiler
Hi, Thanks for fixing the coff loading on win64. Attached patch enables the use of gorc on win64 in the compiler: adding {$R lazarus.rc} includes this resource into the Lazarus executable, giving it a main icon and a XP look. Vincent Index: systems.pas === --- systems.pas (revision 7919) +++ systems.pas (working copy) @@ -188,6 +188,7 @@ ,res_m68k_palmos,res_m68k_mpw ,res_powerpc_mpw,res_elf ,res_gnu_wince_windres +,res_win64_gorc ); tdbg = (dbg_none Index: systems/i_win.pas === --- systems/i_win.pas (revision 7919) +++ systems/i_win.pas (working copy) @@ -105,7 +105,7 @@ asmext : '.s'; objext : '.o'; resext : '.res'; -resobjext: '.or'; +resobjext: '.obj'; sharedlibext : '.dll'; staticlibext : '.a'; staticlibprefix : 'libp'; @@ -122,7 +122,7 @@ link : nil; linkextern : nil; ar : ar_gnu_ar; -res : res_gnu_windres; +res : res_win64_gorc; dbg : dbg_stabs; script : script_dos; endian : endian_little; Index: systems/t_win.pas === --- systems/t_win.pas (revision 7919) +++ systems/t_win.pas (working copy) @@ -124,7 +124,16 @@ rccmd : '--include $INC -O res -o $RES $RC'; ); +res_win64_gorc_info : tresinfo = +( + id : res_win64_gorc; + resbin : 'gorc'; + rescmd : '/machine x64 /nw /ni /o /fo $OBJ $RES'; + rcbin : 'gorc'; + rccmd : '/machine x64 /nw /ni /r /fo $RES $RC'; +); + Procedure GlobalInitSysInitUnitName(Linker : TLinker); var hp : tmodule; @@ -1767,7 +1776,7 @@ RegisterImport(system_x86_64_win64,TImportLibWin); RegisterExport(system_x86_64_win64,TExportLibWin); RegisterDLLScanner(system_x86_64_win64,TDLLScannerWin); - RegisterRes(res_gnu_windres_info,TWinResourceFile); + RegisterRes(res_win64_gorc_info,TWinResourceFile); RegisterTarget(system_x64_win64_info); {$endif x86_64} {$ifdef arm} ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] using gorc on win64 as resource compiler
- Original Message - From: Yury Sidorov <[EMAIL PROTECTED]> Date: Monday, July 2, 2007 1:00 pm Subject: Re: [fpc-devel] using gorc on win64 as resource compiler > From: <[EMAIL PROTECTED]> > > Hi, > > > > Thanks for fixing the coff loading on win64. > > > > Attached patch enables the use of gorc on win64 in the compiler: > > adding {$R lazarus.rc} includes this resource into the Lazarus > > executable, giving it a main icon and a XP look. > > Applied. Thanks. Can the GoRC executable be added to the fpcbuild repository? Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Comparison FPC 2.2 - Delphi 7
If you trust Lazarus to make the right decision when determining if something is changed, then go to Project -> Project Options -> Miscellaneous and uncheck "Always build (even if nothing changed)". Vincent Michael Schnell wrote: Does Delphi really rebuild all units, then ? No, it does not. Of course it does do a decent make process. But for me it does a "link" when I press F9 just to restart the program again when debugging. Why is this necessary ? (Delphi just start the program here.) or am I doing something wrong ? As you will have supposed I was experiencing this with Lazarus. Maybe this is a Lazarus problem, but even if Lazarus thoughtlessly does a "make" with unmodified sources, IMHO, the make should no call the linker. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] win32 debugging broken in fixes_2_2?
- Original Message - From: Martin Schreiber <[EMAIL PROTECTED]> Date: Tuesday, July 10, 2007 2:38 pm Subject: [fpc-devel] win32 debugging broken in fixes_2_2? > Hi, > Every program compiled with fixes_2_2 rev. 8006 crashes > in gdb: > " > GNU gdb 6.6 > Copyright (C) 2006 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, > and you are > welcome to change it and/or distribute copies of it under certain > conditions.Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details.This GDB was configured as "i686-pc-mingw32"... > (gdb) run > Starting program: G:\testcase\mse\console/console.exe > Loaded symbols for C:\WINNT\system32\KERNEL32.DLL > Loaded symbols for C:\WINNT\system32\OLEAUT32.DLL > Loaded symbols for C:\WINNT\system32\OLE32.DLL > Loaded symbols for C:\WINNT\system32\rpcrt4.dll > Loaded symbols for C:\WINNT\system32\ADVAPI32.DLL > Loaded symbols for C:\WINNT\system32\GDI32.DLL > Loaded symbols for C:\WINNT\system32\USER32.DLL > > Program received signal SIGILL, Illegal instruction. > 0x00402091 in SYSTEM_FPC_CPUCODEINIT () > (gdb) bt > #0 0x00402091 in SYSTEM_FPC_CPUCODEINIT () > #1 0x0040a504 in SYSTEM_init () > #2 0x00406114 in fpc_initializeunits () > #3 0x7ffdf000 in ?? () > #4 0x in ?? () > (gdb) > " > The programs work without gdb. > System: win2000, PII. > The problem seems not to exist on another PC with win2000 and an > AMD Athlon. > Any hints? It has to to with SSE2 detection. AFAIK the only reliable way to detect it, is execute a SSE2 instruction and capture the exection which it causes if it is not supported. I don't know, how it can be circumvented (except for using a newer processor). Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] win32 debugging broken in fixes_2_2?
- Original Message - From: Martin Schreiber <[EMAIL PROTECTED]> Date: Tuesday, July 10, 2007 2:44 pm Subject: Re: [fpc-devel] win32 debugging broken in fixes_2_2? > On Tuesday 10 July 2007 14.34, Jonas Maebe wrote: > > The rtl checks on startup whether or not your cpu supports SSE. It > > does so by executing an SSE instruction, catching the "illegal > > instruction" exception if it occurs and if so, setting a boolean to > > false. > > > > So just type "continue" in gdb to continue the program. > > > And what should I do in MSEide? Disable SIGILL reporting by gdb? > How does Lazarus handle the problem? > It does not handle it. If you handle it in MSEIDE, please let us know how you did it. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Lazarus: A new widgest set
From: Michael Schnell <[EMAIL PROTECTED]> > Vincent Snijders wrote: > > You have lot's of questions and the few hints I gave don't seem > to be > > enough. Maybe it is better if I try to find some time to write a > wiki > > article. I don't think this question - answer - question cycle is > > getting us anywhere soon. > AFAIK, Mattias did exactly the same as I am trying to accomplish > when > introducing the FPGUI. (Partly that is why I decided to try to use > an > additional wigetset instead of trying to establish an additional > application type, as I intended first.) > Sure, it is really easy. But instead having a bunch of mails in the archives, this information is at a better place in the wiki. I started http://wiki.lazarus.freepascal.org/Adding_a_new_interface, please add what you already did to it. You are the one doing it, so you know best when something is missing. Then add it. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Lazarus: A new widgest set
> I don't have the Free Pascal compiler sources (yet) and (sitting > behind > a firewall) I can't access the RCS. Can these be downloaded as a > zipped > file ? How can you download the zip-file, if you cannot use SVN (that uses http over port 80)? If svn is blocked, you cannot browse to the downlocation either. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Lazarus: A new widgest set
- Original Message - From: Michael Schnell <[EMAIL PROTECTED]> Date: Friday, February 15, 2008 1:22 pm Subject: Re: [fpc-devel] Lazarus: A new widgest set > > > How can you download the zip-file, if you cannot use SVN (that > uses http over port 80)? If svn is blocked, you cannot browse to > the downlocation either. > > > AFAIK, some SVN systems automatically provide a ZIP file of the > latest > state as a "nightly build". > So does the fpc team. But you cannot download them, because you are behind a firewall, so you cannot browse to the download location. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel