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

Comparing AE/installer2/src/net/oni2/aeinstaller/AEInstaller2.java (file contents):
Revision 594 by alloc, Tue Jan 1 19:27:17 2013 UTC vs.
Revision 596 by alloc, Wed Jan 2 17:00:16 2013 UTC

# Line 16 | Line 16 | import javax.swing.SwingUtilities;
16   import javax.swing.UIManager;
17   import javax.swing.UIManager.LookAndFeelInfo;
18  
19 < import net.oni2.aeinstaller.backend.OniSplit;
19 > import net.oni2.aeinstaller.backend.Paths;
20   import net.oni2.aeinstaller.backend.Settings;
21   import net.oni2.aeinstaller.backend.Settings.Platform;
22   import net.oni2.aeinstaller.backend.StuffToRefactorLater;
23   import net.oni2.aeinstaller.backend.depot.DepotManager;
24 + import net.oni2.aeinstaller.backend.oni.Installer;
25 + import net.oni2.aeinstaller.backend.oni.OniSplit;
26   import net.oni2.aeinstaller.gui.MainWin;
27  
28   import org.javabuilders.swing.SwingJavaBuilder;
# Line 61 | Line 63 | public class AEInstaller2 {
63           *            Command line arguments
64           */
65          public static void main(String[] args) {
66 <                new File(Settings.getPrefsPath()).mkdirs();
67 <                new File(Settings.getDownloadPath()).mkdirs();
66 >                Paths.getPrefsPath().mkdirs();
67 >                Paths.getDownloadPath().mkdirs();
68  
69                  boolean debug = false;
70                  for (String a : args)
# Line 70 | Line 72 | public class AEInstaller2 {
72                                  debug = true;
73                  if (!debug) {
74                          try {
75 <                                System.setOut(new PrintStream(Settings.getPrefsPath()
76 <                                                + "aei_output.log"));
77 <                                System.setErr(new PrintStream(Settings.getPrefsPath()
78 <                                                + "aei_error.log"));
75 >                                System.setOut(new PrintStream(new File(Paths.getPrefsPath(),
76 >                                                "aei_output.log")));
77 >                                System.setErr(new PrintStream(new File(Paths.getPrefsPath(),
78 >                                                "aei_error.log")));
79                          } catch (FileNotFoundException e1) {
80                                  e1.printStackTrace();
81                          }
# Line 85 | Line 87 | public class AEInstaller2 {
87                  Settings.deserializeFromFile();
88                  Settings.setDebug(debug);
89                  DepotManager.getInstance().loadFromFile(
90 <                                new File(Settings.getDepotCacheFilename()));
90 >                                Settings.getDepotCacheFilename());
91  
92                  SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle);
93                  SwingJavaBuilder.getConfig().addResourceBundle(basicBundle);
# Line 95 | Line 97 | public class AEInstaller2 {
97  
98                  System.setProperty("networkaddress.cache.ttl", "5");
99                  System.setProperty("networkaddress.cache.negative.ttl", "1");
100 <                
100 >
101                  try {
102                          String laf = Settings.getInstance().get("lookandfeel",
103                                          (String) null);
# Line 119 | Line 121 | public class AEInstaller2 {
121                  JFrame.setDefaultLookAndFeelDecorated(true);
122  
123                  // TODO
124 <                System.out.println("JarPath:   " + Settings.getJarPath());
125 <                System.out.println("PrefsPath: " + Settings.getPrefsPath());
126 <                System.out.println("DataPath:  " + Settings.getDataPath());
127 <                System.out.println("DownPath:  " + Settings.getDownloadPath());
128 <                System.out.println("TempPath:  " + Settings.getTempPath());
124 >                System.out.println("JarPath:   " + Paths.getInstallerPath());
125 >                System.out.println("PrefsPath: " + Paths.getPrefsPath());
126 >                System.out.println("DataPath:  " + Paths.getModsPath());
127 >                System.out.println("DownPath:  " + Paths.getDownloadPath());
128 >                System.out.println("TempPath:  " + Paths.getTempPath());
129                  System.out.println("ValidPath: "
130                                  + StuffToRefactorLater.verifyRunningDirectory());
131                  System.out.println("Platform:  " + Settings.getPlatform());
132                  System.out.println("Architect: " + Settings.getArchitecture());
133                  System.out.println(".NET:      " + OniSplit.isDotNETInstalled());
134 +                System.out.println("Globalized:" + Installer.isEditionInitialized());
135  
136                  if (!StuffToRefactorLater.verifyRunningDirectory()) {
137                          JOptionPane.showMessageDialog(null,
# Line 138 | Line 141 | public class AEInstaller2 {
141                          if (!Settings.getDebug()) {
142                                  return;
143                          }
144 +                } else {
145 +                        Installer.initializeEdition();
146                  }
147  
148                  SwingUtilities.invokeLater(new Runnable() {

Diff Legend

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