equal
deleted
inserted
replaced
172 |
172 |
173 size_t JavaOptions::GetCount() { |
173 size_t JavaOptions::GetCount() { |
174 return FItems.size(); |
174 return FItems.size(); |
175 } |
175 } |
176 |
176 |
177 // jvmuserargs can have a trailing equals in the key. This needs to be |
|
178 // removed to use other parts of the launcher. |
|
179 OrderedMap<TString, TString> RemoveTrailingEquals( |
|
180 OrderedMap<TString, TString> Map) { |
|
181 OrderedMap<TString, TString> result; |
|
182 |
|
183 std::vector<TString> keys = Map.GetKeys(); |
|
184 |
|
185 for (size_t index = 0; index < keys.size(); index++) { |
|
186 TString name = keys[index]; |
|
187 TString value; |
|
188 |
|
189 if (Map.GetValue(name, value) == true) { |
|
190 // If the last character of the key is an equals, then remove it. |
|
191 // If there is no equals then combine the two as a key. |
|
192 TString::iterator i = name.end(); |
|
193 i--; |
|
194 |
|
195 if (*i == '=') { |
|
196 name = name.substr(0, name.size() - 1); |
|
197 } |
|
198 else { |
|
199 i = value.begin(); |
|
200 |
|
201 if (*i == '=') { |
|
202 value = value.substr(1, value.size() - 1); |
|
203 } |
|
204 else { |
|
205 name = name + value; |
|
206 value = _T(""); |
|
207 } |
|
208 } |
|
209 |
|
210 result.Append(name, value); |
|
211 } |
|
212 } |
|
213 |
|
214 return result; |
|
215 } |
|
216 |
|
217 //---------------------------------------------------------------------------- |
177 //---------------------------------------------------------------------------- |
218 |
178 |
219 JavaVirtualMachine::JavaVirtualMachine() { |
179 JavaVirtualMachine::JavaVirtualMachine() { |
220 } |
180 } |
221 |
181 |
239 + package.GetPackageLauncherDirectory()); |
199 + package.GetPackageLauncherDirectory()); |
240 options.AppendValue( |
200 options.AppendValue( |
241 _T("-Djava.launcher.path"), package.GetPackageLauncherDirectory()); |
201 _T("-Djava.launcher.path"), package.GetPackageLauncherDirectory()); |
242 options.AppendValue(_T("-Dapp.preferences.id"), package.GetAppID()); |
202 options.AppendValue(_T("-Dapp.preferences.id"), package.GetAppID()); |
243 options.AppendValues(package.GetJVMArgs()); |
203 options.AppendValues(package.GetJVMArgs()); |
244 options.AppendValues(RemoveTrailingEquals(package.GetJVMUserArgs())); |
|
245 |
204 |
246 #ifdef DEBUG |
205 #ifdef DEBUG |
247 if (package.Debugging() == dsJava) { |
206 if (package.Debugging() == dsJava) { |
248 options.AppendValue(_T("-Xdebug"), _T("")); |
207 options.AppendValue(_T("-Xdebug"), _T("")); |
249 options.AppendValue( |
208 options.AppendValue( |