[Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Reinier Olislagers
Hi list,

Trying to create a Lazarus installer on Windows:

1. gdb path problem
the readme says:
 A.5 Lazarus binaries
 Some binaries from a lazarus/binaries svn tree. These binaries (like gdb and 
 the qt interface dll) are distributed with Lazarus, but are not built from 
 source.

I did
svn co http://svn.freepascal.org/svn/lazarus/binaries/i386-win32/
c:\development\lazbinaries\
and passed that directory to create_intaller as the 3rd argument

create_installer.bat has
:: Path to the lazarus third party binaries checked out of subversion
SET LAZSVNBINDIR=%3
...
SET FPCFULLTARGET=%FPCTARGETCPU%-%FPCTARGETOS%
...

my c:\development\lazbinaries shows this tree:
├───gdb
│   └───bin
└───qt
but this:
:: Path to the directory containing the mingw gdb debugger installation
:: it should have the debugger with the name gdb.exe in its bin subdirectory
SET GDBDIR=%LAZSVNBINDIR%\%FPCFULLTARGET%\gdb

is looking for c:\development\lazbinaries\i386-win32\gdb

What repository should I use instead of the one I specified?

2. inno setup error
I get
C:\Development\lazarus\tools\install\winD:\Program Files (x86)\Inno
Setup 5\ISCC.exe lazarus.iss  1installer.log
Error on line 102 in
C:\Development\lazarus\tools\install\win\lazarus.iss: No files found
matching c:\development\lazbinaries\i386-win32\qt\*.dll
Compile aborted.

Same problem, really, I'd guess..

Any suggestions?

BTW, patch attached that:
- clarify/update readme (mentioned 2.2 fpc compiler instead of 2.6.0)
- lets you use environment variables for BUILDDIR

Also below are my complete notes on what I did FYI

Thanks,
Reinier

Followed lazarus\tools\install\win\readme.txt; notes below refer to this
and add some details
rem A.1 Inno Setup
rem I used Inno Setup version 5.4.1 (unicode)... dating back to 2010.
Newer versions will probably work, too :)

rem A.3 FPC build sources:
rem Using fixes 2.6 here (the fixes to the latest stable version at this
time)
cd /d c:\development
mkdir c:\development\fpcbuild
svn checkout
http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_6_0/
c:\development\fpcbuild

rem A.4 Lazarus sources:
rem I've got my Lazarus sources in c:\development\lazarus (downloaded by
fpcup)

rem A.5 Lazarus binaries
rem Hum, where is the svn for that? Let's guess
mkdir c:\development\lazbinaries
svn checkout http://svn.freepascal.org/svn/lazarus/binaries/i386-win32/
c:\development\lazbinaries\

rem A.6 Latest release fpc compiler
rem Have a 2.6.0 i386 compiler in c:\development\fpcbootstrap\ppc386.exe
(downloaded by fpcup)

rem B adjust C:\Development\lazarus\tools\install\win\create_installer.bat
rem didn't do that, instead set environment variables to my situation
mkdir c:\development\lazarusbuild
rem Set BUILDDIR to c:\development\lazarusbuild
SET BUILDDIR=c:\development\lazarusbuild
rem (though in current batch script this won't be picked up and output
goes to c:\temp\lazarusbuild)
rem so edited the batch from:
rem SET BUILDDIR=c:\temp\lazbuild
rem to:
rem if [%BUILDDIR%]==[] SET BUILDDIR=c:\temp\lazbuild

rem set SVN to my situation:
SET SVN=D:\Program Files\SlikSvn\bin\svn.exe

rem set ISCC to my situation:
SET ISCC=D:\Program Files (x86)\Inno Setup 5\ISCC.exe

rem check:
SET

rem C run the script
cd /d C:\Development\lazarus\tools\install\win
create_installer.bat c:\development\fpcbuild c:\development\lazarus
c:\development\lazbinaries c:\development\fpcbootstrap\ppc386.exe

It ran for about 8 minutes on my pc.

Log ends up in
C:\Development\lazarus\tools\install\win\installer.log
Index: tools/install/win/create_installer.bat
===
--- tools/install/win/create_installer.bat  (revision 38099)
+++ tools/install/win/create_installer.bat  (working copy)
@@ -10,7 +10,7 @@
 
 :: Path to build directory.
 :: In this directory an image of the installation will be built.
-SET BUILDDIR=c:\temp\lazbuild
+if [%BUILDDIR%]==[] SET BUILDDIR=c:\temp\lazbuild
 
 :: Path to the svn executable
 if [%SVN%]==[] SET SVN=c:\program files\subversion\bin\svn.exe
Index: tools/install/win/readme.txt
===
--- tools/install/win/readme.txt(revision 38099)
+++ tools/install/win/readme.txt(working copy)
@@ -10,7 +10,7 @@
 I used Inno Setup, a free installer for Windows programs. You can download it 
from http://www.jrsoftware.org/, and you need the QuickStart Pack and during 
installation choose Inno Setup Preprocessor too.
 
 A.2 Subversion
-The build script assumes you have the Subversion installed. You can download 
it from http://subversion.tigris.org/, you can use the package with setup in 
name.
+The build script assumes you have the Subversion client installed. You can 
download it from http://subversion.tigris.org/, you can use the package with 
setup in name.
 
 A.3 FPC sources
 The build script assumes you have a svn version of the fpcbuild sources. For 
information about getting the fpc sources from svn see: 

Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Rigel R.
 
Hi, 
Why not expand 
GNU Gettext for Delphi, C++ and Kylix
то be used 
with Lazarus: 
http://sourceforge.net/projects/dxgettext/  
Some advantages:
open source;
Automatic extract of name of components from form;
Manually include text to translate (addition to the above)

using .po files
Automatic add translation in .exe (with right-click);
Automatic choose of language depending on Local Settings;
Manual setting of language (if someone don't want previous option);
Very easy to use (even I can use it ;) )
 

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


Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Reinier Olislagers
On 1-8-2012 8:27, Rigel R. wrote:
 Hi,
 
 Why not expand  GNU Gettext for Delphi, C++ and Kylix то be used  with
 Lazarus:
 
 http://sourceforge.net/projects/dxgettext/
 
 Some advantages:
 open source;
 Automatic extract of name of components from form;
 Manually include text to translate (addition to the above) 
 using .po files
 Automatic add translation in .exe (with right-click);
 Automatic choose of language depending on Local Settings;
 Manual setting of language (if someone don't want previous option);
 Very easy to use (even I can use it ;) )

Their website says:
Supports for Kylix 3, Delphi 5, 6, 7, 2005, 2006, 2007, 2009,
FreePascal, Lazarus and C++ Builder.

so perhaps that already has been done?

The descriptions seem to indicate it uses Windows explorer integration
which I personnally hate, but... it's open source ;)


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


Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Rigel R.
 Unfortunately I found no options for Lazarus. dxgettext-1.2.2.exe don't add 
options for Lazarus source or .exe. Do you know how can be used with Lazarus?




 Оригинално писмо 
От:  Reinier Olislagers  
Относно: Re: [Lazarus] Translations / Localizations for controls at design
time
До: Lazarus mailing list  
Изпратено на: Сряда, 2012, Август 1 09:39:19 EEST


On 1-8-2012 8:27, Rigel R. wrote:

 Hi,

 

 Why not expand  GNU Gettext for Delphi, C++ and Kylix то be used  with

 Lazarus:

 

  http://sourceforge.net/projects/dxgettext/ 

 

 Some advantages:

 open source;

 Automatic extract of name of components from form;

 Manually include text to translate (addition to the above) 

 using .po files

 Automatic add translation in .exe (with right-click);

 Automatic choose of language depending on Local Settings;

 Manual setting of language (if someone don't want previous option);

 Very easy to use (even I can use it ;) )



Their website says:

Supports for Kylix 3, Delphi 5, 6, 7, 2005, 2006, 2007, 2009,

FreePascal, Lazarus and C++ Builder.



so perhaps that already has been done?



The descriptions seem to indicate it uses Windows explorer integration

which I personnally hate, but... it's open source ;)





--

___

Lazarus mailing list

 Lazarus@lists.lazarus.freepascal.org 

 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 

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


Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Graeme Geldenhuys
Hi,

On 1 August 2012 00:02, Mattias Gaertner nc-gaert...@netcologne.de wrote:
 As far as I know there is no way to automatically generate some
 meaning like rsAccountingTransactionDate.


Exactly my point, and why the automation isn't a good idea.


 Yes, please do so. How much duplication do you see for translators in
 the Lazarus IDE?

I already have done so in the past, and even contributed patches to
reduce some duplication in resource strings.


 Almost all resourcestrings of the IDE were created by picking from a
 list. Can you be more specific?

Yes, but as the original poster said, you can't pick from that list
using the Object Inspector. That's the point he was trying to make.


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Graeme Geldenhuys
On 1 August 2012 00:07, Maxim Ganetsky gan...@narod.ru wrote:

 Reusing string constants is manual process. In my experience in most cases
 constants reusing is not desirable.

Just to give you a very simple example: So you think it is OK for each
form to have there own versions of rsCancel and rsOK for buttons? So
for an application with 200+ forms, that is already a lot of
duplication.


 Besides, I fail to see how can original poster's proposal significantly save
 your time in comparison with manual resourcestring assignments

A custom String property editor could maintain the list of resource
strings - thus adding a new resource on the spot should be possible
and fast. Everywhere else you can simply select an existing resource
string constant to be used in the Caption  Hint properties. There
would be no need for the developer to implement a SetupTranslations()
or SetupCaptions() method in each form. If you make it easy enough,
developer would stop hard-coding English text in the Caption property
of widgets, and opt to rather use resource strings - thus their
programs will be immediately possible for translation. It's much
harder to add translation afterwards, and prone to errors (missing a
translation in some widgets).

Anyway, this is how I envisioned it to work when I researched the idea
for fpGUI's UI Designer. And I will still find a suitable solution.


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Graeme Geldenhuys
Hi,


On 1 August 2012 06:31, Jürgen Hestermann juergen.hesterm...@gmx.de wrote:

 And how do you handle nesting of code and text as in:

I really don't see the problem. I have resource strings like that all
over the place. Even heard of the Format() function? Here are some
resource strings from my applications:

resourcestring

uiLoggedInAs= 'Logged in as: %s to %s';
uiViewsFor  = 'Views For %s';
uiErrTheItemAlreadExists= 'The item %s already exists.';
uiErrBulkInvRatesEmpty  = 'It seems some of the Bulk Invoice
Rates items have zero amounts. This is not allowed. Please correct
this problem and try again.';
uiErrXXXIsMissing   = '%s is missing';
uiErrNoDefaultTaxRate   = 'No default Tax Rate has been set for
this centre. Please contact Head Office.';
uiErrDBVersionMismatch  = 'This version of %s, v%d.%2.2d (%s %s), ' 
+
  'is not valid for the current database
version v%s. ' +
  'Please make sure you are running the
latest version of %s.';
uiErrMissingDefaultPaths= 'The Default Paths have not been set.
Do you want to set them now? $\n' +
  'Click Yes to set them now. If you
select No, you can set them $\n' +
  'later using the %s menu.';


I normally don't force line breaks in my resource strings. That's up
to the widget to word wrap them, and scale the UI. But I do have one
such case - see the last example. PO files/editors use the C-style
newline character to indicate a line break:  $\n



-- 
Regards,
  - Graeme -


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

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


[Lazarus] Merging of PDF files

2012-08-01 Thread zeljko
Hi,
Anyone knows is there any api which can do merging of multiple pdf files ?

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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Martin

On 01/08/2012 07:20, Reinier Olislagers wrote:

Hi list,

Trying to create a Lazarus installer on Windows:

1. gdb path problem
the readme says:

A.5 Lazarus binaries
Some binaries from a lazarus/binaries svn tree. These binaries (like gdb and 
the qt interface dll) are distributed with Lazarus, but are not built from 
source.

I did
svn co http://svn.freepascal.org/svn/lazarus/binaries/i386-win32/
c:\development\lazbinaries\
and passed that directory to create_intaller as the 3rd argument


You need to check out  svn co 
http://svn.freepascal.org/svn/lazarus/binaries


You only got one folder in it. But thu installer can run for 64 bit too, 
so it chooses the path itself





2. inno setup error
I get
C:\Development\lazarus\tools\install\winD:\Program Files (x86)\Inno
Setup 5\ISCC.exe lazarus.iss  1installer.log
Error on line 102 in
C:\Development\lazarus\tools\install\win\lazarus.iss: No files found
matching c:\development\lazbinaries\i386-win32\qt\*.dll
Compile aborted.


Same issue. check out the full binaries for all platforms, and let the 
installer deal with it




Same problem, really, I'd guess..

Any suggestions?

BTW, patch attached that:
- clarify/update readme (mentioned 2.2 fpc compiler instead of 2.6.0)
- lets you use environment variables for BUILDDIR

I will look at it.


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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Reinier Olislagers
On 1-8-2012 13:28, Martin wrote:
 On 01/08/2012 07:20, Reinier Olislagers wrote:
 Hi list,

 Trying to create a Lazarus installer on Windows:

 1. gdb path problem
 the readme says:
 A.5 Lazarus binaries
 Some binaries from a lazarus/binaries svn tree. These binaries (like
 gdb and the qt interface dll) are distributed with Lazarus, but are
 not built from source.
 I did
 svn co http://svn.freepascal.org/svn/lazarus/binaries/i386-win32/
 c:\development\lazbinaries\
 and passed that directory to create_intaller as the 3rd argument
 
 You need to check out  svn co
 http://svn.freepascal.org/svn/lazarus/binaries
 
 You only got one folder in it. But thu installer can run for 64 bit too,
 so it chooses the path itself
Oh Martin, I can't believe I overlooked that ;)
Thanks a lot ;)

 BTW, patch attached that:
 - clarify/update readme (mentioned 2.2 fpc compiler instead of 2.6.0)
 - lets you use environment variables for BUILDDIR
 I will look at it.
Thanks,

Reinier


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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Martin

On 01/08/2012 07:20, Reinier Olislagers wrote:

BTW, patch attached that:
- clarify/update readme (mentioned 2.2 fpc compiler instead of 2.6.0)
- lets you use environment variables for BUILDDIR




I skipped the build dir part.

BUILDDIR is too generic as a name, and may be set by something else. If 
so, the script would delete whatever directory that points too.


Feel free to introduce

LAZTEMPBUILDDIR

But do not replace it everywere. Initialize BUILDDIR from the former.
And maybe add a check, for empty, or none existent.

The hardcoded BUILDDIR points to a temp dir (and contains laz in the name), so 
it can always be deleted with little risk.

for a directory from the environment, this is not known. It could point to 
important data. So it should be required to bo empty already.

yes that prevents auto clean up, if a previous build fails (since on failure 
the content is left in place, so it can be inspected)



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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread Graeme Geldenhuys
On 1 August 2012 11:13, zeljko zel...@holobit.net wrote:

 Anyone knows is there any api which can do merging of multiple pdf files ?


Have you tried Google yet?   Enter the term:   merging pdf files
:-)


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Reinier Olislagers
On 1-8-2012 14:27, Martin wrote:
 On 01/08/2012 07:20, Reinier Olislagers wrote:
 BTW, patch attached that:
 - clarify/update readme (mentioned 2.2 fpc compiler instead of 2.6.0)
 - lets you use environment variables for BUILDDIR
Thanks!

 I skipped the build dir part.
 
 BUILDDIR is too generic as a name, and may be set by something else. If
 so, the script would delete whatever directory that points too.
 
 Feel free to introduce
 
 LAZTEMPBUILDDIR
 
 But do not replace it everywere. Initialize BUILDDIR from the former.
 And maybe add a check, for empty, or none existent.
Thanks, make sense.
Done; check included, see patch.
Tested by setting LAZTEMPBUILDDIR and it does put the output there.

The patch also contains a fix for the iss file (a Pascal begin..end
block without colon after the end ;) - otherwise I get this error:

Error on line 383 in
C:\Development\lazarus\tools\install\win\lazarus.iss: Column 2:
Semicolon (';') expected.
Compile aborted.

If you want me to open mantis issues instead, I'd be happy to...

However, I now get this:
Error on line 417 in
C:\Development\lazarus\tools\install\win\lazarus.iss: Column 40:
Type mismatch.

The lines in question:
var
  FileName: string;
  Content: string;
begin
  FileName := ExpandConstant(CurrentFileName);
  LoadStringFromFile(FileName, Content); //-- line 417; col 40 is the ;

Those lines appear to have been there since r6092 (svn blame)... perhaps
it's the fact I'm using Unicode Inno Setup or something I'm not seeing?
(No experience with PascalScript or those functions, nor do I know what
CurrentFileName is, so more or less blindly guessing)

I upgraded my Inno Setup to the latest, 5.5.1 unicode, no change.

Thanks,
Reinier

Index: tools/install/win/lazarus.iss
===
--- tools/install/win/lazarus.iss   (revision 38105)
+++ tools/install/win/lazarus.iss   (working copy)
@@ -378,7 +378,7 @@
   MsgBox(s, mbInformation, MB_OK );
   Result := false;
   exit;
-end
+end;
 
UpdateUninstallInfo;
 UnInstaller := RemoveQuotes(GetUninstallData('UninstallString'));
Index: tools/install/win/create_installer.bat
===
--- tools/install/win/create_installer.bat  (revision 38105)
+++ tools/install/win/create_installer.bat  (working copy)
@@ -10,7 +10,9 @@
 
 :: Path to build directory.
 :: In this directory an image of the installation will be built.
+:: If the user specified a LAZTEMPBUILDDIR environment variable, use that 
instead.
 SET BUILDDIR=c:\temp\lazbuild
+if NOT [%LAZTEMPBUILDDIR%]==[] SET BUILDDIR=%LAZTEMPBUILDDIR%
 
 :: Path to the svn executable
 if [%SVN%]==[] SET SVN=c:\program files\subversion\bin\svn.exe
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread Michael Schnell

On 08/01/2012 02:54 PM, zeljko wrote:



Yes, there are various apps which can do that, but I've asked about 
some api/component which can be included into application.



I once tried some of them. Most simply don't work (being printers to PDF 
files) and some installed nasty addware stuff. I gave up at that time.


Maybe you could try to install FinePrint (which I know works fine, but 
supposedly Windows-only), have it collect the print output of printed 
PDF files and have FinePrint print to a PDF printer.


-Michael

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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread Reinier Olislagers
On 1-8-2012 16:10, Michael Schnell wrote:
 On 08/01/2012 02:54 PM, zeljko wrote:


 Yes, there are various apps which can do that, but I've asked about
 some api/component which can be included into application.


 I once tried some of them. Most simply don't work (being printers to PDF
 files) and some installed nasty addware stuff. I gave up at that time.

One tool I use is GiosPDFMerge, which is open source and written in .Net
but has no accessible API as far as I know.

Perhaps you could try to call pdftk using TProcess? It's open source and
multi platform (at least Windows and Linux).

Regards,
Reinier

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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread zeljko
On Wednesday 01 of August 2012 16:31:17 Reinier Olislagers wrote:
 On 1-8-2012 16:10, Michael Schnell wrote:
  On 08/01/2012 02:54 PM, zeljko wrote:
  Yes, there are various apps which can do that, but I've asked about
  some api/component which can be included into application.
  
  I once tried some of them. Most simply don't work (being printers to PDF
  files) and some installed nasty addware stuff. I gave up at that time.
 
 One tool I use is GiosPDFMerge, which is open source and written in .Net
 but has no accessible API as far as I know.
 
 Perhaps you could try to call pdftk using TProcess? It's open source and
 multi platform (at least Windows and Linux).

Thanks, I've already found pdftk as best solution atm. PowerPDF cannot do that 
?

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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread Graeme Geldenhuys
Hi,

On 1 August 2012 13:54, zeljko zel...@holobit.net wrote:

 Yes, there are various apps which can do that, but I've asked about some
 api/component which can be included into application.


Maybe some of them could be called via TProcess (eg: a console tool)
with some parameters?


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread Sven Barth

Am 01.08.2012 12:13, schrieb zeljko:

Hi,

Anyone knows is there any api which can do merging of multiple pdf files ?


At work we use the QuickPDF library ( 
http://www.quickpdflibrary.com/index.php ), but sadly it's not free and 
I don't know whether the source would compile with FPC or how platform 
independant it would be... (we don't have the source release)


Regards,
Sven


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


Re: [Lazarus] Translations / Localizations for controls at design time

2012-08-01 Thread Jürgen Hestermann

Am 2012-08-01 09:34, schrieb Graeme Geldenhuys:
 And how do you handle nesting of code and text as in:
 I really don't see the problem. I have resource strings like that all
 over the place. Even heard of the Format() function?

Ah, yes. Well, I have heard of it but I have never used the Format() function.
There is a reason I want to program in Pascal and not in C. ;-)

But ok, now I know how this case is handled.


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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Reinier Olislagers
On 1-8-2012 15:42, Reinier Olislagers wrote:
 However, I now get this:
 Error on line 417 in
 C:\Development\lazarus\tools\install\win\lazarus.iss: Column 40:
 Type mismatch.
 
 The lines in question:
 var
   FileName: string;
   Content: string;
 begin
   FileName := ExpandConstant(CurrentFileName);
   LoadStringFromFile(FileName, Content); //-- line 417; col 40 is the ;
 
 Those lines appear to have been there since r6092 (svn blame)... perhaps
 it's the fact I'm using Unicode Inno Setup or something I'm not seeing?
I think it's using Inno Setup Unicode.
from
http://www.jrsoftware.org/ishelp/
Other Information
Unicode Inno Setup
Unicode Pascal Scripting notes:
...LoadStringFromfile, SaveStringToFile,... are of type AnsiString now
instead of String.
It seems that replacing the relevant String variables with explicit
AnsiStrings might be a good idea which should work with ANSI Inno Setup.

And this The Unicode compiler is more strict about correct ';'
usage... explains the earlier error I got.

I'll try to fix the script, then run the installer, then install ANSI
InnoSetup, do the same, and if it works, submit a patch.

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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread João Marcelo Vaz
 On 1 August 2012 13:54, zeljko zel...@holobit.net wrote:

 Yes, there are various apps which can do that, but I've asked about some
 api/component which can be included into application.


 Maybe some of them could be called via TProcess (eg: a console tool)
 with some parameters?


You may use Ghostscript as a console tool.

http://www.linuxjournal.com/content/tech-tip-using-ghostscript-convert-and-combine-files

-- 
João Marcelo
http://blog.caixadepandora.com/

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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Martin

On 01/08/2012 17:41, Reinier Olislagers wrote:

On 1-8-2012 15:42, Reinier Olislagers wrote:

However, I now get this:
Error on line 417 in
C:\Development\lazarus\tools\install\win\lazarus.iss: Column 40:
Type mismatch.

The lines in question:
var
   FileName: string;
   Content: string;
begin
   FileName := ExpandConstant(CurrentFileName);
   LoadStringFromFile(FileName, Content); //-- line 417; col 40 is the ;

Those lines appear to have been there since r6092 (svn blame)... perhaps
it's the fact I'm using Unicode Inno Setup or something I'm not seeing?

I think it's using Inno Setup Unicode.
from
http://www.jrsoftware.org/ishelp/

Possible. So far the installer are build with the ansi setup.

Migrating to the unicode is on the list.


I'll try to fix the script, then run the installer, then install ANSI
InnoSetup, do the same, and if it works, submit a patch.


Big step is to look at includes such as the Russian translation. If they 
can move into the [language] section, then inno should deal with it


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


[Lazarus] fpWeb, XHR2 and arraybuffer

2012-08-01 Thread Reimar Grabowski
Hi,

I am trying to use fpWeb in a simple cgi app to send data to a webpage. I am 
using XMLHttpRequest2 on the JS side. My problem is that the response is null 
if I set the responseType to arraybuffer. If I do not set a responseType at 
all I get a response.
My JS skills are not the best but I think the code is correct (at least that is 
how it is done in all the examples I studied).
But the cgi app seems to work correctly, too. If I point my browser to the cgi 
app it downloads the data to a file and this data is correct.
Most likely I am doing something stupid or missing something obvious but 
currently I don't know what to do or where to look to get this working.

The relevant code parts:
Server-side:

Procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest: TRequest;
  AResponse: TResponse; Var Handled: Boolean);

var
  StreamResponse: TMemoryStream;
  Data: array [0..7] of byte;

begin
  StreamResponse:=TMemoryStream.Create;
  try
Data[0]:=0;
Data[1]:=1;
Data[2]:=2;
Data[3]:=3;
Data[4]:=4;
Data[5]:=5;
Data[6]:=6;
Data[7]:=7;
StreamResponse.Write(Data, SizeOf(Data));
AResponse.ContentType:='application/octet-stream';
AResponse.ContentLength:=StreamResponse.Size;
AResponse.ContentStream:=StreamResponse;
AResponse.Code:=200;
AResponse.SendContent;
  finally
StreamResponse.Free;
  end;
  AResponse.ContentStream:=nil;
  Handled:=True;
end;


Client-side:

function sendXHR() {
  var xhr = new XMLHttpRequest();
  xhr.open(GET, http://devserver/cgi-bin/cgitest;, true);
  xhr.responseType = arraybuffer;
  xhr.onload = function() {
var arrayBuffer = xhr.response;
  }
  xhr.send();
}

Any help is appreciated.
R.

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


Re: [Lazarus] Merging of PDF files

2012-08-01 Thread Mark Morgan Lloyd

Reinier Olislagers wrote:


Perhaps you could try to call pdftk using TProcess? It's open source and
multi platform (at least Windows and Linux).


I thought pdftk was a thin wrapper around a library... pdftk uses a 
slightly modified iText Java library (http://itextpdf.sourceforge.net/) 
to read and write PDF. The author compiled this Java library using GCJ 
(http://gcc.gnu.org) so it could be linked with a front end written in 
C++.  The pdftk home page is http://www.accesspdf.com/pdftk/.;


There'd probably be a problem calling the backend library, if it uses 
Java or C++ OO techniques, from FPC- I think somebody in the list 
commented on this a few days ago. I wonder whether it would be possible 
to modify the pdftk program to be a library with a single entry point, 
callable as a Pascal function?


--
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] How does Lazarus find SQLite?

2012-08-01 Thread Ing . Héctor F . Fiandor Rosario

Dear Mr. Klenin:

I have installed succesfully the SQLite3 and I have done the excersice 
covered in the Tutorial01 and Tutorial02.


The tutorial03 don´t work.

I will appreciate very much to know when you will publish the demo 
documentation mentioned.


thanks in advance,

Ing. Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu

- Original Message - 
From: Alexander Klenin kle...@gmail.com

To: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Sent: Tuesday, July 24, 2012 6:18 AM
Subject: Re: [Lazarus] How does Lazarus find SQLite?


On Tue, Jul 24, 2012 at 9:52 PM, leledumbo leledumbo_c...@yahoo.co.id 
wrote:

It seems the Lazaurs uses SQLite. (For what, btw? just curious)


Not at all, except if you install SQLite component.


So how does Lazarus find the SQLite library?


You are right. This sounds like a bug in the component, however --
after installation of sqllite3laz package, Lazarus itself fails to
start in there is no DLL in path.
The DLL should be loaded only when the connection is made, similar to
the other databases.


Windows: anywhere in PATH
*nix: /usr/lib or /usr/local/lib usually, but other places are possible 
(not

really sure about all of them, it may differ one to another)


I see. Based my incorrect conclusion that Lazarus itself uses SQLite I was
hoping to guarantee its presence for the demo.
I'll just write in the demo documentation that it is required :)

--
Alexander S. Klenin

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



--

Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Reinier Olislagers
On 1-8-2012 19:18, Martin wrote:
 On 01/08/2012 17:41, Reinier Olislagers wrote:
 On 1-8-2012 15:42, Reinier Olislagers wrote:
 Those lines appear to have been there since r6092 (svn blame)... perhaps
 it's the fact I'm using Unicode Inno Setup or something I'm not seeing?
 I think it's using Inno Setup Unicode.
 from
 http://www.jrsoftware.org/ishelp/
 Possible. So far the installer are build with the ansi setup.
Certain ;)
Got the installer to run with unicode setup after some changes.

 Migrating to the unicode is on the list.
 
 I'll try to fix the script, then run the installer, then install ANSI
 InnoSetup, do the same, and if it works, submit a patch.
Unfortunately I don't think we can have 1 script for both ansi and
unicode inno setup unless PascalScript supports ifdefs and there's a
compiler define for the unicode and one for the ansi version.

Assuming nobody is building on win9x, requiring unicode Inno (instead of
ANSI Inno) shouldn't be a problem, I think.

 Big step is to look at includes such as the Russian translation. If they
 can move into the [language] section, then inno should deal with it
Will have to have a look at what you mean... been a while since I used Inno.
AFAIU from the docs, Inno Unicode can read UTF8 files without BOM (and
more); currently the Russian translation seems to be encoded using some
ANSI codepage (1251 by heart?).

Meanwhile I have a working setup.exe but it seems to mix 2.6.0 and 2.6.1
directories below Lazarus (I'm using a 2.6.0 bootstrap and a 2.6.1 svn
dir... don't know if that influences things).

Going to stop now... back tomorrow to have another go.

Regards,
Reinier


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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Martin

On 01/08/2012 20:51, Reinier Olislagers wrote:

On 1-8-2012 19:18, Martin wrote:


Migrating to the unicode is on the list.


I'll try to fix the script, then run the installer, then install ANSI
InnoSetup, do the same, and if it works, submit a patch.

Unfortunately I don't think we can have 1 script for both ansi and
unicode inno setup unless PascalScript supports ifdefs and there's a
compiler define for the unicode and one for the ansi version.

the inno preprocessor has...


Assuming nobody is building on win9x, requiring unicode Inno (instead of
ANSI Inno) shouldn't be a problem, I think.

building, I guess not. Installing afaik yes


Big step is to look at includes such as the Russian translation. If they
can move into the [language] section, then inno should deal with it

Will have to have a look at what you mean... been a while since I used Inno.
AFAIU from the docs, Inno Unicode can read UTF8 files without BOM (and
more); currently the Russian translation seems to be encoded using some
ANSI codepage (1251 by heart?).
according to inno docs, the unicode version can use some of the ansi 
files, and will convert them to utf8 itself (applies to language section)




Meanwhile I have a working setup.exe but it seems to mix 2.6.0 and 2.6.1
directories below Lazarus (I'm using a 2.6.0 bootstrap and a 2.6.1 svn
dir... don't know if that influences things).

No idea.


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


Re: [Lazarus] TFileDescPascalUnit - How to save closed units?

2012-08-01 Thread Mattias Gaertner
On Mon, 30 Jul 2012 21:42:58 -0300
silvioprog silviop...@gmail.com wrote:

 Hi,
 
 Attached my package. It don't save the unit plugin.pas. I click in
 Save All, but IDE call only cgi1.lpi and hello.pas to save in
 file.
 
 So, you can only save one unit if it is open in the code editor?

Yes.
You can save other source files yourself:

Code:=CodeToolBoss.FindFile(Filename);
if (Codenil) and (not Code.Save) then 
  error...

Mattias

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


Re: [Lazarus] Problems creating Lazarus installer + readme/batch patch

2012-08-01 Thread Martin

On 01/08/2012 20:51, Reinier Olislagers wrote:

On 1-8-2012 19:18, Martin wrote:

Possible. So far the installer are build with the ansi setup.

Certain ;)
Got the installer to run with unicode setup after some changes.



Well. I threw out some unused code. And it comes down to 1 change in the 
pal script. (ignoring the fix of a missing semicolon)




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


Re: [Lazarus] TFileDescPascalUnit - How to save closed units?

2012-08-01 Thread silvioprog
2012/8/1 Mattias Gaertner nc-gaert...@netcologne.de:
 On Mon, 30 Jul 2012 21:42:58 -0300
 silvioprog silviop...@gmail.com wrote:

 Hi,

 Attached my package. It don't save the unit plugin.pas. I click in
 Save All, but IDE call only cgi1.lpi and hello.pas to save in
 file.

 So, you can only save one unit if it is open in the code editor?

 Yes.
 You can save other source files yourself:

 Code:=CodeToolBoss.FindFile(Filename);
 if (Codenil) and (not Code.Save) then
   error...

 Mattias

Great idea! I'll ask if user want to save all files before close the project. :)

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog

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


Re: [Lazarus] Change the default name of an event handler

2012-08-01 Thread Mattias Gaertner
On Mon, 30 Jul 2012 08:54:00 +0200
Yann Bat batyann...@gmail.com wrote:

 Don't no if it's because of my poor english or because of my questions are
 stupid but I didn't get much answers... :-(
 
 How can I change the default name from DataModuleCreate to ZModuleCreate ?
 
 
 I suppose that the default name of an event handler is built from the name
 of the class that introduced the event so may be there is no simple way to
 change that...

The default component name is fetched from the
TProjectFileDescriptor.DefaultResourceName.


  When I create a new TZModule it's small. Can I change the default size of
  newly created TZModule  ?
 
 
 I found that this can be done overriding Create to set a value to
 DesignSize.
 
 constructor TZModule.Create(TheOwner: TComponent);
 var
   Size : TPoint;
 begin
   inherited Create(TheOwner);
 
   Size.X := 320;
   Size.Y := 200;
   DesignSize := Size;
 end;
 
 May this can be done in the default constructor of TDataModule ? Without
 that the window representing a newly created TDataModule in the IDE is so
 small that it needs manual resizing before any use.

Yes. Feel free to propose a change to the FPC bug tracker.
I increased the minimum size in the IDE for TDataModule to 150x150.

Mattias

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


[Lazarus] Lazarus 1.0 release candidate 1 available for download

2012-08-01 Thread Mattias Gaertner
The Lazarus team is glad to announce that Lazarus 1.0RC is available for 
download at the SourceForge download page:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU / OS / distro and then the 1.0RC1 directory.

Minimum requirements:
Windows:   98, 2k, Vista, 7, 32 or 64bit
FreeBSD/Linux: gtk 2.8 or qt4.5, 32 or 64bit
Mac OS X:  10.4, LCL only 32bit, non LCL apps can be 64bit

This release has been built with fpc 2.6.0 (the former release 0.9.30.4 was
built with that too).

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

Please, let me know if you find any problems with these release candidates.

Also let me know if you installed it without any problem.

Mattias

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


Re: [Lazarus] Lazarus 1.0 release candidate 1 available for download

2012-08-01 Thread Paul Ishenin

02.08.12, 5:35, Mattias Gaertner пишет:

The Lazarus team is glad to announce that Lazarus 1.0RC is available for 
download at the SourceForge download page:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU / OS / distro and then the 1.0RC1 directory.

Minimum requirements:
Windows:   98, 2k, Vista, 7, 32 or 64bit
FreeBSD/Linux: gtk 2.8 or qt4.5, 32 or 64bit
Mac OS X:  10.4, LCL only 32bit, non LCL apps can be 64bit

This release has been built with fpc 2.6.0 (the former release 0.9.30.4 was
built with that too).

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

Please, let me know if you find any problems with these release candidates.

Also let me know if you installed it without any problem.


Also the list of changes:
http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes

Best regards,
Paul Ishenin

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


Re: [Lazarus] Lazarus 1.0 release candidate 1 available for download

2012-08-01 Thread silvioprog
2012/8/1 Paul Ishenin webpi...@mail.ru:
 02.08.12, 5:35, Mattias Gaertner пишет:

 The Lazarus team is glad to announce that Lazarus 1.0RC is available for
 download at the SourceForge download page:
 http://sourceforge.net/projects/lazarus/files/

 Choose your CPU / OS / distro and then the 1.0RC1 directory.

 Minimum requirements:
 Windows:   98, 2k, Vista, 7, 32 or 64bit
 FreeBSD/Linux: gtk 2.8 or qt4.5, 32 or 64bit
 Mac OS X:  10.4, LCL only 32bit, non LCL apps can be 64bit

 This release has been built with fpc 2.6.0 (the former release 0.9.30.4
 was
 built with that too).

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

 Please, let me know if you find any problems with these release
 candidates.

 Also let me know if you installed it without any problem.


 Also the list of changes:
 http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes

 Best regards,
 Paul Ishenin

Congratulations to all the for the great work!

--
Silvio Clécio
My public projects - github.com/silvioprog

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