Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-07

big resource

14 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dariusz Mazur

Hi
I include res file to executed file. Res is compiled by brcc32 from RC. Till now everything work OK.
But when i try extract big PNG picture from RES I had wrong size of file. File has length 136303.
When I read it from res length is 5321. This seems size of res is 16 bit.

This is intentional that size of resource is limited ?

I use FPC 2.2.2 under Linux.

Darek

Reply by email

Michael Van Canneyt
to Dariusz Mazur
Dariusz Mazur wrote 8 lines
Hi I include res file to executed file. Res is compiled by brcc32 from RC. Till now everything work OK. But when i try extract big PNG picture from RES I had wrong size of file. File has length 136303. When I read it from res length is 5321. This seems size of res is 16 bit. This is intentional that size of resource is limited ?

Not intentionally, at least not that I am aware of. Maybe there is a bug ?

Michael.

Reply by email

Dariusz Mazur
to Michael Van Canneyt

Michael Van Canneyt pisze:

Show quoted text 17 lines
On Mon, 6 Jul 2009, Dariusz Mazur wrote: > Hi > I include res file to executed file. Res is compiled by brcc32 from > RC. Till now everything work OK. > But when i try extract big PNG picture from RES I had wrong size of > file. > File has length 136303. > When I read it from res length is 5321. This seems size of res is > 16 bit. > > This is intentional that size of resource is limited ? Not intentionally, at least not that I am aware of. Maybe there is a bug ?

I use {$R file.res}
How prepare testcase: should I attach big PNG+RC+RES file?

Darek

Reply by email

Yury Sidorov
to Dariusz Mazur

From: "Dariusz Mazur"

Show quoted text 20 lines
Michael Van Canneyt pisze: > > > On Mon, 6 Jul 2009, Dariusz Mazur wrote: > >> Hi >> I include res file to executed file. Res is compiled by brcc32 >> from RC. Till now everything work OK. >> But when i try extract big PNG picture from RES I had wrong size >> of file. >> File has length 136303. >> When I read it from res length is 5321. This seems size of res >> is 16 bit. >> >> This is intentional that size of resource is limited ? > > Not intentionally, at least not that I am aware of. Maybe there is > a bug ? I use {$R file.res} How prepare testcase: should I attach big PNG+RC+RES file?

You should try FPC 2.3.1 first. It has rewritten resources support and may work properly.

Yury.

Reply by email

Michael Van Canneyt
to Dariusz Mazur: Michael Van Canneyt pisze: I use {$R file.res} How prepare testcase: should I attach big…
Dariusz Mazur wrote 18 lines
Michael Van Canneyt pisze: > > > On Mon, 6 Jul 2009, Dariusz Mazur wrote: > >> Hi >> I include res file to executed file. Res is compiled by brcc32 from RC. >> Till now everything work OK. >> But when i try extract big PNG picture from RES I had wrong size of file. >> File has length 136303. >> When I read it from res length is 5321. This seems size of res is 16 >> bit. >> >> This is intentional that size of resource is limited ? > > Not intentionally, at least not that I am aware of. Maybe there is a bug ? I use {$R file.res} How prepare testcase: should I attach big PNG+RC+RES file?

Yes, but please test with 2.3.1 first. the resource mechanism was rewritten.

Michael.

Reply by email

Dariusz Mazur
to Michael Van Canneyt

Michael Van Canneyt pisze:

Show quoted text 27 lines
On Mon, 6 Jul 2009, Dariusz Mazur wrote: > Michael Van Canneyt pisze: >> >> >> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >> >>> Hi >>> I include res file to executed file. Res is compiled by brcc32 >>> from RC. Till now everything work OK. >>> But when i try extract big PNG picture from RES I had wrong size of >>> file. >>> File has length 136303. >>> When I read it from res length is 5321. This seems size of res >>> is 16 bit. >>> >>> This is intentional that size of resource is limited ? >> >> Not intentionally, at least not that I am aware of. Maybe there is a >> bug ? > I use {$R file.res} > How prepare testcase: should I attach big PNG+RC+RES file? Yes, but please test with 2.3.1 first. the resource mechanism was rewritten.

I made some test
FPC 2.3.1 with RC compiled by binutils windres - everything is OK FPC 2.3.1 with RES compiled by brcc32 - 131kb png is not found

FPC.2.2.4 with RC compiled by binutils windres -
131kB PNG - size from resource is 5231
50KB PNG - size from resourse is 4294951983 (sic)

FPC.2.2.4 with RC compiled by brcc32 -
131kB PNG - size from resource is 0 (absent)
50KB PNG - size from resourse is 4294951983

I can make and upload more test, but which?
Is there any chance to make patch to FPC 2.2.4 (its stable)

Darek

Reply by email

Michael Van Canneyt
to Dariusz Mazur
Dariusz Mazur wrote 31 lines
Michael Van Canneyt pisze: > > > On Mon, 6 Jul 2009, Dariusz Mazur wrote: > >> Michael Van Canneyt pisze: >>> >>> >>> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >>> >>>> Hi >>>> I include res file to executed file. Res is compiled by brcc32 from RC. >>>> Till now everything work OK. >>>> But when i try extract big PNG picture from RES I had wrong size of >>>> file. >>>> File has length 136303. >>>> When I read it from res length is 5321. This seems size of res is 16 >>>> bit. >>>> >>>> This is intentional that size of resource is limited ? >>> >>> Not intentionally, at least not that I am aware of. Maybe there is a bug >>> ? >> I use {$R file.res} >> How prepare testcase: should I attach big PNG+RC+RES file? > > Yes, but please test with 2.3.1 first. the resource mechanism was > rewritten. I made some test FPC 2.3.1 with RC compiled by binutils windres - everything is OK FPC 2.3.1 with RES compiled by brcc32 - 131kb png is not found

Strange behaviour of brcc32. Does it work with Delphi ?

Show quoted text 11 lines
FPC.2.2.4 with RC compiled by binutils windres - 131kB PNG - size from resource is 5231 50KB PNG - size from resourse is 4294951983 (sic) FPC.2.2.4 with RC compiled by brcc32 - 131kB PNG - size from resource is 0 (absent) 50KB PNG - size from resourse is 4294951983 I can make and upload more test, but which? Is there any chance to make patch to FPC 2.2.4 (its stable)

Not likely.
The fixes in resources are HUGE, and have not been merged to 2.2.4 for this reason.

The problem seems most likely to be in the resource compilers. Neither of them are maintained by FPC, so we cannot fix that. It would be useful to see if the brcc32 resource compiler produces a correct .res by trying to extract it from Delphi.

If you don't have Delphi, can you make a sample program that tests it ? Then I will try to compile and run.

Michael.

Reply by email

Dariusz Mazur
to Michael Van Canneyt

Michael Van Canneyt pisze:

Show quoted text 37 lines
On Mon, 6 Jul 2009, Dariusz Mazur wrote: > Michael Van Canneyt pisze: >> >> >> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >> >>> Michael Van Canneyt pisze: >>>> >>>> >>>> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >>>> >>>>> Hi >>>>> I include res file to executed file. Res is compiled by brcc32 >>>>> from RC. Till now everything work OK. >>>>> But when i try extract big PNG picture from RES I had wrong size >>>>> of file. >>>>> File has length 136303. >>>>> When I read it from res length is 5321. This seems size of res >>>>> is 16 bit. >>>>> >>>>> This is intentional that size of resource is limited ? >>>> >>>> Not intentionally, at least not that I am aware of. Maybe there is >>>> a bug ? >>> I use {$R file.res} >>> How prepare testcase: should I attach big PNG+RC+RES file? >> >> Yes, but please test with 2.3.1 first. the resource mechanism was >> rewritten. > I made some test > FPC 2.3.1 with RC compiled by binutils windres - everything is OK > FPC 2.3.1 with RES compiled by brcc32 - 131kb png is not found Strange behaviour of brcc32. Does it work with Delphi ?

Yes, I do it every day. But I try it once more from ground.

Show quoted text 16 lines
> > FPC.2.2.4 with RC compiled by binutils windres - > 131kB PNG - size from resource is 5231 > 50KB PNG - size from resourse is 4294951983 (sic) > > FPC.2.2.4 with RC compiled by brcc32 - > 131kB PNG - size from resource is 0 (absent) > 50KB PNG - size from resourse is 4294951983 > > I can make and upload more test, but which? > Is there any chance to make patch to FPC 2.2.4 (its stable) Not likely. The fixes in resources are HUGE, and have not been merged to 2.2.4 for this reason.

That's not good for me. I don't want change to unstable compiler. I must do something other.

Show quoted text 5 lines
The problem seems most likely to be in the resource compilers. Neither of them are maintained by FPC, so we cannot fix that. It would be useful to see if the brcc32 resource compiler produces a correct .res by trying to extract it from Delphi.

I don;t understand.
i've compiled RES from RC by brcc32 on windows and copy to linux. I use several RES with hundred files. Till now i have no problem.

If you don't have Delphi, can you make a sample program that tests it ? Then I will try to compile and run.

OK

Darek

Reply by email

Graeme Geldenhuys
to Dariusz Mazur
Dariusz Mazur wrote 7 lines
>> I can make and upload more test, but which? >> Is there any chance to make patch to FPC 2.2.4 (its stable) > Not likely. The fixes in resources are HUGE, and have not been merged > to 2.2.4 for this reason. > That's not good for me. I don't want change to unstable compiler. I must do something other.
Alternatively, if an older version of FPC 2.2.x or 2.0.x worked, then
maybe you could switch to that instead.

Or maybe implement the fix locally in your version of 2.2.5. I have done this for our company as well - created local fixes for the 2.2.x branch which will not be merged with the FPC repository (for whatever reason), and no we also did not want to switch to the unstable 2.3.x branch for production work.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote 18 lines
Dariusz Mazur wrote: >>> I can make and upload more test, but which? >>> Is there any chance to make patch to FPC 2.2.4 (its stable) >> Not likely. The fixes in resources are HUGE, and have not been merged >> to 2.2.4 for this reason. >> > That's not good for me. I don't want change to unstable compiler. > I must do something other. Alternatively, if an older version of FPC 2.2.x or 2.0.x worked, then maybe you could switch to that instead. Or maybe implement the fix locally in your version of 2.2.5. I have done this for our company as well - created local fixes for the 2.2.x branch which will not be merged with the FPC repository (for whatever reason), and no we also did not want to switch to the unstable 2.3.x branch for production work.

If you have a patch to merge the resources support to the fixes_2_2 branch, I am interested too. It is one of the highlights from fpc 2.3 from a Lazarus point of view.

Vincent

Reply by email

Graeme Geldenhuys
to Vincent Snijders
Vincent Snijders wrote
If you have a patch to merge the resources support to the fixes_2_2 branch, I am interested too.

Sorry if I was unclear in my previous email. I did not mean I have local fixed for the resource issue mentioned in this thread. I was purely pointing out to Dariusz that he could fix the issue locally if he had the skills and time - even though that fix might not be merged with the actual "fixes_2_2" branch for whatever reason. I have done something similar for _other_ issues.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Dariusz Mazur
to Vincent Snijders: If you have a patch to merge the resources support to the fixes_2_2 branch, I am…

Vincent Snijders pisze:

Show quoted text 24 lines
Graeme Geldenhuys schreef: > Dariusz Mazur wrote: >>>> I can make and upload more test, but which? >>>> Is there any chance to make patch to FPC 2.2.4 (its stable) >>> Not likely. The fixes in resources are HUGE, and have not been >>> merged to 2.2.4 for this reason. >>> >> That's not good for me. I don't want change to unstable compiler. >> I must do something other. > > > Alternatively, if an older version of FPC 2.2.x or 2.0.x worked, then > maybe you could switch to that instead. > > Or maybe implement the fix locally in your version of 2.2.5. I have > done this for our company as well - created local fixes for the 2.2.x > branch which will not be merged with the FPC repository (for whatever > reason), and no we also did not want to switch to the unstable 2.3.x > branch for production work. If you have a patch to merge the resources support to the fixes_2_2 branch, I am interested too. It is one of the highlights from fpc 2.3 from a Lazarus point of view.

Maybe merge all from 2.3.1
Its only 3 patch: 10481,9697,9703

Darek

Reply by email

Dariusz Mazur
to Michael Van Canneyt: Strange behaviour of brcc32. Does it work with Delphi ? Not likely. The fixes in…

Michael Van Canneyt pisze:

Show quoted text 38 lines
On Mon, 6 Jul 2009, Dariusz Mazur wrote: > Michael Van Canneyt pisze: >> >> >> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >> >>> Michael Van Canneyt pisze: >>>> >>>> >>>> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >>>> >>>>> Hi >>>>> I include res file to executed file. Res is compiled by brcc32 >>>>> from RC. Till now everything work OK. >>>>> But when i try extract big PNG picture from RES I had wrong size >>>>> of file. >>>>> File has length 136303. >>>>> When I read it from res length is 5321. This seems size of res >>>>> is 16 bit. >>>>> >>>>> This is intentional that size of resource is limited ? >>>> >>>> Not intentionally, at least not that I am aware of. Maybe there is >>>> a bug ? >>> I use {$R file.res} >>> How prepare testcase: should I attach big PNG+RC+RES file? >> >> Yes, but please test with 2.3.1 first. the resource mechanism was >> rewritten. > I made some test > FPC 2.3.1 with RC compiled by binutils windres - everything is OK > FPC 2.3.1 with RES compiled by brcc32 - 131kb png is not found Strange behaviour of brcc32. Does it work with Delphi ?

I test it once more, on 2.3.1 all is OK

Show quoted text 23 lines
> > FPC.2.2.4 with RC compiled by binutils windres - > 131kB PNG - size from resource is 5231 > 50KB PNG - size from resourse is 4294951983 (sic) > > FPC.2.2.4 with RC compiled by brcc32 - > 131kB PNG - size from resource is 0 (absent) > 50KB PNG - size from resourse is 4294951983 > > I can make and upload more test, but which? > Is there any chance to make patch to FPC 2.2.4 (its stable) Not likely. The fixes in resources are HUGE, and have not been merged to 2.2.4 for this reason. The problem seems most likely to be in the resource compilers. Neither of them are maintained by FPC, so we cannot fix that. It would be useful to see if the brcc32 resource compiler produces a correct .res by trying to extract it from Delphi. If you don't have Delphi, can you make a sample program that tests it ? Then I will try to compile and run.

on mantis 14122 test program is added

Darek

Reply by email

Michael Van Canneyt
to Dariusz Mazur
Dariusz Mazur wrote 40 lines
Michael Van Canneyt pisze: > > > On Mon, 6 Jul 2009, Dariusz Mazur wrote: > >> Michael Van Canneyt pisze: >>> >>> >>> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >>> >>>> Michael Van Canneyt pisze: >>>>> >>>>> >>>>> On Mon, 6 Jul 2009, Dariusz Mazur wrote: >>>>> >>>>>> Hi >>>>>> I include res file to executed file. Res is compiled by brcc32 from >>>>>> RC. Till now everything work OK. >>>>>> But when i try extract big PNG picture from RES I had wrong size of >>>>>> file. >>>>>> File has length 136303. >>>>>> When I read it from res length is 5321. This seems size of res is >>>>>> 16 bit. >>>>>> >>>>>> This is intentional that size of resource is limited ? >>>>> >>>>> Not intentionally, at least not that I am aware of. Maybe there is a >>>>> bug ? >>>> I use {$R file.res} >>>> How prepare testcase: should I attach big PNG+RC+RES file? >>> >>> Yes, but please test with 2.3.1 first. the resource mechanism was >>> rewritten. >> I made some test >> FPC 2.3.1 with RC compiled by binutils windres - everything is OK >> FPC 2.3.1 with RES compiled by brcc32 - 131kb png is not found > > Strange behaviour of brcc32. Does it work with Delphi ? > I test it once more, on 2.3.1 all is OK

If on 2.3.1 all is OK, then I am afraid that you'll have to use 2.3.1, because we're not going to update 2.2.4 any more. (at least, there are no such plans).

Michael.

Reply by email