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

Comparing java/installer2/src/net/oni2/aeinstaller/AEInstaller2.java (file contents):
Revision 849 by alloc, Thu May 2 11:15:35 2013 UTC vs.
Revision 852 by alloc, Fri May 3 12:25:21 2013 UTC

# Line 20 | Line 20 | import javax.swing.SwingUtilities;
20   import javax.swing.UIManager;
21   import javax.swing.UIManager.LookAndFeelInfo;
22  
23 + import net.oni2.ProxySettings;
24   import net.oni2.SettingsManager;
25   import net.oni2.aeinstaller.backend.CaseInsensitiveFile;
26   import net.oni2.aeinstaller.backend.Paths;
27 + import net.oni2.aeinstaller.backend.RuntimeOptions;
28   import net.oni2.aeinstaller.backend.SizeFormatter;
29   import net.oni2.aeinstaller.backend.oni.OniSplit;
30   import net.oni2.aeinstaller.backend.oni.management.Installer;
# Line 46 | Line 48 | import org.simplericity.macify.eawt.Defa
48   */
49   public class AEInstaller2 {
50  
51 <        private static ResourceBundle imagesBundle;
52 <        private static ResourceBundle basicBundle;
51 >        private static ResourceBundle imagesBundle = ResourceBundle
52 >                        .getBundle("net.oni2.aeinstaller.Images");
53 >        private static ResourceBundle basicBundle = ResourceBundle
54 >                        .getBundle("net.oni2.aeinstaller.AEInstaller");
55          private static ResourceBundle globalBundle;
56  
57          private static Application app = null;
# Line 81 | Line 85 | public class AEInstaller2 {
85                                  addClassPath(localesSubDir);
86                          }
87                  }
84                imagesBundle = ResourceBundle.getBundle("net.oni2.aeinstaller.Images");
85                basicBundle = ResourceBundle
86                                .getBundle("net.oni2.aeinstaller.AEInstaller");
88                  globalBundle = UTF8ResourceBundleLoader
89                                  .getBundle("net.oni2.aeinstaller.localization.Global");
90          }
# Line 115 | Line 116 | public class AEInstaller2 {
116                  Paths.getPrefsPath().mkdirs();
117                  Paths.getDownloadPath().mkdirs();
118  
118                boolean debug = false;
119                boolean useWd = false;
120                boolean noCacheUpdate = false;
121                boolean offline = false;
119                  for (String a : args) {
120                          if (a.equalsIgnoreCase("-debug"))
121 <                                debug = true;
121 >                                RuntimeOptions.setDebug(true);
122                          if (a.equalsIgnoreCase("-nocacheupdate"))
123 <                                noCacheUpdate = true;
123 >                                RuntimeOptions.setNoCacheUpdateMode(true);
124                          if (a.equalsIgnoreCase("-offline"))
125 <                                offline = true;
125 >                                RuntimeOptions.setOfflineMode(true);
126                          if (a.equalsIgnoreCase("-usewd"))
127 <                                useWd = true;
127 >                                RuntimeOptions.setUseWorkingDir(true);
128                  }
129 <                if (!debug) {
129 >                if (!RuntimeOptions.isDebug()) {
130                          try {
131                                  PrintStream ps = new PrintStream(new File(Paths.getPrefsPath(),
132                                                  "aei_output.log"));
# Line 140 | Line 137 | public class AEInstaller2 {
137                          }
138                  }
139  
140 <                SettingsManager.setDebug(debug);
140 >                if (PlatformInformation.getPlatform() == Platform.MACOS)
141 >                        initMacOS();
142 >
143                  SettingsManager.deserializeFromFile(Paths.getSettingsFilename());
144 <                SettingsManager.setDebug(debug);
145 <                SettingsManager.setUseWorkingDir(useWd);
146 <                SettingsManager.getInstance().setNoCacheUpdateMode(noCacheUpdate);
144 >                
145 >                if (Paths.getProxySettingsFilename().exists()) {
146 >                        ProxySettings.deserializeFromFile(Paths.getProxySettingsFilename());
147 >                }
148  
149                  initBundles();
150  
151                if (PlatformInformation.getPlatform() == Platform.MACOS)
152                        initMacOS();
153
151                  SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle);
152                  SwingJavaBuilder.getConfig().addResourceBundle(basicBundle);
153                  SwingJavaBuilder.getConfig().addResourceBundle(globalBundle);
# Line 241 | Line 238 | public class AEInstaller2 {
238                                          globalBundle.getString("invalidPath.text"),
239                                          globalBundle.getString("invalidPath.title"),
240                                          JOptionPane.ERROR_MESSAGE);
241 <                        if (!SettingsManager.isDebug()) {
241 >                        if (!RuntimeOptions.isDebug()) {
242                                  return;
243                          }
244                  }
245  
246 <                if (!offline) {
247 <                        offline = !DepotManager.getInstance().checkConnection();
246 >                if (!RuntimeOptions.isOfflineMode()) {
247 >                        RuntimeOptions.setOfflineMode(!DepotManager.getInstance()
248 >                                        .checkConnection());
249                  }
250 <                if (offline) {
250 >                if (RuntimeOptions.isOfflineMode()) {
251                          JOptionPane.showMessageDialog(null,
252                                          globalBundle.getString("offlineModeStartup.text"),
253                                          globalBundle.getString("offlineModeStartup.title"),
254                                          JOptionPane.INFORMATION_MESSAGE);
255                  }
258                SettingsManager.getInstance().setOfflineMode(offline);
256  
257 <                if (!offline) {
257 >                if (!RuntimeOptions.isOfflineMode()) {
258                          SVN svn = new SVN();
259                          try {
260                                  int x = svn.checkSVN("http://svn.aei.oni2.net",

Diff Legend

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