[Lazarus] Startlazarus starting wrong Lazarus

2013-01-12 Thread Giuliano Colla
I stumbled into a situation which might be rather confusing for an 
inexperienced user:


Lazarus 1.04, Linux environment.

If you install from rpm a new version, but your local old version has a 
more recent date (because you recompiled it recently to install some 
packages), startlazarus will show the splash screen of the new version, 
but will silently load the old version.


I don't see an easy way out, and maybe we must just live with it, but I 
felt it appropriate to mention. Maybe someone smarter than me will come 
out with a brilliant solution to avoid that.


Giuliano


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


Re: [Lazarus] Startlazarus starting wrong Lazarus

2013-01-12 Thread Juha Manninen
If both versions are in the system path then anything can happen.
The one you install from RPM goes maybe to /usr/bin/ and is certainly
in the path.
I recommend you put any other version of Lazarus into its own
directory which is not in the system path,
for example into ~/Lazarus_test. Then start it from console:
 $ ./lazarus --pcp=~/.lazarus_test

Juha

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


Re: [Lazarus] Startlazarus starting wrong Lazarus

2013-01-12 Thread Giuliano Colla

On 01/12/2013 12:52 PM, Juha Manninen wrote:

If both versions are in the system path then anything can happen.
The one you install from RPM goes maybe to /usr/bin/ and is certainly
in the path.
I recommend you put any other version of Lazarus into its own
directory which is not in the system path,
for example into ~/Lazarus_test. Then start it from console:
  $ ./lazarus --pcp=~/.lazarus_test
I'm not speaking of a special setup with multiple version, which 
requires appropriate handling.


I'm speaking of just a normal situation, with a /usr/lib/lazarus where 
the system default executable resides, and a ~/.lazarus/bin directory, 
where my custom executable resides (when recompiled to install packages).


In the usual case (i.e. new version more recent than my custom copy), 
after the download a new version, startlazarus  pops up a message 
Multiple lazarus found - Which Lazarus should be started?.


But if my custom copy happens to be more recent than the new version, my 
custom copy is started silently, even if it's an older version of Lazarus.


It's not so obvious how to handle this condition, but it may be confusing.

Giuliano



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


Re: [Lazarus] Got Pointer, expected Open Array Of Char

2013-01-12 Thread Howard Page-Clark

On 12/1/13 6:10, Dave Coventry wrote:


dst and src are passed to the function that calls Copybytes();

function copy_compressed_bytes(var dst: array of Char; var dloc, sloc:
integer; src: array of Char;
   len: integer): integer;
begin
   Copybytes(@dst[dloc],@src[sloc],16);
   return 0;
end;


I think making src also a var parameter and structuring the signatures 
for the routines without @ as follows will work:


procedure Copybytes(var dst, src: array of Char; len: integer);
...

function copy_compressed_bytes(var dst: array of Char;
   var dloc, sloc:integer;
   src: array of Char;
   len: integer): integer;
begin
  Copybytes(dst[dloc],src[sloc],16);
  Exit(0);
end;


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


Re: [Lazarus] Startlazarus starting wrong Lazarus

2013-01-12 Thread Juha Manninen
Ok, I see.
It sounds like a bug.
I personally don't have experience of that because I mostly use
development versions and start them from a console.

Juha

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