61 FBootFields->FPackageRootDirectory = platform.GetPackageRootDirectory();
62 FBootFields->FPackageAppDirectory = platform.GetPackageAppDirectory();
63 FBootFields->FPackageLauncherDirectory =
64 platform.GetPackageLauncherDirectory();
65 FBootFields->FAppDataDirectory = platform.GetAppDataDirectory();
66
67 std::map<TString, TString> keys = platform.GetKeys();
68
69 // Read from configure.cfg/Info.plist
70 AutoFreePtr<ISectionalPropertyContainer> config =
71 platform.GetConfigFile(platform.GetConfigFileName());
72
73 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
74 keys[JPACKAGE_APP_DATA_DIR], FBootFields->FPackageAppDataDirectory);
75 FBootFields->FPackageAppDataDirectory =
76 FilePath::FixPathForPlatform(FBootFields->FPackageAppDataDirectory);
77
78 // Main JAR.
79 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
80 keys[CONFIG_MAINJAR_KEY], FBootFields->FMainJar);
81 FBootFields->FMainJar =
82 FilePath::IncludeTrailingSeparator(GetPackageAppDirectory())
83 + FilePath::FixPathForPlatform(FBootFields->FMainJar);
84
85 // Main Module.
86 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
87 keys[CONFIG_MAINMODULE_KEY], FBootFields->FMainModule);
88
89 // Classpath.
90 // 1. If the provided class path contains main jar then only use
91 // provided class path.
92 // 2. If class path provided by config file is empty then add main jar.
93 // 3. If main jar is not in provided class path then add it.
94 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
95 keys[CONFIG_CLASSPATH_KEY], FBootFields->FClassPath);
96 FBootFields->FClassPath =
97 FilePath::FixPathSeparatorForPlatform(FBootFields->FClassPath);
98
99 if (FBootFields->FClassPath.empty() == true) {
100 FBootFields->FClassPath = GetMainJar();
101 } else if (FBootFields->FClassPath.find(GetMainJar()) == TString::npos) {
102 FBootFields->FClassPath = GetMainJar()
103 + FilePath::PathSeparator() + FBootFields->FClassPath;
|
61 FBootFields->FPackageRootDirectory = platform.GetPackageRootDirectory();
62 FBootFields->FPackageAppDirectory = platform.GetPackageAppDirectory();
63 FBootFields->FPackageLauncherDirectory =
64 platform.GetPackageLauncherDirectory();
65 FBootFields->FAppDataDirectory = platform.GetAppDataDirectory();
66
67 std::map<TString, TString> keys = platform.GetKeys();
68
69 // Read from configure.cfg/Info.plist
70 AutoFreePtr<ISectionalPropertyContainer> config =
71 platform.GetConfigFile(platform.GetConfigFileName());
72
73 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
74 keys[JPACKAGE_APP_DATA_DIR], FBootFields->FPackageAppDataDirectory);
75 FBootFields->FPackageAppDataDirectory =
76 FilePath::FixPathForPlatform(FBootFields->FPackageAppDataDirectory);
77
78 // Main JAR.
79 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
80 keys[CONFIG_MAINJAR_KEY], FBootFields->FMainJar);
81 FBootFields->FMainJar = FilePath::FixPathForPlatform(FBootFields->FMainJar);
82
83 // Main Module.
84 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
85 keys[CONFIG_MAINMODULE_KEY], FBootFields->FMainModule);
86
87 // Classpath.
88 // 1. If the provided class path contains main jar then only use
89 // provided class path.
90 // 2. If class path provided by config file is empty then add main jar.
91 // 3. If main jar is not in provided class path then add it.
92 config->GetValue(keys[CONFIG_SECTION_APPLICATION],
93 keys[CONFIG_CLASSPATH_KEY], FBootFields->FClassPath);
94 FBootFields->FClassPath =
95 FilePath::FixPathSeparatorForPlatform(FBootFields->FClassPath);
96
97 if (FBootFields->FClassPath.empty() == true) {
98 FBootFields->FClassPath = GetMainJar();
99 } else if (FBootFields->FClassPath.find(GetMainJar()) == TString::npos) {
100 FBootFields->FClassPath = GetMainJar()
101 + FilePath::PathSeparator() + FBootFields->FClassPath;
|