diff --git a/src/chooser/DirChooser.java b/src/chooser/DirChooser.java index d59df3b..130342d 100644 --- a/src/chooser/DirChooser.java +++ b/src/chooser/DirChooser.java @@ -1,16 +1,12 @@ package chooser; -import framework.Operations; +import helpers.LauncherHelper; import updater.CoreUpdater; import javax.swing.*; import java.awt.Toolkit; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; import java.util.Properties; import java.util.logging.Level; @@ -24,7 +20,7 @@ public class DirChooser { public void execute() { //Functor pattern - Operations.LogSetup(log,false); + LauncherHelper.LogSetup(log,false); if (!fired) { boolean found = false; fired = true; @@ -59,7 +55,7 @@ public void execute() { System.exit(0); } } - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); } } @@ -80,10 +76,10 @@ public boolean isFired() { public void changePathProp(String path){ Properties prop = new Properties(); - Operations.loadProp(prop,"gw2_launcher.cfg"); + LauncherHelper.loadProp(prop,"gw2_launcher.cfg"); OutputStream output= null; prop.put("path", path); - Operations.saveProp(prop,"gw2_launcher.cfg"); + LauncherHelper.saveProp(prop,"gw2_launcher.cfg"); } } diff --git a/src/frame/CoreFrame.java b/src/frame/CoreFrame.java index 4a7b894..9b17045 100644 --- a/src/frame/CoreFrame.java +++ b/src/frame/CoreFrame.java @@ -20,9 +20,8 @@ public class CoreFrame extends JFrame{ private JLabel arg=new JLabel("Arguments: "); public JCheckBox autostart= new JCheckBox("Start with these settings each time (Fast-start)"); public JCheckBox background= new JCheckBox("Hide the GUI when fast-start is enabled "); - public JButton arc= new JButton("Install ArcDPS"); - public JButton btempl= new JButton("Install Buildtemplates"); public JTextField arg_string=new JTextField(20); + private JButton arc= new JButton("Install ArcDPS"); private String path_string; private JButton me= new JButton("?"); private String mode; @@ -60,15 +59,11 @@ public CoreFrame(String dir){ startwithout.setActionCommand("without"); background.setActionCommand("background"); arc.setActionCommand("arc"); - btempl.setActionCommand("btempl_install"); - - //Create MyActionListener MyActionListener mal= new MyActionListener(path_string,this); //Add Listeners arc.addActionListener(mal); - btempl.addActionListener(mal); startwith.addActionListener(mal); startwithout.addActionListener(mal); background.addActionListener(mal); @@ -89,7 +84,6 @@ public CoreFrame(String dir){ sel.add(status); sel2.add(path); install.add(arc); - install.add(btempl); top.add(sel2); top.add(sel); mid.setLayout(new BorderLayout(0, 0)); @@ -130,39 +124,23 @@ public CoreFrame(String dir){ public void setMode(String mode) { this.mode=mode; - if (mode.equals("none")) { - arc.setText("Install ArcDPS"); - status.setText("- ArcDPS is not installed"); - status.setForeground(Color.RED); - btempl.setText("Install Buildtemplates"); - btempl.setEnabled(false); - startwith.setEnabled(false); - autostart.setEnabled(false); - background.setEnabled(false); - } - else if (mode.equals("both")) { - arc.setText("Remove ArcDPS"); - File templates= new File(path_string+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - if(templates.exists()) { - btempl.setText("Remove Buildtemplates"); - btempl.setActionCommand("btempl_remove"); - } - else btempl.setText("Install Buildtemplates"); - - } - else if (mode.equals("arc_only")) { - arc.setText("Remove ArcDPS"); - File templates= new File(path_string+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - if (templates.exists()) { - btempl.setText("Remove Buildtemplates"); - btempl.setActionCommand("btempl_remove"); - } - else btempl.setText("Install Buildtemplates"); - } - - else { - arc.setText("Install ArcDPS"); - } + switch (mode) { + case "none": + arc.setText("Install ArcDPS"); + status.setText("- ArcDPS is not installed"); + status.setForeground(Color.RED); + startwith.setEnabled(false); + autostart.setEnabled(false); + background.setEnabled(false); + break; + case "both": + case "arc_only": + arc.setText("Remove ArcDPS"); + break; + default: + arc.setText("Install ArcDPS"); + break; + } } diff --git a/src/frame/FastFrame.java b/src/frame/FastFrame.java index eb6f627..6691f35 100644 --- a/src/frame/FastFrame.java +++ b/src/frame/FastFrame.java @@ -20,8 +20,7 @@ public class FastFrame extends JFrame{ private JCheckBox autostart= new JCheckBox("Start with these settings each time"); public JTextField arg_string=new JTextField(20); private String path_string; - public JButton arc= new JButton("Install ArcDPS"); - public JButton bgdm= new JButton("Install BGDM"); + private JButton arc= new JButton("Install ArcDPS"); private String mode; @@ -68,22 +67,18 @@ public FastFrame(String dir, boolean hide){ public void setMode(String mode) { this.mode=mode; - if (mode.equals("none")) { - arc.setText("Install ArcDPS"); - status.setText("- ArcDPS is not installed"); - status.setForeground(Color.RED); - } - else if (mode.equals("both")) { - arc.setText("Remove ArcDPS"); - File templates= new File(path_string+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - - } - else if (mode.equals("arc_only")) { - arc.setText("Remove ArcDPS"); - File templates= new File(path_string+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - } - - else { - arc.setText("Install ArcDPS"); - } + switch (mode) { + case "none": + arc.setText("Install ArcDPS"); + status.setText("- ArcDPS is not installed"); + status.setForeground(Color.RED); + break; + case "both": + case "arc_only": + arc.setText("Remove ArcDPS"); + break; + default: + arc.setText("Install ArcDPS"); + break; + } }} diff --git a/src/framework/Operations.java b/src/helpers/LauncherHelper.java similarity index 76% rename from src/framework/Operations.java rename to src/helpers/LauncherHelper.java index a2c15ce..7f3c382 100644 --- a/src/framework/Operations.java +++ b/src/helpers/LauncherHelper.java @@ -1,4 +1,4 @@ -package framework; +package helpers; import java.awt.Color; import java.io.*; @@ -17,9 +17,9 @@ import launcher.Main; -public class Operations { +public class LauncherHelper { private static final boolean DEBUG = false; - static Logger log = Logger.getLogger( Main.class.getName() ); + private static Logger log = Logger.getLogger( Main.class.getName() ); public static void LogSetup(Logger log, boolean operations) { @@ -87,8 +87,8 @@ public static synchronized void installArc(CoreFrame cf, String path) { // TODO Auto-generated catch block e.printStackTrace(); } - Operations.downloadINI(cf,path); //.ini is required for the first install - Operations.updateDll(cf,path); //placeholder swapped with the last version of the dll + LauncherHelper.downloadINI(cf,path); //.ini is required for the first install + LauncherHelper.updateDll(cf,path); //placeholder swapped with the last version of the dll File backup = new File(path+"\\bin64\\d3d9_old.dll"); if (backup.exists()) backup.delete(); try { @@ -107,12 +107,12 @@ public static synchronized void installArc(CoreFrame cf, String path) { } public static synchronized void installLoaderReshade(String path) { - Operations.LogSetup(log,true); + LauncherHelper.LogSetup(log,true); log.log( Level.INFO, "Installing reshade support (loader) [installLoaderReshade]"); File download = new File(path+"\\bin64\\d3d9_chainload.dll"); if (!download.exists()) { try { - FileUtils.copyURLToFile(new URL("http://www.deltaconnected.com/arcdps/x64/reshade_loader/d3d9_chainload.dll"),download, 10000, 10000); + FileUtils.copyURLToFile(new URL("http://www.deltaconnected.com/arcdps/reshade_loader/d3d9_chainload.dll"),download, 10000, 10000); log.log( Level.INFO, "Everything went smooth [installBGDMwithArc]"); } catch (IOException e) { @@ -121,13 +121,13 @@ public static synchronized void installLoaderReshade(String path) { e.printStackTrace(); } } - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); } //Delete d3d9.dll of Arc public static synchronized void removeArc(CoreFrame cf, String path) { - Operations.LogSetup(log,true); + LauncherHelper.LogSetup(log,true); log.log( Level.INFO, "Removing arc [removeArc]"); File dll=new File(path+"\\bin64\\d3d9.dll"); File dll_old=new File(path+"\\bin64\\d3d9_old.dll"); @@ -149,13 +149,13 @@ public static synchronized void removeArc(CoreFrame cf, String path) { cf.setMode("none"); cf.status.setText("- ArcDPS not installed"); cf.status.setForeground(Color.RED); - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); } public static synchronized void removeArcSetting(CoreFrame cf, String path) { - Operations.LogSetup(log,true); + LauncherHelper.LogSetup(log,true); log.log( Level.INFO, "Removing arc settings [removeArcSetting]"); File ini= new File(path+"\\bin64\\arcdps.ini"); File directory=new File(path+"\\addons\\arcdps"); @@ -172,7 +172,7 @@ public static synchronized void removeArcSetting(CoreFrame cf, String path) { log.log( Level.INFO, "Everything went smooth [removeArcSetting]"); - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); } @@ -185,7 +185,7 @@ public static synchronized void removeReshadeLoader(String path) { } public static synchronized void downloadINI(CoreFrame cf, String path){ - Operations.LogSetup(log,true); + LauncherHelper.LogSetup(log,true); File ini=new File(path+"\\bin64\\arcdps.ini"); if (ini.exists()) ini.delete(); //Delete existing ini file to prevent an exception log.log( Level.INFO,"Downloading configuration file"); @@ -195,67 +195,27 @@ public static synchronized void downloadINI(CoreFrame cf, String path){ log.log( Level.INFO,"archdps.ini installed successfully"); //Exceptions if something goes wrong (Connection/IO) } catch (IOException e) { - e.printStackTrace(); cf.status.setText("- Cannot connect to the update server"); cf.status.setForeground(Color.RED); log.log( Level.SEVERE,"IOException when downloading ini"); } - Operations.closeLogHandlers(log); - } - - - //method used to download the Buildtemplates' dll - public static synchronized int installBTempl(CoreFrame cf, String path){ - Operations.LogSetup(log,true); - File btempl=new File(path+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - if (btempl.exists()) btempl.delete(); //Delete existing ini file to prevent an exception - log.log( Level.INFO,"Downloading Buildtemplates dll"); - try { - //Download default configuration from the website - FileUtils.copyURLToFile(new URL("http://www.deltaconnected.com/arcdps/x64/buildtemplates/d3d9_arcdps_buildtemplates.dll"),btempl, 10000, 10000); - log.log( Level.INFO,"Buildtemplates funcionality installed successfully"); - cf.btempl.setText("Remove Buildtemplates"); - //Exceptions if something goes wrong (Connection/IO) - } catch (IOException e) { - - e.printStackTrace(); - cf.status.setText("- Cannot connect to the update server"); - cf.status.setForeground(Color.RED); - log.log( Level.SEVERE,"IOException when downloading Buildtemplates dll"); - return -1; - } - Operations.closeLogHandlers(log); - return 0; - } - - - //method used to remove the buildtemplates' dll - public static synchronized int removeBTempl(CoreFrame cf, String path){ - Operations.LogSetup(log,true); - File btempl=new File(path+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - if (btempl.exists()) btempl.delete(); //Delete existing dll - log.log( Level.INFO,"Buildtemplates dll removed"); - Operations.closeLogHandlers(log); - return 0; + LauncherHelper.closeLogHandlers(log); } - + //used to update arcDPS public static synchronized void updateDll(CoreFrame cf, String path){ - Operations.LogSetup(log,true); + LauncherHelper.LogSetup(log,true); File dll=new File(path+"\\bin64\\d3d9.dll"); FileInputStream fis = null; String md5_new; String md5_old; try { - //Generate md5 file of the dll installed in the system using some external libraries - fis = new FileInputStream(dll); - byte data[] = new byte[0]; - data = org.apache.commons.codec.digest.DigestUtils.md5(fis); - char md5Chars[] = Hex.encodeHex(data); + byte[] data = org.apache.commons.codec.digest.DigestUtils.md5(fis); + char[] md5Chars = Hex.encodeHex(data); md5_old = String.valueOf(md5Chars); //md5 of the dll fis.close(); @@ -283,12 +243,7 @@ public static synchronized void updateDll(CoreFrame cf, String path){ cf.status.setText("- ArcDPS updated"); cf.status.setForeground(new Color(0,102,51)); File btempl=new File(path+"\\bin64\\d3d9_arcdps_buildtemplates.dll"); - if (btempl.exists()) { - Operations.closeLogHandlers(log); - Operations.installBTempl(cf, path); - Operations.LogSetup(log,true); - } - + if (btempl.exists()) btempl.delete(); } else { //Same checksum means that the user has the most recent version of ArcDPS @@ -315,10 +270,8 @@ public static synchronized void updateDll(CoreFrame cf, String path){ cf.status.setForeground(Color.RED); log.log( Level.SEVERE,"IOException when downloading dll"); } - - Operations.closeLogHandlers(log); - Operations.installLoaderReshade(path); - + LauncherHelper.closeLogHandlers(log); + LauncherHelper.installLoaderReshade(path); } diff --git a/src/launcher/Main.java b/src/launcher/Main.java index 3e9e96b..749c1eb 100644 --- a/src/launcher/Main.java +++ b/src/launcher/Main.java @@ -3,7 +3,7 @@ import chooser.DirChooser; import frame.CoreFrame; import frame.FastFrame; -import framework.Operations; +import helpers.LauncherHelper; import updater.CoreUpdater; import updater.FastUpdater; import updater.UpdateNotifier; @@ -24,8 +24,8 @@ public static void main(String[] args) throws InterruptedException { //Create Logger Logger log = Logger.getLogger( Main.class.getName() ); - Operations.cleanOldLogger(); - Operations.LogSetup(log,false); + LauncherHelper.cleanOldLogger(); + LauncherHelper.LogSetup(log,false); //Create configuration file if it doesn't exist already File config= new File("gw2_launcher.cfg"); @@ -36,7 +36,7 @@ public static void main(String[] args) throws InterruptedException { } Properties prop = new Properties(); - Operations.loadProp(prop,"gw2_launcher.cfg"); + LauncherHelper.loadProp(prop,"gw2_launcher.cfg"); //Change look and feel try { @@ -60,7 +60,7 @@ public static void main(String[] args) throws InterruptedException { gui.arg_string.setText(prop.getProperty("args","Example: -autologin, -noaudio, -bmp ")); if(gui.arg_string.getText().equals("")) gui.arg_string.setText("Example: -autologin, -noaudio, -bmp "); gui.setMode(prop.getProperty("mode","none")); - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); if (!prop.getProperty("mode","none").equals("none")) { Thread t1 = new Thread(new CoreUpdater(gui, prop.getProperty("path"))); t1.start(); @@ -90,7 +90,7 @@ else if (DirChooser.validDir(prop.getProperty("path")) && prop.getProperty("fast //Updater thread is created. If ("type".equals("yes") is yes it means that the preferred option for execution is "Run with ArcDPS" //otherwise is "Run only GW2" ("type".equals("no"). //Type is one of the settings contained in gw2_launcher.cfg - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); Thread t1=null; if (prop.getProperty("useAddons","yes").equals("yes")) { t1= new Thread(new FastUpdater(gui,prop.getProperty("path"),true));} else t1= new Thread(new FastUpdater(gui,prop.getProperty("path"),false)); @@ -101,11 +101,11 @@ else if (DirChooser.validDir(prop.getProperty("path")) && prop.getProperty("fast //Else If currentDir is valid we don't need to use the JFileChooser else if (DirChooser.validDir(currentDir)){ log.log( Level.INFO, "Path not found, no autostart, but valid current dir"); - Operations.removeReshadeLoader(currentDir); + LauncherHelper.removeReshadeLoader(currentDir); CoreFrame gui = new CoreFrame(currentDir); gui.setMode(prop.getProperty("mode","none")); log.log(Level.INFO, "mode: "+prop.getProperty("mode")); - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); if (!prop.getProperty("mode","none").equals("none")) { Thread t1 = new Thread(new CoreUpdater(gui, currentDir)); t1.start(); @@ -116,12 +116,12 @@ else if (DirChooser.validDir(currentDir)){ //JFileChooser is needed else { log.log( Level.INFO, "FileChooser needed"); - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); DirChooser dir=new DirChooser(); dir.execute(); if(!dir.getCancel() && dir.isFired()) { if (dir.getJFileChooser().getSelectedFile()==null) System.exit(0); - Operations.removeReshadeLoader(dir.getJFileChooser().getSelectedFile().getAbsolutePath()); + LauncherHelper.removeReshadeLoader(dir.getJFileChooser().getSelectedFile().getAbsolutePath()); CoreFrame gui = new CoreFrame(dir.getJFileChooser().getSelectedFile().getAbsolutePath()); gui.setMode(prop.getProperty("mode","none")); if (!prop.getProperty("mode","none").equals("none")) { diff --git a/src/listeners/MyActionListener.java b/src/listeners/MyActionListener.java index ced7da1..1d5abd1 100644 --- a/src/listeners/MyActionListener.java +++ b/src/listeners/MyActionListener.java @@ -1,7 +1,7 @@ package listeners; import frame.CoreFrame; -import framework.Operations; +import helpers.LauncherHelper; import updater.CoreUpdater; import javax.swing.*; import java.awt.event.ActionEvent; @@ -28,9 +28,8 @@ public void actionPerformed(ActionEvent e) { if(e.getActionCommand().equals("arc")) { if(cf.getMode().equals("none")) { - Operations.installArc(cf, path); + LauncherHelper.installArc(cf, path); saveConfig(true); - cf.btempl.setEnabled(true); cf.startwith.setEnabled(true); cf.autostart.setEnabled(true); cf.background.setEnabled(true); @@ -41,34 +40,16 @@ public void actionPerformed(ActionEvent e) { int dialogResult=JOptionPane.showConfirmDialog(null,"Would you like to remove ArcDPS' settings files too? \n" + "If you are going to install ArcDPS in the future press 'No'. ","Remove settings?",dialogButton); if (dialogResult==JOptionPane.YES_OPTION){ - Operations.removeArcSetting(cf, path); + LauncherHelper.removeArcSetting(cf, path); } - Operations.removeArc(cf, path); + LauncherHelper.removeArc(cf, path); saveConfig(true); - cf.btempl.setText("Install Buildtemplates"); - cf.btempl.setEnabled(false); cf.startwith.setEnabled(false); cf.autostart.setEnabled(false); cf.background.setEnabled(false); } - } - - if(e.getActionCommand().equals("btempl_install")) { - if(Operations.installBTempl(cf, path)==0) { - cf.btempl.setText("Remove Buildtemplates"); - cf.btempl.setActionCommand("btempl_remove"); - } - - } - - if(e.getActionCommand().equals("btempl_remove")) { - if (Operations.removeBTempl(cf,path)==0) { - cf.btempl.setText("Install Buildtemplates"); - cf.btempl.setActionCommand("btempl_install"); - } - } if(e.getActionCommand().equals("background")){ @@ -99,18 +80,18 @@ public void actionPerformed(ActionEvent e) { } //Used to the save settings in "gw2_launcher.cfg" - public void saveConfig(boolean useAddons){ + private void saveConfig(boolean useAddons){ Properties prop = new Properties(); OutputStream output= null; prop.put("path",path); - Operations.loadProp(prop,"gw2_launcher.cfg"); + LauncherHelper.loadProp(prop,"gw2_launcher.cfg"); if (cf.autostart.isSelected()) { prop.put("faststart", "yes"); } else prop.put("faststart","no"); - if (useAddons==true) prop.put("useAddons","yes"); + if (useAddons) prop.put("useAddons","yes"); else prop.put("useAddons","no"); if(cf.background.isSelected()) prop.put("background", "yes"); @@ -120,12 +101,12 @@ public void saveConfig(boolean useAddons){ if(cf.arg_string.getText().contains("Example")) prop.put("args",""); else prop.put("args",cf.arg_string.getText()); - Operations.saveProp(prop,"gw2_launcher.cfg"); + LauncherHelper.saveProp(prop,"gw2_launcher.cfg"); } @SuppressWarnings("unused") //Create process Gw2-64.exe with some arguments - public void runGW2(){ + private void runGW2(){ try { if(cf.arg_string.getText().contains("Example")) cf.arg_string.setText(""); cf.dispose(); diff --git a/src/updater/CoreUpdater.java b/src/updater/CoreUpdater.java index 7bb1efa..d579098 100644 --- a/src/updater/CoreUpdater.java +++ b/src/updater/CoreUpdater.java @@ -1,15 +1,11 @@ package updater; -import framework.Operations; +import helpers.LauncherHelper; import frame.CoreFrame; import javax.swing.*; import java.awt.*; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStream; import java.nio.file.Files; import java.util.Properties; import java.util.logging.Level; @@ -31,7 +27,7 @@ public CoreUpdater(CoreFrame cf, String path){ dll=new File(path+"\\bin64\\d3d9.dll"); //dll of ArcDPS or BGDM old_dll= new File(path+"\\bin64\\d3d9_old.dll"); //backup dll of ArcDPS or BGDM disabled_dll= new File(path+"\\bin64\\d3d9_disabled.dll"); //disabled dll of ArcDPS or BGDM - Operations.LogSetup(log,false); + LauncherHelper.LogSetup(log,false); } //run() from interface "Runnable" @@ -43,7 +39,7 @@ public void run() { //System.out.println("d3d9.dll exists"); changeConfig("arc_only"); log.log( Level.INFO,"d3d9.dll found"); - Operations.updateDll(cf,path); //if d3d9.dll exists check if update is needed + LauncherHelper.updateDll(cf,path); //if d3d9.dll exists check if update is needed } @@ -60,7 +56,7 @@ else if (!check && disabled_dll.exists()){ cf.status.setText("- Cannot restore ArcDPS"); cf.status.setForeground(Color.RED); } - Operations.updateDll(cf,path); //check for update just in case + LauncherHelper.updateDll(cf,path); //check for update just in case } @@ -78,7 +74,7 @@ else if (!check && old_dll.exists()){ cf.status.setForeground(Color.RED); } - Operations.updateDll(cf,path); + LauncherHelper.updateDll(cf,path); } @@ -97,13 +93,13 @@ else if (!check && old_dll.exists()){ log.log( Level.INFO,"archdps.ini not found"); int dialogResult = JOptionPane.showConfirmDialog(null,"ArcDPS configuration file not found. Would you like to download a default configoration?","ArcDPS configuration file not detected",dialogButton); if (dialogResult==JOptionPane.YES_OPTION){ - Operations.downloadINI(cf,path); //Method used to download the .ini + LauncherHelper.downloadINI(cf,path); //Method used to download the .ini } } - Operations.closeLogHandlers(log); + LauncherHelper.closeLogHandlers(log); } @@ -138,9 +134,9 @@ public static void errorDialog(String path){ public void changeConfig(String mode){ Properties prop = new Properties(); - Operations.loadProp(prop,"gw2_launcher.cfg"); + LauncherHelper.loadProp(prop,"gw2_launcher.cfg"); prop.put("mode", mode); - Operations.saveProp(prop,"gw2_launcher.cfg"); + LauncherHelper.saveProp(prop,"gw2_launcher.cfg"); } diff --git a/src/updater/FastUpdater.java b/src/updater/FastUpdater.java index 38d63b3..4ae73a9 100644 --- a/src/updater/FastUpdater.java +++ b/src/updater/FastUpdater.java @@ -1,6 +1,6 @@ package updater; -import framework.Operations; +import helpers.LauncherHelper; import org.apache.commons.codec.binary.Hex; import org.apache.commons.io.FileUtils; @@ -12,9 +12,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStream; import java.net.URL; import java.nio.file.Files; import java.util.Arrays; @@ -43,7 +41,7 @@ public FastUpdater(FastFrame cf, String path,boolean type){ old_dll= new File(path+"\\bin64\\d3d9_old.dll"); //backup dll of ArcDPS disabled_dll= new File(path+"\\bin64\\d3d9_disabled.dll"); //disabled dll of ArcDPS this.type=type; - Operations.LogSetup(log,false); + LauncherHelper.LogSetup(log,false); } @@ -296,7 +294,7 @@ public void changeConfig(String mode){ } prop.put("mode", mode); - Operations.saveProp(prop,"gw2_launcher.cfg"); + LauncherHelper.saveProp(prop,"gw2_launcher.cfg"); }