Feat: add apple M1 cpu support
This commit is contained in:
25
src/com/sheepit/client/os/MacM1.java
Normal file
25
src/com/sheepit/client/os/MacM1.java
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Laurent CLOUET
|
||||
* Author Laurent CLOUET <laurent.clouet@nopnop.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; version 2
|
||||
* of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
package com.sheepit.client.os;
|
||||
|
||||
public class MacM1 extends Mac {
|
||||
@Override public String name() {
|
||||
return "macm1";
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,12 @@ public abstract class OS {
|
||||
instance = new Windows();
|
||||
break;
|
||||
case "Apple":
|
||||
instance = new Mac();
|
||||
if ("aarch64".equalsIgnoreCase(System.getProperty("os.arch"))) { // ARM arch ?
|
||||
instance = new MacM1();
|
||||
}
|
||||
else {
|
||||
instance = new Mac();
|
||||
}
|
||||
break;
|
||||
case "GNU/Linux":
|
||||
instance = new Linux();
|
||||
|
||||
Reference in New Issue
Block a user