ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
(Generate patch)

Comparing AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java (file contents):
Revision 639 by alloc, Sun Jan 20 17:02:07 2013 UTC vs.
Revision 640 by alloc, Sun Jan 20 18:02:43 2013 UTC

# Line 121 | Line 121 | public class MainWin extends JFrame impl
121                                  + " - v"
122                                  + SwingJavaBuilder.getConfig().getResource("appversion"));
123  
124 <                setSize(getWidth()+150, getHeight());
124 >                setSize(getWidth() + 150, getHeight());
125                  contents.setDividerLocation(500);
126                  contents.setResizeWeight(0.4);
127  
# Line 383 | Line 383 | public class MainWin extends JFrame impl
383                  }
384                  toolsMenuItems.clear();
385                  for (Mod m : ModManager.getInstance().getInstalledTools()) {
386 <                        if (m.getExeFile() != null && m.getExeFile().exists()) {
386 >                        File exe = m.getExeFile();
387 >                        if (exe != null && exe.exists()) {
388                                  JMenuItem item = new JMenuItem();
389                                  final Vector<String> params = new Vector<String>();
390 <                                params.add(m.getExeFile().getPath());
390 >                                if (exe.getName().toLowerCase().endsWith(".jar")) {
391 >                                        File jre = null;
392 >                                        if (Settings.getPlatform() == Platform.WIN)
393 >                                                jre = new File(System.getProperties().getProperty(
394 >                                                                "java.home"), "bin/javaw.exe");
395 >                                        else
396 >                                                jre = new File(System.getProperties().getProperty(
397 >                                                                "java.home"), "bin/java");
398 >                                        params.add(jre.getPath());
399 >                                        params.add("-jar");
400 >                                }
401 >                                params.add(exe.getPath());
402                                  final File wd = m.getWorkingDir();
403                                  Icon ico = null;
404                                  if (m.getIconFile() != null && m.getIconFile().exists()) {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)