Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaribsin committed Nov 24, 2024
2 parents 1c016d8 + f5c750d commit 0fd8c39
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/providers/JavaDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,25 @@ export async function getJre(ref: Ref): Promise<string> {
const platform: NodeJS.Platform = await ipcRenderer.invoke('getPlatform');
// const platform: NodeJS.Platform = 'linux';

const getMacArch = () => {
const arch = os.arch();

if (arch === 'x64') {
return 'x64';
} else if (arch === 'arm64') {
return 'aarch64';
}

return arch;
};

const flags = {
// https://api.adoptium.net/q/swagger-ui/#/Binary/getBinary
// /v3/binary/latest/{feature_version}/{release_type}/{os}/{arch}/{image_type}/{jvm_impl}/{heap_size}/{vendor}
feature_version: '17', // Drehmal is 1.17+, so use JRE 17
release_type: 'ga',
os: osMap[platform],
arch: os.arch(),
arch: platform === 'darwin' ? getMacArch() : os.arch(),
image_type: 'jre',
jvm_impl: 'hotspot',
heap_size: 'normal',
Expand Down

0 comments on commit 0fd8c39

Please sign in to comment.