From 5ae8a54dd4626ff15694410892d42b4deaa1a7f1 Mon Sep 17 00:00:00 2001 From: Vhati Date: Fri, 20 Sep 2013 09:21:47 -0400 Subject: [PATCH] Added known game location for 'Humble Bundle' Windows installs --- skel_common/readme_changelog.txt | 1 + src/main/java/net/vhati/modmanager/core/FTLUtilities.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/skel_common/readme_changelog.txt b/skel_common/readme_changelog.txt index ca754ff..c210ff6 100644 --- a/skel_common/readme_changelog.txt +++ b/skel_common/readme_changelog.txt @@ -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" diff --git a/src/main/java/net/vhati/modmanager/core/FTLUtilities.java b/src/main/java/net/vhati/modmanager/core/FTLUtilities.java index e6c707c..3575713 100644 --- a/src/main/java/net/vhati/modmanager/core/FTLUtilities.java +++ b/src/main/java/net/vhati/modmanager/core/FTLUtilities.java @@ -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 ) {