ZaneDubya / UltimaXNA

Ultima Online client in C#/XNA
GNU General Public License v3.0
142 stars 73 forks source link

Handling more versions of UO installed #55

Closed PatrikSamuelTauchim closed 9 years ago

PatrikSamuelTauchim commented 9 years ago

After 1a75f6d, UltimaXNA prefers "Ultima Online Classic" installation directory, even if UOML directory was found before. Since latest UO installer (was in wiki before) installs UO as "Ultima Online Classic", this version is not compatible with UltimaXNA, causing it not to load due to file format.

I would probably:

ZaneDubya commented 9 years ago

This is a great idea. I could implement it. But beyond the name of the install directory - how can we determine the version of a uo client installed in that directory? Is the version string installed anywhere?

PatrikSamuelTauchim commented 9 years ago

Some versions of client.exe have File Version property set. This is easiest ways. Unfortunately, not all of them and it was changing with time. There are also some cfg/txt/xyz files in instalation folder indicating version of UO installed, but again, it differs with versions. I think that original client has hardcoded version string inside it, which we should be able to get. Not a nice way, but probably most precise.

robertdeclaux commented 9 years ago

Expansions have different file for identifying but it's not systemic. "Verinfo", "Version.dat" or "Version" the files i know. Instead of this i think we can have a var in the ini (SettingVars class - Settings.ini v3) file, if client can't find uo folder automatically, users could give the value for the folder.

PatrikSamuelTauchim commented 9 years ago

@robertdeclaux if UOData value in Settings.ini file is set, FileManager skips looking for UO in registry, so you can set whatever location you want. There is still no verification, if that location contains valid and supported version of UO files, but allows you to override ignore values in registry (if any) at your responsibility.

ZaneDubya commented 9 years ago

To summarize, the places we look to check the Client Version are:

Client.exe Property.Version (?) Client.exe hardcoded value Vercfg.cfg Verinfo Version.dat Version.txt

However, in the version of ML I have installed on my laptop ( 4.0.x.x), none of these files indicate the correct version:

Client.exe: no version property. Client.exe: could not find hardcoded value.

Vercfg.cfg: 0 . patch\ patch.uo.eamythic.com 8888 0 40% 80%

Verinfo Win32_ML 0

Version.dat xx

Version.txt 1.25.35

robertdeclaux commented 9 years ago

"Origin Worlds Online\Ultima Online\KR Legacy Beta" "EA Games\Ultima Online: Mondain's Legacy\1.00.0000" "Origin Worlds Online\Ultima Online\1.0" "Origin Worlds Online\Ultima Online Third Dawn\1.0" "EA GAMES\Ultima Online Samurai Empire" "EA Games\Ultima Online: Mondain's Legacy" "EA GAMES\Ultima Online Samurai Empire\1.0" "EA GAMES\Ultima Online Samurai Empire\1.00.0000" "EA GAMES\Ultima Online: Samurai Empire\1.0" "EA GAMES\Ultima Online: Samurai Empire\1.00.0000" "EA Games\Ultima Online: Mondain's Legacy\1.0" "EA Games\Ultima Online: Mondain's Legacy\1.00.0000" "Origin Worlds Online\Ultima Online Samurai Empire BETA\2d\1.0" "Origin Worlds Online\Ultima Online Samurai Empire BETA\3d\1.0" "Origin Worlds Online\Ultima Online Samurai Empire\2d\1.0" "Origin Worlds Online\Ultima Online Samurai Empire\3d\1.0"

Checking regs InstCDPath directory, if it includes any file that named *.uop UltimaXNA does not support it. It's the easiest way i could find.

robertdeclaux commented 9 years ago

But i don't think we need to handle it, just leave it to user.

PatrikSamuelTauchim commented 9 years ago

I think that is important to make compromise between "DIY" and "stupid proof". If we can recognize correct UO instalation to use, why not to do it. Ofcourse, in case we are not able to, we can just throw and notification window for the user, with instruction on what to do. We can even put example configuration line into Settings.ini file.

But we all know, that for the user is best, if he can install with NEXT NEXT NEXT and then just put login credentials and play. :-)

ZaneDubya commented 9 years ago

Ok, so unless SettingsVars has a directory set, we look for all UO installations and select the last UO client (from the list of RegKeys in UltimaData.FileManager) that does not have *.UOP files in the directory. I've written the fix and will post it later today.

ZaneDubya commented 9 years ago

@Eskymak I believe this is fixed in #62. If this is not the case, please let me know.

ZaneDubya commented 9 years ago

I'm closing this issue. If problems remain, or you have a new idea as to how to handle client versions, please open a new one.