Added an error popup when the jar is double-clicked
This commit is contained in:
parent
e2f82bebf0
commit
aa4d6d7c30
2 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,7 @@ Changelog
|
||||||
- Changed modman.exe to fail rather than use VirtualStore
|
- Changed modman.exe to fail rather than use VirtualStore
|
||||||
- Added modman_admin.exe, which always runs as administrator
|
- Added modman_admin.exe, which always runs as administrator
|
||||||
- Added a Validate warning for junk files whose names end with a tilde
|
- Added a Validate warning for junk files whose names end with a tilde
|
||||||
|
- Added an error popup when the jar is double-clicked
|
||||||
- Minor optimizations to reduce memory usage
|
- Minor optimizations to reduce memory usage
|
||||||
|
|
||||||
1.4:
|
1.4:
|
||||||
|
|
|
@ -51,6 +51,14 @@ public class FTLModManager {
|
||||||
log.debug( String.format( "%s %s", System.getProperty("os.name"), System.getProperty("os.version") ) );
|
log.debug( String.format( "%s %s", System.getProperty("os.name"), System.getProperty("os.version") ) );
|
||||||
log.debug( String.format( "%s, %s, %s", System.getProperty("java.vm.name"), System.getProperty("java.version"), System.getProperty("os.arch") ) );
|
log.debug( String.format( "%s, %s, %s", System.getProperty("java.vm.name"), System.getProperty("java.version"), System.getProperty("os.arch") ) );
|
||||||
|
|
||||||
|
// Nag if the jar was double-clicked.
|
||||||
|
if ( new File("./mods/").exists() == false ) {
|
||||||
|
String currentPath = new File(".").getAbsoluteFile().getParentFile().getAbsolutePath();
|
||||||
|
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 ) );
|
||||||
|
System.err.println( String.format( "Slipstream could not find its own folder (Currently in \"%s\"), exiting.", currentPath ) );
|
||||||
|
System.exit( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
File configFile = new File( "modman.cfg" );
|
File configFile = new File( "modman.cfg" );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue