|
Post by matty47 on Apr 14, 2023 23:06:09 GMT -6
Not sure if this is a bug or my own ineptitude. I am running Mint Linux 20.3 in Virtual Box. I tried installing RCBasic and can start the editor OK. When I try to run a program I get a missing symbol error SDL2_FlashWindow. I checked the version of SDL2 in the lib folder and found libSDL2-2.0.so.10.0 symbolically linked to the libSDL2-2.0.so.0. A web search seems to indicate that Flashwindow was available from SDL2.16 which I assume is later than the one I have installed. Anyone else have this problem and how did you fix it? Got to go out so I'll have another go later. Thanks
|
|
|
Post by n00b on Apr 14, 2023 23:11:24 GMT -6
I bundled the version of SDL2 I used. It should be automatically using that version when running from RCBasic Studio.
Are you using Studio or some other editor?
|
|
|
Post by matty47 on Apr 15, 2023 2:42:52 GMT -6
I'm using the studio. I tested again. I had started studio using the studio run file in the app folder. I just tried again and found the entry in the start menu under programming. Starting from that I was able to compile OK. Must have missed some instructions somewhere. Now I just need to sort out the android build on windows or get it working under linux - but that's another story. Thanks for the quick reply though. Much appreciated.
|
|
|
Post by n00b on Apr 15, 2023 10:21:12 GMT -6
Android building should be a lot easier now. If you followed the instructions and its still not working let me know. I tried to be as thorough as I could in the instructions but there may be some assumptions I made that I didn't think about.
|
|
|
Post by matty47 on Apr 15, 2023 19:10:48 GMT -6
I followed the instructions and let the init_android script do the downloads. SDK 28 was installed along with the ndk. When I tried compiling it appeared that something (gradle?) was calling for sdk30. I got a release resources error in the final step of the build. I checked the web - one suggestion was a mismatch between the sdk and the build tools so I changed the default sdk in the Init_android script to sdk30 and reran the script. This downloaded the correct tools and another emulator image (big download!). Still getting errors in the android build. Debug Build Error (pretty sure this is it)
13 warnings and 1 error generated. make: *** [/home/mingl/android/ndk/21.4.7075529/build/core/build-binary.mk:478: /home/mingl/Programs/rcbasic/tools/dist/rcbasic_android/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/objs-debug/main/main.o] Error 1
Release Build Error
In file included from /home/mingl/Programs/rcbasic/tools/dist/rcbasic_android/android-project/app/jni/src/main.cpp:53: /home/mingl/Programs/rcbasic/tools/dist/rcbasic_android/android-project/app/jni/src/rc_process.h:5:10: fatal error: 'SDL2/SDL.h' file not found #include <SDL2/SDL.h>
I do have SDL2/SDL.h in /usr/include and there is also SDL/SDL.h in a dir above the src mentioned in the message. I looked at the makefile which set SDL include to the second one. I tried changing the setting in the makefile to SDL2 dir to the local include dir but that did not work so I restored the original makefile.
Making for android seems terribly convoluted and I'm not the greatest at understanding all the steps. Good news is that other platforms seem to be generated OK. Not really tried web output yet.
I found windows even more exasperating as I have Android studio installed. I did set up a separate dir with just the command line tools, set ANDROID_HOME to the parent dir and then ran the init_android bat file. Everything installed OK although I did have to upgrade from JDK8 to JDK17 to get the bat file to work - something about the jar files needing "level 55" not "52". Only tried a debug android build but it failed. The output messages seem fewer on windows so I can't see why the fail.
Sorry for the long reply, just trying to pass on as much info as possible and not sure if any of this helps at all. A final question - would it be less complicated to output an Android Studio project and then use Android studio to create the apk? This might allow creation of an aab as well. I have no idea how hard this might be.
Thanks for all your hard work.
|
|
|
Post by n00b on Apr 15, 2023 22:55:02 GMT -6
I know what the issue is. rc_process.h was added very close to release. I don't think I did another android test after adding it. I will try to have a fix uploaded for it tommorow.
|
|
|
Post by n00b on Apr 16, 2023 16:48:53 GMT -6
matty47 I have some good news and bad news. The good news is that I apparently did account for rc_process.h with the latest release and a fresh install of RCBasic on linux was able to build for android without any issues at all. The bad news is that I don't know how you are getting the error you are getting. I will try it on Linux Mint 20.3 and see if I get the error there. I tried it in a VM with the following specs: Also, I found a small bug on the windows version. To fix it just replace pkg.bas in rcbasic\tools\dist with this and re-compile it: pkg.bas (41.2 KB)
|
|
|
Post by n00b on Apr 16, 2023 19:31:12 GMT -6
Ok, I finally found the issue. I am going to re-upload the linux version once I finish re-packaging it. It should be up in about 20 minutes. It will be called 320r3.
|
|
|
Post by matty47 on Apr 17, 2023 3:18:41 GMT -6
On Mint Linux used the uninstall script to remove the existing RCBasic and then installed 320r3. I tried building both debug and release apks. Both versions built ok and excited I transferred them to my Redmi Note 8 Pro phone. System refused to install them - dashed. I opened both in Android studio on my Win 11. AndStud notified that the libraries did not have any debug "infos" and wanted me to find libraries that did. I analysed both in Android Studio and did not get any further notifications I tried running the release version in the emulator (sdk30). It appeared to install but when running only showed a black screen. I have now installed a fresh empty Win10 in virtual box and will wait for your next update before chasing android building any further. Thanks for all your hard work in this. I am sure that with all the different versions of java and android sdks on my win machine it was always going to be hard for me.
|
|
|
Post by n00b on Apr 17, 2023 6:48:33 GMT -6
Did you make a keystone? You have to do that to get it to work.
|
|
|
Post by matty47 on Apr 17, 2023 6:54:22 GMT -6
Yes I made a .keystore for the release version.
|
|
|
Post by n00b on Apr 17, 2023 7:24:47 GMT -6
Try installing the release version. I think the debug had some issues.
|
|
|
Post by n00b on Apr 17, 2023 8:14:51 GMT -6
Sorry, I was rushing through your post before leaving for work. When I get home tonight I will troubleshoot it some more. Android has always been a bit tricky. The hardest part is just building so I am sure your issue will be fixed today.
|
|
|
Post by n00b on Apr 17, 2023 20:06:11 GMT -6
matty47 I found the android issue. Open /home/<your_username>/Programs/rcbasic/tools/dist/rcbasic_android/android-project/app/jni/src/main.cpp and comment out the top line in that file. It should work fine after that. I will make sure its commented out in the next revision.
|
|
|
Post by matty47 on Apr 18, 2023 16:53:15 GMT -6
I did that and created a new release apk. The file was created OK. Unfortunately the phone would not install the apk with this message. "There was a problem while parsing the package" I'm off to visit my daughter interstate for her 40th birthday so will be away for a few weeks. Please don't stress too much over this. Thanks again for all your work.
|
|