Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov

On 30/03/2016 14:45, Alexsander Rosa wrote:

How can I get GetAppConfigDir correctly on Windows XP (PT-BR)?
The path includes the word "configurações" (settings, in portuguese).

  dir_config := ExtractFilePath(GetAppConfigDirUTF8(false));
Any hints?


Can you reproduce this problem if you creating a new (empty) application 
project in Lazarus? Can you zip it and share?


Local tests with Lazarus 1.4.4 and 1.6, on Windows XP and 7, show that 
GetAppConfigDirUTF8 is operating correctly with various Unicode symbols 
in the path.


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


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov

On 01/04/2016 22:03, Bart wrote:
So, also on the 1.6 branch we directly call the Windows Wide API 
(provided you are NOT on a Win9x system). 


Sorry Bart, you are right.

I overlooked "Win32MajorVersion <= 4" after seeing "{$ifndef WinCE}". I 
went straight to GetAppConfigDirAnsi to discover issues with 
SysUtils.GetAppConfigDir, or specifically with GetWindowsSpecialDir. So, 
issues with GetWindowsSpecialDir are a concern only for FPC then.


Denis

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Marco van de Voort
On Fri, Apr 01, 2016 at 08:58:14AM +0200, Michael Van Canneyt wrote:
> > they've learned to love on Linux.
> 
> I seriously doubt this will have any effect.
> 
> Most (if not all) of their admin tools are GUI based. 
> That makes scripting them impossibile. Which is the point of scripting.

Most of those are based on COM/WMI and can be scripted very confortably and
OO in powershell.
 

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Marco van de Voort
On Fri, Apr 01, 2016 at 09:23:23AM +0100, Henry Vermaak wrote:
> I've come across ld running out of memory when linking the lazarus
> executable on my (very) old ARM laptop.  You can try to pass
> --no-keep-memory and --reduce-memory-overheads to ld, at the cost of
> performance.  I can't see how the build system has anything to do with
> it.

Maybe trying to disable smartlinking also helps.

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


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Bart
On 4/1/16, Denis Kozlov  wrote:

> Yes, Lazarus 1.7 uses SHGetFolderPath directly. Lazarus 1.6 fixes branch
> still uses GetWindowsSpecialDir.

>From the 1.6 fixes brach, file
($lazarus)/components/lazutils/winlazfileutils.inc

This happens in the initialization section when Windows version > WinMe:

_GetAppConfigDirUtf8 := @GetAppConfigDirWide;

function GetAppConfigDirWide(Global: Boolean; Create: boolean = false): string;
const
  CSIDL_GLOBAL = {$IFDEF
WINCE}CSIDL_WINDOWS{$ELSE}CSIDL_COMMON_APPDATA{$ENDIF WINCE};
  CSIDL_LOCAL = {$IFDEF WINCE}CSIDL_APPDATA{$ELSE}CSIDL_LOCAL_APPDATA{$ENDIF};
begin
  If Global then
Result := GetWindowsSpecialDirW(CSIDL_GLOBAL)
  else
Result := GetWindowsSpecialDirW(CSIDL_LOCAL);
...


And GetWindowsSpecialDirW is also in winlazfileutils.inc:

function GetWindowsSpecialDirW(ID :  Integer) : String;
Var
  APath : Array[0..MAX_PATH] of WideChar;
  WS: WideString;
  Len: SizeInt;
begin
  Result := '';
  if (CFGDLLHandle = 0) then
InitDLL;
  If (SHGetFolderPathW <> Nil) then
  begin
FillChar(APath{%H-}, SizeOf(APath), #0);
if SHGetFolderPathW(0,ID or CSIDL_FLAG_CREATE,0,0,@APATH[0]) = S_OK then
begin
  Len := StrLen(APath);
  SetLength(WS, Len);
  System.Move(APath[0], WS[1], Len * SizeOf(WideChar));
  Result := AppendPathDelim(Utf16ToUtf8(WS));
end;
  end
  else  //note: only on Windows < XP
Result := SysToUtf8(GetWindowsSpecialDir(ID));
end;

And SHGetFolderPathW is initialized like this:
  
Pointer(ShGetFolderPathW):=GetProcAddress(CFGDLLHandle,'SHGetFolderPathW');

So, also on the 1.6 branch we directly call the Windows Wide API
(provided you are NOT on a Win9x system).

I showed you the revision, you can read that I implemented it that
way, so why do you think it's not true what I'm telling you?
This was introduce way before the 1.6 was branched off.
I tested it with unicode characters (some oriental characters) outside
my system codepage (western european) and it works as expected.


Note:
Mattias renamed GetWindowsSpecialDirW into SHGetFolderPathUTF8 and
exposed it in the interface section of LazFileUtils.

Bart

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


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Bart
On 4/1/16, Denis Kozlov  wrote:

> This issue also affects Lazarus 1.6 and FPC 3.0+.
>
> GetWindowsSpecialDir in FPC 3.0.0 and trunk has severe encoding and buffer
> overrun issues. SHGetFolderPath links to SHGetFolderPathW if
> FPC_UNICODE_RTL is defined. But GetWindowsSpecialDir still calls it as
> SHGetFolderPathA, passing under-sized PChar buffer instead of PWideChar.

GetAppConfigDirUTF8 on Windows uses SHGetFolderPathW directly and then
does Utf16ToUtf8 on the result.
Bypassig the GetWindowsSpecialDir in fpc completely.
(revision 43495 by bart, Thu Nov 28 18:37:44 2013)

Bart

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


Re: [Lazarus] PDF generator, try 2

2016-04-01 Thread Jesus Reyes A.
On Thu, 31 Mar 2016 18:16:18 -0600, Graeme Geldenhuys  
 wrote:


BTW, out of curiosity, in the sample there is code like this:

  lPt1 := P.Matrix.Transform(15, 120);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Languages: English: Hello, World!');

  lPt1 := P.Matrix.Transform(40, 130);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Greek: -FÃåéÜ óïõ êüóìïò');

  lPt1 := P.Matrix.Transform(40, 140);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Polish: Witaj -B¶wiecie');

  lPt1 := P.Matrix.Transform(40, 150);
  P.WriteUTF8Text(lPt1.X, lPt1.Y, 'Portuguese: Ol-Aá mundo');

and then WriteUTF8Text and practically every other drawing function does  
something like this:


  p1.X := X;
  p1.Y := Y;
  DoUnitConversion(p1);

The question is why isn't the transformation matrix "active"?,

I mean the code above would be simply:

  p.SetTransformationMatrix(paramst o adjust the matrix) // or 
  p.Matrix.SetTransformationMatrix(params to adjust the matrix);

(it seems currently is not necessary because the matrix is auto-adjusted)  
and then ...


  P.WriteUTF8Text(15, 120, 'Languages: English: Hello, World!');
  P.WriteUTF8Text(40, 130, 'Greek: -FÃåéÜ óïõ êüóìïò');
  P.WriteUTF8Text(40, 140, 'Polish: Witaj -B¶wiecie');
  P.WriteUTF8Text(40, 150, 'Portuguese: Ol-Aá mundo');

Of course, before DoUnitConversion(p1); there should be a  
DoMatrixTransform(p1); etc.


One thought is that coordinates could be reused and in such case it might  
help but it doesn't seem to be a very strong reason, is interesting to  
know the real reason.


Jesus Reyes A.

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


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov
On 1 April 2016 at 16:55, Denis Kozlov  wrote:

> In Lazarus 1.4.4, GetAppConfigDirUTF8 and GetAppConfigFileUTF8 internally
> use GetAppConfigDirAnsi and GetAppConfigFileAnsi (unless running on Windows
> CE), respectively. These functions call ANSI version of Windows API and
> then map the result into UTF8.
>
> If there are characters in the path which do not exist in your current
> system ANSI code page, then you would get question marks instead,
> e.g. "Configura??es".
>


This issue also affects Lazarus 1.6 and FPC 3.0+.

GetWindowsSpecialDir in FPC 3.0.0 and trunk has severe encoding and buffer
overrun issues. SHGetFolderPath links to SHGetFolderPathW if
FPC_UNICODE_RTL is defined. But GetWindowsSpecialDir still calls it as
SHGetFolderPathA, passing under-sized PChar buffer instead of PWideChar.

Working on a fix.

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Anthony Walter
I am running mate as the desktop environment which may account for a
greater than normal memory usage than the default Raspbian environment,
though it's not too much more.

I will say this though, increasing the swap file from the default of 100MB
to 1024MB seems to alleviate the problem.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov
On 1 April 2016 at 15:02, Alexsander Rosa  wrote:

> Lazarus 1.4.4 with FPC 2.6.4.
>


In Lazarus 1.4.4, GetAppConfigDirUTF8 and GetAppConfigFileUTF8 internally
use GetAppConfigDirAnsi and GetAppConfigFileAnsi (unless running on Windows
CE), respectively. These functions call ANSI version of Windows API and
then map the result into UTF8.

If there are characters in the path which do not exist in your current
system ANSI code page, then you would get question marks instead,
e.g. "Configura??es".

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


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Alexsander Rosa
Lazarus 1.4.4 with FPC 2.6.4. It's on a TLabel.

2016-03-30 13:36 GMT-03:00 Bart :

> On 3/30/16, Alexsander Rosa  wrote:
>
> Which Lazarus version?
> Which Fpc version?
> Did you define DisableUtf8RTL in project options?
>
> Lazarus trunk:
>
>   s := getappconfigdirutf8(false);
>   e := ExtractFilePath(getappconfigdirutf8(false));
>   showmessage('GetAppConfigDir(False) = '^m'"'+s+'"'+
>   ^m^m'ExtractFilePath(GetAppConfigDir(False)) = '+
>   ^m'"'+e+'"');
>
> Gives me
> [Window Title]
> test
>
> [Content]
> GetAppConfigDir(False) =
> "C:\Users\บลูเบอ\AppData\Local\test\"
>
> ExtractFilePath(GetAppConfigDir(False)) =
> "C:\Users\บลูเบอ\AppData\Local\test\"
>
> [OK]
>
> Notice that the username (บลูเบอ) is outside my current system
> codepage and still isdisplayed correctly.
>
> (The code for getAppConfigDirUtf8 in 1.6 does not differ from trunk.)
>
> When do you see the "Configura??es", in a GUI window (like showmessage
> or a TLabel) or when written to console with writeln??
>
> Bart
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 
Atenciosamente,
Alexsander da Rosa
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Graeme Geldenhuys
On 2016-04-01 12:44, Santiago A. wrote:
> 
> Me too, but it would a nice plus if you also give me nice UI.

I guess then you have best of both worlds - at the expense of the
developer that had to implement all that. :)

In fact my mail server (SurgeMail) has exactly what you suggest. I can
edit text config files directly, use a console tool to set values one at
a time, or use the built-in webserver and web interface. No matter what
interface you use, all settings are stored in the same text config files.

I remember from years back, SuSE and OpenSuSE linux distro had some
fancy config tool called YaST, which had a Console and GUI interface for
managing pretty much every service included with the distro. So with
that being said, maybe SuSE is then a good recommendation for any
Windows centric admins moving to Linux.


Regards,
  - Graeme -

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

My public PGP key:  http://tinyurl.com/graeme-pgp

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


Re: [Lazarus] The return of the dreaded "The IDE is still building"

2016-04-01 Thread Michael Van Canneyt



On Fri, 1 Apr 2016, Dmitry Boyarintsev wrote:


On Fri, Apr 1, 2016 at 4:52 AM, Michael Van Canneyt 
wrote:



See attachment.

The IDE main window caption does not say 'building', and it is not
building.



The messages window shows the package compilation is in progress.
I typically get this message when trying to run a compilation while
something else compiles.

It feels like IDE doesn't distinguish between IDE and a package building.


Package compilation was long finished. But there was an error in the
sources. It seems the IDE didn't detect this.

After aborting the 'compile', I recompiled, and then it showed me the error.

Michael.

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


Re: [Lazarus] The return of the dreaded "The IDE is still building"

2016-04-01 Thread Dmitry Boyarintsev
On Fri, Apr 1, 2016 at 4:52 AM, Michael Van Canneyt 
wrote:

>
> See attachment.
>
> The IDE main window caption does not say 'building', and it is not
> building.
>

The messages window shows the package compilation is in progress.
I typically get this message when trying to run a compilation while
something else compiles.

It feels like IDE doesn't distinguish between IDE and a package building.

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Santiago A.
El 01/04/2016 a las 13:19, Graeme Geldenhuys escribió:

> Give me good old text configs any time of the time. Easy to edit, easy
> to backup.
>

Me too, but it would a nice plus if you also give me nice UI.

Although I had sometimes to edit configuration of virtual hosts with
includes etc,  I don't think plesk or cpanel or webmin are bad steps.

-- 
Saludos

Santi
s...@ciberpiula.net


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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Schnell

On 04/01/2016 01:23 PM, Sven Barth wrote:


"it" meant the GUI,

I see.  I misunderstood that with "only with Windows Store Apps" you 
wanted to exclude "normal" Windows services.


-Michael

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Sven Barth
Am 01.04.2016 13:21 schrieb "Michael Schnell" :
>
> On 04/01/2016 01:13 PM, Sven Barth wrote:
>>
>>
>> However classical WinAPI can't access it. You can access it only with
Windows Store Apps and then only one at a time. Though you can runs these
platforms headless as well without problems.
>>
> That is not true (and a very common misconception).
>
> A colleague of min already did run Windows services done with Delphi on
Win IoT.
>
> The complete Windows API seems to work if you don't use GUI functions
(which would be called widgets in Linux). Timers and TCP/IP do work .

"it" meant the GUI, WinAPI applications can not access the GUI on IoT
systems. From our past discussions you should know that I know that by now.

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Schnell

On 04/01/2016 01:13 PM, Sven Barth wrote:


However classical WinAPI can't access it. You can access it only with 
Windows Store Apps and then only one at a time. Though you can runs 
these platforms headless as well without problems.



That is not true (and a very common misconception).

A colleague of min already did run Windows services done with Delphi on 
Win IoT.


The complete Windows API seems to work if you don't use GUI functions 
(which would be called widgets in Linux). Timers and TCP/IP do work .


-Michael

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Graeme Geldenhuys
On 2016-04-01 10:22, Santiago A. wrote:
> but 90% of times you shouldn't have to mess with
> configuration files, each one with its one syntax (that's what many unix
> products miss and  windows shines)

This only seems to be an issue for Windows centric people - for
everybody else it has never been a problem. I have been maintaining
Unix-like servers for years. All types of services (web, mail, news, NFS
etc). I've never had a problem configuring them via config files, and
the documentation and examples were always excellent.

As for support (when you are stuck). Post your config file somewhere on
the web, others can take a look and immediately instruct you on what you
did wrong. Under Windows, you have NO such option, because the
configuration is hidden is some binary blob or deep in the registry mess.

Give me good old text configs any time of the time. Easy to edit, easy
to backup.

Regards,
  - Graeme -

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

My public PGP key:  http://tinyurl.com/graeme-pgp

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Sven Barth
Am 01.04.2016 11:20 schrieb "Henry Vermaak" :
>
> On Fri, Apr 01, 2016 at 09:12:10AM +, Mark Morgan Lloyd wrote:
> > Henry Vermaak wrote:
> > >On Fri, Apr 01, 2016 at 12:39:15AM -0400, Anthony Walter wrote:
> > >>My question is can someone look into this issue so that building
Lazarus in
> > >>environments where free memory is than 700MB does not result in
Lazarus
> > >>build failures?
> > >
> > >I've come across ld running out of memory when linking the lazarus
> > >executable on my (very) old ARM laptop.  You can try to pass
> > >--no-keep-memory and --reduce-memory-overheads to ld, at the cost of
> > >performance.  I can't see how the build system has anything to do with
> > >it.
> >
> > It's always worked fine for me on things like NSLU-2 provided that the
> > overall memory (i.e. RAM + swap) is at least 512Mb. It will be
unfortunate
> > if recent builds of FPC and/or Lazarus have pushed this requirement
upwards,
> > but so far I've not seen any problems on a Raspberry Pi (both 1 and 2)
> > running Raspbian or Debian.
>
> Yes, I remember that the slug needed swap.  Swap is painfully slow,
> though, so I'd recommend reducing ld's memory usage instead.  I wonder
> if anyone has tried the gold linker.  It was supposed to be faster, I
> don't know about memory usage.

FPC does not support the gold linker (though I don't remember right now
what the problems were).

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Sven Barth
Am 01.04.2016 09:52 schrieb "Michael Van Canneyt" :
>
>
>
> On Fri, 1 Apr 2016, Michael Schnell wrote:
>
>> On 04/01/2016 08:58 AM, Michael Van Canneyt wrote:
>>>
>>>
>>> Some years ago they announced that the sever could run "without GUI".
>>
>>
>> In fact "Windows IOT" is windows 10 without the GUI API (i.e. you can
run Aervicesm but you can't run applications).
>>
>> So this is viable/sensible/possible in the end.
>
>
> "Windows IOT" is a misnomer. Windows = GUI. The name kind of gives it
away.

However classical WinAPI can't access it. You can access it only with
Windows Store Apps and then only one at a time. Though you can runs these
platforms headless as well without problems.

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Mark Morgan Lloyd

wkitt...@windstream.net wrote:

ummm... shouldn't the compiling process use as much swap as needed if 
real memory it too tight (aka not enough)??


Yes, and that's outside the remit of Lazarus etc.

the swap size is what attracted my attention because normally swap is 
the same or double what installed real memory is... eg: 16G RAM means 
that 16G to 32G of swap is configured...


That's at the discretion of whoever built the distro, it's only a 
convention. Check the output of  swapon -s  and monitor console output 
for kernel messages suggesting there might be a problem.


In the case of Raspbian the swap is in a file rather than a separate 
partition, and I've got a vague recollection that it has to be 
explicitly enabled the first time the system is run.


If swap isn't working then something at the system level is broken. Once 
I'd hit on the right binaries and sources (initially, a patched 2.6.4) 
I've had no significant problems on either Raspbian or pukka Debian 
running on either a RPi 1 or 2 (3 not tested yet), with swap on either 
card or a USB-connected Flash stick.


--
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] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Mark Morgan Lloyd

Henry Vermaak wrote:


It's always worked fine for me on things like NSLU-2 provided that the
overall memory (i.e. RAM + swap) is at least 512Mb. It will be unfortunate
if recent builds of FPC and/or Lazarus have pushed this requirement upwards,
but so far I've not seen any problems on a Raspberry Pi (both 1 and 2)
running Raspbian or Debian.


Yes, I remember that the slug needed swap.  Swap is painfully slow,
though, so I'd recommend reducing ld's memory usage instead.  I wonder
if anyone has tried the gold linker.  It was supposed to be faster, I
don't know about memory usage.


Lazarus took a week to build, but would do so reliably. That sort of 
performance takes me back to my mainframe days :-)


It does occur to me that this could be something to do with the way that 
the linker has been built, i.e. not strictly a Lazarus (or makefile 
etc.) problem.


--
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] Can some fix this "make" issue? Pi related.

2016-04-01 Thread wkitty42

On 04/01/2016 03:25 AM, Anthony Walter wrote:

Here is what my Pi looks like with a ssh session and 64MB reserved for the GPU.
Note the free memory is 854MB:

pi@retropie:~ $ free -m
  total   used   free sharedbuffers cached
Mem:   925571354  6 20479
-/+ buffers/cache: 70854
Swap:   99  0 99

Here is what it looks like with and ssh session, 128MB reserved for the GPU,
mate desktop running, and Lazarus opened:

pi@retropie:~ $ free -m
  total   used   free sharedbuffers cached
Mem:   862413449 16 32199
-/+ buffers/cache:181681
Swap:   99  0 99

Rebuilding the IDE will actually fail at this point. Note the free memory is
actually 681MB.


ummm... shouldn't the compiling process use as much swap as needed if real 
memory it too tight (aka not enough)??


the swap size is what attracted my attention because normally swap is the same 
or double what installed real memory is... eg: 16G RAM means that 16G to 32G of 
swap is configured...


--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Santiago A.
El 01/04/2016 a las 10:37, Michael Van Canneyt escribió:
> I cannot understand that Canonical agreed to cooperate on this.
> It's called shooting in your own foot...
>

Me neither.

>> And don't deceive yourself. Scripts are the most powerful solution, but
>> a GUI need less knowledge and expertise, so they may be cheaper in the
>> long run.
>
> You therewith assert that microsoft advocates ignorance and stupidity
> ? :-)

It is a wise strategy. There are more middle users than gurus.

> All very nice till you hit a really hard problem and then you need to
> call an expert anyway, who charges you astronomical amounts of money
> for deleting a
> registry key or so. It's a nice deceit...
Yes, when you hit a hard problem, windows is a blackbox.  There is the
old linux saying "Windows makes easy what is easy and impossible what is
difficult". You needn't to convince me.

Nevertheless, Unix world should have more configurations tools with a
good UI (graphic or not).
If you need to do hard things, you must be able to tweak with well
documented configuration files (that's what windows doesn't have and
unix products shines), but 90% of times you shouldn't have to mess with
configuration files, each one with its one syntax (that's what many unix
products miss and  windows shines)

The Cherokee web server (now a dead project) offered a configuration
utility with a web UI as part of the product. That is the right path.

Well, this is going too off topic.

-- 
Saludos

Santiago A.
s...@ciberpiula.net


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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Van Canneyt



On Fri, 1 Apr 2016, Santiago A. wrote:



I agree that is not easy. Windows has created his own set of services,
uses a strange jargon and nomenclature for services and stuff that has
been there for years in unix world. But that's its strategy: Make unix
admins a little more comfortable with windows concepts, jargon and
products. Maybe next time a unix admin faces a windows product, he won't
push for only-unix solution so hard.


Yes, they are a wolf in sheepskin...

I cannot understand that Canonical agreed to cooperate on this.
It's called shooting in your own foot...


And don't deceive yourself. Scripts are the most powerful solution, but
a GUI need less knowledge and expertise, so they may be cheaper in the
long run.


You therewith assert that microsoft advocates ignorance and stupidity ? :-)

All very nice till you hit a really hard problem and then you need to call 
an expert anyway, who charges you astronomical amounts of money for deleting a

registry key or so. It's a nice deceit...

Michael.

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


Re: [Lazarus] Raspberry Pi 3 build issues

2016-04-01 Thread Mark Morgan Lloyd

Florian Klämpfl wrote:

Am 25.03.2016 um 11:19 schrieb Mark Morgan Lloyd:

Bo Berglund wrote:


It should be noted that the default swap file size of Raspbian is only
100MB which combined with a possible GPU memory settings will occasionally
cause Lazarus builds to fail mysteriously.

I originally had instructions for usage that specifically increased
swap to 1000MB to get around this issue. But a forum user repeatedly
claimed it was not necessary so I took tha part out and it does work
on the RPi3 at least when I tried. Afetr all it has more RAM.
But I agree that having bigger swap might not hurt anyway.

You'll generally need something like 512Mb of available memory, i.e. RAM + 
swap, with the linker in
particular benefiting from extra. Around here, I'm being firmly discouraged (by 
other colleagues
with an electronics background) from putting swap on the card, but instead 
putting it on an external
USB device with wear levelling.



SD cards do wear leveling as well.


My understanding is that some do and some don't.

--
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] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Henry Vermaak
On Fri, Apr 01, 2016 at 09:12:10AM +, Mark Morgan Lloyd wrote:
> Henry Vermaak wrote:
> >On Fri, Apr 01, 2016 at 12:39:15AM -0400, Anthony Walter wrote:
> >>My question is can someone look into this issue so that building Lazarus in
> >>environments where free memory is than 700MB does not result in Lazarus
> >>build failures?
> >
> >I've come across ld running out of memory when linking the lazarus
> >executable on my (very) old ARM laptop.  You can try to pass
> >--no-keep-memory and --reduce-memory-overheads to ld, at the cost of
> >performance.  I can't see how the build system has anything to do with
> >it.
> 
> It's always worked fine for me on things like NSLU-2 provided that the
> overall memory (i.e. RAM + swap) is at least 512Mb. It will be unfortunate
> if recent builds of FPC and/or Lazarus have pushed this requirement upwards,
> but so far I've not seen any problems on a Raspberry Pi (both 1 and 2)
> running Raspbian or Debian.

Yes, I remember that the slug needed swap.  Swap is painfully slow,
though, so I'd recommend reducing ld's memory usage instead.  I wonder
if anyone has tried the gold linker.  It was supposed to be faster, I
don't know about memory usage.

Henry

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Mark Morgan Lloyd

Henry Vermaak wrote:

On Fri, Apr 01, 2016 at 12:39:15AM -0400, Anthony Walter wrote:

My question is can someone look into this issue so that building Lazarus in
environments where free memory is than 700MB does not result in Lazarus
build failures?


I've come across ld running out of memory when linking the lazarus
executable on my (very) old ARM laptop.  You can try to pass
--no-keep-memory and --reduce-memory-overheads to ld, at the cost of
performance.  I can't see how the build system has anything to do with
it.


It's always worked fine for me on things like NSLU-2 provided that the 
overall memory (i.e. RAM + swap) is at least 512Mb. It will be 
unfortunate if recent builds of FPC and/or Lazarus have pushed this 
requirement upwards, but so far I've not seen any problems on a 
Raspberry Pi (both 1 and 2) running Raspbian or Debian.


--
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] The return of the dreaded "The IDE is still building"

2016-04-01 Thread Michael Van Canneyt


Hi,

See attachment.

The IDE main window caption does not say 'building', and it is not building.

It happens very seldom these days, but still. Sigh... :(

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Mattias Gaertner
On Fri, 1 Apr 2016 03:25:47 -0400
Anthony Walter  wrote:

> Calling the compiler directly works on most any project/program. I am not
> sure how to build Lazarus (with my preferred packages) using lazbuild or
> fpc. The "make useride" command fails exactly like I described in my
> original post.

make useride calls "lazbuild --build-ide=", which calls the compiler.
You can call "./lazbuild --build-ide= --max-process-count=1" directly
to avoid calling make and use at most one process.

Make sure to strip lazbuild to avoid loading debugging and compile it
with optimizations to use less memory.

Have you tried building lazbuild with cmem?

If this does not suffice, call the compiler directly using the command
shown by lazbuild.

Is it possible to add virtual memory to the Pi?

Mattias

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Graeme Geldenhuys
On 2016-04-01 07:58, Michael Van Canneyt wrote:
> Most (if not all) of their admin tools are GUI based. 
> That makes scripting them impossibile.

Plus the fact that you can transfer existing configurations to newly
built servers to replace the old ones. On Unix/Linux, it is simply a
matter of copying config files from /etc/ and /usr/local/etc/. Can't get
easier (and more convenient) than that.


> Some years ago they announced that the sever could run "without GUI".
> I think it was windows server 2012. Till you need to run an installer

Haha... very good point. :)


Regards,
  - Graeme -

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

My public PGP key:  http://tinyurl.com/graeme-pgp

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Henry Vermaak
On Fri, Apr 01, 2016 at 12:39:15AM -0400, Anthony Walter wrote:
> My question is can someone look into this issue so that building Lazarus in
> environments where free memory is than 700MB does not result in Lazarus
> build failures?

I've come across ld running out of memory when linking the lazarus
executable on my (very) old ARM laptop.  You can try to pass
--no-keep-memory and --reduce-memory-overheads to ld, at the cost of
performance.  I can't see how the build system has anything to do with
it.

Henry

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Van Canneyt



On Fri, 1 Apr 2016, Michael Schnell wrote:


On 04/01/2016 09:53 AM, Michael Van Canneyt wrote:

"Windows IOT" is a misnomer. Windows = GUI. The name kind of gives it away.
Of course language-wise you are right, but politically of course M$ needs to 
stick to the "Windows" name, even if stripping off any sense of that.


This kind of reasoning only can come from marketeers.
It's a bit like BMW with their huge version of the 'mini'. 
Someone should explain to them what 'mini' actually means...


Luckily, Douglas Adams had good ideas about what to do with such people :-)

Anyway, we are diverting.

Michael.

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Martin Schreiber
On Thursday 31 March 2016 20:30:59 Anthony Walter wrote:
> I thought this was newsworthy and of interest to us:
>
> https://blog.xamarin.com/xamarin-for-all/

A date effect maybe? ;-)

Martin

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Van Canneyt



On Fri, 1 Apr 2016, Michael Schnell wrote:


On 04/01/2016 08:58 AM, Michael Van Canneyt wrote:


Some years ago they announced that the sever could run "without GUI".


In fact "Windows IOT" is windows 10 without the GUI API (i.e. you can run 
Aervicesm but you can't run applications).


So this is viable/sensible/possible in the end.


"Windows IOT" is a misnomer. Windows = GUI. 
The name kind of gives it away.


Michael.

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Schnell

On 04/01/2016 08:58 AM, Michael Van Canneyt wrote:


Some years ago they announced that the sever could run "without GUI".


In fact "Windows IOT" is windows 10 without the GUI API (i.e. you can 
run Aervicesm but you can't run applications).


So this is viable/sensible/possible in the end.

-Michael

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Schnell

On 03/31/2016 08:30 PM, Anthony Walter wrote:

I thought this was newsworthy and of interest to us:
Am I wrong feeling that the (IMHO rather viable) CIL (aka".Net") 
initiative, once launched by Microsoft is declining due to the 
ubiquitous rise of Java  ?


In fact Microsoft took Silverlight to grave,  recently I did not hear 
much about Mono and Moonlight,


Open sourcing Xamarin to me seems just a sign that nobody can earn any 
money with same, so it's just another indication of the thesis.


The fpc community never seemed to have much interest for CIL 
(Embarcadero started two questionable attempts with "Delphi for .Net" 
and the acquisition of Oxygen).


fpc instead seems to be rather far into creating Java/Dalvik Byte/Word code

-Michael

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Anthony Walter
Calling the compiler directly works on most any project/program. I am not
sure how to build Lazarus (with my preferred packages) using lazbuild or
fpc. The "make useride" command fails exactly like I described in my
original post. As a side note, I am able to have GPU memory set to 128MB or
more and have "make all" succeed if I have no window manage running and
instead ssh into the pi and execute the "make all" command from a remote
tty session. Again this is because running without a window manager frees
up enough memory for "make all" to succeed.

Here is what my Pi looks like with a ssh session and 64MB reserved for the
GPU. Note the free memory is 854MB:

pi@retropie:~ $ free -m
 total   used   free sharedbuffers cached
Mem:   925571354  6 20479
-/+ buffers/cache: 70854
Swap:   99  0 99

Here is what it looks like with and ssh session, 128MB reserved for the
GPU, mate desktop running, and Lazarus opened:

pi@retropie:~ $ free -m
 total   used   free sharedbuffers cached
Mem:   862413449 16 32199
-/+ buffers/cache:181681
Swap:   99  0 99

Rebuilding the IDE will actually fail at this point. Note the free memory
is actually 681MB.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Xamarin becomes free and open-source

2016-04-01 Thread Michael Van Canneyt



On Thu, 31 Mar 2016, vfclists . wrote:


On 31 March 2016 at 21:56, Denis Kozlov  wrote:


On 31/03/2016 21:31, vfclists . wrote:


They are going all out against Apple and Redhat.



You meant Apple and Google maybe? They target Windows, Mac/iOS and Android.

A wide selection of supported platforms is where FPC and Lazarus defiantly
have an edge.

Denis


They are going after the whole Linux.Unix system. They want Linux admins and
developers to realize that they can have good GUI development and
server-management
tools available on Windows and still have all the command line goodies
they've learned to love on Linux.


I seriously doubt this will have any effect.

Most (if not all) of their admin tools are GUI based. 
That makes scripting them impossibile. Which is the point of scripting.


Some years ago they announced that the sever could run "without GUI".
I think it was windows server 2012. Till you need to run an installer to
install some software... And all windows software installers are GUI based.

We threw out windows servers, and the admin crew is all the more happy for
it, because now they can script literally everything.

More importantly, windows is still a black box. Something happens, you get
completely stuck. I still need to encounter the problem I cannot solve with
the use of strace on linux.

Michael.

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


Re: [Lazarus] Can some fix this "make" issue? Pi related.

2016-04-01 Thread Mattias Gaertner
On Fri, 1 Apr 2016 00:39:15 -0400
Anthony Walter  wrote:

>[...]
> My question is can someone look into this issue so that building Lazarus in
> environments where free memory is than 700MB does not result in Lazarus
> build failures?

Does it compile when you directly call the compiler?

Mattias

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


Re: [Lazarus] PDF generator, try 2

2016-04-01 Thread Michael Van Canneyt



On Fri, 1 Apr 2016, Ondrej Pokorny wrote:


On 31.03.2016 22:58, Michael Van Canneyt wrote:

I suspect this can be easily implemented.

Synopse pdf is the reason I started fppdf. Synopse is heavily Windows
centric, but otherwise quite capable.


Yes, correct. I was who implemented exact drawing to Synopse PDF (i.e. 
rendering to exact rect) because the font sizes on Canvas and PDF were quite 
different. IIRC you compare the actual text width with the wanted text width 
and you scale the text box with a transformation.


Coordinate transformations are explicitly part of the PDF generator design.

I also implemented underline text and did more enhancements, I don't remember 
exactly any more. It was years ago.


Now I stay before a choice to use Synopse PDF (and to have PDF export 
Windows-only) or create a new bindings to fppdf.


Well, obviously I cannot make this choice for you. 
For me there was no choice: my software runs on headless linux servers. 
So maybe you will profit from my lack of choice :-)



Fppdf is a young library (although it required many months of work)
I am sure many improvements will be made as the reporting library develops.

A canvas descendant that renders to pdf is planned, but not very high
priority.

Patches and suggestions are definitely welcome. The library is intended for
production, so quality is important.


I have to take a look at fppdf. I'll need a PDF export in the next months. If 
I decide for fppdf you can be sure that I'll make you busy with sending 
patches :)


No worries there, they will be very welcome :)

Michael.

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