Changeset 649 for AE/installer2/src/net
- Timestamp:
- Jan 25, 2013, 1:25:29 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
r648 r649 70 70 71 71 boolean debug = false; 72 for (String a : args) 72 boolean noCacheUpdate = false; 73 for (String a : args) { 73 74 if (a.equalsIgnoreCase("-debug")) 74 75 debug = true; 76 if (a.equalsIgnoreCase("-nocacheupdate")) 77 noCacheUpdate = true; 78 } 75 79 if (!debug) { 76 80 try { … … 90 94 Settings.deserializeFromFile(); 91 95 Settings.setDebug(debug); 96 Settings.getInstance().setNoCacheUpdateMode(noCacheUpdate); 92 97 93 98 SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle); … … 185 190 } 186 191 187 boolean forcedOffline = false;192 boolean offline = false; 188 193 for (String a : args) 189 194 if (a.equalsIgnoreCase("-offline")) 190 forcedOffline = true;191 192 booleanoffline = !DepotManager.getInstance().checkConnection();193 194 if ( forcedOffline ||offline) {195 offline = true; 196 if (!offline) { 197 offline = !DepotManager.getInstance().checkConnection(); 198 } 199 if (offline) { 195 200 JOptionPane.showMessageDialog(null, 196 201 globalBundle.getString("offlineModeStartup.text"), … … 198 203 JOptionPane.INFORMATION_MESSAGE); 199 204 } 200 Settings.getInstance().setOfflineMode( forcedOffline ||offline);205 Settings.getInstance().setOfflineMode(offline); 201 206 202 207 SwingUtilities.invokeLater(new Runnable() { -
AE/installer2/src/net/oni2/aeinstaller/backend/Settings.java
r625 r649 67 67 68 68 private boolean offlineMode = false; 69 private boolean noCacheUpdate = false; 69 70 70 71 /** … … 178 179 179 180 /** 181 * @return Is in noCacheUpdate mode? 182 */ 183 public boolean isNoCacheUpdateMode() { 184 return noCacheUpdate; 185 } 186 187 /** 188 * @param noCacheUpdate 189 * Is in noCacheUpdate mode? 190 */ 191 public void setNoCacheUpdateMode(boolean noCacheUpdate) { 192 this.noCacheUpdate = noCacheUpdate; 193 } 194 195 /** 180 196 * @return Mod Depot cache filename 181 197 */ -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r648 r649 174 174 @DoInBackground(progressMessage = "updateDepot.title", cancelable = false, indeterminateProgress = false) 175 175 private void execDepotUpdate(final BackgroundEvent evt) { 176 if (!Settings.getInstance().isOfflineMode() ) {176 if (!Settings.getInstance().isOfflineMode() && !Settings.getInstance().isNoCacheUpdateMode()) { 177 177 long start = new Date().getTime(); 178 178
Note:
See TracChangeset
for help on using the changeset viewer.