BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dxgettext - ggassemble.exe

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internationalization
View previous topic :: View next topic  
Author Message
Michael Fritz
Guest





PostPosted: Tue Sep 09, 2003 6:00 am    Post subject: Dxgettext - ggassemble.exe Reply with quote



Hi,

I'm using ggassemble to merge an existing mo file into my executable. This
runs fine even when switching language at runtime.
When using UPX to pack my executable the program stops working. This means I
cannot switch languages anymore. However no crash or something like this. It
seems that dxgettext does not know about any different languages anymore.

Any hints?
Michael


Back to top
johnnie
Guest





PostPosted: Tue Sep 09, 2003 11:34 am    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote



Michael Fritz wrote:

Quote:
Hi,

I'm using ggassemble to merge an existing mo file into my executable.
This runs fine even when switching language at runtime.
When using UPX to pack my executable the program stops working. This
means I cannot switch languages anymore. However no crash or
something like this. It seems that dxgettext does not know about any
different languages anymore.

Any hints?
Michael

It is clearly an incompatability of the way the UPX is working and has
nothing to do with either internationalization or delphi in general.

I suggest you try the same question on the B.P.D.NativeApi group for
a better chance to receive an answer.


Back to top
Michael Fritz
Guest





PostPosted: Tue Sep 09, 2003 11:46 am    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote



Quote:
It is clearly an incompatability of the way the UPX is working and has
nothing to do with either internationalization or delphi in general.

May be, however I think posting this in b.p.d.nativeapi will return the
questions what is ggassemble or how does ggassemble or Dxgettext work,
search for translated strings in exe file etc.

So posting this Q here where Lars (the author of Dxgettext) frequently
visits is more appropriate, I think.

cu,
Michael




Back to top
Lars B. Dybdahl
Guest





PostPosted: Tue Sep 09, 2003 7:06 pm    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote

Michael Fritz wrote:
Quote:
I'm using ggassemble to merge an existing mo file into my executable. This
runs fine even when switching language at runtime.
When using UPX to pack my executable the program stops working.

The assemble program simply appends the translation files to the exe file.
Afterwards, it appends a list of translations to the .exe file, too, and
finally it finds a special (and long) sequence of bytes inside the .exe
file, where it writes the position of the translation file list.

When your program runs, it detects that this position has been written to
the .exe file, and then goes to that position in the .exe file to read the
list of translations. This is the part that fails when you pack the .exe
file with UPX.

Quote:
This means I
cannot switch languages anymore. However no crash or something like this.

When the system cannot find its translations, it runs using the default
language.

Unfortunately, there are only two options:
1) Don't use UPX
2) Don't embed the translations in the .exe file.

If anybody can think of a method that would allow UPX to coexist with such
translations, please let me know.

Lars.

--
Freelance programmer
Denmark

Free GNU gettext for Delphi i18n/localization tool:
http://dybdahl.dk/dxgettext/

Back to top
johnnie
Guest





PostPosted: Wed Sep 10, 2003 9:15 am    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote

Quote:
If anybody can think of a method that would allow UPX to coexist with
such translations, please let me know.

As far as I'm aware of in order to make this work you will need to
avoid to go to the file at runtime this leaves you with only the
choice to use Resources inside the exe to hold the translation.

I remember that I come across a few resource editing components in
the past I just do not remember the author or the site at the moment
I'll take a look tonginh and if you are interested I'll post a link
here.


regards
johnnie.

Back to top
Lars B. Dybdahl
Guest





PostPosted: Wed Sep 10, 2003 3:24 pm    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote

johnnie wrote:
Quote:
As far as I'm aware of in order to make this work you will need to
avoid to go to the file at runtime this leaves you with only the
choice to use Resources inside the exe to hold the translation.

I intentionally avoided that because that would lead to drastically reduced
performance. Resources can be painfully slow to fetch.

But now that you say it, it could be an option, and therefore I added your
suggestion to our RFE list.

Lars.

--
Freelance programmer
Denmark

Free GNU gettext for Delphi i18n/localization tool:
http://dybdahl.dk/dxgettext/


Back to top
johnnie
Guest





PostPosted: Thu Sep 11, 2003 12:30 pm    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote

Lars B. Dybdahl wrote:

Quote:
johnnie wrote:
As far as I'm aware of in order to make this work you will need to
avoid to go to the file at runtime this leaves you with only the
choice to use Resources inside the exe to hold the translation.

I intentionally avoided that because that would lead to drastically
reduced performance. Resources can be painfully slow to fetch.

But now that you say it, it could be an option, and therefore I added
your suggestion to our RFE list.

Lars.

I know what you meen also you must take in to account that there is
a problem with the resource number on 16bit systems (win9x, ME).

Have you tried to add the translations after the Compression?
will this work?

regards
johnnie.

Back to top
Lars B. Dybdahl
Guest





PostPosted: Thu Sep 11, 2003 7:20 pm    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote

johnnie wrote:
Quote:
Have you tried to add the translations after the Compression?
will this work?

Actually, one of the beta-versions just added the translations to the end of
the .exe file, and this would work with compressed files, but it conflicted
with other tools that also append stuff to the executables.

But instead of changing that behaviour to the current behaviour I should
have made it possible to make the user decide the method. I added that as a
suggestion to the RFE. Thanks.

Lars.

--
Freelance programmer
Denmark

Free GNU gettext for Delphi i18n/localization tool:
http://dybdahl.dk/dxgettext/


Back to top
Michael Fritz
Guest





PostPosted: Fri Sep 12, 2003 8:05 am    Post subject: Re: Dxgettext - ggassemble.exe Reply with quote

Quote:
But instead of changing that behaviour to the current behaviour I should
have made it possible to make the user decide the method. I added that as
a
suggestion to the RFE. Thanks.

Thanks Lars,

cu,
Michael



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internationalization All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.