Added known game location for 'Humble Bundle' Windows installs

This commit is contained in:
Vhati 2013-09-20 09:21:47 -04:00
parent 3646de2aec
commit 5ae8a54dd4
2 changed files with 7 additions and 0 deletions

View file

@ -2,6 +2,7 @@ Changelog
1.4:
- Cleaned up some dodgy code when initially prompting for FTL's location
- Added another common game location: "C:\Program Files (x86)\FTL"
1.3:
- Added "Return FTL to an unmodded state before switching to a new version"

View file

@ -26,6 +26,7 @@ public class FTLUtilities {
public static File findDatsDir() {
String steamPath = "Steam/steamapps/common/FTL Faster Than Light/resources";
String gogPath = "GOG.com/Faster Than Light/resources";
String humblePath = "FTL/resources";
String xdgDataHome = System.getenv("XDG_DATA_HOME");
if (xdgDataHome == null)
@ -38,6 +39,9 @@ public class FTLUtilities {
// Windows - GOG
new File( new File(""+System.getenv("ProgramFiles(x86)")), gogPath ),
new File( new File(""+System.getenv("ProgramFiles")), gogPath ),
// Windows - Humble Bundle
new File( new File(""+System.getenv("ProgramFiles(x86)")), humblePath ),
new File( new File(""+System.getenv("ProgramFiles")), humblePath ),
// Linux - Steam
new File( xdgDataHome +"/Steam/SteamApps/common/FTL Faster Than Light/data/resources" ),
// OSX - Steam
@ -61,6 +65,8 @@ public class FTLUtilities {
/**
* Modally prompts the user for the FTL resources dir.
*
* Reminder: GUI dialogs need to be in the event dispatch thread.
*
* @param parentComponent a parent for Swing dialogs, or null
*/
public static File promptForDatsDir( Component parentComponent ) {