File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ DynamicRuntimeInfo::DynamicRuntimeInfo()
43
43
#elif linux
44
44
_environment = RuntimeEnvironment::LINUX_LOCAL;
45
45
#elif _WIN32
46
- parseStaticRuntimeInfoFile (fq ( AppDirs::programDir (). absoluteFilePath ( tq (staticInfoFileName)) )); // will set runtime env info
47
- parseDynamicRuntimeInfoFile (fq ( AppDirs::appData ( false ) + " / " + tq (dynamicInfoFileName) ));
46
+ parseStaticRuntimeInfoFile (staticRuntimeInfoFilePath ( )); // will set runtime env info
47
+ parseDynamicRuntimeInfoFile (dynamicRuntimeInfoFilePath ( ));
48
48
#else
49
49
_environment = RuntimeEnvironment::UNKNOWN;
50
50
#endif
@@ -108,6 +108,23 @@ bool DynamicRuntimeInfo::parseDynamicRuntimeInfoFile(const std::string &path)
108
108
109
109
}
110
110
111
+ std::string DynamicRuntimeInfo::staticRuntimeInfoFilePath ()
112
+ {
113
+ return fq (AppDirs::programDir ().absoluteFilePath (tq (staticInfoFileName)));
114
+ }
115
+
116
+ std::string DynamicRuntimeInfo::dynamicRuntimeInfoFilePath ()
117
+ {
118
+ switch (getRuntimeEnvironment ()) {
119
+ case ZIP:
120
+ return fq (AppDirs::programDir ().absoluteFilePath (tq (dynamicInfoFileName)));
121
+ case MSIX:
122
+ return fq (AppDirs::appData (false ) + " /" + tq (dynamicInfoFileName));
123
+ default :
124
+ return " " ;
125
+ }
126
+ }
127
+
111
128
bool DynamicRuntimeInfo::writeDynamicRuntimeInfoFile ()
112
129
{
113
130
std::string path = fq (AppDirs::appData (false ) + " /" + tq (dynamicInfoFileName));
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ class DynamicRuntimeInfo
57
57
bool parseDynamicRuntimeInfoFile (const std::string& path);
58
58
59
59
private:
60
+ std::string staticRuntimeInfoFilePath ();
61
+ std::string dynamicRuntimeInfoFilePath ();
62
+
60
63
RuntimeEnvironment _environment;
61
64
MicroArch _arch;
62
65
You can’t perform that action at this time.
0 commit comments