Re: [fpc-pascal] Could someone explain me which the correct triggering of the BeforeDestruction method?

2016-09-06 Thread silvioprog
On Tue, Sep 6, 2016 at 5:10 PM, silvioprog  wrote:

> On Tue, Sep 6, 2016 at 5:18 AM, Maciej Izak  wrote:
>
>>
>> 2016-09-05 17:56 GMT+02:00 silvioprog :
>>
>>> FPC triggers 132, Delphi 1342. :-/
>>
>>
>> Please report on bug tracker. IMO in presented context - definitely bug.
>>
>
> Sweet, I'm going to do it tonight. :-)
>

Done: http://bugs.freepascal.org/view.php?id=30570 .

-- 
Silvio Clécio
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Cross platform mobile development

2016-09-06 Thread donald . pedder
Hi Ryan,

   Just so happens this is what I've been immersed in the last few
months. I have an idea for an app I'm working on - like you I have
Pascal experience, but unlike you I have no Apple experience, so I've
been trying to find the best way for me to code for Apple as well.

   I did make some enquiries about ways to use Pascal, and was told
there are ways to do it, but it still comes down to using some Java
interfaces. Didn't pursue that much as other ways of doing it came to
my attention which looked more straight-forward...

   The first I looked at was Phonegap. This works on hybrid
technology of HTML/CSS/XML. You can compile in the cloud for platforms
other than whatever you have, though you do still need to have at
least an Apple developer certificate to compile for Apple (this is an
issue for me, and one I'm still trying to resolve. Been trying to get
OSX going on my PC in a VM, but no success yet - I didn't find out
until AFTER I got my new computer that you need to have OSX to get
certificates to test on iOS. :-( There are other options like Mac In
The Cloud, but you wouldn't need those of course, just to enrol in the
developer program).

   Finally got a working Hello World on Phonegap, when I found out
about Xamarin, and this is where I'm heading at the moment. It is
based on C#, so gives a more-native experience for the user than
hybrid technology, and using Xamarin forms for the front-end you can
have close to 100% code-share across platforms. I have Hello World
working on Android, but still working on my OSX issue in order to test
the Apple version (Visual Studio gives you the option of connecting to
a networked Mac for credentials/testing of Apple side, and looking
into this at the moment. This is where Mac In The Cloud could help if
I can't get OSX working on my computer and can't find a friend to help
out here).

   Let me know if you have any specific questions about Phonegap or
Xamarin (or let me know if you find a good Pascal-based solution :-)
).

regards,
   Donald.

- Original Message -
From: "FPC-Pascal users discussions" 
To:"FPC-Pascal users discussions" 
Cc:
Sent:Tue, 6 Sep 2016 15:54:04 -0600
Subject:[fpc-pascal] Cross platform mobile development

 Coming from the background of a Pascal programmer (on Mac
specifically) does anyone have any ideas as to what the best cross
platform development environment/language is right now for mobile
apps? I’d like to do some learning and maybe start some projects but
I’m not sure if there are any that could be made to work with FPC or
if not something more similar than not. iOS from Free Pascal works but
Java is more complicated from what I’ve been learning.

 Thanks.

 Regards,
 Ryan Joseph

 ___
 fpc-pascal maillist - fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-
Email sent using Optus Webmail
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Cross platform mobile development

2016-09-06 Thread Ryan Joseph
Coming from the background of a Pascal programmer (on Mac specifically) does 
anyone have any ideas as to what the best cross platform development 
environment/language is right now for mobile apps? I’d like to do some learning 
and maybe start some projects but I’m not sure if there are any that could be 
made to work with FPC or if not something more similar than not. iOS from Free 
Pascal works but Java is more complicated from what I’ve been learning.

Thanks.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Could someone explain me which the correct triggering of the BeforeDestruction method?

2016-09-06 Thread silvioprog
On Tue, Sep 6, 2016 at 5:18 AM, Maciej Izak  wrote:

>
> 2016-09-05 17:56 GMT+02:00 silvioprog :
>
>> FPC triggers 132, Delphi 1342. :-/
>
>
> Please report on bug tracker. IMO in presented context - definitely bug.
>

Sweet, I'm going to do it tonight. :-)

-- 
Silvio Clécio
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] generic way of writing Sets or Enum values to a String

2016-09-06 Thread Graeme Geldenhuys
On 2016-09-06 18:07, leledumbo wrote:
> Take mine:

Fantastic, I'll give it a go tomorrow. Many thanks.  I guess there is a
use for Generics then. ;-)

Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0 deb packages?

2016-09-06 Thread Tomas Hajny
On Tue, September 6, 2016 10:36, Karoly Balogh (Charlie/SGR) wrote:
> On Mon, 5 Sep 2016, Jon Foster wrote:


Hi,

(now putting my "mailing list member" hat on ;-) )

>> After I banged on it for many hours applying several crude patches it
>> finally makes packages again. But all of this leads me to believe that
>> Debian packages for FPC are no longer maintained / supported? If so
>> what's the story? Maybe my crude hacks could be put to use or I could
>> help out some way?

The Debian rules are primarily maintained by a Debian package maintainer,
not directly inside the SVN repository of FPC (although we're more than
happy to merge them to mainstream if they are supplied to us) and not
necessarily up to the latest changes of FPC. See
https://packages.debian.org/source/sid/fpc for information about the
current status there.


> Well, I guess the main issue is, Debian splits the FPC "packages" into
> separate packages. :) Because it not only installs the package, but all of
> its dependencies (for example C static link libs), therefore a global FPC
> "packages" package with all its dependencies would be *HUGE*. But maybe
> for 3.0 that decision should have been modified, and Debian should have
> bundled a 'set of packages' as a .deb package, instead of each package as
> a separate .deb alone... I mean the various FCL or the various RTL
> packages are certainly just one "package" from the user PoV...
 .
 .

See the link above (or install/debian/*.in in fpcbuild) - such a grouping
is indeed performed in Debian.

I leave the other parts of the original message to others knowing more
about the current status than me.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0 deb packages?

2016-09-06 Thread Tomas Hajny
On Tue, September 6, 2016 10:36, Karoly Balogh (Charlie/SGR) wrote:
> On Mon, 5 Sep 2016, Jon Foster wrote:


Hello everybody,

Please note that the original poster (Jon Foster) is apparently not
subscribed to the mailing list (although he has not mentioned this in his
post). I suggest that you include him in Cc: of your replies - forwarding
the response of Charlie to his e-mail below to make sure it gets to him...

Regards

Tomas
(one of fpc-pascal mailing list moderators)


> Hi,
>
>> After I banged on it for many hours applying several crude patches it
>> finally makes packages again. But all of this leads me to believe that
>> Debian packages for FPC are no longer maintained / supported? If so
>> what's the story? Maybe my crude hacks could be put to use or I could
>> help out some way?
>
> Well, I guess the main issue is, Debian splits the FPC "packages" into
> separate packages. :) Because it not only installs the package, but all of
> its dependencies (for example C static link libs), therefore a global FPC
> "packages" package with all its dependencies would be *HUGE*. But maybe
> for 3.0 that decision should have been modified, and Debian should have
> bundled a 'set of packages' as a .deb package, instead of each package as
> a separate .deb alone... I mean the various FCL or the various RTL
> packages are certainly just one "package" from the user PoV...
>
> And yes, I'm not sure if the .deb packaging is still maintained in FPC's
> own build system. Maybe the people doing the actual packaging for Debian
> could help you there?
>
>  > My current need is the StrUtils unit, which I must say I'm shocked to
>> find is not part of the core RTL but is in a package?!?! I don't get
>> that but that's your decision.
>
> Again, that's because FPC doesn't think about "packages" the way Debian
> and Linux distributions in general think. Remember, we deploy the same
> structure on all of our supported platforms. We even provide Linux binary
> builds, where "packages" is just one archive, with a specific directory
> structure and that's it.
>
> So we moved out large chunks from the RTL (including strutils) to separate
> packages, because it reduces compiler build times and therefore speeds up
> development. Also, it's makes easier the maintenance of some RTL features,
> which are in fact separate from the rest of the RTL really. I guess the
> Debian packaging situation was simply not considered while making that
> decision, given most FPC developers themselves don't use distribution
> provided packages.
>
> Anyway, packages not finding a given unit in another package could be
> probably fixed by adding additional dependencies to that other package.
>
> That said, if anyone feels like helping out with the current packaging
> situation on whatever platform, he's certainly very welcomed to do so. :)
>
> Cheers,
> --
> Charlie


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] THashedStringList doesn't honour CaseSensitive?

2016-09-06 Thread Giuliano Colla

Il 02/09/2016 14:20, Michael Van Canneyt ha scritto:

On Fri, 2 Sep 2016, Giuliano Colla wrote:

In my application I stumbled into a problem with a search in a 
HashedStringList: IndexOfName doesn't return the proper index if the 
search string doesn't match the name case, even if CaseSensitive is 
set to false.


For common sense and Delphi compatibility 
(http://docwiki.embarcadero.com/Libraries/Berlin/en/System.IniFiles.THashedStringList_Properties) 
CaseSensitive should be supported.


Am I doing something wrong, or it is an fpc missing feature?


Please report a bug. 


Done:

http://bugs.freepascal.org/view.php?id=30568

I have attached a small patch which should fix the issue.

As a side issue, Delphi's TIniFiles, (at least in the CLX version which 
I checked), uses a THashedStringList for better efficiency. Once 
THashedStringList supports the CaseSensitive flag, it can be used in fpc 
too.


Giuliano


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to sent totally custom parameters to the linker ?

2016-09-06 Thread fredvs
>I've had no problem with e.g. 
>export OPT='-k-t -k--reduce-memory-overheads -k--no-keep-memory' 

Ha, I will try this one too.

Thanks Mark.

Fre;D



-
Many thanks ;-)
--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/How-to-sent-totally-custom-parameters-to-the-linker-tp5726266p5726286.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-06 Thread Marc Santhoff
On Di, 2016-09-06 at 10:42 -0700, fredvs wrote:
> > No, I didn't. I only compile native programs.
> 
> Huh, it is what I wanted to ask...
> 
> Did you try to compile on a native FreeBSD 32 bit using -XX parameter (smart
> link).

No, I have no FreeBSD 32 Bit at hand, sorry.

Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to sent totally custom parameters to the linker ?

2016-09-06 Thread fredvs
 
Andrew Haines wrote
> On 09/05/2016 07:27 PM, fredvs wrote:
>> Hello.
>>
>> Is it possible to sent new-other parameters to the linker ?
>> Without the use of *-k*
> 
> , fpc sent this to the linker:
>>
>> [5.227] (9017) Using util /usr/bin/ld
>> [5.227] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m
>> elf_x86_64  --dynamic-linker=/lib64/ld-linux-x86-6
>> 4.so.2   -s -L. -o ./test ./link.res"
>>
>> Using the *-k* parameter, this is sent (with *-ksomething -kotherting*):
>>
>> [5.224] (9017) Using util /usr/bin/ld
>> [5.224] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m
>> elf_x86_64  *something* *otherthing* --dynamic-linker=
>> /lib64/ld-linux-x86-64.so.2   -s -L. -o ./test ./link.res"
>>
>> You may see that the parameters "something" "otherthing" are inserted
>> afterelf_x86_64.
>>
>> But how to sent totally custom parameters, without those given by fpc ?
>>
>>
> 
> If you use -s the compiler will not link your program but leave a script 
> "ppas.sh" that you can edit and run manually to assemble and link your 
> program. Also it leaves a link.res file that if you really want to you 
> can edit.
> 
> Regards,
> 
> Andrew
> __

Excellent, it is even better that my wishes. 

Many thanks Andrew.

Fre;D




-
Many thanks ;-)
--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/How-to-sent-totally-custom-parameters-to-the-linker-tp5726266p5726284.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-06 Thread fredvs
> No, I didn't. I only compile native programs.

Huh, it is what I wanted to ask...

Did you try to compile on a native FreeBSD 32 bit using -XX parameter (smart
link).

Fre;D



-
Many thanks ;-)
--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Linking-to-Linux-on-a-FreeBSD-system-with-Linux-emulated-tp5726205p5726283.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] generic way of writing Sets or Enum values to a String

2016-09-06 Thread Jonas Maebe
Graeme Geldenhuys wrote:
> Is there a way to have a single implementation of Enum-to-String

system.str() also works for enums in FPC. For sets, you can use a for-in
loop that calls str(). If you want to encapsulate it in a function,
you'll have to use a generic function probably.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] generic way of writing Sets or Enum values to a String

2016-09-06 Thread leledumbo
> Is there a way to have a single implementation of Enum-to-String or 
> Set-to-String (and the reverse), but pass in the type, instead of having 
> a separate implementation of each Enum or Set types. 
> 
> Could RTTI help? Could Generics help? Is there some other language 
> construct I might have missed? 

Take mine:

generic function EnumValueNameOf(v: T): String;
begin
  Result := GetEnumName(TypeInfo(T), LongInt(v));
end;

guess you already know how to use it, don't you?



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/generic-way-of-writing-Sets-or-Enum-values-to-a-String-tp5726280p5726281.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] generic way of writing Sets or Enum values to a String

2016-09-06 Thread Graeme Geldenhuys
Hi,

I use the following code which works fine, and I have many methods like
these for all the various Sets and Enum types I used.  I would like to
reduce my programming effort (such boilerplate code) by reusing maybe a
single implementation.

Is there a way to have a single implementation of Enum-to-String or
Set-to-String (and the reverse), but pass in the type, instead of having
a separate implementation of each Enum or Set types.

Could RTTI help? Could Generics help? Is there some other language
construct I might have missed?


function VisibleOnPageToString(AEnum: TFPReportVisibleOnPage): string;
inline;
begin
  result := GetEnumName(TypeInfo(TFPReportVisibleOnPage), Ord(AEnum));
end;

function StringToVisibleOnPage(AName: string): TFPReportVisibleOnPage;
inline;
begin
  Result :=
TFPReportVisibleOnPage(GetEnumValue(TypeInfo(TFPReportVisibleOnPage),
AName));
end;

function StringToMemoOptions(const AValue: string): TFPReportMemoOptions;
var
  lList: TStrings;
  lIndex: integer;
begin
  Result := [];
  lList := nil;
  lList := TStringList.Create;
  try
lList.Delimiter := ',';
lList.DelimitedText := AValue;
for lIndex := 0 to lList.Count - 1 do
  Include(Result,
TFPReportMemoOption(GetEnumValue(TypeInfo(TFPReportMemoOption),
lList[lIndex])));
  finally
lList.Free;
  end;
end;

function MemoOptionsToString(const AValue: TFPReportMemoOptions): String;
var
  lIndex: integer;
begin
  Result := '';
  for lIndex := Ord(Low(TFPReportMemoOption)) to
Ord(High(TFPReportMemoOption)) do
  begin
if TFPReportMemoOption(lIndex) in AValue then
begin
  if Result = '' then
Result := GetEnumName(TypeInfo(TFPReportMemoOption), lIndex)
  else
Result := Result + ',' +
GetEnumName(TypeInfo(TFPReportMemoOption), lIndex);
end;
  end;
end;


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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-06 Thread Marcos Douglas
On Tue, Sep 6, 2016 at 7:04 AM, Graeme Geldenhuys
 wrote:
> On 2016-09-05 21:32, Marcos Douglas wrote:
>> Ok, now I understand how TBase64DecodingStream works.
>
> Don't feel alone. I always get my first implementation of using
> TBase64Decoding/Encoding wrong. So much so, that I annotated my FCL INF
> documentation with a working code example. :-)

:)

When this happens I code a wrapper for these "problems".

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-06 Thread Marcos Douglas
On Mon, Sep 5, 2016 at 9:07 PM, Graeme Geldenhuys
 wrote:
> See the tiCompressZLib.pas unit included with tiOPF. It supports Stream,
> Buffer, String and File compress/decompress functionality using ZLib.  I
> believe GZip and ZLib use the same algorithms.
>
>
> https://sourceforge.net/p/tiopf/code/ci/tiopf2/tree/Options/tiCompressZLib.pas

Thanks, I will take a look.

Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Windows console

2016-09-06 Thread Marcos Douglas
On Tue, Sep 6, 2016 at 6:44 AM, Santiago A.  wrote:
> I have found a solution here:
>
> http://stackoverflow.com/questions/20134421/can-a-windows-gui-program-written-in-lazarus-create-a-console-and-write-to-it-at
>
> At least it works for windows
>
> uses
>   Windows;
> begin
>   AllocConsole;  // in Windows unit
>   IsConsole := True; // in System unit
>   SysInitStdIO;  // in System unit
>   // Now you can do Writeln, DebugLn, ...
> end.

This is very useful to show whats going on in a Windows application
when is processing in background, thanks.

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to sent totally custom parameters to the linker ?

2016-09-06 Thread Mark Morgan Lloyd

On 05/09/16 23:30, fredvs wrote:

Hello.

Is it possible to sent new-other parameters to the linker ?
Without the use of *-k*, fpc sent this to the linker:

[5.227] (9017) Using util /usr/bin/ld
[5.227] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m
elf_x86_64  --dynamic-linker=/lib64/ld-linux-x86-6
4.so.2   -s -L. -o ./test ./link.res"

Using the *-k* parameter, this is sent (with *-ksomething -kotherting*):

[5.224] (9017) Using util /usr/bin/ld
[5.224] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m
elf_x86_64  *something* *otherthing* --dynamic-linker=
/lib64/ld-linux-x86-64.so.2   -s -L. -o ./test ./link.res"

You may see that the parameters "something" "otherthing" are inserted
afterelf_x86_64.

But how to sent totally custom parameters, without those given by fpc ?


I've had no problem with e.g.

export OPT='-k-t -k--reduce-memory-overheads -k--no-keep-memory'

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

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-06 Thread Graeme Geldenhuys
On 2016-09-05 21:32, Marcos Douglas wrote:
> Ok, now I understand how TBase64DecodingStream works.

Don't feel alone. I always get my first implementation of using
TBase64Decoding/Encoding wrong. So much so, that I annotated my FCL INF
documentation with a working code example. :-)

Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Windows console

2016-09-06 Thread Santiago A.
El 05/09/2016 a las 16:26, José Mejuto escribió:
> El 05/09/2016 a las 15:01, Santiago A. escribió:
>> Hello:
>>
>> I have a little watchdog utility for windows that runs each five
>> minutes, like a unix cron ("Tareas programadas" in Spanish, scheduled
>> tasks?). It opened a console window for a second and that was very
>> annoying. So I used the switch -GW and there is no more flashing console
>> bothering. But then I can't show any help or any output for debug from
>> the prompt.
>>
>> I can live with it, in fact, it usually uses a log file, but some times,
>> when I'm installing, testing paramters etc, it's more handy to run the
>> program from the prompt and see the result immediately or display the
>> help instead of having to open logs.
>>
>> Is there any way to open a console on the fly and send the output to the
>> console?
> 
> Hello,
> 
> I would create a .bat file in temp folder and run a new shell execute of
> that .bat. This .bat simply display some echo lines and finally autokill
> itself.
> 
> If your system for security reasons do not allow run bats then you can
> create a .txt file and launch a shell execute cmd with "type
> \path\file.txt" (keeping session open or it will clear the screen). You
> main program can wait 2-5 seconds and delete the .txt file to not
> pollute the temp folder.
> 
> Of course this is a "home made" solution :) Another is have a different
> exe just for the help, have a .bat or .txt in your app folder just to
> show the help if it is always the same, ...

I have found a solution here:

http://stackoverflow.com/questions/20134421/can-a-windows-gui-program-written-in-lazarus-create-a-console-and-write-to-it-at

At least it works for windows

uses
  Windows;
begin
  AllocConsole;  // in Windows unit
  IsConsole := True; // in System unit
  SysInitStdIO;  // in System unit
  // Now you can do Writeln, DebugLn, ...
end.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC 3.0 deb packages?

2016-09-06 Thread Karoly Balogh (Charlie/SGR)
Hi,

On Mon, 5 Sep 2016, Jon Foster wrote:

> After I banged on it for many hours applying several crude patches it
> finally makes packages again. But all of this leads me to believe that
> Debian packages for FPC are no longer maintained / supported? If so
> what's the story? Maybe my crude hacks could be put to use or I could
> help out some way?

Well, I guess the main issue is, Debian splits the FPC "packages" into
separate packages. :) Because it not only installs the package, but all of
its dependencies (for example C static link libs), therefore a global FPC
"packages" package with all its dependencies would be *HUGE*. But maybe
for 3.0 that decision should have been modified, and Debian should have
bundled a 'set of packages' as a .deb package, instead of each package as
a separate .deb alone... I mean the various FCL or the various RTL
packages are certainly just one "package" from the user PoV...

And yes, I'm not sure if the .deb packaging is still maintained in FPC's
own build system. Maybe the people doing the actual packaging for Debian
could help you there?

 > My current need is the StrUtils unit, which I must say I'm shocked to
> find is not part of the core RTL but is in a package?!?! I don't get
> that but that's your decision.

Again, that's because FPC doesn't think about "packages" the way Debian
and Linux distributions in general think. Remember, we deploy the same
structure on all of our supported platforms. We even provide Linux binary
builds, where "packages" is just one archive, with a specific directory
structure and that's it.

So we moved out large chunks from the RTL (including strutils) to separate
packages, because it reduces compiler build times and therefore speeds up
development. Also, it's makes easier the maintenance of some RTL features,
which are in fact separate from the rest of the RTL really. I guess the
Debian packaging situation was simply not considered while making that
decision, given most FPC developers themselves don't use distribution
provided packages.

Anyway, packages not finding a given unit in another package could be
probably fixed by adding additional dependencies to that other package.

That said, if anyone feels like helping out with the current packaging
situation on whatever platform, he's certainly very welcomed to do so. :)

Cheers,
--
Charlie
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Could someone explain me which the correct triggering of the BeforeDestruction method?

2016-09-06 Thread Maciej Izak
2016-09-05 17:56 GMT+02:00 silvioprog :

> FPC triggers 132, Delphi 1342. :-/


Please report on bug tracker. IMO in presented context - definitely bug.

-- 
Best regards,
Maciej Izak
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] FPC 3.0 deb packages?

2016-09-06 Thread Jon Foster
I'm trying to get FPC to build again and although I'm getting along a
lot better I still don't seem to be able to get the knack of it. First
I'd like to know if anyone has any updated build instructions? I've been
on the wiki and read the "build faq" PDF document. Both are good as far
as they go. But neither is anywhere near complete.

My first major dilemma, and what this email pertains to, is building
Debian packages. I went to grab the latest FPC 3 from SF and found that
the usual tarball of Debian packages doesn't exist. So I downloaded the
"fpcbuild" tarball for FPC 3.0.0 and tried the "make deb".

After I banged on it for many hours applying several crude patches it
finally makes packages again. But all of this leads me to believe that
Debian packages for FPC are no longer maintained / supported? If so
what's the story? Maybe my crude hacks could be put to use or I could
help out some way?

After installing the packages and doing some simple builds I thought all
was good... Nope! Turns out several of the compiled units, from the
packages folder aren't getting packaged. I fixed a few of the
*.install.in files to include the missing package unit folders. However,
at least in some situations, it looks like some of the additional unit
files are getting missed by the deb packaging.

My current need is the StrUtils unit, which I must say I'm shocked to
find is not part of the core RTL but is in a package?!?! I don't get
that but that's your decision. Through injecting breakpoints in the
package build process I have found that the unit files are getting built
and installed into the temporary distribution folders. But somehow they
aren't making it into the final packages.

I'm still working on it but I thought I'd ask and see if anyone knows
where in the Debian package building stuff things are getting lost?

I do want to commend the FPC developers. There are only two pieces of
software that continue to impress me release after release: the Linux
kernel and FreePascal compiler (not Lazarus).

My system stats: Debian 7 i386. FPC 3.0.0 as the currently installed
compiler, first from the binary tarball package and then from my package
build attempts, which are mostly functional.

TIA - Jon

-- 
Sent from my Debian Linux workstation -- http://www.debian.org/intro/about

Jon Foster
JF Possibilities, Inc.
j...@jfpossibilities.com
541-410-2760
Making computers work for you!

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal