-
Notifications
You must be signed in to change notification settings - Fork 30
[Xamarin.Android.Tools.AndroidSdk] Probe for Microsoft OpenJDK dirs #113
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
Conversation
cb01ba5
to
01ed56b
Compare
|
||
static IEnumerable<string> GetMacOSMicrosoftOpenJdkPaths () | ||
{ | ||
var jdk = AppDomain.CurrentDomain.GetData ($"GetMacOSMicrosoftOpenJdkPath override! {typeof (JdkInfo).AssemblyQualifiedName}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing
2a32fd3
to
1a29cf3
Compare
@@ -139,9 +140,89 @@ internal static class RegistryEx | |||
static extern int RegCreateKeyEx (UIntPtr hKey, string subKey, uint reserved, string? @class, uint options, | |||
uint samDesired, IntPtr lpSecurityAttributes, out UIntPtr phkResult, out Disposition lpdwDisposition); | |||
|
|||
// https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regenumkeyexw | |||
[DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] | |||
static extern int RegEnumKeyExW ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the need for p/invoke here? Is it an issue with 32-bit processes reading 64-bit keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of the original need; this code never used Microsoft.Win32.Registry
& co, and I'm not sure why. (Apparently a question for @mhutch?)
Thus, given that we're already a tangled mess of P/Invokes, I figured it "best" to continue with the current paradigm.
1a29cf3
to
4c041c8
Compare
Context: https://aka.ms/getopenjdk Context: https://devblogs.microsoft.com/java Remove support for the obsolete (and never updated) `microsoft_dist_openjdk_*` builds of OpenJDK. Despite having "microsoft" in the name, it was maintained by a different team which has moved on to other things.
4c041c8
to
21ea061
Compare
No description provided.