Dropped Classic support.
This commit is contained in:
@ -32,15 +32,13 @@ import com.l2jserver.tools.dbinstaller.util.mysql.ScriptExecutor;
|
||||
public class RunTasks extends Thread
|
||||
{
|
||||
DBOutputInterface _frame;
|
||||
boolean _classicInstall;
|
||||
String _db;
|
||||
String _sqlDir;
|
||||
|
||||
public RunTasks(DBOutputInterface frame, String db, String sqlDir, boolean classicInstall)
|
||||
public RunTasks(DBOutputInterface frame, String db, String sqlDir)
|
||||
{
|
||||
_frame = frame;
|
||||
_db = db;
|
||||
_classicInstall = classicInstall;
|
||||
_sqlDir = sqlDir;
|
||||
}
|
||||
|
||||
@ -53,16 +51,6 @@ public class RunTasks extends Thread
|
||||
_frame.appendToProgressArea("Installing Database Content...");
|
||||
exec.execSqlBatch(new File(_sqlDir));
|
||||
|
||||
if (_classicInstall)
|
||||
{
|
||||
File cusDir = new File(_sqlDir, "classic");
|
||||
if (cusDir.exists())
|
||||
{
|
||||
_frame.appendToProgressArea("Installing Classic Tables...");
|
||||
exec.execSqlBatch(cusDir);
|
||||
}
|
||||
}
|
||||
|
||||
_frame.appendToProgressArea("Database Installation Complete!");
|
||||
|
||||
try
|
||||
|
@ -71,12 +71,12 @@ public class DBInstallerConsole implements DBOutputInterface
|
||||
System.out.print("Do you really want to destroy your db (Y/N)?");
|
||||
if (scn.next().equalsIgnoreCase("y"))
|
||||
{
|
||||
rt = new RunTasks(this, db, dir, true);
|
||||
rt = new RunTasks(this, db, dir);
|
||||
}
|
||||
}
|
||||
else if (resp.equalsIgnoreCase("u"))
|
||||
{
|
||||
rt = new RunTasks(this, db, dir, false);
|
||||
rt = new RunTasks(this, db, dir);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ public class DBInstallerConsole implements DBOutputInterface
|
||||
|
||||
if ((mode != null) && ("c".equalsIgnoreCase(mode) || "u".equalsIgnoreCase(mode)))
|
||||
{
|
||||
final RunTasks rt = new RunTasks(this, database, dir, "c".equalsIgnoreCase(mode));
|
||||
final RunTasks rt = new RunTasks(this, database, dir);
|
||||
rt.run();
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +131,6 @@ public class DBConfigGUI extends JFrame
|
||||
_prop.put("dbUser_" + _db, _dbUser.getText());
|
||||
_prop.put("dbDbse_" + _db, _dbDbse.getText());
|
||||
|
||||
boolean classicInstall = false;
|
||||
DBInstallerGUI dbi = new DBInstallerGUI(connector.getConnection());
|
||||
setVisible(false);
|
||||
|
||||
@ -153,25 +152,19 @@ public class DBConfigGUI extends JFrame
|
||||
{
|
||||
Object[] options =
|
||||
{
|
||||
"Classic Install",
|
||||
"Ertheia Install",
|
||||
"Install Server",
|
||||
"Exit"
|
||||
};
|
||||
int n = JOptionPane.showOptionDialog(null, "Select installation type.", "Select an option", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
|
||||
int n = JOptionPane.showOptionDialog(null, "Install game server database?", "Select an option", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
|
||||
|
||||
if ((n == 2) || (n == -1))
|
||||
if ((n == 1) || (n == -1))
|
||||
{
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
classicInstall = true;
|
||||
}
|
||||
}
|
||||
dbi.setVisible(true);
|
||||
|
||||
RunTasks task = new RunTasks(dbi, _db, _dir, classicInstall);
|
||||
RunTasks task = new RunTasks(dbi, _db, _dir);
|
||||
task.setPriority(Thread.MAX_PRIORITY);
|
||||
task.start();
|
||||
}
|
||||
|
Reference in New Issue
Block a user