Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Not requiring Steam directory anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
quanticc committed Jan 22, 2016
1 parent 6bd5ee2 commit 770ca76
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/main/java/lwrt/Lawena.java
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,9 @@ public Lawena(SettingsManager cfg) {
oDxlevel = getOriginalDxlevel();

// get SteamPath from registry, this value might be invalid or there might not be a value at all

Path steampath = cl.getSteamPath();
if (!cl.isValidSteamPath(steampath)) {
/*if (!cl.isValidSteamPath(steampath)) {
steampath = Paths.get(settings.getString(Key.AltSteamDir));
}
log.fine("Checking for Steam path at " + steampath);
Expand All @@ -704,13 +705,20 @@ public Lawena(SettingsManager cfg) {
steampath = getChosenSteamPath();
if (steampath == null) {
log.info("No Steam directory specified, exiting.");
JOptionPane.showMessageDialog(null, "No Steam directory specified, program will exit.",
"Invalid SteamPath", JOptionPane.WARNING_MESSAGE);
throw new IllegalArgumentException("Steam directory must be specified");
//JOptionPane.showMessageDialog(null, "No Steam directory specified, program will exit.",
// "Invalid SteamPath", JOptionPane.WARNING_MESSAGE);
//throw new IllegalArgumentException("Steam directory must be specified");
settings.setString(Key.AltSteamDir, "");
settings.setBoolean(Key.LaunchUsingSteam, false);
} else {
settings.setString(Key.AltSteamDir, steampath.toString());
}
settings.setString(Key.AltSteamDir, steampath.toString());
}
settings.setString(Key.SteamDir, steampath.toString());
if (steampath != null) {
settings.setString(Key.SteamDir, steampath.toString());
}*/

settings.setBoolean(Key.LaunchUsingSteam, false);

// retrieve GamePath, attempt resolving via SteamPath, otherwise ask user for it
Path tfpath = settings.getTfPath();
Expand Down

0 comments on commit 770ca76

Please sign in to comment.