83
84 // Main JAR.
85 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_MAINJAR_KEY], FBootFields->FMainJar);
86 FBootFields->FMainJar = FilePath::IncludeTrailingSeparater(GetPackageAppDirectory()) +
87 FilePath::FixPathForPlatform(FBootFields->FMainJar);
88
89 // Classpath.
90 // 1. If the provided class path contains main jar then only use provided class path.
91 // 2. If class path provided by config file is empty then add main jar.
92 // 3. If main jar is not in provided class path then add it.
93 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_CLASSPATH_KEY], FBootFields->FClassPath);
94 FBootFields->FClassPath = FilePath::FixPathSeparatorForPlatform(FBootFields->FClassPath);
95
96 if (FBootFields->FClassPath.empty() == true) {
97 FBootFields->FClassPath = GetMainJar();
98 }
99 else if (FBootFields->FClassPath.find(GetMainJar()) == TString::npos) {
100 FBootFields->FClassPath = GetMainJar() + FilePath::PathSeparator() + FBootFields->FClassPath;
101 }
102
103 // Main Class.
104 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_MAINCLASSNAME_KEY], FBootFields->FMainClassName);
105
106 // Splash Screen.
107 if (config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_SPLASH_KEY], FBootFields->FSplashScreenFileName) == true) {
108 FBootFields->FSplashScreenFileName = FilePath::IncludeTrailingSeparater(GetPackageAppDirectory()) +
109 FilePath::FixPathForPlatform(FBootFields->FSplashScreenFileName);
110
111 if (FilePath::FileExists(FBootFields->FSplashScreenFileName) == false) {
112 FBootFields->FSplashScreenFileName = _T("");
113 }
114 }
115
116 // Runtime.
117 FBootFields->FIsRuntimeBundled = true;
118 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[JVM_RUNTIME_KEY], FBootFields->FJVMRuntimeDirectory);
119
120 if (FBootFields->FJVMRuntimeDirectory.empty()) {
121 FBootFields->FIsRuntimeBundled = false;
122 FBootFields->FJVMRuntimeDirectory = platform.GetSystemJRE();
543 FBootFields->FAppCDSCacheFileName = macros.ExpandMacros(FBootFields->FAppCDSCacheFileName);
544 FBootFields->FAppCDSCacheFileName = FilePath::FixPathForPlatform(FBootFields->FAppCDSCacheFileName);
545 }
546
547 return FBootFields->FAppCDSCacheFileName;
548 }
549
550 TString Package::GetAppID() {
551 assert(FBootFields != NULL);
552 return FBootFields->FAppID;
553 }
554
555 TString Package::GetPackageAppDataDirectory() {
556 assert(FBootFields != NULL);
557 return FBootFields->FPackageAppDataDirectory;
558 }
559
560 TString Package::GetClassPath() {
561 assert(FBootFields != NULL);
562 return FBootFields->FClassPath;
563 }
564
565 TString Package::GetMainJar() {
566 assert(FBootFields != NULL);
567 return FBootFields->FMainJar;
568 }
569
570 TString Package::GetMainClassName() {
571 assert(FBootFields != NULL);
572 return FBootFields->FMainClassName;
573 }
574
575 bool Package::IsRuntimeBundled() {
576 assert(FBootFields != NULL);
577 return FBootFields->FIsRuntimeBundled;
578 }
579
580 TString Package::GetJVMLibraryFileName() {
581 assert(FBootFields != NULL);
582
|
83
84 // Main JAR.
85 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_MAINJAR_KEY], FBootFields->FMainJar);
86 FBootFields->FMainJar = FilePath::IncludeTrailingSeparater(GetPackageAppDirectory()) +
87 FilePath::FixPathForPlatform(FBootFields->FMainJar);
88
89 // Classpath.
90 // 1. If the provided class path contains main jar then only use provided class path.
91 // 2. If class path provided by config file is empty then add main jar.
92 // 3. If main jar is not in provided class path then add it.
93 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_CLASSPATH_KEY], FBootFields->FClassPath);
94 FBootFields->FClassPath = FilePath::FixPathSeparatorForPlatform(FBootFields->FClassPath);
95
96 if (FBootFields->FClassPath.empty() == true) {
97 FBootFields->FClassPath = GetMainJar();
98 }
99 else if (FBootFields->FClassPath.find(GetMainJar()) == TString::npos) {
100 FBootFields->FClassPath = GetMainJar() + FilePath::PathSeparator() + FBootFields->FClassPath;
101 }
102
103 // Modulepath.
104 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_MODULEPATH_KEY], FBootFields->FModulePath);
105 FBootFields->FModulePath = FilePath::FixPathSeparatorForPlatform(FBootFields->FModulePath);
106
107 // Main Class.
108 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_MAINCLASSNAME_KEY], FBootFields->FMainClassName);
109
110 // Splash Screen.
111 if (config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[CONFIG_SPLASH_KEY], FBootFields->FSplashScreenFileName) == true) {
112 FBootFields->FSplashScreenFileName = FilePath::IncludeTrailingSeparater(GetPackageAppDirectory()) +
113 FilePath::FixPathForPlatform(FBootFields->FSplashScreenFileName);
114
115 if (FilePath::FileExists(FBootFields->FSplashScreenFileName) == false) {
116 FBootFields->FSplashScreenFileName = _T("");
117 }
118 }
119
120 // Runtime.
121 FBootFields->FIsRuntimeBundled = true;
122 config->GetValue(keys[CONFIG_SECTION_APPLICATION], keys[JVM_RUNTIME_KEY], FBootFields->FJVMRuntimeDirectory);
123
124 if (FBootFields->FJVMRuntimeDirectory.empty()) {
125 FBootFields->FIsRuntimeBundled = false;
126 FBootFields->FJVMRuntimeDirectory = platform.GetSystemJRE();
547 FBootFields->FAppCDSCacheFileName = macros.ExpandMacros(FBootFields->FAppCDSCacheFileName);
548 FBootFields->FAppCDSCacheFileName = FilePath::FixPathForPlatform(FBootFields->FAppCDSCacheFileName);
549 }
550
551 return FBootFields->FAppCDSCacheFileName;
552 }
553
554 TString Package::GetAppID() {
555 assert(FBootFields != NULL);
556 return FBootFields->FAppID;
557 }
558
559 TString Package::GetPackageAppDataDirectory() {
560 assert(FBootFields != NULL);
561 return FBootFields->FPackageAppDataDirectory;
562 }
563
564 TString Package::GetClassPath() {
565 assert(FBootFields != NULL);
566 return FBootFields->FClassPath;
567 }
568
569 TString Package::GetModulePath() {
570 assert(FBootFields != NULL);
571 return FBootFields->FModulePath;
572 }
573
574 TString Package::GetMainJar() {
575 assert(FBootFields != NULL);
576 return FBootFields->FMainJar;
577 }
578
579 TString Package::GetMainClassName() {
580 assert(FBootFields != NULL);
581 return FBootFields->FMainClassName;
582 }
583
584 bool Package::IsRuntimeBundled() {
585 assert(FBootFields != NULL);
586 return FBootFields->FIsRuntimeBundled;
587 }
588
589 TString Package::GetJVMLibraryFileName() {
590 assert(FBootFields != NULL);
591
|