Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logger, improve support for ARM64 & Windows 7 #13

Merged
merged 5 commits into from
Dec 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add Architecture files..
modmuss50 committed Dec 29, 2023
commit f4a8b12921876f79a275e822057bcfdcc4626939
16 changes: 16 additions & 0 deletions src/Architecture.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "Architecture.h"

std::wstring Architecture::AsString(const Value& arch)
{
switch (arch) {
case X64:
return L"x64";
case ARM64:
return L"arm64";
case X86:
return L"x86";
case UNKNOWN:
default:
return L"unknown";
}
}
21 changes: 21 additions & 0 deletions src/Architecture.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include <string>

namespace Architecture
{
// Ordered to ensure that we only check for JVMs that will run on the host arch.
// On an x64 host only check for x64 and x86 as arm will never run.
// On x86 there is no need to try any other arch as it wont run.
enum Value {
UNKNOWN,
ARM64,
X64,
X86,
};

constexpr Value VALUES[] = { UNKNOWN, ARM64, X64, X86 };

std::wstring AsString(const Value& arch);
};