Make Standalone Apk in BBCSDL Android

Discussions about the BBC BASIC language, with particular reference to BB4W and BBCSDL
User avatar
zachnoland
Posts: 11
Joined: Sat 07 Dec 2024, 15:22
Location: somewhere in Southeast Asia

Make Standalone Apk in BBCSDL Android

Post by zachnoland »

Richard Russell wrote: Thu 27 Feb 2025, 17:07 They should not be stored in a parent directory (@dir$ + "../parent...") because if you do that any attempt to build a standalone executable (or in the case of Android a self-contained APK) will fail.

So whilst it may be working for you at the moment, I would review how you are organising your project so that you would be able to build a standalone executable or application if you wanted to.
I opened a new Topic for my new questions related to the things I found in the previous topic.

So, is it possible to create an .apk or .exe (standalone executable) in BBCSDL BASIC Android or Windows?

I tried in BBCSDL Windows to create an executable but it requires BBCSDL if you want to run the executable (I tried on another Virtual Machine computer), After that I think that BBCSDL is an interpreter not a compiler.

So is it possible to create a standalone Executable on Android or Windows others want to try without having to install BBCSDL?

If this is possible this is awesome! Make .apk with android or .exe with android.
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: Make Standalone Apk in BBCSDL Android

Post by Richard Russell »

zachnoland wrote: Fri 28 Feb 2025, 10:39 So, is it possible to create an .apk or .exe (standalone executable) in BBCSDL BASIC Android or Windows?
Yes, you can create completely self-contained applications from your BBC BASIC program in Windows, MacOS and Android.

In Linux and for running in a browser you can create an 'application bundle' but it requires additional components to support it (in the case of Linux the end-user must have installed SDL2, SDL2_ttf and SDL2_net from the repository; in the in-browser case you must link to the run-time engine at bbcbasic.net).

It is not currently possible to create a standalone application for iOS, and even if it was it wouldn't be a lot of use because there's no sideloading capability in iOS so you'd need to get it into the App Store. :(
I tried in BBCSDL Windows to create an executable but it requires BBCSDL if you want to run the executable (I tried on another Virtual Machine computer)
No it doesn't. The .exe file created by BBCSDL in Windows is completely standalone and contains all the components required to run on any Windows PC, including SDL2 itself and the BBCSDL run-time engine. That's why it's fairly large, even if your BBC BASIC program is small.
So is it possible to create a standalone Executable on Android or Windows others want to try without having to install BBCSDL?
Absolutely. For Windows and MacOS it's a capability built in to BBCSDL, for Android you need to download the free BBC2APK Windows application.

Here's an Android APK and here's a Windows EXE for the calculator program supplied with BBCSDL.
User avatar
zachnoland
Posts: 11
Joined: Sat 07 Dec 2024, 15:22
Location: somewhere in Southeast Asia

Re: Make Standalone Apk in BBCSDL Android

Post by zachnoland »

Richard Russell wrote: Fri 28 Feb 2025, 11:26
zachnoland wrote: Fri 28 Feb 2025, 10:39 So, is it possible to create an .apk or .exe (standalone executable) in BBCSDL BASIC Android or Windows?
Yes, you can create completely self-contained applications from your BBC BASIC program in Windows, MacOS and Android.

In Linux and for running in a browser you can create an 'application bundle' but it requires additional components to support it (in the case of Linux the end-user must have installed SDL2, SDL2_ttf and SDL2_net from the repository; in the in-browser case you must link to the run-time engine at bbcbasic.net).

It is not currently possible to create a standalone application for iOS, and even if it was it wouldn't be a lot of use because there's no sideloading capability in iOS so you'd need to get it into the App Store. :(
I tried in BBCSDL Windows to create an executable but it requires BBCSDL if you want to run the executable (I tried on another Virtual Machine computer)
No it doesn't. The .exe file created by BBCSDL in Windows is completely standalone and contains all the components required to run on any Windows PC, including SDL2 itself and the BBCSDL run-time engine. That's why it's fairly large, even if your BBC BASIC program is small.
So is it possible to create a standalone Executable on Android or Windows others want to try without having to install BBCSDL?
Absolutely. For Windows and MacOS it's a capability built in to BBCSDL, for Android you need to download the free BBC2APK Windows application.

Here's an Android APK and here's a Windows EXE for the calculator program supplied with BBCSDL.
This all looks interesting. I might try it on Windows too to make android app.

There seems to be one question that is missed. Is it possible to create .apk in bbcsdl android (I mean created with android device itself). If possible how?
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: Make Standalone Apk in BBCSDL Android

Post by Richard Russell »

zachnoland wrote: Fri 28 Feb 2025, 11:49 Is it possible to create .apk in bbcsdl android (I mean created with android device itself).
On the Android device itself? No.

I don't really consider Android to be suitable as a 'software development' platform, apart from anything else a small touchscreen is just too fiddly (I know you can connect an external keyboard, but it's still not ideal).

The minimal 'IDE' capabilities of the Android edition of BBCSDL are adequate for debugging, but I find them too limiting for development and testing. There's no profiler, no breakpoints, no memory monitor, no variable listing etc. and if a program crashes you have to restart the app.

So I develop my programs on a Windows laptop, and test them there as far as is practical (it has a touch screen, so I can even test the UI to a degree) and only when everything seems to be working do I move to Android for final testing.

Even then, I connect the Android device to the laptop with a USB cable, so that I can 'instantly' modify and re-test the program without having to edit it on Android at all.

Having said all that, BBC2APK is of course itself a BBC BASIC program so it could probably be ported to Android, but I don't plan to try.