EmergencyX / Client

Outdated project! This repo has been migrated to gitlab.com/emergencyx/Client !
http://gitlab.com/emergencyx/Client
MIT License
2 stars 0 forks source link

Check and get Emergency Installation #2

Open ciajoe opened 8 years ago

ciajoe commented 8 years ago

Information is avablible in registry HKEY_LOCAL_MACHINE\SOFTWARE\Sixteen Tons Entertainment\EMERGENCY 5 If the Path-Key is set it should be avalible. Path is also usefull to get the mod dir in the Emergency5 installation dir. If Emergency is installed we can check the known appdata dir for mods too...

ciajoe commented 8 years ago

We should implement different detection options for the differnt versions

  1. Emergency 5
  2. Emergency 5 Steam
  3. Emergency 2016
  4. Emergency 2016 Steam
noBlubb commented 8 years ago

Ein erweiterbares Pattern wie dieses hier vielleicht? (Interface implementieren + Dictionary) http://stackoverflow.com/questions/33878216/factory-pattern-without-a-switch-or-if-then

ciajoe commented 8 years ago

Looks a bit tricky to me... :|

noBlubb commented 8 years ago

Wir müssen keine Raketenwissenschaft betreiben. Grundsätzlich brauchen wir ja nur ein flexibles System, das für ein Merkmal x einen Detektor y zuordnen kann. Ob es sich lohnt für jedes Spiel eine eigene Klasse auf Basis einer Basisklasse / Interfaces anzulegen und dann ein Dictionary mit IGame => IGameDetector zu betreiben oder doch "nur" einen String ("em5-steam", "em5", ...) durch ein switch-Statement zu jagen, den jeweiligen Detektor aufzurufen und dann direkt den Pfad zu returnen, ist mir gleich. Grundsätzlich bin ich für Interfaces, dann können wir bessere Tests schreiben :joy: