Trivial code cleanup
This commit is contained in:
parent
ad6d87a4bf
commit
8f55580ed2
3 changed files with 17 additions and 13 deletions
|
@ -1,10 +1,14 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SETLOCAL
|
SETLOCAL
|
||||||
SET L4J_LOG_NAME=launch4j.log
|
SET L4J_LOG_NAME=launch4j.log
|
||||||
SET SMM_LOG_NAME=modman-log.txt
|
|
||||||
SET L4J_LOG_PATH=%~dp0launch4j.log
|
SET L4J_LOG_PATH=%~dp0launch4j.log
|
||||||
|
|
||||||
|
SET SMM_LOG_NAME=modman-log.txt
|
||||||
SET SMM_LOG_PATH=%~dp0modman-log.txt
|
SET SMM_LOG_PATH=%~dp0modman-log.txt
|
||||||
|
|
||||||
|
SET SMM_CFG_NAME=modman.cfg
|
||||||
|
SET SMM_CFG_PATH=%~dp0modman.cfg
|
||||||
|
|
||||||
IF EXIST "%L4J_LOG_PATH%" DEL /Q "%L4J_LOG_PATH%"
|
IF EXIST "%L4J_LOG_PATH%" DEL /Q "%L4J_LOG_PATH%"
|
||||||
IF EXIST "%SMM_LOG_PATH%" DEL /Q "%SMM_LOG_PATH%"
|
IF EXIST "%SMM_LOG_PATH%" DEL /Q "%SMM_LOG_PATH%"
|
||||||
|
|
||||||
|
@ -19,14 +23,14 @@ ECHO.
|
||||||
|
|
||||||
|
|
||||||
ECHO Some users reported interface glitches if they had custom Windows themes.
|
ECHO Some users reported interface glitches if they had custom Windows themes.
|
||||||
ECHO Setting 'use_default_ui=true' in modman.cfg is a workaround.
|
ECHO Setting 'use_default_ui=true' in %SMM_CFG_NAME% is a workaround.
|
||||||
ECHO.
|
ECHO.
|
||||||
SET /P YN="Create a new modman.cfg to do this? (y/N): "
|
SET /P YN="Create a new %SMM_CFG_NAME% to do this? (y/N): "
|
||||||
ECHO.
|
ECHO.
|
||||||
|
|
||||||
IF /I [%YN%]==[y] (
|
IF /I [%YN%]==[y] (
|
||||||
ECHO Creating a new config.
|
ECHO Creating a new config.
|
||||||
ECHO use_default_ui=true>modman.cfg
|
ECHO use_default_ui=true>"%SMM_CFG_PATH%"
|
||||||
ECHO.
|
ECHO.
|
||||||
)
|
)
|
||||||
ECHO.
|
ECHO.
|
||||||
|
|
|
@ -96,12 +96,11 @@ public class FTLModManager {
|
||||||
String currentPath = new File( "." ).getAbsoluteFile().getParentFile().getAbsolutePath();
|
String currentPath = new File( "." ).getAbsoluteFile().getParentFile().getAbsolutePath();
|
||||||
|
|
||||||
log.error( String.format( "Slipstream could not find its own folder (Currently in \"%s\"), exiting...", currentPath ) );
|
log.error( String.format( "Slipstream could not find its own folder (Currently in \"%s\"), exiting...", currentPath ) );
|
||||||
showErrorDialog( String.format( "Slipstream could not find its own folder.\nCurrently in: %s\n\nRun one of the following instead of the jar...\nWindows: modman.exe or modman_admin.exe\nLinux/OSX: modman.command or modman-cli.sh\n\nThe Mod Manager will now exit.", currentPath ) );
|
showErrorDialog( String.format( "Slipstream could not find its own folder.\nCurrently in: %s\n\nRun one of the following instead of the jar...\nWindows: modman.exe or modman_admin.exe\nLinux/OSX: modman.command or modman-cli.sh\n\nSlipstream will now exit.", currentPath ) );
|
||||||
|
|
||||||
throw new ExitException();
|
throw new ExitException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
File configFile = new File( "modman.cfg" );
|
File configFile = new File( "modman.cfg" );
|
||||||
|
|
||||||
boolean writeConfig = false;
|
boolean writeConfig = false;
|
||||||
|
@ -220,7 +219,7 @@ public class FTLModManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( datsDir == null ) {
|
if ( datsDir == null ) {
|
||||||
showErrorDialog( "FTL resources were not found.\nThe Mod Manager will now exit." );
|
showErrorDialog( "FTL resources were not found.\nSlipstream will now exit." );
|
||||||
log.debug( "No FTL dats path found, exiting" );
|
log.debug( "No FTL dats path found, exiting" );
|
||||||
|
|
||||||
throw new ExitException();
|
throw new ExitException();
|
||||||
|
|
|
@ -147,12 +147,13 @@ public class FTLUtilities {
|
||||||
public static File promptForDatsDir( Component parentComponent ) {
|
public static File promptForDatsDir( Component parentComponent ) {
|
||||||
File result = null;
|
File result = null;
|
||||||
|
|
||||||
String message = "";
|
String message = ""
|
||||||
message += "You will now be prompted to locate FTL manually.\n";
|
+ "You will now be prompted to locate FTL manually.\n"
|
||||||
message += "Look in {FTL dir} to select 'ftl.dat' or 'data.dat'.\n";
|
+ "Look in {FTL dir} to select 'ftl.dat' or 'data.dat'.\n"
|
||||||
message += "\n";
|
+ "\n"
|
||||||
message += "It may be buried under a subdirectory called 'resources/'.\n";
|
+ "It may be buried under a subdirectory called 'resources/'.\n"
|
||||||
message += "Or select 'FTL.app', if you're on OSX.";
|
+ "Or select 'FTL.app', if you're on OSX.";
|
||||||
|
|
||||||
JOptionPane.showMessageDialog( parentComponent, message, "Find FTL", JOptionPane.INFORMATION_MESSAGE );
|
JOptionPane.showMessageDialog( parentComponent, message, "Find FTL", JOptionPane.INFORMATION_MESSAGE );
|
||||||
|
|
||||||
JFileChooser fc = new JFileChooser();
|
JFileChooser fc = new JFileChooser();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue