GlovePIEPreservation / GlovePIEReverseEngineering

The GlovePIE decompilation effort
32 stars 2 forks source link

Used libraries, Decompilation artifacts and some pointers. #1

Open C0bra5 opened 3 years ago

C0bra5 commented 3 years ago

What you have here is a good starting point but I feel like you still have a lot to figure out seeing as there is basically no activity on this repo since it was created. I did some digging around and familiarized myself with the language and I believe I got some starting points we could all use.

Decompilation Artifacts

First, let's go over some decompilation artifacts. By that I mean files that got included in the decompiling that are part of the default Delphi packages:

... If I would continue listing them all but right now I'm short on time. Basically, if the file name matches the name of a unit in the Delphi docs; I think it's fair to assume we can just use the default one: http://docwiki.embarcadero.com/Libraries/Sydney/en/Unit_List

Just search the name of the file and it should appear

Libraries:

So far I've found that the code uses the following libraries

Jedi Code Library (JCL):
v2.2 build 3845 according to _Unit46: https://sourceforge.net/projects/jcl/files/JCL%20Releases/JCL%202.2%20Build%203845/

TNT Controls/TMS unicode component pack
It appears as it's now a paid library https://www.tmssoftware.com/site/tmsuni.asp#product-downloads but it appears at it was once open-source and that source has been archived: https://github.com/rofl0r/TntUnicode

Jedi Video Component Libary (JVCL) Not a clue what version but I know JvTrayIcon.pas is from that lib: https://github.com/project-jedi/jvcl

Some Potentially Helpful Pointers

C0bra5 commented 3 years ago

Looks like I missed mwEdit which seems to be from moops-client: https://github.com/silasary/moops-client/tree/master/mwEdit

mwEditSearch.pas: https://github.com/silasary/moops-client/blob/master/mwEdit/mwEditSearch.pas mwKeyCmds: https://github.com/silasary/moops-client/blob/master/mwEdit/mwkeycmds.pas

Ravbug commented 3 years ago

Thank you so much for this information! I'll take a closer look when I have some time.

Ravbug commented 3 years ago

@C0bra5 (or anyone with experience using IDR) I seem to only be able to see the left-most pane of IDR on my computer, so I didn't know it had all these other features. The Tabs menu doesn't appear to do anything either. I tried using the various different windows compatibility modes for it and even unplugging my 4K monitor in case the app doesn't handle DPI scaling correctly, but none of that had an effect.

This is what I see (scrolling all the way to the right does not show the other panels): image

For reference, this is what it's supposed to look like: image

Any thoughts?

Ravbug commented 3 years ago

I figured it out - For anyone else who encounters this issue, the solution is to delete IDR.ini and re-run IDR.exe.

C0bra5 commented 3 years ago

idk what's going on for you but for me it's opening up properly. I did some testing with a new install on my 4k tv and it turns out that if you open it on a 4k screen it does look pretty funky, but I didn't see anything like yours: default idr

I dragged the horizontal gray bar that separates the unit/form/types tabs from the rest all the way to the right and restarted the program. It turns out, that lead to the creation of a window that was identical to yours: idr-after-reopen

Fortunately for you (and my poor install), This means that idr remembers the last layout you used. To do that it needs to store it somewhere and low and behold it's the INI that the program creates.

[MainForm]
Left=-6
Top=11
Width=1292
Height=732
CXRefWidth=180
SXRefWidth=128
CXrefsWidth=154
SXrefsWidth=128
LeftWidth=353
BottomHeight=142
WorkingDir=G:\DELPHI\WonderlandOnline
[Recent Executable Files]
[Recent Project Files]
[Settings]
CodePage=950
FontName=Courier New
FontSize=324
FontColor=0
FontBold=1
FontCharset=204
FontItalic=0

Unfortunately the issue seems to be caused by window scaling, if you open the executable's properties -> compatibility tab -> change high dpi settings - > high DPI scaling override -> check the box -> make sure it's on application it should open it at native res without any issues. Though this is not a great fix as native res windows don't often work on 4k screen due to their pixel density. image

I would recommend you apply the config, change your resolution to one where scaling isn't necessary (like 1080p), disable the previous scaling and use the application that way.

Ravbug commented 3 years ago

Do you know if in IDR it's possible to have it generate source code like it does in the F10 view for all files? I'm currently getting commented-out assembly when I have it generate a Delphi project.

C0bra5 commented 3 years ago

not to my knowledge unfortunately