| 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(), |
| 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); |
| 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() { |