thcrap
thcrap copied to clipboard
Automatically detect installed games
During configuration, automatically detect games installed by the official installer or by Steam. We should do this step before looking for games. If we find some games here, we should display the "you already have games. Add new ones?" screen.
We should detect games from 3 sources:
- [x] Steam library (done in 86799e7f80d3de8b1f8f00ce85c6eb291c016fe6)
- [ ] Official installers
- [ ] Parent directory (people tend to put thcrap in or around the game's directory)
When ran automatically, maybe having a 5s or 10s timeout would be a good idea? Like, if someone decides to put their thcrap installation in C:\thcrap
6/7/8/9/9.5 installers don't touch registry. Default install paths:
TH06="c:\\Program Files\\\x93\x8c\x95\xfb\x8d\x67\x96\x82\x8b\xbd"
TH07="C:\\Program Files (x86)\\\x93\x8c\x95\xfb\x97\x64\x81\x58\x96\xb2"
TH08="C:\\Program Files (x86)\\\x93\x8c\x95\xfb\x89\x69\x96\xe9\x8f\xb4"
TH09="C:\\Program Files (x86)\\\x93\x8c\x95\xfb\x89\xd4\x89\x66\x92\xcb"
TH095="C:\\Program Files (x86)\\\x93\x8c\x95\xfb\x95\xb6\x89\xd4\x92\x9f"
(The first one is hardcoded, the later ones based on the actual program files folder) Th06 doesn't make any icons. The later games do, but I haven't checked the path they use.
Newer TSA games use innosetup, with the following AppIds
TH10=\x93\x8c\x95\xfb\x95\x97\x90\x5f\x98\x5e
TH11=\x93\x8c\x95\xfb\x92\x6e\x97\xec\x93\x61
TH125=\x83\x5f\x83\x75\x83\x8b\x83\x58\x83\x7c\x83\x43\x83\x89\x81\x5b
TH128=\x97\x64\x90\xb8\x91\xe5\x90\xed\x91\x88
TH12=\x93\x8c\x95\xfb\x90\xaf\x98\x40\x91\x44
TH13=\x93\x8c\x95\xfb\x90\x5f\x97\xec\x95\x5f
TH14=\x93\x8c\x95\xfb\x8b\x50\x90\x6a\x8f\xe9
TH15=\x93\x8c\x95\xfb\x8d\xae\x8e\xec\x93\x60
(I'm yet to retrieve 14.3/16/16.5/17/18 from my backups. Not even sure if I have the installer for the first one)
These AppIds are just the kanji part of the title. The uninstall key is formed like so HKLM\Software[\Wow6432Node]\Microsoft\Windows\CurrentVersion\Uninstall\[AppId]_is1
. InnoSetup is one of those programs that exists in ANSI and Unicode versions, and it seems that at least for those games ANSI version was used. This means that the actual unicode registry key depends on the codepage used during installation.
Default start menu group is 上海アリス幻樂団\[AppId]
Default installation path is same at the above, placed in the 32-bit program files folder.
The icon in the start menu and on desktop is also [AppId].
This is ANSI too, so 上海アリス幻樂団 is \x8f\xe3\x8a\x43\x83\x41\x83\x8a\x83\x58\x8c\xb6\x9e\xd9\x92\x63
in ACP