| 31 |
|
import net.oni2.aeinstaller.gui.MainWin; |
| 32 |
|
import net.oni2.platformtools.PlatformInformation; |
| 33 |
|
import net.oni2.platformtools.PlatformInformation.Platform; |
| 34 |
+ |
import net.oni2.platformtools.applicationinvoker.ApplicationInvoker; |
| 35 |
|
import net.oni2.platformtools.applicationinvoker.DotNet; |
| 36 |
+ |
import net.oni2.platformtools.applicationinvoker.EExeType; |
| 37 |
+ |
import net.oni2.svnaccess.SVN; |
| 38 |
|
|
| 39 |
|
import org.javabuilders.swing.SwingJavaBuilder; |
| 40 |
|
import org.simplericity.macify.eawt.Application; |
| 66 |
|
e.printStackTrace(); |
| 67 |
|
} |
| 68 |
|
} |
| 69 |
< |
|
| 69 |
> |
|
| 70 |
|
private static void initBundles() { |
| 71 |
< |
File localesDir = CaseInsensitiveFile.getCaseInsensitiveFile(Paths.getInstallerPath(), "locales"); |
| 71 |
> |
File localesDir = CaseInsensitiveFile.getCaseInsensitiveFile( |
| 72 |
> |
Paths.getInstallerPath(), "locales"); |
| 73 |
|
if (localesDir.isDirectory()) |
| 74 |
|
addClassPath(localesDir); |
| 75 |
|
imagesBundle = ResourceBundle.getBundle("net.oni2.aeinstaller.Images"); |
| 124 |
|
e1.printStackTrace(); |
| 125 |
|
} |
| 126 |
|
} |
| 127 |
< |
|
| 127 |
> |
|
| 128 |
|
initBundles(); |
| 129 |
|
|
| 130 |
|
if (PlatformInformation.getPlatform() == Platform.MACOS) |
| 176 |
|
System.out.println("TempPath: " + Paths.getTempPath()); |
| 177 |
|
System.out.println("ValidPath: " + Installer.verifyRunningDirectory()); |
| 178 |
|
System.out.println("Platform: " + PlatformInformation.getPlatform()); |
| 179 |
< |
System.out.println("Architect: " + PlatformInformation.getArchitecture()); |
| 179 |
> |
System.out.println("Architect: " |
| 180 |
> |
+ PlatformInformation.getArchitecture()); |
| 181 |
|
System.out.println(".NET: " + DotNet.isInstalled()); |
| 182 |
|
System.out.println("OniSplit: " + OniSplit.isOniSplitInstalled()); |
| 183 |
|
System.out.println("Globalized:" + Installer.isEditionInitialized()); |
| 245 |
|
} |
| 246 |
|
SettingsManager.getInstance().setOfflineMode(offline); |
| 247 |
|
|
| 248 |
+ |
if (!offline) { |
| 249 |
+ |
SVN svn = new SVN(); |
| 250 |
+ |
try { |
| 251 |
+ |
int x = svn.checkSVN("http://svn.aei.oni2.net", |
| 252 |
+ |
new File(Paths.getPrefsPath(), "bin")); |
| 253 |
+ |
if (x > 0) { |
| 254 |
+ |
// Update available |
| 255 |
+ |
int res = JOptionPane.showConfirmDialog(null, |
| 256 |
+ |
globalBundle.getString("aeiUpdateAvailable.text"), |
| 257 |
+ |
globalBundle.getString("aeiUpdateAvailable.title"), |
| 258 |
+ |
JOptionPane.YES_NO_OPTION, |
| 259 |
+ |
JOptionPane.INFORMATION_MESSAGE); |
| 260 |
+ |
if (res == JOptionPane.YES_OPTION) { |
| 261 |
+ |
File updater = new File(Paths.getInstallerPath(), |
| 262 |
+ |
"AEInstaller2Updater.jar"); |
| 263 |
+ |
ApplicationInvoker.execute(EExeType.JAR, null, updater, |
| 264 |
+ |
null); |
| 265 |
+ |
return; |
| 266 |
+ |
} |
| 267 |
+ |
} else if (x == 0) { |
| 268 |
+ |
// Up to date |
| 269 |
+ |
} else if (x < 0) { |
| 270 |
+ |
// No WC at given path |
| 271 |
+ |
} |
| 272 |
+ |
} catch (Exception e) { |
| 273 |
+ |
e.printStackTrace(); |
| 274 |
+ |
} |
| 275 |
+ |
} |
| 276 |
+ |
|
| 277 |
|
SwingUtilities.invokeLater(new Runnable() { |
| 278 |
|
public void run() { |
| 279 |
|
try { |