@@ -148,34 +148,36 @@ static std::string GenerateReportText(const APILayerStore* store) {
148148}
149149
150150static std::string GenerateActiveRuntimeText (
151- const uint8_t bitness ,
151+ const Architecture arch ,
152152 const std::optional<Runtime>& runtime) {
153+ const auto archName = magic_enum::enum_name (arch);
153154 if (!runtime) {
154- return std::format (" ❌ Active {}-bit runtime: NONE\n " , bitness );
155+ return std::format (" ❌ Active {} runtime: NONE\n " , archName );
155156 }
156157
157158 if (!runtime->mName ) {
158159 if (runtime->mName .error () != Runtime::ManifestError::FieldNotPresent) {
159160 return std::format (
160- " 🚨 Active {}-bit runtime: CORRUPTED - {}\n " ,
161- bitness ,
161+ " 🚨 Active {} runtime: CORRUPTED - {}\n " ,
162+ archName ,
162163 runtime->mPath .string ());
163164 }
164165 return std::format (
165- " ✅ Active {}-bit runtime: {}\n " , bitness , runtime->mPath .string ());
166+ " ✅ Active {} runtime: {}\n " , archName , runtime->mPath .string ());
166167 }
167168
168169 return std::format (
169- " ✅ Active {}-bit runtime: \" {}\" - {}\n " ,
170- bitness ,
170+ " ✅ Active {} runtime: \" {}\" - {}\n " ,
171+ archName ,
171172 runtime->mName .value (),
172173 runtime->mPath .string ());
173174}
174175
175176static std::string GenerateAvailableRuntimesText (
176- const uint8_t bitness ,
177+ const Architecture arch ,
177178 const std::vector<AvailableRuntime>& runtimes) {
178- auto ret = std::format (" \n Available {}-bit runtimes:\n " , bitness);
179+ const auto archName = magic_enum::enum_name (arch);
180+ auto ret = std::format (" \n Available {} runtimes:\n " , archName);
179181 if (runtimes.empty ()) {
180182 return ret + " NONE\n " ;
181183 }
@@ -336,13 +338,13 @@ std::string GenerateReport() {
336338 std::chrono::current_zone (), std::chrono::system_clock::now ()));
337339
338340 auto & platform = Platform::Get ();
339- text += GenerateActiveRuntimeText ( 64 , platform.Get64BitRuntime ());
340- text += GenerateActiveRuntimeText (32 , platform.Get32BitRuntime ( ));
341-
342- text
343- += GenerateAvailableRuntimesText (64 , platform. GetAvailable64BitRuntimes ());
344- text
345- += GenerateAvailableRuntimesText ( 32 , platform. GetAvailable32BitRuntimes ());
341+ for ( const auto arch: platform.GetArchitectures ().enumerate()) {
342+ text += GenerateActiveRuntimeText (arch , platform.GetActiveRuntime (arch ));
343+ }
344+ for ( const auto arch: platform. GetArchitectures ().enumerate()) {
345+ text += GenerateAvailableRuntimesText (
346+ arch, platform. GetAvailableRuntimes (arch));
347+ }
346348
347349 for (const auto store: APILayerStore::Get ()) {
348350 text += GenerateReportText (store);
0 commit comments