diff --git a/lime/tools/platforms/LinuxPlatform.hx b/lime/tools/platforms/LinuxPlatform.hx
index db9590502..2ba6fc7f0 100644
--- a/lime/tools/platforms/LinuxPlatform.hx
+++ b/lime/tools/platforms/LinuxPlatform.hx
@@ -43,6 +43,10 @@ class LinuxPlatform extends PlatformTarget {
is64 = true;
+ } else if (architecture == Architecture.ARMV7) {
+
+ isRaspberryPi = true;
+
}
}
@@ -52,21 +56,6 @@ class LinuxPlatform extends PlatformTarget {
isRaspberryPi = true;
is64 = false;
- } else if (PlatformHelper.hostPlatform == Platform.LINUX) {
-
- var process = new Process ("uname", [ "-a" ]);
- var output = process.stdout.readAll ().toString ();
- var error = process.stderr.readAll ().toString ();
- process.exitCode ();
- process.close ();
-
- if (output.toLowerCase ().indexOf ("raspberrypi") > -1) {
-
- isRaspberryPi = true;
- is64 = true;
-
- }
-
}
if (project.targetFlags.exists ("neko") || project.target != PlatformHelper.hostPlatform) {
@@ -129,8 +118,18 @@ class LinuxPlatform extends PlatformTarget {
if (targetType == "neko") {
ProcessHelper.runCommand ("", "haxe", [ hxml ]);
- NekoHelper.createExecutable (project.templatePaths, "linux" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
- NekoHelper.copyLibraries (project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory);
+
+ if (isRaspberryPi) {
+
+ NekoHelper.createExecutable (project.templatePaths, "rpi", targetDirectory + "/obj/ApplicationMain.n", executablePath);
+ NekoHelper.copyLibraries (project.templatePaths, "rpi", applicationDirectory);
+
+ } else {
+
+ NekoHelper.createExecutable (project.templatePaths, "linux" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
+ NekoHelper.copyLibraries (project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory);
+
+ }
} else if (targetType == "nodejs") {
@@ -249,7 +248,7 @@ class LinuxPlatform extends PlatformTarget {
if (targetFlags.exists ("rpi")) {
- commands.push ([ "-Dlinux", "-Drpi", "-DCXX=arm-linux-gnueabihf-g++", "-DHXCPP_M32", "-DHXCPP_STRIP=arm-linux-gnueabihf-strip", "-DHXCPP_AR=arm-linux-gnueabihf-ar", "-DHXCPP_RANLIB=arm-linux-gnueabihf-ranlib" ]);
+ commands.push ([ "-Dlinux", "-Drpi", "-Dtoolchain=linux", "-DBINDIR=RPi", "-DCXX=arm-linux-gnueabihf-g++", "-DHXCPP_M32", "-DHXCPP_STRIP=arm-linux-gnueabihf-strip", "-DHXCPP_AR=arm-linux-gnueabihf-ar", "-DHXCPP_RANLIB=arm-linux-gnueabihf-ranlib" ]);
} else {
diff --git a/project/Build.xml b/project/Build.xml
index 6382d172c..977317604 100644
--- a/project/Build.xml
+++ b/project/Build.xml
@@ -8,7 +8,7 @@
-
+
@@ -173,10 +173,12 @@
@@ -336,6 +338,16 @@
+
+
diff --git a/project/lib/sdl b/project/lib/sdl
index 0358bad6c..1febbad89 160000
--- a/project/lib/sdl
+++ b/project/lib/sdl
@@ -1 +1 @@
-Subproject commit 0358bad6c0b32d5fba2c1d8a5fa97440266beef8
+Subproject commit 1febbad899a41b988a280594d9dddbeb4088bb34
diff --git a/project/src/backend/sdl/SDLWindow.cpp b/project/src/backend/sdl/SDLWindow.cpp
index 74ad26e45..941bd22c7 100644
--- a/project/src/backend/sdl/SDLWindow.cpp
+++ b/project/src/backend/sdl/SDLWindow.cpp
@@ -34,6 +34,13 @@ namespace lime {
SDL_SetHint (SDL_HINT_VIDEO_WIN_D3DCOMPILER, "d3dcompiler_47.dll");
#endif
+ #if defined (RASPBERRYPI)
+ SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
+ SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
+ SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
+ SDL_SetHint (SDL_HINT_RENDER_DRIVER, "opengles2");
+ #endif
+
if (flags & WINDOW_FLAG_DEPTH_BUFFER) {
SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 32 - (flags & WINDOW_FLAG_STENCIL_BUFFER) ? 8 : 0);
@@ -309,4 +316,4 @@ namespace lime {
}
-}
\ No newline at end of file
+}
diff --git a/project/src/graphics/opengl/OpenGL.h b/project/src/graphics/opengl/OpenGL.h
index b2b6fb645..935855b2f 100644
--- a/project/src/graphics/opengl/OpenGL.h
+++ b/project/src/graphics/opengl/OpenGL.h
@@ -2,7 +2,7 @@
#define LIME_GRAPHICS_OPENGL_OPENGL_H
-#if defined (BLACKBERRY) || defined (ANDROID) || defined (WEBOS) || defined (GPH) || defined (EMSCRIPTEN)
+#if defined (BLACKBERRY) || defined (ANDROID) || defined (WEBOS) || defined (GPH) || defined (EMSCRIPTEN) || defined (RASPBERRYPI)
#define LIME_GLES
#include
diff --git a/templates/neko/bin/neko-rpi b/templates/neko/bin/neko-rpi
new file mode 100755
index 000000000..555d52586
Binary files /dev/null and b/templates/neko/bin/neko-rpi differ
diff --git a/templates/neko/ndll/rpi/libneko.so b/templates/neko/ndll/rpi/libneko.so
new file mode 100755
index 000000000..3d323f0e8
Binary files /dev/null and b/templates/neko/ndll/rpi/libneko.so differ
diff --git a/templates/neko/ndll/rpi/regexp.ndll b/templates/neko/ndll/rpi/regexp.ndll
new file mode 100755
index 000000000..0b41b16b4
Binary files /dev/null and b/templates/neko/ndll/rpi/regexp.ndll differ
diff --git a/templates/neko/ndll/rpi/sqlite.ndll b/templates/neko/ndll/rpi/sqlite.ndll
new file mode 100755
index 000000000..70f88805e
Binary files /dev/null and b/templates/neko/ndll/rpi/sqlite.ndll differ
diff --git a/templates/neko/ndll/rpi/std.ndll b/templates/neko/ndll/rpi/std.ndll
new file mode 100755
index 000000000..8c1ac7910
Binary files /dev/null and b/templates/neko/ndll/rpi/std.ndll differ
diff --git a/templates/neko/ndll/rpi/zlib.ndll b/templates/neko/ndll/rpi/zlib.ndll
new file mode 100755
index 000000000..7a5e26bf6
Binary files /dev/null and b/templates/neko/ndll/rpi/zlib.ndll differ