Changeset 637 for AE/installer2/src/net
- Timestamp:
- Jan 20, 2013, 12:28:12 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/AEInstaller.properties
r636 r637 1 1 appname=AE Installer 2 2 appversion=0.9 32 appversion=0.94 -
AE/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
r635 r637 51 51 app = new DefaultApplication(); 52 52 53 URL icon = AEInstaller2.class.getResource("images/AElogo.png"); 53 URL icon = AEInstaller2.class.getResource(imagesBundle 54 .getString("img.ae")); 54 55 try { 55 56 BufferedImage img = ImageIO.read(icon); … … 86 87 initMacOS(); 87 88 89 Settings.setDebug(debug); 88 90 Settings.deserializeFromFile(); 89 91 Settings.setDebug(debug); … … 121 123 JFrame.setDefaultLookAndFeelDecorated(true); 122 124 123 System.out.println(basicBundle.getString("appname") + " " + basicBundle.getString("appversion")); 125 System.out.println(basicBundle.getString("appname") + " " 126 + basicBundle.getString("appversion")); 124 127 System.out.println("JarPath: " + Paths.getInstallerPath()); 125 128 System.out.println("PrefsPath: " + Paths.getPrefsPath()); -
AE/installer2/src/net/oni2/aeinstaller/DepotPackageCheck.java
r634 r637 49 49 for (NodeMod nm : foundNodes.get(inst)) { 50 50 System.out 51 .format(" Node %3d, Files %d, Platform %5s, Type %1 0s, Title \"%s\"\n",51 .format(" Node %3d, Files %d, Platform %5s, Type %11s, Submitter %10s, Title \"%s\"\n", 52 52 nm.getNid(), nm.getUploads().size(), nm 53 53 .getPlatform().toString(), nm 54 .getTypes().toString(), nm.getTitle()); 54 .getTypes().toString(), nm.getName(), 55 nm.getTitle()); 55 56 } 56 57 System.out.println(); -
AE/installer2/src/net/oni2/aeinstaller/Images.properties
r623 r637 27 27 img.tools=/net/oni2/aeinstaller/images/open_icon_library/tools-hammer_and_nails.png 28 28 img.install=/net/oni2/aeinstaller/images/open_icon_library/run-build-install-root.png 29 img.uninstall=/net/oni2/aeinstaller/images/open_icon_library/edit-delete-6.png 29 30 img.folder=/net/oni2/aeinstaller/images/open_icon_library/folder-open-3.png 30 31 img.update=/net/oni2/aeinstaller/images/open_icon_library/system-software-update-2.png -
AE/installer2/src/net/oni2/aeinstaller/backend/mods/Mod.java
r636 r637 8 8 import java.io.IOException; 9 9 import java.io.InputStreamReader; 10 import java.net.URI; 11 import java.net.URISyntaxException; 10 12 import java.util.HashSet; 11 13 … … 295 297 } 296 298 299 /** 300 * @return Depot page URI 301 */ 302 public URI getUrl() { 303 if (node == null) 304 return null; 305 if (node.getPath() == null) 306 return null; 307 URI res = null; 308 try { 309 res = new URI(node.getPath()); 310 } catch (URISyntaxException e) { 311 e.printStackTrace(); 312 } 313 return res; 314 } 315 297 316 @Override 298 317 public String toString() { -
AE/installer2/src/net/oni2/aeinstaller/backend/mods/ModManager.java
r636 r637 129 129 } 130 130 131 updateInstalledMods(); 132 } 133 134 /** 135 * Update the list of currently installed mods 136 */ 137 public void updateInstalledMods() { 131 138 currentlyInstalled = Installer.getInstalledMods(); 132 139 if (currentlyInstalled == null) -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r635 r637 121 121 + SwingJavaBuilder.getConfig().getResource("appversion")); 122 122 123 contents.setDividerLocation(400); 123 setSize(getWidth()+150, getHeight()); 124 contents.setDividerLocation(500); 124 125 contents.setResizeWeight(0.4); 125 126 … … 409 410 } 410 411 411 @SuppressWarnings("unused")412 412 private void revertSelection() { 413 413 tblMods.revertSelection(); … … 537 537 @SuppressWarnings("unused") 538 538 private void installDone() { 539 ModManager.getInstance().updateInstalledMods(); 540 revertSelection(); 539 541 switch (installDone) { 540 542 case DONE: -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTable.java
r631 r637 76 76 final Mod mod = (Mod) getValueAt(rowindex, -1); 77 77 78 JPopupMenu popup = new JPopupMenu(); 79 78 80 if (mod.isLocalAvailable()) { 79 JPopupMenu popup = new JPopupMenu();81 // Open package folder item 80 82 JMenuItem openModFolder = new JMenuItem( 81 83 bundle.getString("openModFolder.text")); … … 94 96 }); 95 97 popup.add(openModFolder); 98 } 99 100 if (mod.getUrl() != null) { 101 // Open Depot page item 102 JMenuItem openDepotPage = new JMenuItem( 103 bundle.getString("openDepotPage.text")); 104 openDepotPage 105 .addActionListener(new ActionListener() { 106 @Override 107 public void actionPerformed( 108 ActionEvent arg0) { 109 try { 110 Desktop.getDesktop().browse( 111 mod.getUrl()); 112 } catch (IOException e) { 113 e.printStackTrace(); 114 } 115 } 116 }); 117 popup.add(openDepotPage); 118 } 119 120 if (popup.getSubElements().length > 0) 96 121 popup.show(e.getComponent(), e.getX(), e.getY()); 97 }98 122 } 99 123 } -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r631 r637 2 2 3 3 import java.io.File; 4 import java.text.SimpleDateFormat; 5 import java.util.Date; 4 6 import java.util.HashSet; 5 7 import java.util.ResourceBundle; … … 55 57 res += (mod.isLocalAvailable() ? "D" : "_"); 56 58 return res; 59 case 5: 60 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 61 return sdf 62 .format(new Date(mod.getFile().getTimestamp() * 1000)); 57 63 } 58 64 return null; … … 72 78 case 4: 73 79 return bundle.getString("mod.state"); 80 case 5: 81 return bundle.getString("mod.date"); 74 82 } 75 83 return null; … … 83 91 @Override 84 92 public int getColumnCount() { 85 return 5;93 return 6; 86 94 } 87 95 … … 98 106 return String.class; 99 107 case 4: 108 return String.class; 109 case 5: 100 110 return String.class; 101 111 } … … 134 144 case 4: 135 145 w = 55; 146 col.setPreferredWidth(w); 147 col.setMinWidth(w); 148 col.setMaxWidth(w); 149 break; 150 case 5: 151 w = 95; 136 152 col.setPreferredWidth(w); 137 153 col.setMinWidth(w); -
AE/installer2/src/net/oni2/aeinstaller/gui/toolmanager/ToolManager.java
r629 r637 9 9 import javax.swing.AbstractAction; 10 10 import javax.swing.DefaultListModel; 11 import javax.swing.Icon; 12 import javax.swing.ImageIcon; 11 13 import javax.swing.JButton; 12 14 import javax.swing.JComponent; … … 15 17 import javax.swing.JList; 16 18 import javax.swing.JOptionPane; 19 import javax.swing.JSplitPane; 17 20 import javax.swing.KeyStroke; 18 21 import javax.swing.ListSelectionModel; … … 41 44 private BuildResult result = SwingJavaBuilder.build(this, bundle); 42 45 46 private JSplitPane contents; 47 43 48 private JList lstTools; 44 49 … … 51 56 52 57 private JButton btnInstall; 58 59 private Icon icoInstall = null; 60 private Icon icoUninstall = null; 53 61 54 62 /** … … 73 81 getRootPane().getActionMap().put("close", closeAction); 74 82 83 contents.setDividerLocation(200); 84 contents.setResizeWeight(0.4); 85 75 86 lstTools.addListSelectionListener(this); 76 87 lstTools.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); … … 80 91 for (String name : tools.keySet()) 81 92 dlm.addElement(tools.get(name)); 93 lstTools.setModel(dlm); 94 95 icoInstall = new ImageIcon(getClass().getResource( 96 SwingJavaBuilder.getConfig().getResource("img.install"))); 97 icoUninstall = new ImageIcon(getClass().getResource( 98 SwingJavaBuilder.getConfig().getResource("img.uninstall"))); 82 99 } 83 100 … … 102 119 lblDownloadSizeVal.setText(""); 103 120 btnInstall.setEnabled(false); 121 btnInstall.setIcon(icoInstall); 104 122 105 123 if (lstTools.getSelectedValue() instanceof Mod) { … … 116 134 btnInstall.setToolTipText(bundle 117 135 .getString("btnInstall.un.tooltip")); 136 btnInstall.setIcon(icoUninstall); 118 137 } else { 119 138 btnInstall.setText(bundle.getString("btnInstall.text")); -
AE/installer2/src/net/oni2/aeinstaller/localization/ModTable.properties
r631 r637 4 4 mod.creator=Creator 5 5 mod.state=State 6 mod.date=Last change 6 7 7 8 state.installed=Is <b>I</b>nstalled … … 12 13 13 14 openModFolder.text=Open mod folder 15 openDepotPage.text=Open Depot page in browser -
AE/installer2/src/net/oni2/aeinstaller/localization/ToolManager.properties
r629 r637 1 1 frame.title=AE Installer: Tool Manager 2 2 3 btnInstall.text= &Install3 btnInstall.text=Install 4 4 btnInstall.tooltip=Install this tool 5 btnInstall.un.text= &Uninstall5 btnInstall.un.text=Uninstall 6 6 btnInstall.un.tooltip=Uninstall this tool 7 7
Note:
See TracChangeset
for help on using the changeset viewer.