Skip to content

Commit

Permalink
enable gpgnet4ta logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Axle1975 committed Nov 26, 2020
1 parent 3b0c07d commit dc779db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public List<String> build() {
command.add(country);
}

if (logFile != null) {
command.add("--logfile");
command.add(String.format(QUOTED_STRING_DECORATOR, logFile.toString()));
}

if (additionalArgs != null) {
List<String> args = additionalArgs.stream()
.map((String arg) -> arg.replace("/", "--"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public Process startGameOffline(String modTechnical, List<String> args) throws I
Path launcherExecutable = getLauncherExectuable();
List<String> launchCommand = defaultLaunchCommand()
.gpgnet4taExecutable(launcherExecutable)
.logFile(preferencesService.getNewGameLogFile(0))
.baseModName(prefs.getBaseGameName())
.gameInstalledPath(prefs.getInstalledPath())
.gameExecutable(prefs.getInstalledExePath().getFileName().toString())
Expand All @@ -56,6 +57,7 @@ public Process startGame(String modTechnical, int uid, @Nullable Faction faction
Path launcherExecutable = getLauncherExectuable();
List<String> launchCommand = defaultLaunchCommand()
.gpgnet4taExecutable(launcherExecutable)
.logFile(preferencesService.getNewGameLogFile(uid))
.baseModName(prefs.getBaseGameName())
.gameInstalledPath(prefs.getInstalledPath())
.gameExecutable(prefs.getInstalledExePath().getFileName().toString())
Expand All @@ -80,6 +82,7 @@ public Process startReplay(String modTechnical, Path path, @Nullable Integer rep
Path launcherExecutable = getLauncherExectuable();
List<String> launchCommand = defaultLaunchCommand()
.gpgnet4taExecutable(launcherExecutable)
.logFile(preferencesService.getNewGameLogFile(replayId))
.baseModName(prefs.getBaseGameName())
.gameInstalledPath(prefs.getInstalledPath())
.gameExecutable(prefs.getInstalledExePath().getFileName().toString())
Expand All @@ -95,6 +98,7 @@ public Process startReplay(String modTechnical, URI replayUri, Integer replayId,
Path launcherExecutable = getLauncherExectuable();
List<String> launchCommand = defaultLaunchCommand().baseModName(modTechnical)
.gpgnet4taExecutable(launcherExecutable)
.logFile(preferencesService.getFafLogDirectory().resolve("replay.log"))
.baseModName(prefs.getBaseGameName())
.gameInstalledPath(prefs.getInstalledPath())
.gameExecutable(prefs.getInstalledExePath().getFileName().toString())
Expand Down

0 comments on commit dc779db

Please sign in to comment.