| View previous topic :: View next topic |
| Author |
Message |
Michael Fritz Guest
|
Posted: Tue Sep 09, 2003 6:00 am Post subject: Dxgettext - ggassemble.exe |
|
|
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
|
Posted: Tue Sep 09, 2003 11:34 am Post subject: Re: Dxgettext - ggassemble.exe |
|
|
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
|
Posted: Tue Sep 09, 2003 11:46 am Post subject: Re: Dxgettext - ggassemble.exe |
|
|
| 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
|
Posted: Tue Sep 09, 2003 7:06 pm Post subject: Re: Dxgettext - ggassemble.exe |
|
|
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
|
Posted: Wed Sep 10, 2003 9:15 am Post subject: Re: Dxgettext - ggassemble.exe |
|
|
| 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
|
Posted: Wed Sep 10, 2003 3:24 pm Post subject: Re: Dxgettext - ggassemble.exe |
|
|
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
|
Posted: Thu Sep 11, 2003 12:30 pm Post subject: Re: Dxgettext - ggassemble.exe |
|
|
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
|
Posted: Thu Sep 11, 2003 7:20 pm Post subject: Re: Dxgettext - ggassemble.exe |
|
|
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
|
Posted: Fri Sep 12, 2003 8:05 am Post subject: Re: Dxgettext - ggassemble.exe |
|
|
| 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 |
|
 |
|