Other Running B4X products on Linux with PlayOnLinux

Discussion in 'Android Questions' started by Mihai Rainer Jr., Oct 1, 2018.

  1. Mihai Rainer Jr.

    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: Oct 1, 2018
  2. DonManfred

    DonManfred Expert Licensed User

    B4X Products needs .net Framework from Microsoft. I fear it will not work on Linux
     
  3. Mihai Rainer Jr.

    Mihai Rainer Jr. Member Licensed User

    Here is a picture of my laptop running B4A on Xubuntu 18.04, with PlayOnLinux and Wine 3.17 :)
    You need to install dotnet40 additional components on wine, plus mono210 and gecko
     

    Attached Files:

  4. Erel

    Erel Administrator Staff Member Licensed User

    What happens if you try to run B4A Sdk Manager without wine? It should work if Java is installed.
     
  5. Mihai Rainer Jr.

    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
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You are correct. B4A Sdk Manager does need to be updated to work with Linux.
     
  7. Mihai Rainer Jr.

    Mihai Rainer Jr. Member Licensed User

    Except that is building paths with "\" instead of "/". If you can manage that, you will have a product fully running on Linux :)
     
  8. Mihai Rainer Jr.

    Mihai Rainer Jr. Member Licensed User

    See the screenshot Screenshot_2018-10-02_10-23-06.png
     
  9. Mihai Rainer Jr.

    Mihai Rainer Jr. Member Licensed User

    Screenshot_2018-10-02_10-34-07.png Tried with JDK android SDK for Linus, same error
     
  10. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice