clarifications for v1.81

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
nikos
Site Admin
Site Admin
Posts: 15799
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

visual studio v6 will do
also there are some resource editors mentioned here
http://www.codeproject.com/KB/wtl/WTLExpress.aspx
(many broken links but check with google the names)
User avatar
snakebyte
Gold Member
Gold Member
Posts: 430
Joined: 2003 May 07, 07:14
Location: Seattle
Contact:

Post by snakebyte »

External resource dll is a great idea! Thanks Nikos for considering taking this route.

Kilmatead, why do you need the full VS? Won't just the ResHacker or any other resource editor work for you?
Help! I'm an AI running around in someone's universe simulator.
Kilmatead
Platinum Member
Platinum Member
Posts: 4578
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

snakebyte wrote:Won't just the ResHacker or any other resource editor work for you?
Yes, ResHacker works, but I'm having difficulty getting it to read the "raw" files in the translation kit - whereas if I take a pre-made .dll and simply replace the stuff I want, it seems to work fine.  Except there are no English dll's as it's built in.

I did try an experiment, and took the entire binary and resaved it as a dll, and it seemed to work fine - x2 just took the bits it wanted and ignored the rest.  Of course, this results in a dll that's 1.4 MB which seems unnecessary as "normal" translation dll's are tiny.

Not sure if this would have any weird side-effects either.  ResHacker doesn't seem to want to allow me to "remove" the bits I don't need.
User avatar
nikos
Site Admin
Site Admin
Posts: 15799
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

you guys probably need visual studio or something similar along with the translator pack. Of course you will be doing a dummy 'english' translation but resource hacker won't hack it this time.
Kilmatead
Platinum Member
Platinum Member
Posts: 4578
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

nikos wrote:but resource hacker won't hack it this time.
Why not?  It seems to work fine.  Or am I missing the time-bomb?  As a test I edited the Greek dll and it works fine.  All I need is an English dll (like I've said about 6 times now).

Seems total overkill to install VS just to make one little file, no?
User avatar
nikos
Site Admin
Site Admin
Posts: 15799
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

that's the million dollar question, where is the english dll? there isn't any, so you have to make one. There is no point me supplying one because you need a new one every time there's a new version out

so get the translator pack, use the english resource RC file in there, change some terms to cockney or whatever to make it feel like a translation and you are there!
Kilmatead
Platinum Member
Platinum Member
Posts: 4578
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

Ok, Mr. Smarty-Pants, is there anything against me just using the .EXE as a .DLL?  Once it's converted it works just fine (at least I think it does).  The original executable is still the thing that runs as a process - this duplicate merely provides the resources and acts like a seriously overweight translation file. (I haven't tested this fully, but is the idea kosher?)
User avatar
nikos
Site Admin
Site Admin
Posts: 15799
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

i'm not with you: you mean renaming the revamped EXE as a DLL? I don't expect it to work but try it by all means
Kilmatead
Platinum Member
Platinum Member
Posts: 4578
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

No, you load the .exe into ResHacker, edit what you want, but actually save it (from within ResHacker) as x2t_Nikos_is_stubborn.DLL and it actually works just fine.  The original .exe is untouched, and the modified resources in the fake "dll" work fine - it's just excessively large.

So this won't set off any nuclear weapons?
pj
Gold Member
Gold Member
Posts: 476
Joined: 2006 Jan 26, 14:01
Location: Florida

Post by pj »

Kilmatead wrote:... as x2t_Nikos_is_stubborn.DLL and ...
Thanks for a very good laugh today!

========

PJ in (chilly) FL
User avatar
nikos
Site Admin
Site Admin
Posts: 15799
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

you see, i programmed x2 so well that even oddities like this won't cause any problems. If it loads then it won't have any side effects
Kilmatead
Platinum Member
Platinum Member
Posts: 4578
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

One rather entertaining and unintended side effect (I assume this would apply to all embedded languages) is that the Help menu automatically gets a new entry of "English Translation" - even though the modded resources were already in English... if one clicks it, x2 restarts the process using the "unmodded" resources until one clicks it again and it toggles back to the new ones, which is rather useful.  Strangely, this seems to write to the registry irrespective of "Save Settings on Exit", as the toggle is persistent.

Kind of nice, actually, for when one starts messing with MENU entries as well (moving and removing the chaff) aside from the more obvious DIALOGs - and better than the old way which involved trading out binaries.

Still would be nice to strip out the unnecessary flab, though.  Which resources are absolutely necessary for x2t_ to function as a translation?  I've noticed that if I take a stripped (old) language dll and only add the parts I want, it doesn't work, so it seems to be an "all or nothing" approach, requiring certain elements.  I'm thinking of automating the process of creating a new (mirror) dll from the resources of the original .exe, then allowing the user to mod that instead, only the bits he wants.  This is easy enough to automate using ResHacker scripts (yes, boys and girls, ResHacker has scripting!), but I just need to know the bare necessities.

If, for example, I take the x2t_Greek.dll and strip out everything (leaving, effectively an empty dll header of 15kb), and replace those verbatim with stuff stripped off the .exe, I should end up with a de-facto unmodded x2t_English.dll of the latest version ready for corruption.

This is kinda fun, in a twisted "I have nothing better to do on a Saturday" sort of way. :D  (I'm trying really hard, as you can see, to avoid installing any form of VS.  And no, I'm not blind to the irony of using Peter to pay Paul.  The two lads have been bleeding me dry for years, so this is my comeback. :wink:)

So, do I have to replace all the resources, or just specific ones to make a stand-alone English translation?  Or am I in uncharted waters anyway, considering you didn't think the idea of using the binary would work at all?
Last edited by Kilmatead on 2010 Dec 11, 10:25, edited 1 time in total.
User avatar
nikos
Site Admin
Site Admin
Posts: 15799
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

there is only one active resource at any time, so you can't have half the resources in a dll. For ultimate flexibility build your own 'translation' dll instead of EXE hacks
Kilmatead
Platinum Member
Platinum Member
Posts: 4578
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

As usual, you didn't read the fine-print - I am building my own DLL, just not the way the rulebook says to do it.  (Consider me allergic to VS, and this an experiment in digital madness.  And techically mine is based one ultimate flexibility, as the .exe is the most up-to-date reservoir of resources anyway.)

You did, at least answer my question, so that means I've got to rebuild the whole thing first, then tear down the walls.  Crank up the Pink Floyd, roll up the sleeves, and create a new Frankenstein.  Should be every growing lad's motto. :D
otlaolap
Silver Member
Silver Member
Posts: 237
Joined: 2007 Aug 11, 21:37

Post by otlaolap »

(yes, boys and girls, ResHacker has scripting!)
I love what I find out on this forum!  All these years, wishing ResHacker had scripting, and I never noticed this.  Thanks. :D
Post Reply