- Timestamp:
- May 3, 2013, 2:25:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
r849 r852 21 21 import javax.swing.UIManager.LookAndFeelInfo; 22 22 23 import net.oni2.ProxySettings; 23 24 import net.oni2.SettingsManager; 24 25 import net.oni2.aeinstaller.backend.CaseInsensitiveFile; 25 26 import net.oni2.aeinstaller.backend.Paths; 27 import net.oni2.aeinstaller.backend.RuntimeOptions; 26 28 import net.oni2.aeinstaller.backend.SizeFormatter; 27 29 import net.oni2.aeinstaller.backend.oni.OniSplit; … … 47 49 public class AEInstaller2 { 48 50 49 private static ResourceBundle imagesBundle; 50 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"); 51 55 private static ResourceBundle globalBundle; 52 56 … … 82 86 } 83 87 } 84 imagesBundle = ResourceBundle.getBundle("net.oni2.aeinstaller.Images");85 basicBundle = ResourceBundle86 .getBundle("net.oni2.aeinstaller.AEInstaller");87 88 globalBundle = UTF8ResourceBundleLoader 88 89 .getBundle("net.oni2.aeinstaller.localization.Global"); … … 116 117 Paths.getDownloadPath().mkdirs(); 117 118 118 boolean debug = false;119 boolean useWd = false;120 boolean noCacheUpdate = false;121 boolean offline = false;122 119 for (String a : args) { 123 120 if (a.equalsIgnoreCase("-debug")) 124 debug = true;121 RuntimeOptions.setDebug(true); 125 122 if (a.equalsIgnoreCase("-nocacheupdate")) 126 noCacheUpdate = true;123 RuntimeOptions.setNoCacheUpdateMode(true); 127 124 if (a.equalsIgnoreCase("-offline")) 128 offline = true;125 RuntimeOptions.setOfflineMode(true); 129 126 if (a.equalsIgnoreCase("-usewd")) 130 useWd = true;131 } 132 if (! debug) {127 RuntimeOptions.setUseWorkingDir(true); 128 } 129 if (!RuntimeOptions.isDebug()) { 133 130 try { 134 131 PrintStream ps = new PrintStream(new File(Paths.getPrefsPath(), … … 141 138 } 142 139 143 SettingsManager.setDebug(debug);144 SettingsManager.deserializeFromFile(Paths.getSettingsFilename());145 SettingsManager.setDebug(debug);146 SettingsManager.setUseWorkingDir(useWd);147 SettingsManager.getInstance().setNoCacheUpdateMode(noCacheUpdate);148 149 initBundles();150 151 140 if (PlatformInformation.getPlatform() == Platform.MACOS) 152 141 initMacOS(); 142 143 SettingsManager.deserializeFromFile(Paths.getSettingsFilename()); 144 145 if (Paths.getProxySettingsFilename().exists()) { 146 ProxySettings.deserializeFromFile(Paths.getProxySettingsFilename()); 147 } 148 149 initBundles(); 153 150 154 151 SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle); … … 242 239 globalBundle.getString("invalidPath.title"), 243 240 JOptionPane.ERROR_MESSAGE); 244 if (! SettingsManager.isDebug()) {241 if (!RuntimeOptions.isDebug()) { 245 242 return; 246 243 } 247 244 } 248 245 249 if (!offline) { 250 offline = !DepotManager.getInstance().checkConnection(); 251 } 252 if (offline) { 246 if (!RuntimeOptions.isOfflineMode()) { 247 RuntimeOptions.setOfflineMode(!DepotManager.getInstance() 248 .checkConnection()); 249 } 250 if (RuntimeOptions.isOfflineMode()) { 253 251 JOptionPane.showMessageDialog(null, 254 252 globalBundle.getString("offlineModeStartup.text"), … … 256 254 JOptionPane.INFORMATION_MESSAGE); 257 255 } 258 SettingsManager.getInstance().setOfflineMode(offline); 259 260 if (!offline) { 256 257 if (!RuntimeOptions.isOfflineMode()) { 261 258 SVN svn = new SVN(); 262 259 try {
Note:
See TracChangeset
for help on using the changeset viewer.