digitalmars.D.announce - DlangUI on Android
- Vadim Lopatin (27/27) Apr 21 2016 Hello,
- ANtlord (3/5) Apr 21 2016 Am I sleeping? Can we develop UI applications for Android on D?
- Vadim Lopatin (2/8) Apr 21 2016 Yes, and the same code may run on both desktops and Android.
- David Nadlinger (4/6) Apr 22 2016 Yes – cool, right?
- David Nadlinger (3/4) Apr 22 2016 (the fact that we can deploy stuff to Android in the first place,
- Vadim Lopatin (6/7) Apr 22 2016 Yes, it's really GREAT work!
- Vadim Lopatin (10/12) Apr 21 2016 Forgot to add that DerelictFT patch is required for
- Mike Parker (16/21) Apr 22 2016 I was late, but I have since gotten this taken care of, so it's
- Vadim Lopatin (3/18) Apr 22 2016 Thank you for your help! I've updated dlangui dub.json with
- Dmitry (3/4) Apr 21 2016 It's great! Thank you!
- Vadim Lopatin (4/9) Apr 22 2016 DlangUI Tetris example now works ok on Android (arm, android4.4+)
- FrankLike (2/13) Apr 22 2016 Android5.02 ,Not ok, sorry.
- Vadim Lopatin (4/10) Apr 22 2016 Does it crash instantly or shows app GUI for some time?
- FrankLike (3/14) Apr 23 2016 What is the name of log file?
- FrankLike (5/7) Apr 23 2016 test-runner.apk is ok,but DLangUITetrisExample.apk and
- Vadim Lopatin (15/22) Apr 23 2016 Log messages are in Android system log.
- FrankLike (3/4) Apr 23 2016 Thank you.
- Vadim Lopatin (4/8) Apr 23 2016 Probably something is wrong with OpenGL.
- FrankLike (3/13) Apr 23 2016 Waiting for the new apk....
- FrankLike (2/5) Apr 22 2016 Congratulations!
- TheGag96 (3/4) Apr 22 2016 Wow, really nice stuff! I wasn't even aware we could write D for
- Laeeth Isharc (11/12) Apr 22 2016 Congratulations, Vadim.
- Vadim Lopatin (15/24) Apr 22 2016 It took about one week to make DlangUI android backend once I
- Vadim Lopatin (6/8) Apr 26 2016 New example - Minecraft-like 3D application.
Hello, I've implemented initial support of Android in DlangUI. Only armv7a architecture is supported so far. You can downlowd sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/ How to add support of Android to your DlangUI project. ===================================================== Copy dlangui/android/android_project directory to you DlangUI project directory. Probably you will want to change android package name in AndroidManifest.xml and application display name in res/values/strings.xml Modify android_app.mk, android_build_config.mk android_app.mk ============== Update LOCAL_SRC_FILES to include all your project's files. android_build_config.mk ======================= Update paths to Android NDK, SDK, DlangUI source directory. Default values: export DLANGUI_DIR=$HOME/src/d/dlangui export NDK=$HOME/android-ndk-r11c export SDK=$HOME/android-sdk-linux export LDC=$HOME/ldc2-android-arm-0.17.0-alpha2-linux-x86_64 export NDK_ARCH=x86_64 Use LDC cross compiler for armv7a build according instructions https://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D
Apr 21 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:Hello, I've implemented initial support of Android in DlangUI.Am I sleeping? Can we develop UI applications for Android on D? It's great!
Apr 21 2016
On Thursday, 21 April 2016 at 14:48:40 UTC, ANtlord wrote:On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:Yes, and the same code may run on both desktops and Android.Hello, I've implemented initial support of Android in DlangUI.Am I sleeping? Can we develop UI applications for Android on D? It's great!
Apr 21 2016
On Thursday, 21 April 2016 at 14:48:40 UTC, ANtlord wrote:Am I sleeping? Can we develop UI applications for Android on D? It's great!Yes – cool, right? This is a reality now mostly due to Joakim's great LDC work. — David
Apr 22 2016
On Friday, 22 April 2016 at 18:48:26 UTC, David Nadlinger wrote:This is a reality now mostly due to Joakim's great LDC work.(the fact that we can deploy stuff to Android in the first place, that is – obviously, the UI layer is a whole separate story)
Apr 22 2016
On Friday, 22 April 2016 at 18:48:26 UTC, David Nadlinger wrote:This is a reality now mostly due to Joakim's great LDC work.Yes, it's really GREAT work! I just took his NativeActivity example and modified a bit to make dlangui's platform class implementation. I would be nice to have all Joakim's patches in upstream LDC and druntime/phobos.
Apr 22 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:Hello, I've implemented initial support of Android in DlangUI.Forgot to add that DerelictFT patch is required for DlangUI/Android. (Freetype library has name libft2.so on Android) PR is submitted, but not yet integrated into DerelictFT: https://github.com/DerelictOrg/DerelictFT/pull/9 PS: Current build is using android-19 API (Android 4.4 Kitkat) due to GLES3 dependency. Will provide support of older platforms later, if needed.
Apr 21 2016
On Thursday, 21 April 2016 at 15:49:32 UTC, Vadim Lopatin wrote:Forgot to add that DerelictFT patch is required for DlangUI/Android. (Freetype library has name libft2.so on Android) PR is submitted, but not yet integrated into DerelictFT: https://github.com/DerelictOrg/DerelictFT/pull/9I was late, but I have since gotten this taken care of, so it's all golden. FYI, for anyone facing a similar problem in the future and is hung up waiting on me to merge a pull request, the base loader in DerelictUtil allows overriding the default library names. So instead of a library like DLangUI requiring a patched Derelict package, you could do this: version(Derelict_OS_Android) DerelictFT.load("libft2.so"); You can pass multiple library names as a single, comma-separated string: DerelictFT.load("libft2.so,libfreetype.so"); Or as an array (which is what the above is converted to internally anyway): DerelictFT.load(["libft2.so", "libfreetype.so"]);
Apr 22 2016
On Friday, 22 April 2016 at 13:41:52 UTC, Mike Parker wrote:I was late, but I have since gotten this taken care of, so it's all golden. FYI, for anyone facing a similar problem in the future and is hung up waiting on me to merge a pull request, the base loader in DerelictUtil allows overriding the default library names. So instead of a library like DLangUI requiring a patched Derelict package, you could do this: version(Derelict_OS_Android) DerelictFT.load("libft2.so"); You can pass multiple library names as a single, comma-separated string: DerelictFT.load("libft2.so,libfreetype.so"); Or as an array (which is what the above is converted to internally anyway): DerelictFT.load(["libft2.so", "libfreetype.so"]);Thank you for your help! I've updated dlangui dub.json with latest DerelictFT.
Apr 22 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:I've implemented initial support of Android in DlangUI.It's great! Thank you! And congrats with it!
Apr 21 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:Hello, I've implemented initial support of Android in DlangUI. Only armv7a architecture is supported so far. You can downlowd sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/DlangUI Tetris example now works ok on Android (arm, android4.4+) You can download it here: https://sourceforge.net/projects/crengine/files/DlangUI/
Apr 22 2016
On Friday, 22 April 2016 at 12:05:52 UTC, Vadim Lopatin wrote:On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:Android5.02 ,Not ok, sorry.Hello, I've implemented initial support of Android in DlangUI. Only armv7a architecture is supported so far. You can downlowd sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/DlangUI Tetris example now works ok on Android (arm, android4.4+)
Apr 22 2016
On Friday, 22 April 2016 at 15:02:32 UTC, FrankLike wrote:Does it crash instantly or shows app GUI for some time? Is your smartphone arm-based? Couldn't you collect logs with `adb logcat`?Android5.02 ,Not ok, sorry.You can downlowd sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/DlangUI Tetris example now works ok on Android (arm, android4.4+)
Apr 22 2016
On Friday, 22 April 2016 at 17:02:20 UTC, Vadim Lopatin wrote:On Friday, 22 April 2016 at 15:02:32 UTC, FrankLike wrote:What is the name of log file? Nothing is in SDCard.Does it crash instantly or shows app GUI for some time? Is your smartphone arm-based? Couldn't you collect logs with `adb logcat`?Android5.02 ,Not ok, sorry.You can downlowd sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/DlangUI Tetris example now works ok on Android (arm, android4.4+)
Apr 23 2016
On Friday, 22 April 2016 at 17:02:20 UTC, Vadim Lopatin wrote:Does it crash instantly or shows app GUI for some time? Is your smartphone arm-based?test-runner.apk is ok,but DLangUITetrisExample.apk and DlangUIHelloWorld.apk ,only shows black color. HTC Android 5.02 ,it's arm-based,Not ok, sorry. Where is the log file? Path?
Apr 23 2016
On Saturday, 23 April 2016 at 11:21:10 UTC, FrankLike wrote:On Friday, 22 April 2016 at 17:02:20 UTC, Vadim Lopatin wrote:Log messages are in Android system log. On older androids, application CatLog (available on Market) was able to store logs to file. But on latest android, app cannot read logs of other applications, and CatLog shows none useful. You can try CatLog, but if it does not work (if you cannot see any messages with 'dlangui' tag), the only way to get logs I know is to use 'adb' utility from Android SDK. Download Android SDK, unpack to some folder, use sdk/platform-tools/adb utility. Connect device to pc using USB. `adb logcat` from commandline shows log messages from device. run `adb logcat > log.txt`, then start program which crashes on device, then press Ctrl+C to stop adb logcat. Now file log.txt should contain logs with crash.Does it crash instantly or shows app GUI for some time? Is your smartphone arm-based?test-runner.apk is ok,but DLangUITetrisExample.apk and DlangUIHelloWorld.apk ,only shows black color. HTC Android 5.02 ,it's arm-based,Not ok, sorry. Where is the log file? Path?
Apr 23 2016
On Saturday, 23 April 2016 at 11:42:49 UTC, Vadim Lopatin wrote:[...]Thank you. But why nothing to be shown,only black color?
Apr 23 2016
On Saturday, 23 April 2016 at 12:45:01 UTC, FrankLike wrote:On Saturday, 23 April 2016 at 11:42:49 UTC, Vadim Lopatin wrote:Probably something is wrong with OpenGL. E.g. OpenGL ES3 is not supported. Log can should failed opengl calls.[...]Thank you. But why nothing to be shown,only black color?
Apr 23 2016
On Saturday, 23 April 2016 at 14:35:55 UTC, Vadim Lopatin wrote:On Saturday, 23 April 2016 at 12:45:01 UTC, FrankLike wrote:Waiting for the new apk.... Thank you..On Saturday, 23 April 2016 at 11:42:49 UTC, Vadim Lopatin wrote:Probably something is wrong with OpenGL. E.g. OpenGL ES3 is not supported. Log can should failed opengl calls.[...]Thank you. But why nothing to be shown,only black color?
Apr 23 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:Hello, I've implemented initial support of Android in DlangUI. [...]Congratulations!
Apr 22 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:(snip)Wow, really nice stuff! I wasn't even aware we could write D for Android at all...
Apr 22 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:I've implemented initial support of Android in DlangUI.Congratulations, Vadim. This is a very exciting development. (And impressive in the 'consequent' department, as the Germans say - you said you would have DlangUI ported to Android some weeks after the working compiler, and that's what you did!). Might be useful for me to port some D code for internal enterprise apps to Android that currently runs on linux (I recognise how experimental it is, but I'm okay with that since mobile is just nice to have, and not yet necessary). Will you be at dconf?
Apr 22 2016
On Friday, 22 April 2016 at 18:49:24 UTC, Laeeth Isharc wrote:This is a very exciting development. (And impressive in the 'consequent' department, as the Germans say - you said you would have DlangUI ported to Android some weeks after the working compiler, and that's what you did!).It took about one week to make DlangUI android backend once I managed to build NativeActivity example by Joakim's instructions. I would say it will take a week or too to make iOS backend once we have working compiler for iOS (in my estimations it will have 1K-2K lines of D code and 1K-2K lines of obj-c code. Unfortunately, I have no experience with objective C neither with iOS programming. Android port was easy for me because DlangUI was a kind of port/reimplementation of my C++ cross platform GUI library I used for my CoolReader GL project (e-book reader).Might be useful for me to port some D code for internal enterprise apps to Android that currently runs on linux (I recognise how experimental it is, but I'm okay with that since mobile is just nice to have, and not yet necessary).Please let me know issue you face when using DlangUI for mobile development.Will you be at dconf?No, I'm not planning to participate. D is just a hobby for me.
Apr 22 2016
On Saturday, 23 April 2016 at 02:48:10 UTC, Vadim Lopatin wrote:On Friday, 22 April 2016 at 18:49:24 UTC, Laeeth Isharc wrote:Anyone interested in taking DlangUI and turning it into something like Swing/JavaFX for D?This is a very exciting development. (And impressive in the 'consequent' department, as the Germans say - you said you would have DlangUI ported to Android some weeks after the working compiler, and that's what you did!).It took about one week to make DlangUI android backend once I managed to build NativeActivity example by Joakim's instructions. I would say it will take a week or too to make iOS backend once we have working compiler for iOS (in my estimations it will have 1K-2K lines of D code and 1K-2K lines of obj-c code. Unfortunately, I have no experience with objective C neither with iOS programming. Android port was easy for me because DlangUI was a kind of port/reimplementation of my C++ cross platform GUI library I used for my CoolReader GL project (e-book reader).Might be useful for me to port some D code for internal enterprise apps to Android that currently runs on linux (I recognise how experimental it is, but I'm okay with that since mobile is just nice to have, and not yet necessary).Please let me know issue you face when using DlangUI for mobile development.Will you be at dconf?No, I'm not planning to participate. D is just a hobby for me.
Apr 23 2016
On Saturday, 23 April 2016 at 18:16:38 UTC, Chris wrote:Anyone interested in taking DlangUI and turning it into something like Swing/JavaFX for D?What exactly do you mean by that?
Apr 23 2016
On Sunday, 24 April 2016 at 06:19:14 UTC, thedeemon wrote:On Saturday, 23 April 2016 at 18:16:38 UTC, Chris wrote:Embrace DlangUI or something based on it in the same way DUB was embraced. Atm, only Vadim works on it as a hobby. It would be a pity to see it come to a standstill one day - for what ever reason. I think a D based UI is important, especially now that D is getting some attention.Anyone interested in taking DlangUI and turning it into something like Swing/JavaFX for D?What exactly do you mean by that?
Apr 24 2016
On Sunday, 24 April 2016 at 11:57:18 UTC, Chris wrote:On Sunday, 24 April 2016 at 06:19:14 UTC, thedeemon wrote:+1On Saturday, 23 April 2016 at 18:16:38 UTC, Chris wrote:Embrace DlangUI or something based on it in the same way DUB was embraced. Atm, only Vadim works on it as a hobby. It would be a pity to see it come to a standstill one day - for what ever reason. I think a D based UI is important, especially now that D is getting some attention.Anyone interested in taking DlangUI and turning it into something like Swing/JavaFX for D?What exactly do you mean by that?
Apr 25 2016
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:You can download sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/New example - Minecraft-like 3D application. It's demo of dlangui Scene3d - simple 3D engine. On Android works a bit slow, and with artifacts. But works... To try it on desktop, use `dub run dlangui:dminer` Another Scene3d example: `dub run dlangui:d3d`
Apr 26 2016