Revision 7006

View differences:

trunk/install/launcher/izpack-launcher-1.3/src/launcher.cpp
23 23
#include <wx/file.h>
24 24
#include <wx/filename.h>
25 25
#include <wx/url.h>
26
#include <wx/process.h>
26 27

  
27 28
#include "launcher.h"
28 29

  
......
696 697
  }
697 698
}
698 699

  
700
bool LauncherApp::checkVersion(const wxString javaexe)
701
{
702
     wxString cmd;
703
     wxArrayString out;
704
     wxArrayString err;
705
     
706
     cmd = cmd.Format("%s -version", javaexe.c_str());
707
     if( wxExecute(cmd,out,err)!= 0 ) {
708
         notifyToUser("wxExecute ha petao.");      
709
         exit(1);
710
     }
711
     
712
     if (err[0].Contains("1.4.2") && err[0].Contains("version")) {
713
        return true; 
714
     }
715
     notifyToUser(cmd.Format(_("%s\nJava 1.4.2 recommended"), err[0].c_str()));
716
     return false;
717

  
718

  
719
}
720

  
699 721
void LauncherApp::run(){
700 722
  bool doChecks = true;
701 723
  
......
737 759
    //caragamos la variable con el eljecutable
738 760
    javaExecPath = dlg.GetPath();
739 761
    
762
    checkVersion(javaExecPath);
763
    
740 764
    //generamos el path para el JavaHome (por si acaso)
741 765
    wxFileName fileName(javaExecPath);
742 766
    fileName.SetFullName("");
trunk/install/launcher/izpack-launcher-1.3/src/launcher.h
103 103
  bool compareVersions(const wxString localVersion, const wxString requireVersion);
104 104

  
105 105
  void jaiInstall();
106

  
107
  bool checkVersion(const wxString msg);
106 108
  
107 109
  void jaiIoInstall();
108 110

  

Also available in: Unified diff