| 20 |
|
import javax.swing.UIManager; |
| 21 |
|
import javax.swing.UIManager.LookAndFeelInfo; |
| 22 |
|
|
| 23 |
+ |
import net.oni2.SettingsManager; |
| 24 |
|
import net.oni2.aeinstaller.backend.CaseInsensitiveFile; |
| 24 |
– |
import net.oni2.aeinstaller.backend.DotNet; |
| 25 |
|
import net.oni2.aeinstaller.backend.Paths; |
| 26 |
|
import net.oni2.aeinstaller.backend.SizeFormatter; |
| 27 |
|
import net.oni2.aeinstaller.backend.depot.DepotManager; |
| 29 |
|
import net.oni2.aeinstaller.backend.oni.OniSplit; |
| 30 |
|
import net.oni2.aeinstaller.gui.HTMLLinkLabel; |
| 31 |
|
import net.oni2.aeinstaller.gui.MainWin; |
| 32 |
< |
import net.oni2.settingsmanager.Settings; |
| 33 |
< |
import net.oni2.settingsmanager.Settings.Platform; |
| 32 |
> |
import net.oni2.platformtools.PlatformInformation; |
| 33 |
> |
import net.oni2.platformtools.PlatformInformation.Platform; |
| 34 |
> |
import net.oni2.platformtools.applicationinvoker.DotNet; |
| 35 |
|
|
| 36 |
|
import org.javabuilders.swing.SwingJavaBuilder; |
| 37 |
|
import org.simplericity.macify.eawt.Application; |
| 123 |
|
|
| 124 |
|
initBundles(); |
| 125 |
|
|
| 126 |
< |
if (Settings.getPlatform() == Platform.MACOS) |
| 126 |
> |
if (PlatformInformation.getPlatform() == Platform.MACOS) |
| 127 |
|
initMacOS(); |
| 128 |
|
|
| 129 |
< |
Settings.setDebug(debug); |
| 130 |
< |
Settings.deserializeFromFile(Paths.getSettingsFilename()); |
| 131 |
< |
Settings.setDebug(debug); |
| 132 |
< |
Settings.getInstance().setNoCacheUpdateMode(noCacheUpdate); |
| 129 |
> |
SettingsManager.setDebug(debug); |
| 130 |
> |
SettingsManager.deserializeFromFile(Paths.getSettingsFilename()); |
| 131 |
> |
SettingsManager.setDebug(debug); |
| 132 |
> |
SettingsManager.getInstance().setNoCacheUpdateMode(noCacheUpdate); |
| 133 |
|
|
| 134 |
|
SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle); |
| 135 |
|
SwingJavaBuilder.getConfig().addResourceBundle(basicBundle); |
| 142 |
|
System.setProperty("networkaddress.cache.negative.ttl", "1"); |
| 143 |
|
|
| 144 |
|
try { |
| 145 |
< |
String laf = Settings.getInstance().get("lookandfeel", |
| 145 |
> |
String laf = SettingsManager.getInstance().get("lookandfeel", |
| 146 |
|
(String) null); |
| 147 |
|
if (laf == null) { |
| 148 |
< |
if (Settings.getPlatform() != Platform.LINUX) { |
| 148 |
> |
if (PlatformInformation.getPlatform() != Platform.LINUX) { |
| 149 |
|
laf = UIManager.getSystemLookAndFeelClassName(); |
| 150 |
|
} else { |
| 151 |
|
for (LookAndFeelInfo lafInfo : UIManager |
| 171 |
|
System.out.println("DownPath: " + Paths.getDownloadPath()); |
| 172 |
|
System.out.println("TempPath: " + Paths.getTempPath()); |
| 173 |
|
System.out.println("ValidPath: " + Installer.verifyRunningDirectory()); |
| 174 |
< |
System.out.println("Platform: " + Settings.getPlatform()); |
| 175 |
< |
System.out.println("Architect: " + Settings.getArchitecture()); |
| 174 |
> |
System.out.println("Platform: " + PlatformInformation.getPlatform()); |
| 175 |
> |
System.out.println("Architect: " + PlatformInformation.getArchitecture()); |
| 176 |
|
System.out.println(".NET: " + DotNet.isInstalled()); |
| 177 |
|
System.out.println("OniSplit: " + OniSplit.isOniSplitInstalled()); |
| 178 |
|
System.out.println("Globalized:" + Installer.isEditionInitialized()); |
| 190 |
|
if (!DotNet.isInstalled()) { |
| 191 |
|
HTMLLinkLabel hll = new HTMLLinkLabel(); |
| 192 |
|
String dlUrl = ""; |
| 193 |
< |
switch (Settings.getPlatform()) { |
| 193 |
> |
switch (PlatformInformation.getPlatform()) { |
| 194 |
|
case WIN: |
| 195 |
< |
switch (Settings.getArchitecture()) { |
| 195 |
> |
switch (PlatformInformation.getArchitecture()) { |
| 196 |
|
case X86: |
| 197 |
|
dlUrl = "http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe"; |
| 198 |
|
break; |
| 220 |
|
globalBundle.getString("invalidPath.text"), |
| 221 |
|
globalBundle.getString("invalidPath.title"), |
| 222 |
|
JOptionPane.ERROR_MESSAGE); |
| 223 |
< |
if (!Settings.isDebug()) { |
| 223 |
> |
if (!SettingsManager.isDebug()) { |
| 224 |
|
return; |
| 225 |
|
} |
| 226 |
|
} |
| 238 |
|
globalBundle.getString("offlineModeStartup.title"), |
| 239 |
|
JOptionPane.INFORMATION_MESSAGE); |
| 240 |
|
} |
| 241 |
< |
Settings.getInstance().setOfflineMode(offline); |
| 241 |
> |
SettingsManager.getInstance().setOfflineMode(offline); |
| 242 |
|
|
| 243 |
|
SwingUtilities.invokeLater(new Runnable() { |
| 244 |
|
public void run() { |