ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
(Generate patch)

Comparing java/installer2/src/net/oni2/aeinstaller/AEInstaller2.java (file contents):
Revision 722 by alloc, Thu Mar 21 11:41:22 2013 UTC vs.
Revision 730 by alloc, Thu Mar 21 17:25:39 2013 UTC

# Line 31 | Line 31 | import net.oni2.aeinstaller.gui.HTMLLink
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;
# Line 63 | Line 66 | public class AEInstaller2 {
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");
# Line 120 | Line 124 | public class AEInstaller2 {
124                                  e1.printStackTrace();
125                          }
126                  }
127 <                
127 >
128                  initBundles();
129  
130                  if (PlatformInformation.getPlatform() == Platform.MACOS)
# Line 172 | Line 176 | public class AEInstaller2 {
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());
# Line 240 | Line 245 | public class AEInstaller2 {
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 {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)