Revision 9892 trunk/install/launcher/izpack-launcher-1.3/src/launcher.cpp
launcher.cpp | ||
---|---|---|
194 | 194 |
variables = sectionKeysFromINI("Variables"); |
195 | 195 |
|
196 | 196 |
variablesValues = sectionKeysValuesFromINI("Variables",variables); |
197 |
|
|
198 |
|
|
199 |
wxArrayString environVariables = sectionKeysFromINI("EnvironVariables"); |
|
200 |
wxArrayString environVariablesValues = sectionKeysValuesFromINI("EnvironVariables",environVariables); |
|
201 |
//echo(paramsJreVersionPrefered.Format("count %i",environVariables.GetCount())); |
|
202 |
//Las cargamos como variables de entorno |
|
203 |
for (size_t i=0; i < environVariables.GetCount() ;i++) { |
|
204 |
wxSetEnv(environVariables[i], environVariablesValues[i]); |
|
205 |
} |
|
197 | 206 |
} |
198 | 207 |
|
199 | 208 |
void LauncherApp::error(const wxString &msg) |
... | ... | |
1059 | 1068 |
char* charResult; |
1060 | 1069 |
|
1061 | 1070 |
charResult =myGetPrivateProfileString(section.c_str(),NULL,NULL,cfgName.c_str()); |
1062 |
//echo(section +" = "+charResult); |
|
1063 | 1071 |
|
1072 |
|
|
1064 | 1073 |
wxArrayString rvalue; |
1065 |
char* token; |
|
1066 |
|
|
1067 |
for ( |
|
1068 |
token = strtok(charResult,"="); |
|
1069 |
token; |
|
1070 |
token = strtok(NULL,"=") |
|
1071 |
|
|
1072 |
) { |
|
1074 |
wxString token = wxString(""); |
|
1075 |
|
|
1076 |
for (int i=0; i < 2048;i++){ |
|
1077 |
if (charResult[i] == 0){ |
|
1078 |
if (token == ""){ |
|
1079 |
return rvalue; |
|
1080 |
} |
|
1073 | 1081 |
rvalue.Add(token); |
1082 |
token = wxString(""); |
|
1083 |
}else{ |
|
1084 |
token.Append(charResult[i]); |
|
1085 |
} |
|
1074 | 1086 |
} |
1075 | 1087 |
return rvalue; |
1076 | 1088 |
} |
Also available in: Unified diff