diff --git a/deploy/clean.bat b/deploy/clean.bat
deleted file mode 100644
index 2f3d3e5..0000000
--- a/deploy/clean.bat
+++ /dev/null
@@ -1 +0,0 @@
-mvn clean
\ No newline at end of file
diff --git a/deploy/deploy.bat b/deploy/deploy.bat
deleted file mode 100644
index e1f4c4f..0000000
--- a/deploy/deploy.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-mvn install:install-file -DgroupId=${project.groupId} -DartifactId=${project.artifactId} -Dversion=${project.version} -Dpackaging=jar -Dfile=../target/final/${project.build.finalName}-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
-
-:: mvn install:install-file -DgroupId=org.parabot -DartifactId=client -Dversion=2.4.1.1 -Dpackaging=jar -Dfile=../target/Parabot-V2.4.1.1-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
-:: mvn install:install-file -DgroupId=org.parabot -DartifactId=client -Dversion=2.4.3 -Dpackaging=jar -Dfile=../target/Parabot-V2.4.3-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
-:: mvn install:install-file -DgroupId=org.parabot -DartifactId=client -Dversion=2.5 -Dpackaging=jar -Dfile=../target/final/Parabot-V2.5-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
diff --git a/deploy/package.bat b/deploy/package.bat
deleted file mode 100644
index 5b5d577..0000000
--- a/deploy/package.bat
+++ /dev/null
@@ -1 +0,0 @@
-mvn package
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b790f36..a57b7a3 100755
--- a/pom.xml
+++ b/pom.xml
@@ -59,24 +59,16 @@
1.1.1
- junit
- junit
-
-
- org.hamcrest
- hamcrest-core
+ *
+ *
-
- com.bugsnag
- bugsnag
- 1.2.8
-
junit
junit
4.11
+ provided
@@ -90,14 +82,6 @@
deploy
true
-
- deploy.bat
- package.bat
- clean.bat
-
-
-
-
@@ -139,6 +123,7 @@
${project.build.directory}/final/
false
+
make-assembly
diff --git a/src/main/java/org/parabot/Landing.java b/src/main/java/org/parabot/Landing.java
index de1cd97..98d3dbc 100644
--- a/src/main/java/org/parabot/Landing.java
+++ b/src/main/java/org/parabot/Landing.java
@@ -1,6 +1,5 @@
package org.parabot;
-import com.bugsnag.Client;
import org.parabot.core.Configuration;
import org.parabot.core.Core;
import org.parabot.core.Directories;
@@ -11,7 +10,6 @@ import org.parabot.core.network.proxy.ProxyType;
import org.parabot.core.ui.BotUI;
import org.parabot.core.ui.ServerSelector;
import org.parabot.core.ui.utils.UILog;
-import org.parabot.environment.api.utils.JavaUtil;
import javax.swing.*;
import java.awt.*;
@@ -27,129 +25,129 @@ import java.net.URI;
* @see Homepage
*/
public final class Landing {
- private static String username;
- private static String password;
- public static void main(String... args) throws IOException {
- Core.initiateBugsnagInstance();
+ private static String username;
+ private static String password;
- parseArgs(args);
+ public static void main(String... args) throws IOException {
- Core.verbose("Debug mode: " + Core.inDebugMode());
+ parseArgs(args);
- try {
- Core.verbose("Setting look and feel: "
- + UIManager.getSystemLookAndFeelClassName());
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (Throwable t) {
- t.printStackTrace();
- }
+ Core.verbose("Debug mode: " + Core.inDebugMode());
- if (!Core.inDebugMode() && !Core.isValid() && Core.hasValidation()) {
- UILog.log("Updates",
- "Please download the newest version of Parabot at "
- + Configuration.DOWNLOAD_BOT,
- JOptionPane.INFORMATION_MESSAGE);
- URI uri = URI.create(Configuration.API_DOWNLOAD_BOT);
- try {
- Desktop.getDesktop().browse(uri);
- } catch (IOException e1) {
- JOptionPane.showMessageDialog(null, "Connection Error",
- "Error", JOptionPane.ERROR_MESSAGE);
- e1.printStackTrace();
- }
- return;
- }
+ try {
+ Core.verbose("Setting look and feel: "
+ + UIManager.getSystemLookAndFeelClassName());
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
- Core.verbose("Validating directories...");
- Directories.validate();
- Core.verbose("Validating account manager...");
- AccountManager.validate();
+ if (!Core.inDebugMode() && !Core.isValid() && Core.hasValidation()) {
+ UILog.log("Updates",
+ "Please download the newest version of Parabot at "
+ + Configuration.DOWNLOAD_BOT,
+ JOptionPane.INFORMATION_MESSAGE);
+ URI uri = URI.create(Configuration.API_DOWNLOAD_BOT);
+ try {
+ Desktop.getDesktop().browse(uri);
+ } catch (IOException e1) {
+ JOptionPane.showMessageDialog(null, "Connection Error",
+ "Error", JOptionPane.ERROR_MESSAGE);
+ e1.printStackTrace();
+ }
+ return;
+ }
- if (username != null && password != null) {
- new BotUI(username, password);
- username = null;
- password = null;
- return;
- }
+ Core.verbose("Validating directories...");
+ Directories.validate();
+ Core.verbose("Validating account manager...");
+ AccountManager.validate();
- Core.verbose("Starting login gui...");
- new BotUI(null, null);
- }
+ if (username != null && password != null) {
+ new BotUI(username, password);
+ username = null;
+ password = null;
+ return;
+ }
- private static void parseArgs(String... args) {
- for (int i = 0; i < args.length; i++) {
- final String arg = args[i].toLowerCase();
- switch (arg.toLowerCase()) {
- case "-createdirs":
- Directories.validate();
- System.out
- .println("Directories created, you can now run parabot.");
- System.exit(0);
- break;
- case "-debug":
- Core.setDebug(true);
- break;
- case "-v":
- case "-verbose":
- Core.setVerbose(true);
- break;
- case "-server":
- ServerSelector.initServer = args[++i];
- break;
- case "-login":
- username = args[++i];
- password = args[++i];
- break;
- case "-loadlocal":
- Core.setLoadLocal(true);
- break;
- case "-dump":
- Core.setDump(true);
- break;
- case "-scriptsbin":
- Directories.setScriptCompiledDirectory(new File(args[++i]));
- break;
- case "-serversbin":
- Directories.setServerCompiledDirectory(new File(args[++i]));
- break;
- case "-clearcache":
- Directories.clearCache();
- break;
- case "-mac":
- byte[] mac = new byte[6];
- String str = args[++i];
- if (str.toLowerCase().equals("random")) {
- new java.util.Random().nextBytes(mac);
- } else {
- i--;
- for (int j = 0; j < 6; j++) {
- mac[j] = Byte.parseByte(args[++i], 16); // parses a hex
- // number
- }
- }
- NetworkInterface.setMac(mac);
- break;
- case "-proxy":
- ProxyType type = ProxyType.valueOf(args[++i].toUpperCase());
- if (type == null) {
- System.err.println("Invalid proxy type:" + args[i]);
- System.exit(1);
- return;
- }
- ProxySocket.setProxy(type, args[++i],
- Integer.parseInt(args[++i]));
- break;
- case "-auth":
- ProxySocket.auth = true;
- ProxySocket.setLogin(args[++i], args[++i]);
- break;
- case "-no_sec":
- Core.disableSec();
- break;
- case "-no_validation":
- Core.disableValidation();
- break;
- }
- }
- }
+ Core.verbose("Starting login gui...");
+ new BotUI(null, null);
+ }
+
+ private static void parseArgs(String... args) {
+ for (int i = 0; i < args.length; i++) {
+ final String arg = args[i].toLowerCase();
+ switch (arg.toLowerCase()) {
+ case "-createdirs":
+ Directories.validate();
+ System.out
+ .println("Directories created, you can now run parabot.");
+ System.exit(0);
+ break;
+ case "-debug":
+ Core.setDebug(true);
+ break;
+ case "-v":
+ case "-verbose":
+ Core.setVerbose(true);
+ break;
+ case "-server":
+ ServerSelector.initServer = args[++i];
+ break;
+ case "-login":
+ username = args[++i];
+ password = args[++i];
+ break;
+ case "-loadlocal":
+ Core.setLoadLocal(true);
+ break;
+ case "-dump":
+ Core.setDump(true);
+ break;
+ case "-scriptsbin":
+ Directories.setScriptCompiledDirectory(new File(args[++i]));
+ break;
+ case "-serversbin":
+ Directories.setServerCompiledDirectory(new File(args[++i]));
+ break;
+ case "-clearcache":
+ Directories.clearCache();
+ break;
+ case "-mac":
+ byte[] mac = new byte[6];
+ String str = args[++i];
+ if (str.toLowerCase().equals("random")) {
+ new java.util.Random().nextBytes(mac);
+ } else {
+ i--;
+ for (int j = 0; j < 6; j++) {
+ mac[j] = Byte.parseByte(args[++i], 16); // parses a hex
+ // number
+ }
+ }
+ NetworkInterface.setMac(mac);
+ break;
+ case "-proxy":
+ ProxyType type = ProxyType.valueOf(args[++i].toUpperCase());
+ if (type == null) {
+ System.err.println("Invalid proxy type:" + args[i]);
+ System.exit(1);
+ return;
+ }
+ ProxySocket.setProxy(type, args[++i],
+ Integer.parseInt(args[++i]));
+ break;
+ case "-auth":
+ ProxySocket.auth = true;
+ ProxySocket.setLogin(args[++i], args[++i]);
+ break;
+ case "-no_sec":
+ Core.disableSec();
+ break;
+ case "-no_validation":
+ Core.disableValidation();
+ break;
+ }
+ }
+ }
}
diff --git a/src/main/java/org/parabot/core/Core.java b/src/main/java/org/parabot/core/Core.java
index 5bf73a8..57cada3 100644
--- a/src/main/java/org/parabot/core/Core.java
+++ b/src/main/java/org/parabot/core/Core.java
@@ -1,8 +1,5 @@
package org.parabot.core;
-import com.bugsnag.BeforeNotify;
-import com.bugsnag.Client;
-import com.bugsnag.Error;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.parabot.Landing;
@@ -39,8 +36,6 @@ public class Core {
private static Version currentVersion = Configuration.BOT_VERSION;
private static Version latestVersion;
- private static Client bugsnagInstance;
-
public static void disableValidation() {
Core.validate = false;
}
@@ -286,8 +281,6 @@ public class Core {
Core.verbose("Checking for updates...");
validateCache();
- setBugsnagVersion();
-
if ((validVersion() && checksumValid()) || (!checksumValid() && currentVersion.compareTo(latestVersion) >= 0)){
Core.verbose("No updates available.");
return true;
@@ -297,29 +290,6 @@ public class Core {
}
}
- public static void initiateBugsnagInstance() {
- bugsnagInstance = new Client(Configuration.BUGSNAG_API);
- bugsnagInstance.setSendThreads(true);
- }
-
- public static void setBugsnagVersion(){
- Core.bugsnagInstance.setReleaseStage(currentVersion != latestVersion ? "development" : "production");
- }
-
- public static void setBugsnagUser(String id, String email, String username){
- // TODO Check order of parameters
- Core.bugsnagInstance.setUser(username, email, id);
- }
-
- public static void setBugsnagServer(String server){
- Core.setBugsnagInformation("Server", "Server", server);
- }
-
- public static void setBugsnagInformation(String tab, String key, String value){
- // TODO Should be checked if correct
- Core.bugsnagInstance.addToTab(tab, key, value);
- }
-
public static void debug(int i) {
if(mDebug) {
System.out.println("DEBUG: " + i);
diff --git a/src/main/java/org/parabot/core/forum/Account.java b/src/main/java/org/parabot/core/forum/Account.java
index 8fd57bd..f2b2a1a 100644
--- a/src/main/java/org/parabot/core/forum/Account.java
+++ b/src/main/java/org/parabot/core/forum/Account.java
@@ -33,8 +33,6 @@ public class Account {
this.username = username;
this.password = password;
this.api = api;
-
- Core.setBugsnagUser("Null", this.username, "Null");
}
/**
diff --git a/src/main/java/org/parabot/environment/scripts/Script.java b/src/main/java/org/parabot/environment/scripts/Script.java
index 732e5c0..971d296 100644
--- a/src/main/java/org/parabot/environment/scripts/Script.java
+++ b/src/main/java/org/parabot/environment/scripts/Script.java
@@ -156,7 +156,6 @@ public class Script implements Runnable {
if(state < 0 || state > 2) {
throw new IllegalArgumentException("Illegal state");
}
- Core.setBugsnagInformation("Script", "State", String.valueOf(state));
this.state = state;
}
@@ -181,6 +180,5 @@ public class Script implements Runnable {
public void setScriptID(int scriptID){
this.scriptID = scriptID;
- Core.setBugsnagInformation("Script", "State", String.valueOf(scriptID));
}
}
diff --git a/src/main/java/org/parabot/environment/servers/executers/ServerExecuter.java b/src/main/java/org/parabot/environment/servers/executers/ServerExecuter.java
index f2ac865..290bac9 100644
--- a/src/main/java/org/parabot/environment/servers/executers/ServerExecuter.java
+++ b/src/main/java/org/parabot/environment/servers/executers/ServerExecuter.java
@@ -24,8 +24,6 @@ public abstract class ServerExecuter {
@Override
public void run() {
try {
- Core.setBugsnagServer(serverName);
-
Context context = Context.getInstance(provider);
context.load();
PaintComponent.getInstance().startPainting(context);
diff --git a/src/main/resources/storage/app.properties b/src/main/resources/storage/app.properties
index 1c3dea3..263d0ff 100755
--- a/src/main/resources/storage/app.properties
+++ b/src/main/resources/storage/app.properties
@@ -1 +1 @@
-application.version=${project.version}
\ No newline at end of file
+application.version=${project.version}${build.version}
\ No newline at end of file