Re: [Lazarus] Lazarus Release 1.8

2017-12-18 Thread Andrea Mauri via Lazarus
same user. only one user on my Mac, I suppose I am admin (I am a OS X
newbie).
I opened using launchpad and directly from finder.

Here the text of IDE menu:

Lazarus version: 1.8.0

Lazarus svn revision: exported

Lazarus build date: 2017/12/04

Lazarus was compiled for i386-darwin

Lazarus was compiled with fpc 3.0.4


Global IDE options:

Primary config directory=/Users/giacca/.lazarus

Secondary config directory=/etc/lazarus

LazarusDirectory=/Developer/lazarus/

Real LazarusDirectory=/Developer/lazarus/

Default CompilerFilename=/usr/local/bin/ppc386

Real Default CompilerFilename=/usr/local/bin/ppc386

Project CompilerFilename=$(CompPath)

Real Project CompilerFilename=/usr/local/bin/ppc386

CompilerMessagesFilename=

Real
CompilerMessagesFilename=/usr/local/share/fpcsrc/compiler/msg/errore.msg

FPC source directory=/usr/local/share/fpcsrc

Real FPC source directory=/usr/local/share/fpcsrc/

Test directory=~/tmp/

Real Test directory=/Users/giacca/tmp/


Working directory=/

Application.ExeName=/Developer/lazarus/lazarus.app/Contents/MacOS/lazarus


Parameters:

/Developer/lazarus/lazarus.app/Contents/MacOS/lazarus


Environment variables:

TMPDIR=/var/folders/z2/958dg9vn2s93cm1rky6j_d9wgn/T/

TMPDIR=/var/folders/z2/958dg9vn2s93cm1rky6j_d9wgn/T/

__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0

SHELL=/bin/bash

HOME=/Users/giacca

Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.M23sK4oq3B/Render

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.VYyuGjeRvT/Listeners

PATH=/usr/bin:/bin:/usr/sbin:/sbin

LOGNAME=giacca

XPC_SERVICE_NAME=lazarus.freepascal.ide.8732

USER=giacca



2017-12-15 12:11 GMT+01:00 Mattias Gaertner via Lazarus <
lazarus@lists.lazarus-ide.org>:

> On Wed, 13 Dec 2017 12:44:19 +0100
> Andrea Mauri via Lazarus  wrote:
>
> > I am trying to update to lazarus 1.8 on my OSX (I was using 1.6.4).
> > I downloaded and installed, fpc, fpc src and lazarus.
> > First run is ok.
> > Then if I recompile lazarus (clean build all) everything seems to be ok
> > but if I try to start lazarus I got an error message. See message1. I
> > close the message try to restart again lazarus and I got the message2.
> >
> > What is going wrong?
>
> Did you run Lazarus as the same user as it was installed?
> Is the user an admin user?
> How did you open the IDE?
>
> Can you send me the text of IDE menu
> View / IDE Internals / About IDE / General?
>
> Mattias
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-15 Thread Kostas Michalopoulos via Lazarus
On Fri, Dec 15, 2017 at 1:41 PM, Mattias Gaertner via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:
>
> At compile time it is CP_NONE, at runtime it can be any codepage.
>

My understanding (which, if it is wrong, sorry but not my fault since the
docs are a bit vague and all the names involved are totally unintuitive
:-P) is that RawByteString has basically no codebase so it is treated as a
byte string pretty much the same way AnsiString was treated pre-FPC3. So
i'd expect the codebase to always be CP_NONE and to change it, i'd have to
assign the RawByteString to some string type with an associated codepage
(basically, making the RBS an "escape hatch" to the whole conversion
machinery).
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-15 Thread Mattias Gaertner via Lazarus
On Fri, 15 Dec 2017 13:32:24 +0200
Kostas Michalopoulos via Lazarus  wrote:

> On Sun, Dec 10, 2017 at 4:17 PM, Luca Olivetti via Lazarus <
> lazarus@lists.lazarus-ide.org> wrote:
> > https://www.freepascal.org/docs-html/rtl/system/rawbytestring.html
> >
> > it's an ansistring.  
> 
> This is IMO misleading since nowadays AnsiString has codepage information
> and a plain AnsiString as shown in the page you linked can be any codepage
> whereas RawByteString is always CP_NONE.

At compile time it is CP_NONE, at runtime it can be any codepage.

> RawByteString and AnsiString are not equivalent.

True.

Mattias

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-15 Thread Kostas Michalopoulos via Lazarus
On Sun, Dec 10, 2017 at 4:17 PM, Luca Olivetti via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:
> https://www.freepascal.org/docs-html/rtl/system/rawbytestring.html
>
> it's an ansistring.

This is IMO misleading since nowadays AnsiString has codepage information
and a plain AnsiString as shown in the page you linked can be any codepage
whereas RawByteString is always CP_NONE. RawByteString and AnsiString are
not equivalent.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-15 Thread Mattias Gaertner via Lazarus
On Wed, 13 Dec 2017 12:44:19 +0100
Andrea Mauri via Lazarus  wrote:

> I am trying to update to lazarus 1.8 on my OSX (I was using 1.6.4).
> I downloaded and installed, fpc, fpc src and lazarus.
> First run is ok.
> Then if I recompile lazarus (clean build all) everything seems to be ok 
> but if I try to start lazarus I got an error message. See message1. I 
> close the message try to restart again lazarus and I got the message2.
> 
> What is going wrong?

Did you run Lazarus as the same user as it was installed?
Is the user an admin user?
How did you open the IDE?

Can you send me the text of IDE menu
View / IDE Internals / About IDE / General?

Mattias

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-14 Thread Andrea Mauri via Lazarus

Anyone has suggestions?

Il 13/12/2017 12:44, Andrea Mauri ha scritto:

I am trying to update to lazarus 1.8 on my OSX (I was using 1.6.4).
I downloaded and installed, fpc, fpc src and lazarus.
First run is ok.
Then if I recompile lazarus (clean build all) everything seems to be ok 
but if I try to start lazarus I got an error message. See message1. I 
close the message try to restart again lazarus and I got the message2.


What is going wrong?

Il 06/12/2017 20:15, Mattias Gaertner via Lazarus ha scritto:

The Lazarus team is glad to announce the release of Lazarus 1.8.

The release was built with FPC 3.0.4.
The previous release Lazarus 1.6.4 was built with FPC 3.0.2.

Here is the list of changes for Lazarus and Free Pascal:
http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes
http://wiki.lazarus.freepascal.org/User_Changes_3.0.4

Here is the list of fixes for Lazarus 1.8.x:
http://wiki.freepascal.org/Lazarus_1.8_fixes_branch

The release is available for download on SourceForge:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 1.8.0" directory.

Checksums for the SourceForge files:
http://www.lazarus-ide.org/index.php?page=checksums#1_8_0

Minimum requirements:

Windows:
2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit.
optional qt 4.5 or 5.6 for qt apps

FreeBSD/Linux:
gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.

Mac OS X:
10.5 to 10.12; Carbon (32bit), Cocoa (64bit, not stable), qt and qt5 
(32 or 64bit).


The svn tag is
http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0

For people who are blocked by SF, the Lazarus releases from 
SourceForge are mirrored at:

ftp://ftp.freepascal.org/pub/lazarus/releases/
and later at (after some time for synchronization)
http://mirrors.iwi.me/lazarus/


Mattias




--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-13 Thread Andrea Mauri via Lazarus

I am trying to update to lazarus 1.8 on my OSX (I was using 1.6.4).
I downloaded and installed, fpc, fpc src and lazarus.
First run is ok.
Then if I recompile lazarus (clean build all) everything seems to be ok 
but if I try to start lazarus I got an error message. See message1. I 
close the message try to restart again lazarus and I got the message2.


What is going wrong?

Il 06/12/2017 20:15, Mattias Gaertner via Lazarus ha scritto:

The Lazarus team is glad to announce the release of Lazarus 1.8.

The release was built with FPC 3.0.4.
The previous release Lazarus 1.6.4 was built with FPC 3.0.2.

Here is the list of changes for Lazarus and Free Pascal:
http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes
http://wiki.lazarus.freepascal.org/User_Changes_3.0.4

Here is the list of fixes for Lazarus 1.8.x:
http://wiki.freepascal.org/Lazarus_1.8_fixes_branch

The release is available for download on SourceForge:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 1.8.0" directory.

Checksums for the SourceForge files:
http://www.lazarus-ide.org/index.php?page=checksums#1_8_0

Minimum requirements:

Windows:
2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit.
optional qt 4.5 or 5.6 for qt apps

FreeBSD/Linux:
gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.

Mac OS X:
10.5 to 10.12; Carbon (32bit), Cocoa (64bit, not stable), qt and qt5 (32 
or 64bit).


The svn tag is
http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0

For people who are blocked by SF, the Lazarus releases from SourceForge 
are mirrored at:

ftp://ftp.freepascal.org/pub/lazarus/releases/
and later at (after some time for synchronization)
http://mirrors.iwi.me/lazarus/


Mattias



-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-13 Thread Mattias Gaertner via Lazarus
On Wed, 13 Dec 2017 00:28:14 +0100
Mattias Gaertner via Lazarus  wrote:

>[...]
> > /usr/bin/ld: /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o:
> > unrecognized relocation (0x2a) in section `.text'
> > /usr/bin/ld: link finale non riuscito: Bad value  
> 
> There is a similar problem with the fpc rpms. 
> GNU binutils 2.26 added a new relocation type. I need to rebuild the debs on 
> an older Linux distribution.

I uploaded new amd64 debs built on a system with binutils 2.24.

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-12 Thread Mattias Gaertner via Lazarus
On Wed, 13 Dec 2017 00:06:45 +0100
Salvatore Coppola via Lazarus  wrote:

> As usual after istalled fpc packages (fpc-src_3.0.4-1_amd64.deb
> 
> and fpc_3.0.4-1_amd64.deb
> )
> the "make all" for source 1.8.0  fails.
> It is ok using  fpc-src_3.0.4-rc1_amd64.deb
> 
> and fpc_3.0.4-rc1_amd64.deb
> 
> 
> /usr/bin/ld: attenzione: ./link.res contiene sezioni di output; forse è
> stata dimenticata -T
> /usr/bin/ld: /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o:
> unrecognized relocation (0x2a) in section `.text'
> /usr/bin/ld: link finale non riuscito: Bad value

There is a similar problem with the fpc rpms. 
GNU binutils 2.26 added a new relocation type. I need to rebuild the debs on an 
older Linux distribution.


Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-12 Thread Salvatore Coppola via Lazarus
As usual after istalled fpc packages (fpc-src_3.0.4-1_amd64.deb

and fpc_3.0.4-1_amd64.deb
)
the "make all" for source 1.8.0  fails.
It is ok using  fpc-src_3.0.4-rc1_amd64.deb

and fpc_3.0.4-rc1_amd64.deb


/usr/bin/ld: attenzione: ./link.res contiene sezioni di output; forse è
stata dimenticata -T
/usr/bin/ld: /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o:
unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: link finale non riuscito: Bad value
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Makefile:2737: set di istruzioni per l'obiettivo "lazres" non riuscito
make[2]: *** [lazres] Errore 1
make[2]: uscita dalla directory "/home/pierluigi/programs/lazarus/tools"
Makefile:3155: set di istruzioni per l'obiettivo "all" non riuscito
make[1]: *** [all] Errore 2
make[1]: uscita dalla directory "/home/pierluigi/programs/lazarus/tools"
Makefile:3267: set di istruzioni per l'obiettivo "lazbuild" non riuscito

Regards

2017-12-06 20:15 GMT+01:00 Mattias Gaertner via Lazarus <
lazarus@lists.lazarus-ide.org>:

> The Lazarus team is glad to announce the release of Lazarus 1.8.
>
> The release was built with FPC 3.0.4.
> The previous release Lazarus 1.6.4 was built with FPC 3.0.2.
>
> Here is the list of changes for Lazarus and Free Pascal:
> http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes
> http://wiki.lazarus.freepascal.org/User_Changes_3.0.4
>
> Here is the list of fixes for Lazarus 1.8.x:
> http://wiki.freepascal.org/Lazarus_1.8_fixes_branch
>
> The release is available for download on SourceForge:
> http://sourceforge.net/projects/lazarus/files/
>
> Choose your CPU, OS, distro and then the "Lazarus 1.8.0" directory.
>
> Checksums for the SourceForge files:
> http://www.lazarus-ide.org/index.php?page=checksums#1_8_0
>
> Minimum requirements:
>
> Windows:
> 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit.
> optional qt 4.5 or 5.6 for qt apps
>
> FreeBSD/Linux:
> gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.
>
> Mac OS X:
> 10.5 to 10.12; Carbon (32bit), Cocoa (64bit, not stable), qt and qt5 (32
> or 64bit).
>
> The svn tag is
> http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0
>
> For people who are blocked by SF, the Lazarus releases from SourceForge
> are mirrored at:
> ftp://ftp.freepascal.org/pub/lazarus/releases/
> and later at (after some time for synchronization)
> http://mirrors.iwi.me/lazarus/
>
>
> Mattias
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
>
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-11 Thread Luca Olivetti via Lazarus

El 11/12/17 a les 16:14, Michael Van Canneyt ha escrit:



On Mon, 11 Dec 2017, Luca Olivetti wrote:


El 11/12/17 a les 13:43, Michael Van Canneyt ha escrit:



[*] I don't know if freeing a thread in OnTerminate is allowed. FPC 
documentation here 
https://www.freepascal.org/docs-html/rtl/classes/tthread.onterminate.html 
says nothing about it, but
the example here (mentioned in the bug report) 
http://docwiki.embarcadero.com/CodeExamples/Tokyo/en/TThreadYield_(Delphi) 
seems to imply that it should.


It is definitely not allowed in FPC, and I will document it as such.


Ouch, that's not delphi compatible then (unless the example is flawed).
In any case it's better to be not compatible and clearly documented 
than vaguely documented and maybe (just maybe) compatible (i.e. I 
don't really care about delphi compatibility since I don't use it, but 
sometimes you have to rely on delphi examples/documentation).


The following is clearly nonsense:

  FThread.FreeOnTerminate := False;  // Free FThread in the OnTerminate 
proc. This will set Terminated to true


Terminated is already True in OnTerminate.

So I think the example is flawed.

 From the TThread implementation:

  if (FThreadID = GetCurrentThreadID) then
     begin
   if not(FFreeOnTerminate) and not FFinished then
     raise EThreadDestroyCalled.Create('A thread cannot destroy 
itself except by setting FreeOnTerminate and leaving!');


I think we cannot be more clear than that :)


Not really: OnTerminate is called in the context of the main thread, so 
FThreadId is different than GetCurrentThreadId.


Bye


--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-11 Thread Michael Van Canneyt via Lazarus



On Mon, 11 Dec 2017, Luca Olivetti wrote:


El 11/12/17 a les 13:43, Michael Van Canneyt ha escrit:



[*] I don't know if freeing a thread in OnTerminate is allowed. FPC 
documentation here 
https://www.freepascal.org/docs-html/rtl/classes/tthread.onterminate.html 
says nothing about it, but
the example here (mentioned in the bug report) 
http://docwiki.embarcadero.com/CodeExamples/Tokyo/en/TThreadYield_(Delphi) 
seems to imply that it should.


It is definitely not allowed in FPC, and I will document it as such.


Ouch, that's not delphi compatible then (unless the example is flawed).
In any case it's better to be not compatible and clearly documented than 
vaguely documented and maybe (just maybe) compatible (i.e. I don't really 
care about delphi compatibility since I don't use it, but sometimes you have 
to rely on delphi examples/documentation).


The following is clearly nonsense:

 FThread.FreeOnTerminate := False;  // Free FThread in the OnTerminate proc. 
This will set Terminated to true

Terminated is already True in OnTerminate.

So I think the example is flawed.

From the TThread implementation:

 if (FThreadID = GetCurrentThreadID) then
begin
  if not(FFreeOnTerminate) and not FFinished then
raise EThreadDestroyCalled.Create('A thread cannot destroy itself 
except by setting FreeOnTerminate and leaving!');

I think we cannot be more clear than that :)

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-11 Thread Michael Van Canneyt via Lazarus



On Mon, 11 Dec 2017, Luca Olivetti via Lazarus wrote:


El 09/12/17 a les 11:57, Luca Olivetti via Lazarus ha escrit:

I know I'll have to upgrade to fpc 3 someday, but what worries me about 
it is my (and other 3rd party units) use of ansistrings as binary 
buffers. I did some quick tests some time ago an nothing seemed broken, 
but I'm somewhat reluctant since my software has to run unattended 24/7 
(or more like 24/5).



I've done some tests with 3.0.4 and it turns out I'm bitten by the 
extensive changes in tthread: freeing a thread in its OnTerminate[*] 
randomly (i.e. not every time) produces a sigsev (under win32).
With 2.6.4 it didn't happen (though freeing a thread in OnTerminate had 
another problem undes Linux, see 
https://bugs.freepascal.org/view.php?id=32759)


[*] I don't know if freeing a thread in OnTerminate is allowed. FPC 
documentation here 
https://www.freepascal.org/docs-html/rtl/classes/tthread.onterminate.html 
says nothing about it, but
the example here (mentioned in the bug report) 
http://docwiki.embarcadero.com/CodeExamples/Tokyo/en/TThreadYield_(Delphi) 
seems to imply that it should.


It is definitely not allowed in FPC, and I will document it as such.

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-11 Thread Luca Olivetti via Lazarus

El 09/12/17 a les 11:57, Luca Olivetti via Lazarus ha escrit:

I know I'll have to upgrade to fpc 3 someday, but what worries me about 
it is my (and other 3rd party units) use of ansistrings as binary 
buffers. I did some quick tests some time ago an nothing seemed broken, 
but I'm somewhat reluctant since my software has to run unattended 24/7 
(or more like 24/5).



I've done some tests with 3.0.4 and it turns out I'm bitten by the 
extensive changes in tthread: freeing a thread in its OnTerminate[*] 
randomly (i.e. not every time) produces a sigsev (under win32).
With 2.6.4 it didn't happen (though freeing a thread in OnTerminate had 
another problem undes Linux, see 
https://bugs.freepascal.org/view.php?id=32759)


[*] I don't know if freeing a thread in OnTerminate is allowed. FPC 
documentation here 
https://www.freepascal.org/docs-html/rtl/classes/tthread.onterminate.html 
says nothing about it, but
the example here (mentioned in the bug report) 
http://docwiki.embarcadero.com/CodeExamples/Tokyo/en/TThreadYield_(Delphi) 
seems to imply that it should.


For the time being I'm using FreeOnTerminate:=true and avoid freeing the 
thread in OnTerminate (though there are other changes required to my 
code and "fixing" working code is always an issue).
I checked the user changes pages for 3.0.0, 3.0.2 and 3.0.4 and there's 
no mention of changes in threads (the only one is this one
http://wiki.freepascal.org/User_Changes_3.0#cthreads:_critical_sections_and_recursive_mutex_support 
and doesn't apply here).


Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-10 Thread Luca Olivetti via Lazarus

El 10/12/17 a les 15:02, Kostas Michalopoulos via Lazarus ha escrit:
 > I think I had this discussion before: I'm not going to use TBytes 
until it offers the same convenience as an ansistring (i.e. easy 
concatenation, insertion and deletion, not to mention search and 
replace, etc.).


Isn't RawByteString a more suited replacement then? In the few places i 
relied on the bytes in a string when i was converting my code from FPC 
2.x to FPC 3.x i used a RawByteString and things seem to work fine.





https://www.freepascal.org/docs-html/rtl/system/rawbytestring.html

it's an ansistring.

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-10 Thread Kostas Michalopoulos via Lazarus
> I think I had this discussion before: I'm not going to use TBytes until
it offers the same convenience as an ansistring (i.e. easy concatenation,
insertion and deletion, not to mention search and replace, etc.).

Isn't RawByteString a more suited replacement then? In the few places i
relied on the bytes in a string when i was converting my code from FPC 2.x
to FPC 3.x i used a RawByteString and things seem to work fine.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-09 Thread Juha Manninen via Lazarus
On Sat, Dec 9, 2017 at 1:41 AM, Werner Pamler via Lazarus
 wrote:
> Tested on Win32 where it fails in interfaces\win32\win32int because unit
> "character" is not found. It is in rtl\objpas of fpc3.04, but not of fpc
> 2.6.4, it came in with fpc 3.0.0

Damn, it is added by me.
It is used only for function TCharacter.IsSurrogate(). Do you know a
replacement function without copying the whole unit from FPC 3.0?
LazUTF16 only has:
 function IsUTF16CharValid(AChar, ANextChar: WideChar): Boolean;
A fix could be committed to the 1.8 fixes branch as a special case
If no easy fix is found then I could add:
  if {$IF 
FPC_FULLVERSION<3}False{$ELSE}TCharacter.IsSurrogate(WideChar(OrgCharCode)){$ENDIF}
then
and the code works with FPC 2.6.4 as it did before my changes.

The call to TCharacter.IsSurrogate() fixes this issue only partly :
 https://bugs.freepascal.org/view.php?id=32101
UTF8KeyPress is still not called. Somebody with better knowledge of
LCL-Win32 should fix it.


On Sat, Dec 9, 2017 at 12:57 PM, Luca Olivetti via Lazarus
 wrote:
> I know I'll have to upgrade to fpc 3 someday, but what worries me about it
> is my (and other 3rd party units) use of ansistrings as binary buffers.

The automatic conversions by FPC 3 could indeed mess things up.
However you should change such binary buffers to use TBytes or similar
in any case. There have always been warnings against using String type
for binary data. In future your code may use $mode DelphiUnicode and
it breaks for sure.
Maybe switching to FPC 3 is the right moment to fix the buffers, too.

Juha
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-09 Thread Luca Olivetti via Lazarus

El 09/12/17 a les 00:41, Werner Pamler via Lazarus ha escrit:

Am 08.12.2017 um 22:32 schrieb Juha Manninen via Lazarus:

How does it fail? Lazarus 1.8 was meant to still compile with FPC 2.6.4.
However with Lazarus trunk I would be happy to go ahead and forget 2.6.4.
If the fix for Lazarus 1.8 is easy, please upload a patch.


Tested on Win32 where it fails in interfaces\win32\win32int because unit 
"character" is not found. It is in rtl\objpas of fpc3.04, but not of fpc 
2.6.4, it came in with fpc 3.0.0


Yes, my dirty hack was to copy character.pas from fpc-3.0.0 (and all 
other needed units[*]) to interfaces\win32.
I also add to edit character.pas to add the missing resource strings and 
the definition of ENoConstructException



--- fpc-3.0.0/rtl/objpas/character.pas  2013-08-20 06:55:05.0 +0200
+++ laz_1_8/lcl/interfaces/win32/character.pas  2017-12-09 
11:51:22.606416879 +0100

@@ -195,6 +195,19 @@
   SysUtils,
   RtlConsts;

+ResourceString
+  SStringIndexOutOfRange= 'String index %d out of range [1 - %d]';
+  SHighSurrogateOutOfRange  = 'High surrogate $%x out of range 
[$D800 - $DBFF]';
+  SLowSurrogateOutOfRange   = 'Low surrogate $%x out of range 
[$DC00 - $DFFF]';
+  SInvalidUTF32Char = 'Invalid UTF32 character $%x. Valid 
UTF32 character must be in range [$0 - $10] except surrogate range 
[$D800-$DFFF]';
+  SInvalidHighSurrogate = 'Invalid high surrogate at index %d. 
High surrogate must be followed by a low surrogate pair';

+  SInvalidUnicodeCodePointSequence = 'Invalid unicode code point sequence';
+  SClassCantBeConstructed   = 'Class %s can not be constructed';
+
+type
+
+  ENoConstructException = class(Exception);
+
 const
   LETTER_CATEGORIES = [
 TUnicodeCategory.ucUppercaseLetter, 
TUnicodeCategory.ucLowercaseLetter,



[*] the complete list of missing units is

?   character.pas
?   unicodedata.inc
?   unicodedata.pas
?   unicodedata_be.inc
?   unicodedata_le.inc
?   unicodenumtable.pas
?   weight_derivation.inc


I know I'll have to upgrade to fpc 3 someday, but what worries me about 
it is my (and other 3rd party units) use of ansistrings as binary 
buffers. I did some quick tests some time ago an nothing seemed broken, 
but I'm somewhat reluctant since my software has to run unattended 24/7 
(or more like 24/5).
OTOH I can always keep a copy of fpc-2.6.4 and lazarus 1.6.4 recompile 
if something goes wrong.



Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-08 Thread Werner Pamler via Lazarus

Am 08.12.2017 um 22:32 schrieb Juha Manninen via Lazarus:

How does it fail? Lazarus 1.8 was meant to still compile with FPC 2.6.4.
However with Lazarus trunk I would be happy to go ahead and forget 2.6.4.
If the fix for Lazarus 1.8 is easy, please upload a patch.


Tested on Win32 where it fails in interfaces\win32\win32int because unit 
"character" is not found. It is in rtl\objpas of fpc3.04, but not of fpc 
2.6.4, it came in with fpc 3.0.0

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-08 Thread Juha Manninen via Lazarus
On Fri, Dec 8, 2017 at 11:57 AM, Luca Olivetti via Lazarus
 wrote:
> I see that, while under linux there's no problem, under windows it cannot be
> built with fpc-2.6.4.

How does it fail? Lazarus 1.8 was meant to still compile with FPC 2.6.4.
However with Lazarus trunk I would be happy to go ahead and forget 2.6.4.
If the fix for Lazarus 1.8 is easy, please upload a patch.

Juha
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-08 Thread Luca Olivetti via Lazarus

El 06/12/17 a les 20:15, Mattias Gaertner via Lazarus ha escrit:

The Lazarus team is glad to announce the release of Lazarus 1.8.


I see that, while under linux there's no problem, under windows it 
cannot be built with fpc-2.6.4.
Now I managed to build it by transplanting the missing unicode units 
from fpc-3.0, but I'm not sure it will work correctly.
I guess I'll have to switch to fpc 3.0.4 but I still fear the unicode 
changes in 3.0 will bite me.


Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release 1.8

2017-12-07 Thread Mattias Gaertner via Lazarus

> Victor Campillo via Lazarus  hat am 7. 
> Dezember 2017 um 10:53 geschrieben:
>[...]
> I just downloaded the sources from sourceforge and after compile it, the 
> splash window and the about dialog show version 1.9.0, I tried the next 
> downloads.

Oops. My fault. I will upload the right versions.

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Lazarus Release 1.8

2017-12-06 Thread Mattias Gaertner via Lazarus

The Lazarus team is glad to announce the release of Lazarus 1.8.The release was built with FPC 3.0.4.The previous release Lazarus 1.6.4 was built with FPC 3.0.2. Here is the list of changes for Lazarus and Free Pascal:http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_noteshttp://wiki.lazarus.freepascal.org/User_Changes_3.0.4Here is the list of fixes for Lazarus 1.8.x:http://wiki.freepascal.org/Lazarus_1.8_fixes_branchThe release is available for download on SourceForge:http://sourceforge.net/projects/lazarus/files/Choose your CPU, OS, distro and then the "Lazarus 1.8.0" directory.Checksums for the SourceForge files:http://www.lazarus-ide.org/index.php?page=checksums#1_8_0Minimum requirements:Windows:  2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. optional qt 4.5 or 5.6 for qt appsFreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.Mac OS X: 10.5 to 10.12; Carbon (32bit), Cocoa (64bit, not stable), qt and qt5 (32 or 64bit).The svn tag ishttp://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at:ftp://ftp.freepascal.org/pub/lazarus/releases/and later at (after some time for synchronization)http://mirrors.iwi.me/lazarus/Mattias
 
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus