Changeset 625 for AE/installer2/src/net
- Timestamp:
- Jan 16, 2013, 5:12:24 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/AEInstaller.properties
r624 r625 1 1 appname=AE Installer 2 2 appversion=0.8 42 appversion=0.85 3 3 4 4 invalidPath.title=Wrong directory -
AE/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
r624 r625 173 173 basicBundle.getString("invalidPath.title"), 174 174 JOptionPane.ERROR_MESSAGE); 175 if (!Settings. getDebug()) {175 if (!Settings.isDebug()) { 176 176 return; 177 177 } -
AE/installer2/src/net/oni2/aeinstaller/backend/Paths.java
r602 r625 16 16 */ 17 17 public static File getInstallerPath() { 18 // String jarPath = Settings.class.getProtectionDomain().getCodeSource() 19 // .getLocation().getPath(); 20 // String decodedPath = null; 21 // try { 22 // decodedPath = URLDecoder.decode(jarPath, "UTF-8"); 23 // } catch (UnsupportedEncodingException e) { 24 // e.printStackTrace(); 25 // } 26 // return new File(decodedPath).getParentFile(); 27 String wd = System.getProperty("user.dir"); 28 return new File(wd); 18 if (Settings.isDebug()) { 19 String wd = System.getProperty("user.dir"); 20 return new File(wd); 21 } else { 22 String jarPath = Settings.class.getProtectionDomain() 23 .getCodeSource().getLocation().getPath(); 24 String decodedPath = null; 25 try { 26 decodedPath = URLDecoder.decode(jarPath, "UTF-8"); 27 } catch (UnsupportedEncodingException e) { 28 e.printStackTrace(); 29 } 30 return new File(decodedPath).getParentFile(); 31 } 29 32 } 30 33 -
AE/installer2/src/net/oni2/aeinstaller/backend/Settings.java
r623 r625 112 112 * @return Is debug run 113 113 */ 114 public static boolean getDebug() {114 public static boolean isDebug() { 115 115 return debugRun; 116 116 } -
AE/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r624 r625 244 244 combineBSLFolders(mods, listener); 245 245 246 if (Settings.getInstance().get("copyintro", false)) { 247 File src = new File(Paths.getVanillaGDF(), "intro.bik"); 248 if (src.exists()) { 249 try { 250 FileUtils.copyFileToDirectory(src, Paths.getEditionGDF()); 251 } catch (IOException e) { 252 e.printStackTrace(); 253 } 254 } 255 } 256 if (Settings.getInstance().get("copyoutro", true)) { 257 File src = new File(Paths.getVanillaGDF(), "outro.bik"); 258 if (src.exists()) { 259 try { 260 FileUtils.copyFileToDirectory(src, Paths.getEditionGDF()); 261 } catch (IOException e) { 262 e.printStackTrace(); 263 } 264 } 265 } 266 246 267 if (unlockLevels.size() > 0) { 247 268 File dat = new File(Paths.getEditionBasePath(), "persist.dat"); -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r624 r625 65 65 import net.oni2.aeinstaller.gui.modtable.ModTableModel; 66 66 import net.oni2.aeinstaller.gui.settings.SettingsDialog; 67 import net.oni2.aeinstaller.gui.toolmanager.ToolManager; 67 68 68 69 import org.javabuilders.BuildResult; … … 428 429 @SuppressWarnings("unused") 429 430 private void tools() { 430 // TODO: Open tools manager 431 JOptionPane.showMessageDialog(this, "tools", "todo", 432 JOptionPane.INFORMATION_MESSAGE); 431 new ToolManager().setVisible(true); 433 432 } 434 433 -
AE/installer2/src/net/oni2/aeinstaller/gui/settings/SettingsDialog.java
r609 r625 34 34 35 35 private JCheckBox chkNotifyOnStart; 36 private JCheckBox chkCopyIntro; 37 private JCheckBox chkCopyOutro; 36 38 37 39 /** … … 40 42 public SettingsDialog() { 41 43 setResizable(false); 42 // setMinimumSize(new Dimension(320, (int) getSize().getHeight() + 0));43 44 44 45 AbstractAction closeAction = new AbstractAction() { … … 67 68 68 69 chkNotifyOnStart.setSelected(set.get("notifyupdates", true)); 70 chkCopyIntro.setSelected(set.get("copyintro", false)); 71 chkCopyOutro.setSelected(set.get("copyoutro", true)); 69 72 } 70 73 … … 73 76 Settings set = Settings.getInstance(); 74 77 75 set.get("notifyupdates", chkNotifyOnStart.isSelected()); 78 set.put("notifyupdates", chkNotifyOnStart.isSelected()); 79 set.put("copyintro", chkCopyIntro.isSelected()); 80 set.put("copyoutro", chkCopyOutro.isSelected()); 76 81 77 82 String oldLaf = set.get("lookandfeel", UIManager.getLookAndFeel() -
AE/installer2/src/net/oni2/aeinstaller/gui/settings/SettingsDialog.properties
r608 r625 8 8 panCommon=Common settings 9 9 lblNotifyOnStart=Notify about updates on startup: 10 lblCopyIntro=Enable starting video on installation: 11 lblCopyOutro=Enable ending video on installation: 10 12 11 13 newLaF.text=A new GUI theme was selected.\nPlease restart the application in order to apply the changes. -
AE/installer2/src/net/oni2/aeinstaller/gui/settings/SettingsDialog.yml
r608 r625 13 13 - JLabel(name=lblNotifyOnStart, text=lblNotifyOnStart) 14 14 - JCheckBox(name=chkNotifyOnStart) 15 - JLabel(name=lblCopyIntro, text=lblCopyIntro) 16 - JCheckBox(name=chkCopyIntro) 17 - JLabel(name=lblCopyOutro, text=lblCopyOutro) 18 - JCheckBox(name=chkCopyOutro) 15 19 - MigLayout: | 16 20 [min] [grow] 17 21 >lblNotifyOnStart chkNotifyOnStart [pref] 22 >lblCopyIntro chkCopyIntro [pref] 23 >lblCopyOutro chkCopyOutro [pref] 18 24 - JPanel(name=panUI, groupTitle=panUI): 19 25 - JLabel(name=lblLaF, text=lblLaF)
Note:
See TracChangeset
for help on using the changeset viewer.