< prev index next >

src/jdk.jpackage/share/native/libapplauncher/Helpers.cpp

Print this page




 181     PropertyFile propertyFile;
 182 
 183     if (propertyFile.LoadFromFile(FileName) == true) {
 184         Platform& platform = Platform::GetInstance();
 185 
 186         std::map<TString, TString> keys = platform.GetKeys();
 187 
 188         // Application Section
 189         AppendToIni(propertyFile, Container, keys[CONFIG_MAINJAR_KEY]);
 190         AppendToIni(propertyFile, Container, keys[CONFIG_MAINMODULE_KEY]);
 191         AppendToIni(propertyFile, Container, keys[CONFIG_MAINCLASSNAME_KEY]);
 192         AppendToIni(propertyFile, Container, keys[CONFIG_CLASSPATH_KEY]);
 193         AppendToIni(propertyFile, Container, keys[APP_NAME_KEY]);
 194         AppendToIni(propertyFile, Container, keys[CONFIG_APP_ID_KEY]);
 195         AppendToIni(propertyFile, Container, keys[JVM_RUNTIME_KEY]);
 196         AppendToIni(propertyFile, Container, keys[JPACKAGE_APP_DATA_DIR]);
 197 
 198         AppendToIni(propertyFile, Container, keys[CONFIG_APP_MEMORY]);
 199         AppendToIni(propertyFile, Container, keys[CONFIG_SPLASH_KEY]);
 200 
 201         // JVMOptions Section
 202         OrderedMap<TString, TString> JVMArgs =
 203                 Helpers::GetJVMArgsFromConfig(&propertyFile);
 204         Container->AppendSection(keys[CONFIG_SECTION_JVMOPTIONS], JVMArgs);
 205 
 206         // ArgOptions Section
 207         std::list<TString> args = Helpers::GetArgsFromConfig(&propertyFile);
 208         OrderedMap<TString, TString> convertedArgs;
 209 
 210         for (std::list<TString>::iterator iterator = args.begin();
 211                 iterator != args.end(); iterator++) {
 212             TString arg = *iterator;
 213             TString name;
 214             TString value;
 215 
 216             if (Helpers::SplitOptionIntoNameValue(arg, name, value) == true) {
 217                 convertedArgs.Append(name, value);
 218             }
 219         }
 220 
 221         Container->AppendSection(keys[CONFIG_SECTION_ARGOPTIONS],
 222                 convertedArgs);
 223     }
 224 }




 181     PropertyFile propertyFile;
 182 
 183     if (propertyFile.LoadFromFile(FileName) == true) {
 184         Platform& platform = Platform::GetInstance();
 185 
 186         std::map<TString, TString> keys = platform.GetKeys();
 187 
 188         // Application Section
 189         AppendToIni(propertyFile, Container, keys[CONFIG_MAINJAR_KEY]);
 190         AppendToIni(propertyFile, Container, keys[CONFIG_MAINMODULE_KEY]);
 191         AppendToIni(propertyFile, Container, keys[CONFIG_MAINCLASSNAME_KEY]);
 192         AppendToIni(propertyFile, Container, keys[CONFIG_CLASSPATH_KEY]);
 193         AppendToIni(propertyFile, Container, keys[APP_NAME_KEY]);
 194         AppendToIni(propertyFile, Container, keys[CONFIG_APP_ID_KEY]);
 195         AppendToIni(propertyFile, Container, keys[JVM_RUNTIME_KEY]);
 196         AppendToIni(propertyFile, Container, keys[JPACKAGE_APP_DATA_DIR]);
 197 
 198         AppendToIni(propertyFile, Container, keys[CONFIG_APP_MEMORY]);
 199         AppendToIni(propertyFile, Container, keys[CONFIG_SPLASH_KEY]);
 200 
 201         // JavaOptions Section
 202         OrderedMap<TString, TString> JVMArgs =
 203                 Helpers::GetJVMArgsFromConfig(&propertyFile);
 204         Container->AppendSection(keys[CONFIG_SECTION_JAVAOPTIONS], JVMArgs);
 205 
 206         // ArgOptions Section
 207         std::list<TString> args = Helpers::GetArgsFromConfig(&propertyFile);
 208         OrderedMap<TString, TString> convertedArgs;
 209 
 210         for (std::list<TString>::iterator iterator = args.begin();
 211                 iterator != args.end(); iterator++) {
 212             TString arg = *iterator;
 213             TString name;
 214             TString value;
 215 
 216             if (Helpers::SplitOptionIntoNameValue(arg, name, value) == true) {
 217                 convertedArgs.Append(name, value);
 218             }
 219         }
 220 
 221         Container->AppendSection(keys[CONFIG_SECTION_ARGOPTIONS],
 222                 convertedArgs);
 223     }
 224 }


< prev index next >