File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,25 @@ export async function getJre(ref: Ref): Promise<string> {
33
33
const platform : NodeJS . Platform = await ipcRenderer . invoke ( 'getPlatform' ) ;
34
34
// const platform: NodeJS.Platform = 'linux';
35
35
36
+ const getMacArch = ( ) => {
37
+ const arch = os . arch ( ) ;
38
+
39
+ if ( arch === 'x64' ) {
40
+ return 'x64' ;
41
+ } else if ( arch === 'arm64' ) {
42
+ return 'aarch64' ;
43
+ }
44
+
45
+ return arch ;
46
+ } ;
47
+
36
48
const flags = {
37
49
// https://api.adoptium.net/q/swagger-ui/#/Binary/getBinary
38
50
// /v3/binary/latest/{feature_version}/{release_type}/{os}/{arch}/{image_type}/{jvm_impl}/{heap_size}/{vendor}
39
51
feature_version : '17' , // Drehmal is 1.17+, so use JRE 17
40
52
release_type : 'ga' ,
41
53
os : osMap [ platform ] ,
42
- arch : os . arch ( ) ,
54
+ arch : platform === 'darwin' ? getMacArch ( ) : os . arch ( ) ,
43
55
image_type : 'jre' ,
44
56
jvm_impl : 'hotspot' ,
45
57
heap_size : 'normal' ,
You can’t perform that action at this time.
0 commit comments