| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,6 +71,7 @@ public boolean accept(File dir, String name) { | |||
| 71 | 71 | if (name.equals("linux32")) return false; | |
| 72 | 72 | if (name.equals("linux64")) return false; | |
| 73 | 73 | if (name.equals("linux-armv6hf")) return false; | |
| 74 | + if (name.equals("linux-arm64")) return false; | ||
| 74 | 75 | if (name.equals("android")) return false; | |
| 75 | 76 | } | |
| 76 | 77 | return true; | |
@@ -173,6 +174,12 @@ protected void handle() { | |||
| 173 | 174 | nativeLibraryFolder = hostLibrary; | |
| 174 | 175 | } | |
| 175 | 176 | } | |
| 177 | + if (hostPlatform.equals("linux") && System.getProperty("os.arch").equals("aarch64")) { | ||
| 178 | + hostLibrary = new File(libraryFolder, "linux-arm64"); | ||
| 179 | + if (hostLibrary.exists()) { | ||
| 180 | + nativeLibraryFolder = hostLibrary; | ||
| 181 | + } | ||
| 182 | + } | ||
| 176 | 183 | ||
| 177 | 184 | // save that folder for later use | |
| 178 | 185 | nativeLibraryPath = nativeLibraryFolder.getAbsolutePath(); | |
@@ -183,6 +190,7 @@ protected void handle() { | |||
| 183 | 190 | String platformName32 = platformName + "32"; | |
| 184 | 191 | String platformName64 = platformName + "64"; | |
| 185 | 192 | String platformNameArmv6hh = platformName + "-armv6hf"; | |
| 193 | + String platformNameArm64 = platformName + "-arm64"; | ||
| 186 | 194 | ||
| 187 | 195 | // First check for things like 'application.macosx=' or 'application.windows32' in the export.txt file. | |
| 188 | 196 | // These will override anything in the platform-specific subfolders. | |
@@ -194,6 +202,8 @@ protected void handle() { | |||
| 194 | 202 | String[] platformList64 = platform64 == null ? null : PApplet.splitTokens(platform64, ", "); | |
| 195 | 203 | String platformArmv6hf = exportTable.get("application." + platformName + "-armv6hf"); | |
| 196 | 204 | String[] platformListArmv6hf = platformArmv6hf == null ? null : PApplet.splitTokens(platformArmv6hf, ", "); | |
| 205 | + String platformArm64 = exportTable.get("application." + platformName + "-arm64"); | ||
| 206 | + String[] platformListArm64 = platformArm64 == null ? null : PApplet.splitTokens(platformArm64, ", "); | ||
| 197 | 207 | ||
| 198 | 208 | // If nothing specified in the export.txt entries, look for the platform-specific folders. | |
| 199 | 209 | if (platformAll == null) { | |
@@ -208,14 +218,17 @@ protected void handle() { | |||
| 208 | 218 | if (platformListArmv6hf == null) { | |
| 209 | 219 | platformListArmv6hf = listPlatformEntries(libraryFolder, platformNameArmv6hh, baseList); | |
| 210 | 220 | } | |
| 221 | + if (platformListArm64 == null) { | ||
| 222 | + platformListArm64 = listPlatformEntries(libraryFolder, platformNameArm64, baseList); | ||
| 223 | + } | ||
| 211 | 224 | ||
| 212 | - if (platformList32 != null || platformList64 != null || platformListArmv6hf != null) { | ||
| 225 | + if (platformList32 != null || platformList64 != null || platformListArmv6hf != null || platformListArm64 != null) { | ||
| 213 | 226 | multipleArch[i] = true; | |
| 214 | 227 | } | |
| 215 | 228 | ||
| 216 | 229 | // if there aren't any relevant imports specified or in their own folders, | |
| 217 | 230 | // then use the baseList (root of the library folder) as the default. | |
| 218 | - if (platformList == null && platformList32 == null && platformList64 == null && platformListArmv6hf == null) { | ||
| 231 | + if (platformList == null && platformList32 == null && platformList64 == null && platformListArmv6hf == null && platformListArm64 == null) { | ||
| 219 | 232 | exportList.put(platformName, baseList); | |
| 220 | 233 | ||
| 221 | 234 | } else { | |
@@ -233,6 +246,9 @@ protected void handle() { | |||
| 233 | 246 | if (platformListArmv6hf != null) { | |
| 234 | 247 | exportList.put(platformNameArmv6hh, platformListArmv6hf); | |
| 235 | 248 | } | |
| 249 | + if (platformListArm64 != null) { | ||
| 250 | + exportList.put(platformNameArm64, platformListArm64); | ||
| 251 | + } | ||
| 236 | 252 | } | |
| 237 | 253 | } | |
| 238 | 254 | // for (String p : exportList.keySet()) { | |
@@ -412,6 +428,9 @@ public String[] getApplicationExportList(int platform, String variant) { | |||
| 412 | 428 | } else if (variant.equals("armv6hf")) { | |
| 413 | 429 | String[] pieces = exportList.get(platformName + "-armv6hf"); | |
| 414 | 430 | if (pieces != null) return pieces; | |
| 431 | + } else if (variant.equals("arm64")) { | ||
| 432 | + String[] pieces = exportList.get(platformName + "-arm64"); | ||
| 433 | + if (pieces != null) return pieces; | ||
| 415 | 434 | } | |
| 416 | 435 | return exportList.get(platformName); | |
| 417 | 436 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -195,6 +195,7 @@ static public int getNativeBits() { | |||
| 195 | 195 | * Return the value of the os.arch property | |
| 196 | 196 | */ | |
| 197 | 197 | static public String getNativeArch() { | |
| 198 | + // This will return "arm" for 32-bit ARM, "aarch64" for 64-bit ARM (both on Linux) | ||
| 198 | 199 | return System.getProperty("os.arch"); | |
| 199 | 200 | } | |
| 200 | 201 | ||
@@ -211,8 +212,12 @@ static public String getVariant() { | |||
| 211 | 212 | static public String getVariant(int platform, String arch, int bits) { | |
| 212 | 213 | if (platform == PConstants.LINUX && | |
| 213 | 214 | bits == 32 && "arm".equals(Platform.getNativeArch())) { | |
| 214 | - return "armv6hf"; // assume armv6hf for now | ||
| 215 | + return "armv6hf"; // assume armv6hf | ||
| 216 | + } else if (platform == PConstants.LINUX && | ||
| 217 | + bits == 64 && "aarch64".equals(Platform.getNativeArch())) { | ||
| 218 | + return "arm64"; | ||
| 215 | 219 | } | |
| 220 | + | ||
| 216 | 221 | return Integer.toString(bits); // 32 or 64 | |
| 217 | 222 | } | |
| 218 | 223 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,4 +8,6 @@ application.windows32=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-wind | |||
| 8 | 8 | application.windows64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-windows-amd64.jar,gluegen-rt-natives-windows-amd64.jar | |
| 9 | 9 | application.linux32=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-i586.jar,gluegen-rt-natives-linux-i586.jar | |
| 10 | 10 | application.linux64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar | |
| 11 | - application.linux-armv6hf=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-armv6hf.jar,gluegen-rt-natives-linux-armv6hf.jar | ||
| 11 | + application.linux-armv6hf=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-armv6hf.jar,gluegen-rt-natives-linux-armv6hf.jar | ||
| 12 | + # XXX: needs JOGL build | ||
| 13 | + application.linux-arm64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-armv6hf.jar,gluegen-rt-natives-linux-armv6hf.jar | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -709,11 +709,15 @@ protected boolean exportApplication() throws IOException, SketchException { | |||
| 709 | 709 | return false; | |
| 710 | 710 | } | |
| 711 | 711 | if (platform == PConstants.LINUX) { | |
| 712 | - // export the armv6hf version as well | ||
| 712 | + // export the arm versions as well | ||
| 713 | 713 | folder = new File(sketch.getFolder(), "application.linux-armv6hf"); | |
| 714 | 714 | if (!exportApplication(folder, platform, "armv6hf", embedJava && (bits == 32) && "arm".equals(arch))) { | |
| 715 | 715 | return false; | |
| 716 | 716 | } | |
| 717 | + folder = new File(sketch.getFolder(), "application.linux-arm64"); | ||
| 718 | + if (!exportApplication(folder, platform, "arm64", embedJava && (bits == 64) && "aarch64".equals(arch))) { | ||
| 719 | + return false; | ||
| 720 | + } | ||
| 717 | 721 | } | |
| 718 | 722 | } else { // just make a single one for this platform | |
| 719 | 723 | folder = new File(sketch.getFolder(), "application." + platformName); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments