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 648 by alloc, Fri Jan 25 12:15:31 2013 UTC vs.
Revision 649 by alloc, Fri Jan 25 12:25:29 2013 UTC

# Line 69 | Line 69 | public class AEInstaller2 {
69                  Paths.getDownloadPath().mkdirs();
70  
71                  boolean debug = false;
72 <                for (String a : args)
72 >                boolean noCacheUpdate = false;
73 >                for (String a : args) {
74                          if (a.equalsIgnoreCase("-debug"))
75                                  debug = true;
76 +                        if (a.equalsIgnoreCase("-nocacheupdate"))
77 +                                noCacheUpdate = true;
78 +                }
79                  if (!debug) {
80                          try {
81                                  PrintStream ps = new PrintStream(new File(Paths.getPrefsPath(),
# Line 89 | Line 93 | public class AEInstaller2 {
93                  Settings.setDebug(debug);
94                  Settings.deserializeFromFile();
95                  Settings.setDebug(debug);
96 +                Settings.getInstance().setNoCacheUpdateMode(noCacheUpdate);
97  
98                  SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle);
99                  SwingJavaBuilder.getConfig().addResourceBundle(basicBundle);
# Line 184 | Line 189 | public class AEInstaller2 {
189                          }
190                  }
191  
192 <                boolean forcedOffline = false;
192 >                boolean offline = false;
193                  for (String a : args)
194                          if (a.equalsIgnoreCase("-offline"))
195 <                                forcedOffline = true;
196 <
197 <                boolean offline = !DepotManager.getInstance().checkConnection();
198 <
199 <                if (forcedOffline || offline) {
195 >                                offline = true;
196 >                if (!offline) {
197 >                        offline = !DepotManager.getInstance().checkConnection();
198 >                }
199 >                if (offline) {
200                          JOptionPane.showMessageDialog(null,
201                                          globalBundle.getString("offlineModeStartup.text"),
202                                          globalBundle.getString("offlineModeStartup.title"),
203                                          JOptionPane.INFORMATION_MESSAGE);
204                  }
205 <                Settings.getInstance().setOfflineMode(forcedOffline || offline);
205 >                Settings.getInstance().setOfflineMode(offline);
206  
207                  SwingUtilities.invokeLater(new Runnable() {
208                          public void run() {

Diff Legend

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