Re: [Lazarus] Resources

2013-11-24 Thread Sven Barth
On 24.11.2013 03:26, Donald Ziesig wrote: Image1.Picture.LoadFromLazarusResource('PIX2'); // Tried 'pix2' as well Lazarus Resources FPC Resources Lazarus Resources where the resources that were used before FPC supported resources itself. So kick out the LResources unit and change

[Lazarus] Resources

2013-11-23 Thread Donald Ziesig
Hi All! I have been trying to use a resource file (mydata.rc) to include some bitmap images in an app but with no success. For simplicity, I have pared the rc file to a single line: pix2 BITMAP /home/mydir/Desktop/myapp/2.bmp I have the following lines in my main unit: {$R *.lfm} //

Re: [Lazarus] Resources

2013-11-23 Thread leledumbo
{$R} (FPC style) resources are not the same as Lazarus resources. See: http://wiki.freepascal.org/Lazarus_Resources -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Resources-tp4034456p4034457.html Sent from the Free Pascal - Lazarus mailing list archive

[Lazarus] lazarus resources

2012-02-07 Thread Everton Vieira
I`ve make a very easy lazarus resource file, is annexed: unEdit_Add_Rem.lrs Description: Binary data , with two png files insides, and i`m using like this: btnAdd.Glyph.LoadFromLazarusResource('edit_add'); initialization {$I unEdit_Add_Rem.lrs} Generates this error: Exception Class:

Re: [Lazarus] lazarus resources

2012-02-07 Thread Felipe Monteiro de Carvalho
Each class can only read 1 format. btnAdd.Glyph is a TBitmap and therefore reads only bitmaps. But you can first read to a PNG and then use Assign to convert to a bitmap. Try doing it like this: var MyPNG: TPortableNetworkGraphic; begin MyPNG := TPortableNetworkGraphic;

Re: [Lazarus] lazarus resources

2012-02-07 Thread Everton Vieira
Thanks! Em 07/02/2012, às 12:32, Felipe Monteiro de Carvalho escreveu: Each class can only read 1 format. btnAdd.Glyph is a TBitmap and therefore reads only bitmaps. But you can first read to a PNG and then use Assign to convert to a bitmap. Try doing it like this: var MyPNG:

Re: [Lazarus] Resources on Windows

2010-07-29 Thread Alexander Klenin
On Thu, Jul 29, 2010 at 13:10, Paul Ishenin i...@kmiac.ru wrote: 29.07.2010 8:08, Alexander Klenin wrote: However, my question is -- is this yet another incompatible change made without any warning? Or did I miss it? I wrote about this change here:

Re: [Lazarus] Resources on Windows

2010-07-29 Thread Paul Ishenin
30.07.2010 9:07, Alexander Klenin wrote: No, Project Options - OK did not change .lpr file in any way. .res file did not appear either. This means that you have no resources: no manifest, no icon, no version information. Remove the old rc and manifest files if they are present and add a

Re: [Lazarus] Lazarus Resources

2010-07-28 Thread Josh Lee
On 28 Jul 2010, at 06:56 AM, Paul Ishenin i...@kmiac.ru wrote: 26.07.2010 19:59, Mattias Gärtner wrote: Can you add some links or paragraphs on http://wiki.lazarus.freepascal.org/Lazarus_Resources about the new resources? Done. Oh brilliant, thanks so much. The article has a lot more

Re: [Lazarus] Resources on Windows

2010-07-28 Thread Paul Ishenin
29.07.2010 8:08, Alexander Klenin wrote: However, my question is -- is this yet another incompatible change made without any warning? Or did I miss it? I wrote about this change here: http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html The problem is that previosly

Re: [Lazarus] Lazarus Resources

2010-07-27 Thread Paul Ishenin
26.07.2010 19:59, Mattias Gärtner wrote: Can you add some links or paragraphs on http://wiki.lazarus.freepascal.org/Lazarus_Resources about the new resources? Done. Best regards, Paul Ishenin. -- ___ Lazarus mailing list

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Duncan Parsons
From: Josh Lee [mailto:frozen-drago...@hotmail.com] Sent: 25 July 2010 12:11 You can add files as User-Defined resource types, or use RCDATA for raw (binary) data. See MSDN Resource Definition Statements, User-Defined Resources Thank you, I read up on them. Do you know where I can find a

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Josh Lee
the source is very educational. I love the idea that they implemented Pascal in it, so you can make custom scripts! It's like a non-GUI Lazarus ;) But isn't Delphi resources set out different from Lazarus resources? The first thing I'm going to do when I fully understand Lazarus resources is write

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Felipe Monteiro de Carvalho
different from Lazarus resources? Delphi uses Windows resources though the Windows API Lazarus supports 2 kinds of resources: Windows resources (RC files) and Lazarus resources (LRS files) using FPC/Lazarus APIs In that sense looking at the Inno Setup source code probably won't help much

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Paul Ishenin
26.07.2010 18:23, Felipe Monteiro de Carvalho wrote: In that sense looking at the Inno Setup source code probably won't help much as it will probably be using Windows API which aren't portable. FPC resources api is compatible with windows. Best regards, Paul Ishenin. --

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Mattias Gärtner
Zitat von Paul Ishenin webpi...@mail.ru: 26.07.2010 18:23, Felipe Monteiro de Carvalho wrote: In that sense looking at the Inno Setup source code probably won't help much as it will probably be using Windows API which aren't portable. FPC resources api is compatible with windows. Can you

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Antônio
Josh, You can store a resource file on your exe by compiling a resource from a file via this tool ( http://lazarusbrasil.org/Resources.zip ) and adding the line {$R ResName.res} to your project. Then you can call the resource by name so: var ResStr :TResourceStream; begin ResStr :=

Re: [Lazarus] Lazarus Resources

2010-07-26 Thread Josh Lee
On 26 Jul 2010, at 01:20 PM, Antônio antoniog12...@gmail.com wrote: Josh, You can store a resource file on your exe by compiling a resource from a file via this tool ( http://lazarusbrasil.org/Resources.zip ) and adding the line {$R ResName.res} to your project. Then you can call the

[Lazarus] Lazarus Resources

2010-07-25 Thread Josh Lee
I am now very confused. I have been told by someone on Lazarus Forums that to write an installer, I would need to use Resources. I have done some research into resources, and got this:Resource (Windows)From Wikipedia, the free encyclopedia In Microsoft Windows, resources are read-only data

Re: [Lazarus] Lazarus Resources

2010-07-25 Thread Mattias Gaertner
On Sun, 25 Jul 2010 09:52:08 +0100 Josh Lee frozen-drago...@hotmail.com wrote: I am now very confused. I have been told by someone on Lazarus Forums that to write an installer, I would need to use Resources. I have done some research into resources, and got this:Resource (Windows)From

Re: [Lazarus] Lazarus Resources

2010-07-25 Thread Josh Lee
Josh Lee Programmer - Owner of JLSoftware On 25 Jul 2010, at 10:05 AM, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Sun, 25 Jul 2010 09:52:08 +0100 Josh Lee frozen-drago...@hotmail.com wrote: I am now very confused. I have been told by someone on Lazarus Forums that to write

Re: [Lazarus] Lazarus Resources

2010-07-25 Thread Hans-Peter Diettrich
Josh Lee schrieb: Each resource has a type and a name, both being either numeric identifiers or strings. [...] So it seems that I cannot store a FILE in a resource. You can add files as User-Defined resource types, or use RCDATA for raw (binary) data. See MSDN Resource Definition

Re: [Lazarus] Lazarus Resources

2010-07-25 Thread Josh Lee
You can add files as User-Defined resource types, or use RCDATA for raw (binary) data. See MSDN Resource Definition Statements, User-Defined ResourcesThank you, I read up on them.Do you know where I can find a step by step tutorial on how to create a stand alone program that installs

Re: [Lazarus] Lazarus Resources

2010-07-25 Thread Hans-Peter Diettrich
Josh Lee schrieb: Do you know where I can find a step by step tutorial on how to create a stand alone program that installs something on the hard disk? No sorry. Details depend on what you want to install (files only, registry settings...), if you want to add an uninstall option as well,

[Lazarus] Lazarus Resources

2010-07-24 Thread Josh Lee
I know these look like spam, I'm not that familiar with mailing lists... Could someone please give me a description and documented code explaining on how Lazarus Resources works and how to use it to make a stand alone .exe that transfers files to the hard drive? I really need to know, as I wish

Re: [Lazarus] Lazarus Resources (2)

2010-07-24 Thread Mattias Gaertner
On Tue, 20 Jul 2010 18:24:36 +0100 Josh Lee frozen-drago...@hotmail.com wrote: Hello people. I've managed to compile a Lazarus resource, test.lrs. It has cmd.exe in it (I think!), and I'm trying to make a (useless) stand-alone program that takes the cmd.exe from the resource and places it

Re: [Lazarus] Lazarus Resources (2)

2010-07-21 Thread Josh Lee
John, I run Vista. Yes, there is error messages, I simply do not know the syntax to achieve it. - Josh -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Lazarus Resources (2)

2010-07-21 Thread John vd Waeter
Josh Lee wrote: John, I run Vista. Yes, there is error messages, I simply do not know the syntax to achieve it. - Josh Oh well, as you can see error messages, you can type them here? John -- ___ Lazarus mailing list

[Lazarus] Lazarus Resources

2010-07-20 Thread Josh Lee
Hey, people. I'm quite a novice Lazarus programmer, and I would like a bit of help, please. How do I use Lazarus resources? I think I know what they are, files that can be compiled into the binary? I'm not sure, but it was suggested to me when I asked how an installer works. Problem is, I can't

Re: [Lazarus] Lazarus Resources

2010-07-20 Thread Antônio
use Lazarus resources? I think I know what they are, files that can be compiled into the binary? I'm not sure, but it was suggested to me when I asked how an installer works. Problem is, I can't find 'New Resource' in Lazarus, and I have no idea how to use it anyway. I Googled it but can't find

[Lazarus] Lazarus Resources (2)

2010-07-20 Thread Josh Lee
Hello people. I've managed to compile a Lazarus resource, test.lrs. It has cmd.exe in it (I think!), and I'm trying to make a (useless) stand-alone program that takes the cmd.exe from the resource and places it in C:\. I've tried, and failed, and the Lazarus wiki doesn't explain it very well.

Re: [Lazarus] Lazarus Resources (2)

2010-07-20 Thread John vd Waeter
Josh, I don't know much about resources, but: - What OS? In Win Vista or 7 you may not be allowed to write to C:\ - Is there an error message? John Josh Lee wrote: Hello people. I've managed to compile a Lazarus resource, test.lrs. It has cmd.exe in it (I think!), and I'm trying to make a