Skip to content

Commit f252701

Browse files
committed
use arm eabi system image on windows and linux
1 parent dc5b551 commit f252701

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/processing/mode/android/SysImageDownloader.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
public class SysImageDownloader extends JDialog implements PropertyChangeListener {
5151
private static final String URL_SYS_IMAGES = "https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml";
5252
private static final String URL_SYS_IMAGES_FOLDER = "http://dl-ssl.google.com/android/repository/sys-img/android/";
53-
private static final String SYSTEM_IMAGE = "Intel x86 Atom System Image";
53+
54+
private static final String SYSTEM_IMAGE_MACOSX = "Intel x86 Atom System Image";
55+
private static final String SYSTEM_IMAGE_WINDOWS = "ARM EABI v7a System Image";
56+
private static final String SYSTEM_IMAGE_LINUX = "ARM EABI v7a System Image";
5457

5558
private static final String PROPERTY_CHANGE_EVENT_TOTAL = "total";
5659
private static final String PROPERTY_CHANGE_EVENT_DOWNLOADED = "downloaded";
@@ -189,6 +192,15 @@ private UrlHolder getDownloadUrls(String repositoryUrl, String requiredHostOs)
189192
DocumentBuilder db = dbf.newDocumentBuilder();
190193

191194
// default system image
195+
String systemImage = "";
196+
if (Platform.isMacOS()) {
197+
systemImage = SYSTEM_IMAGE_MACOSX;
198+
} else if (Platform.isWindows()) {
199+
systemImage = SYSTEM_IMAGE_WINDOWS;
200+
} else if (Platform.isLinux()) {
201+
systemImage = SYSTEM_IMAGE_LINUX;
202+
}
203+
192204
Document docSysImg = db.parse(new URL(repositoryUrl).openStream());
193205
NodeList sysImgList = docSysImg.getElementsByTagName("sdk:system-image");
194206
for (int i = 0; i < sysImgList.getLength(); i++) {
@@ -199,7 +211,7 @@ private UrlHolder getDownloadUrls(String repositoryUrl, String requiredHostOs)
199211
// Only considering nodes without a codename, which correspond to the platform
200212
// pre-releases.
201213
if (level.item(0).getTextContent().equals(SDKDownloader.PLATFORM_API_LEVEL) &&
202-
desc.item(0).getTextContent().equals(SYSTEM_IMAGE) &&
214+
desc.item(0).getTextContent().equals(systemImage) &&
203215
codename.item(0) == null) {
204216
NodeList tag = ((Element) img).getElementsByTagName("sdk:tag-id");
205217
urlHolder.sysImgTag = tag.item(0).getTextContent();

0 commit comments

Comments
 (0)