Other Running B4X products on Linux with PlayOnLinux

Mihai Rainer Jr.

Member
Licensed User
I have managed to successfully run B4A and B4J on Xubuntu 18.04, by using PlayOnLinux and I thought it will be a good idea to share this with the community.

First of all, I need to say that you will need a windows installation of B4A to manage android SDK, since B4ASdkManager is not running because JavaFX fails on Wine.
Also, for B4J, WYSIWYG will display a black window, for the same reason, but the designer is working. Any attempt to use JavaFX based functions will fail.
The installation is pretty straightforward, by installing PlayOnLinux and the latest wine version for it (3.17).
Since I am also using the same virtual drive for PCB design (DesignSpark PCB), I have installed the following components (some may not be needed by B4A and B4J):
- dotnet40
- msxml3
- msxml6
- mfc40
- vcrun2010
- windows fonts
- mono210
- gecko
Then I have installed JDK-1.8.0_181 (with "Install non-listed program" option of PLayOnLinux).
After that I have installed B4A and copied the android SDK directory from the windows machine, configured it (paths and so on). If you want to use B4J, you need to install oracle JDK on your Linux and, also, B4J_bridge, required for applications execution. For B4A I am using B4A-bridge to connect over the local network.
For installation, I have started PlayOnLinux, selected "Configuration", then Miscellaneous -> Run a .exe in virtual drive.
The designer will recommend you to upgrade to .net 4.5.2, but trying this have destroyed the setup several times on me.
You need to use PLayOnLinux configuration to configure wine to 3.17 and to emulate Windows 10 for all applications installed in the virtual drive.
Also, I found the best display options are with:
- GLSL Support - enabled;
- Direct Draw Renderer - gdi;
- Video memory size - 128;
- Offscreen rendering mode - fbo;
- for the rest just let them as default.
I have found B4A working 99% (except B4ASdkManager that I am periodically check in a windows virtual machine and then simply copy the android SDK to the Linux Wine virtual drive).
On B4J, as I said, all function that requires JavaFX (for example, text editor on buttons labels) will fail and break the session.
Sometimes, on start, you will get about not founding proper runtime, just click OK and the applications will run wih no problem.
I have also found that it is actually running faster on Linux with PlayOnLinux than on native Windows machine.
At last, I have to mention that I have also installed B4i, but not tested, since I am not on the iOS development moment right now. Eventually, I will update this post when I will reach this milestone :)
Also tested on a Celeron (2 cores) laptop, with 4GB RAM and SSD, with reasonable performance.
Hope this will make few members happy, since there are, probably, some other people that are not very in love with Windows :)
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
B4X Products needs .net Framework from Microsoft. I fear it will not work on Linux
 
Upvote 0

Mihai Rainer Jr.

Member
Licensed User
See the attached screenshot. This error flows tens times and the window remains black.
But, I guess it will be an easy solution for that. I have tried to run B4Asdkmanager directly with Linux JDK and it starts fine, except it
is not finding the directory structure, since the Linux is using "/" in the paths instead of "\". So, you can try to detect the OS or simply
pass a run parameter (default/no parameter = Windows, so you can build paths with "\" and if you pass "linux" parameter, just build patchs with "/".
If you can manage a trial version, I will test it for you.
Screenshot_2018-10-02_10-07-52.png
 
Upvote 0
Top