Revision 7269
trunk/install/launcher/izpack-launcher-1.3/dist/launcher.ini | ||
---|---|---|
1 |
|
|
2 |
## Ruta al achivo Jar a lanzar |
|
3 |
jar = %JARNAME% |
|
4 |
|
|
5 |
|
|
6 |
## Parametros a incluir al lanzar el Jar |
|
7 |
jarParams = |
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
## Lanzar el Jar en ansincrono o no: |
|
12 |
## * si(se lanza el javaw.exe y finaliza el lanzador):S SI YES Y 1 |
|
13 |
## * si(el lanzado se espera a que termine la ejecucion del javaw.exe):{distinto de los anterirores} |
|
14 |
launchJarAsync = 0 |
|
15 |
|
|
16 |
|
|
17 |
## Habilita la pregunta al usuario de si hay que hacer las comprobaciones de JRE etc... |
|
18 |
## - por defecto se hace la pregunta |
|
19 |
## - Si la respuesta del usario es 'no' se solicita la usuario que indique el ejectuable de la JRE |
|
20 |
## * si(se pregunta al usario):S SI YES Y 1 |
|
21 |
## * no(no se pregunta y se realizan las comprobaciones):{distinto de los anterirores} |
|
22 |
askForCheckingProcess = SI |
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
## Version de JRE requerida |
|
27 |
jre_version = 1.4.2 |
|
28 |
jre_version_prefered = 1.4.2_06 |
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
## Descarga remota |
|
33 |
## * los valores valido de downloadEnabled son: |
|
34 |
## - habilitado: S SI YES Y 1 |
|
35 |
## - deshabilitado: {distinto de los anteriores} |
|
36 |
downloadEnabled = 1 |
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
## Path del instalable del jre (si no existe y estan |
|
41 |
## habilitadas las descargas, lo dejara aqui) |
|
42 |
jre = j2re-1_4_2_06-windows-i586-p.exe |
|
43 |
downloadJre = http://www.gvsig.gva.es/fileadmin/conselleria/images/Documentacion/descargas/software/windows/j2re-1_4_2_06-windows-i586-p.exe |
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
## Path del instalable del jai (si no existe y estan |
|
48 |
## habilitadas las descargas, lo dejara aqui) |
|
49 |
jai = jai-1_1_2_01-lib-windows-i586-jre.exe |
|
50 |
downloadJai = http://www.gvsig.org/jai-1_1_2_01-lib-windows-i586-jre.exe |
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
## Path del instalable del jai io (si no existe y estan |
|
55 |
## habilitadas las descargas, lo dejara aqui) |
|
56 |
jai_io = jai_imageio-1_0_01-lib-windows-i586-jre.exe |
|
57 |
downloadJai_io = http://www.gvsig.gva.es/fileadmin/conselleria/images/Documentacion/descargas/software/windows/jai_imageio-1_0_01-lib-windows-i586-jre.exe |
trunk/install/launcher/izpack-launcher-1.3/dist/launcher-Win32.ini | ||
---|---|---|
1 |
|
|
2 |
## Ruta al achivo Jar a lanzar |
|
3 |
jar = %JARNAME% |
|
4 |
|
|
5 |
|
|
6 |
## Parametros a incluir al lanzar el Jar |
|
7 |
jarParams = |
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
## Lanzar el Jar en ansincrono o no: |
|
12 |
## * si(se lanza el javaw.exe y finaliza el lanzador):S SI YES Y 1 |
|
13 |
## * si(el lanzado se espera a que termine la ejecucion del javaw.exe):{distinto de los anterirores} |
|
14 |
launchJarAsync = 0 |
|
15 |
|
|
16 |
## Realizar la comprobaciones o no: |
|
17 |
## * si(por defecto):S SI YES Y 1 |
|
18 |
## * no(debera estar especificado el parametro'jre_home'):{distinto de los anterirores} |
|
19 |
doChecks = YES |
|
20 |
|
|
21 |
## Ruta el Java_home a usar en caso de 'doChecks-->No' |
|
22 |
jre_home = |
|
23 |
;ejemplo: jre_home = C:/Archivos de programa/Java/j2re1.4.2_11 |
|
24 |
|
|
25 |
|
|
26 |
## Habilita la pregunta al usuario de si hay que hacer las comprobaciones de JRE etc... |
|
27 |
## - por defecto se hace la pregunta |
|
28 |
## - Si la respuesta del usario es 'no' se solicita la usuario que indique el ejectuable de la JRE |
|
29 |
## * si(se pregunta al usario):S SI YES Y 1 |
|
30 |
## * no(no se pregunta y se realizan las comprobaciones):{distinto de los anterirores} |
|
31 |
askForCheckingProcess = SI |
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
## Version de JRE requerida |
|
36 |
jre_version = 1.4.2 |
|
37 |
jre_version_prefered = 1.4.2_06 |
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
## Descarga remota |
|
42 |
## * los valores valido de downloadEnabled son: |
|
43 |
## - habilitado: S SI YES Y 1 |
|
44 |
## - deshabilitado: {distinto de los anteriores} |
|
45 |
downloadEnabled = 1 |
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
## Path del instalable del jre (si no existe y estan |
|
50 |
## habilitadas las descargas, lo dejara aqui) |
|
51 |
jre = j2re-1_4_2_06-windows-i586-p.exe |
|
52 |
downloadJre = http://www.gvsig.gva.es/fileadmin/conselleria/images/Documentacion/descargas/software/windows/j2re-1_4_2_06-windows-i586-p.exe |
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
## Path del instalable del jai (si no existe y estan |
|
57 |
## habilitadas las descargas, lo dejara aqui) |
|
58 |
jai = jai-1_1_2_01-lib-windows-i586-jre.exe |
|
59 |
downloadJai = http://www.gvsig.org/jai-1_1_2_01-lib-windows-i586-jre.exe |
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
## Path del instalable del jai io (si no existe y estan |
|
64 |
## habilitadas las descargas, lo dejara aqui) |
|
65 |
jai_io = jai_imageio-1_0_01-lib-windows-i586-jre.exe |
|
66 |
downloadJai_io = http://www.gvsig.gva.es/fileadmin/conselleria/images/Documentacion/descargas/software/windows/jai_imageio-1_0_01-lib-windows-i586-jre.exe |
|
0 | 67 |
trunk/install/launcher/izpack-launcher-1.3/src/launcher.ini | ||
---|---|---|
14 | 14 |
## * no(el lanzado se espera a que termine la ejecucion del javaw.exe):{distinto de los anterirores} |
15 | 15 |
launchJarAsync = NO |
16 | 16 |
|
17 |
## Realizar la comprobaciones o no: |
|
18 |
## * si(por defecto):S SI YES Y 1 |
|
19 |
## * no:{distinto de los anterirores} |
|
20 |
doChecks = YES |
|
17 | 21 |
|
18 | 22 |
|
19 | 23 |
## Habilita la pregunta al usuario de si hay que hacer las comprobaciones de JRE etc... |
trunk/install/launcher/izpack-launcher-1.3/src/launcher.cpp | ||
---|---|---|
89 | 89 |
completed = false; |
90 | 90 |
|
91 | 91 |
SetAppName(_( APPLICATION_NAME )); |
92 |
loadParams(); |
|
92 |
//loadParams();
|
|
93 | 93 |
} |
94 | 94 |
|
95 | 95 |
void LauncherApp::echo(const wxString &msg) |
... | ... | |
112 | 112 |
|
113 | 113 |
void LauncherApp::loadParams() |
114 | 114 |
{ |
115 |
cfgName = wxString( "launcher.ini" ); |
|
115 |
//cfgName = wxString( "launcher.ini" ); |
|
116 |
cfgName =wxString(argv[0]); |
|
117 |
wxFileName execFileName(cfgName); |
|
118 |
execFileName.SetExt("ini"); |
|
119 |
cfgName = execFileName.GetFullPath(); |
|
120 |
if (!wxFileExists(cfgName)) { |
|
121 |
error(cfgName.Format(_("The configuration file '%s' does not exists."),cfgName.c_str())); |
|
122 |
} |
|
116 | 123 |
|
117 | 124 |
wxFileInputStream in( cfgName ); |
118 | 125 |
wxFileConfig cfg( in ); |
119 | 126 |
wxString downloadEnabled; |
120 | 127 |
wxString launchJarAsync; |
121 | 128 |
wxString askForCheckingProcess; |
129 |
wxString doChecks; |
|
122 | 130 |
|
123 | 131 |
cfg.Read( "jar", ¶msJar, wxEmptyString); |
124 | 132 |
cfg.Read( "jre", ¶msJre, wxEmptyString); |
... | ... | |
133 | 141 |
cfg.Read( "downloadEnabled", &downloadEnabled, wxEmptyString); |
134 | 142 |
cfg.Read( "launchJarAsync", &launchJarAsync, wxEmptyString); |
135 | 143 |
cfg.Read( "askForCheckingProcess", &askForCheckingProcess, wxEmptyString); |
144 |
cfg.Read( "doChecks", &doChecks, wxEmptyString); |
|
145 |
cfg.Read( "jre_home", ¶msJreHome, wxEmptyString); |
|
136 | 146 |
|
137 | 147 |
//procesamos el parametro booleano 'downloadEnabled' |
138 | 148 |
paramsEnabledDownload =string_to_bool(downloadEnabled,false); |
... | ... | |
140 | 150 |
paramsLaunchJarAsync =string_to_bool(launchJarAsync,false); |
141 | 151 |
//procesamos el parametro booleano 'askForCheckingProcess' |
142 | 152 |
paramsAskForCheckingProcess=string_to_bool(askForCheckingProcess,true); |
153 |
//procesamos el parametro booleano 'askForCheckingProcess' |
|
154 |
paramsDoChecks=string_to_bool(doChecks,true); |
|
143 | 155 |
|
144 | 156 |
if (paramsJar == wxEmptyString ) |
145 | 157 |
{ |
146 |
error(_("The configuration file '") + cfgName + _("' does not contain a jar file entry."));
|
|
158 |
error(cfgName.Format(_("The configuration file '%s' does not contain a jar file entry."),cfgName.c_str()));
|
|
147 | 159 |
} |
148 | 160 |
if (paramsJreVersionPrefered == wxEmptyString ) { |
149 | 161 |
paramsJreVersionPrefered = wxString(paramsJreVersion); |
150 | 162 |
} |
163 |
if ((!paramsDoChecks) && paramsJreHome == wxEmptyString) { |
|
164 |
error(cfgName.Format(_("The file entry 'jre_home' can not be empty when 'doChecks = No'."),cfgName.c_str())); |
|
165 |
} |
|
151 | 166 |
} |
152 | 167 |
|
153 | 168 |
void LauncherApp::error(const wxString &msg) |
... | ... | |
193 | 208 |
isStatusDialogVisible = false; |
194 | 209 |
locale.Init(); |
195 | 210 |
locale.AddCatalog("launcher"); |
211 |
loadParams(); |
|
212 |
|
|
213 |
if (paramsDoChecks) { |
|
196 | 214 |
|
197 |
statusDialog = new StatusDialog( APPLICATION_NAME ); |
|
215 |
statusDialog = new StatusDialog( APPLICATION_NAME ); |
|
216 |
|
|
217 |
statusDialog->Centre(); |
|
218 |
statusDialog->Show(TRUE); |
|
219 |
isStatusDialogVisible = true; |
|
220 |
} |
|
198 | 221 |
|
199 |
statusDialog->Centre(); |
|
200 |
statusDialog->Show(TRUE); |
|
201 |
isStatusDialogVisible = true; |
|
202 |
|
|
203 | 222 |
showStatusMsg(_("Intializing...")); |
204 | 223 |
|
205 | 224 |
myTimer = new wxTimer(this,LAUNCHAPP_TIMER_ID); |
... | ... | |
359 | 378 |
if (!vKey.QueryValue("JavaHome", javaHome)){ |
360 | 379 |
return false; |
361 | 380 |
} |
362 |
int osVerMayor; |
|
363 |
int osVerMinor; |
|
364 |
|
|
365 |
wxGetOsVersion(&osVerMayor,&osVerMinor); |
|
366 |
if (osVerMayor < 5) { |
|
367 |
javaExecPath = javaHome + "\\bin\\java"; |
|
368 |
}else{ |
|
369 |
javaExecPath = javaHome + "\\bin\\javaw"; |
|
370 |
} |
|
381 |
|
|
382 |
|
|
383 |
calculateJavaExePath(javaHome); |
|
371 | 384 |
/* |
372 | 385 |
echo("paramsJreVersion=" + paramsJreVersion); |
373 | 386 |
echo("paramsJreVersionPrefered=" + paramsJreVersionPrefered); |
... | ... | |
387 | 400 |
} |
388 | 401 |
|
389 | 402 |
wxString cmd = javaExecPath + paramsJarParams + wxString(" -jar ") + paramsJar; |
403 |
//echo(cmd); |
|
390 | 404 |
if (paramsLaunchJarAsync) { |
391 | 405 |
if (!run_external_async(cmd)) |
392 | 406 |
{ |
... | ... | |
724 | 738 |
} |
725 | 739 |
|
726 | 740 |
void LauncherApp::run(){ |
727 |
bool doChecks = true;
|
|
741 |
bool doChecks =true; |
|
728 | 742 |
|
729 |
if (paramsAskForCheckingProcess) { |
|
730 |
wxString msg = _("Do you want to check the application requirements? \nThis will install missing components."); |
|
731 |
doChecks = confirmYesNoCancel(msg,true); |
|
732 |
} |
|
733 |
|
|
734 |
|
|
735 |
if (doChecks) { |
|
736 |
|
|
737 |
if (!searchJRE()) |
|
738 |
{ |
|
739 |
jreInstall(); |
|
743 |
if (paramsDoChecks) { |
|
744 |
if (doChecks && paramsAskForCheckingProcess) { |
|
745 |
wxString msg = _("Do you want to check the application requirements? \nThis will install missing components."); |
|
746 |
doChecks = confirmYesNoCancel(msg,true); |
|
740 | 747 |
} |
748 |
|
|
741 | 749 |
|
742 |
fixSystemJREConfig();
|
|
750 |
if (doChecks) {
|
|
743 | 751 |
|
744 |
jaiInstall(); |
|
745 |
|
|
746 |
jaiIoInstall(); |
|
752 |
if (!searchJRE()) |
|
753 |
{ |
|
754 |
jreInstall(); |
|
755 |
} |
|
756 |
|
|
757 |
fixSystemJREConfig(); |
|
758 |
|
|
759 |
jaiInstall(); |
|
760 |
|
|
761 |
jaiIoInstall(); |
|
762 |
} else { |
|
763 |
// No quiere comprobacion, por lo que solicitamos |
|
764 |
wxString msgDir = _("Please, select the Java VM."); |
|
765 |
wxFileDialog dlg( |
|
766 |
0, |
|
767 |
msgDir, |
|
768 |
wxEmptyString, |
|
769 |
wxString("java.exe"), |
|
770 |
wxString("Java VM executable file (java.exe)|java.exe"), |
|
771 |
wxOPEN | wxFILE_MUST_EXIST, |
|
772 |
wxDefaultPosition |
|
773 |
); |
|
774 |
int response = dlg.ShowModal(); |
|
775 |
if (response != wxID_OK) { |
|
776 |
notifyToUser(_("Canceled by user")); |
|
777 |
exit(1); |
|
778 |
} |
|
779 |
//caragamos la variable con el eljecutable |
|
780 |
javaExecPath = dlg.GetPath(); |
|
781 |
|
|
782 |
checkVersion(javaExecPath); |
|
783 |
|
|
784 |
//generamos el path para el JavaHome (por si acaso) |
|
785 |
wxFileName fileName(javaExecPath); |
|
786 |
fileName.SetFullName(""); |
|
787 |
fileName.AppendDir(".."); |
|
788 |
fileName.Normalize(); |
|
789 |
javaHome = fileName.GetPath(); |
|
790 |
} |
|
747 | 791 |
} else { |
748 |
// No quiere comprobacion, por lo que solicitamos |
|
749 |
wxString msgDir = _("Please, select the Java VM."); |
|
750 |
wxFileDialog dlg( |
|
751 |
0, |
|
752 |
msgDir, |
|
753 |
wxEmptyString, |
|
754 |
wxString("java.exe"), |
|
755 |
wxString("Java VM executable file (java.exe)|java.exe"), |
|
756 |
wxOPEN | wxFILE_MUST_EXIST, |
|
757 |
wxDefaultPosition |
|
758 |
); |
|
759 |
int response = dlg.ShowModal(); |
|
760 |
if (response != wxID_OK) { |
|
761 |
notifyToUser(_("Canceled by user")); |
|
762 |
exit(1); |
|
763 |
} |
|
764 |
//caragamos la variable con el eljecutable |
|
765 |
javaExecPath = dlg.GetPath(); |
|
766 |
|
|
767 |
checkVersion(javaExecPath); |
|
768 |
|
|
769 |
//generamos el path para el JavaHome (por si acaso) |
|
770 |
wxFileName fileName(javaExecPath); |
|
771 |
fileName.SetFullName(""); |
|
772 |
fileName.AppendDir(".."); |
|
773 |
fileName.Normalize(); |
|
774 |
javaHome = fileName.GetPath(); |
|
775 |
|
|
792 |
javaHome = paramsJreHome; |
|
793 |
calculateJavaExePath(javaHome); |
|
776 | 794 |
} |
777 | 795 |
|
778 | 796 |
runJRE(); |
... | ... | |
784 | 802 |
void LauncherApp::OnTimer(wxTimerEvent& event) { |
785 | 803 |
run(); |
786 | 804 |
} |
805 |
|
|
806 |
void LauncherApp::calculateJavaExePath(const wxString aJavaHome){ |
|
807 |
int osVerMayor; |
|
808 |
int osVerMinor; |
|
809 |
|
|
810 |
wxGetOsVersion(&osVerMayor,&osVerMinor); |
|
811 |
if (osVerMayor < 5) { |
|
812 |
javaExecPath = aJavaHome + "\\bin\\java"; |
|
813 |
}else{ |
|
814 |
javaExecPath = aJavaHome + "\\bin\\javaw"; |
|
815 |
} |
|
816 |
|
|
817 |
} |
trunk/install/launcher/izpack-launcher-1.3/src/launcher.h | ||
---|---|---|
61 | 61 |
wxString paramsJaiIo; |
62 | 62 |
wxString paramsJaiIoDownload; |
63 | 63 |
bool paramsEnabledDownload; |
64 |
bool paramsDoChecks; |
|
65 |
wxString paramsJreHome; |
|
64 | 66 |
StatusDialog* statusDialog; |
65 | 67 |
bool isStatusDialogVisible; |
66 | 68 |
wxTimer* myTimer; |
... | ... | |
122 | 124 |
|
123 | 125 |
void run(); |
124 | 126 |
|
127 |
void calculateJavaExePath(const wxString aJavaHome); |
|
128 |
|
|
125 | 129 |
public: |
126 | 130 |
|
127 | 131 |
LauncherApp(); |
trunk/install/launcher/izpack-launcher-1.3/src/Makefile.mingw | ||
---|---|---|
14 | 14 |
copy $(TARGET).exe ..\dist\launcher-Win32.exe |
15 | 15 |
strip ../dist/launcher-Win32.exe |
16 | 16 |
copy launcher.exe.manifest ..\dist\launcher-Win32.exe.manifest |
17 |
if not exist ..\dist\launcher.ini copy launcher.ini ..\dist
|
|
17 |
if not exist ..\dist\launcher-Win32.ini copy launcher.ini ..\dist\launcher-Win32.ini
|
|
18 | 18 |
|
19 | 19 |
install_lang: |
20 | 20 |
if not exist ..\dist\fr mkdir ..\dist\fr |
Also available in: Unified diff