Jump to content
Tom Mueller

How to extract all resourcestrings from 3rd party components

Recommended Posts

Hi

 

For our project translation tool I extract all resourcestrings from 3rd party components into drc-files.

This is donne by creating a temporary package with all units containing resourcestrings and then compile it with the --drc switch.

Until Delphi 10.2 this worked perfectly.

 

With Delphi 10.3 some of these packages cannot be created anymore. Delphi will raise an "Error: E2621 Export table in output file too large: exceeds 65536 limits"

There is a bug report about this error https://quality.embarcadero.com/browse/RSP-22698 but it is marked as "Resolved" "Workes As Expected".

 

Instead of a package project I tried to include all units into a console application - this compiles without a problem - but not all resourcestrings are extracted into the drc-file.

 

To my question:

Anyone knows another way to extract all resourcestrings int a drc-file from 3rd party source files?

 

 

 

Share this post


Link to post

Yes, I tried this approach - but it is a clumsy way.

- limit the units by try_and_error per package

- merge the resulting drc-files into one drc-file per 3rd party for the translation tool

 

Actually Delphi raises the error after the creation of the drc-file (so the linker does its job with the drc-file but then raises E2621 when trying to create the bpl-file).

Our automated building process will stop because of this error. 

 

I wonder if there is an option to tell the linker to just extract resources?

Edited by Tom Mueller

Share this post


Link to post
15 hours ago, Tom Mueller said:

With Delphi 10.3 some of these packages cannot be created anymore. Delphi will raise an "Error: E2621 Export table in output file too large: exceeds 65536 limits"

That makes sense, as an executable can have up to 65536 max exported names/ordinals, and up to 65536 max resource strings.  It is a limitation of the EXPORTS and STRINGTABLE formats.

15 hours ago, Tom Mueller said:

There is a bug report about this error https://quality.embarcadero.com/browse/RSP-22698 but it is marked as "Resolved" "Workes As Expected".

That ticket discusses exported names, not string resources.  Two different things.

15 hours ago, Tom Mueller said:

Instead of a package project I tried to include all units into a console application - this compiles without a problem

I would expect it to work for an application, as application's don't usually export very many names.  Resource strings, that is a different matter.

 

Just how many resource strings are you dealing with?

Share this post


Link to post
On 2/23/2019 at 1:02 AM, Remy Lebeau said:

Just how many resource strings are you dealing with?

There are not so many resource strings.

In my DevExpress package I include 45 units with "resourcestings" in it - that will extracted about ~5000 resource stings.

 

PS: Sorry for the delayed answer.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×