Other Linux and B4A v8.30

sq8mvy

New Member
Licensed User
Hi,

I was able to install and run B4A v8.30 in Linux Mint 18.3, wine - 3.11. I am writing about it, because from the information on this forum it appears that the new versions of B4A can not be run under wine.


I apologize for poor English - Translated by google translator

B4A.jpeg
 

Winni

Member
Licensed User
Hi,

This is great news -- could you please tell if any special steps were necessary to get B4A - and the Android SDK, Java, .NET... - up and running under Linux with Wine?

I now work at a research institute, and that gives me the luxury that I do not have to use Windows anymore at all -- Microsoft has turned Windows into an unacceptable spyware and advertisement platform that I no longer want to touch. My main work machines are now a Mac Pro with High Sierra and a Dell XPS 15 with Ubuntu 18.04. If the B4X family could be properly(!) used in WINE, that would be awesome. I must confess, though, that my last attempts failed to get it running under the stock Wine64 version that comes with Ubuntu 18.04 LTS.

If you could summarize the installation procedure, that would be amazing!
 
Upvote 0

sq8mvy

New Member
Licensed User
Hi, Winni

I present the installation instructions below:

- Uninstall the default WINE
- add WINEHQ repository. The instruction can be found under the link -> https://wiki.winehq.org/Ubuntu
- install winehq-stagging - I use this branch
B4A_wine-staging.png
The above steps are optional - follow them if there are installation problems under the default WINE

- generate a 32bit environment for WINE.....
in the console:
WINEARCH=win32 WINEPREFIX=/home/USER_DIRECTORY/.wine-B4A winecfg
setup WINE - select windows7 or newer, update disks in the Drive tab. Apply and OK
B4A_wine_setup.png

- install winetricks
- install corefonts:
WINEPREFIX=/home/USER_DIRECTORY/.wine-B4A winetricks corefonts

- install .NET Framework 4.0 or 4.5 ( I have net 4.0 installed )
WINEPREFIX=/home/USER_DIRECTORY/.wine-B4A winetricks dotnet40
B4A_NetFramework_40.png

During the installation of dotnet40, follow the winetricks installer's instructions.
You will need to download several files manually indicated by winetricks.

- Now follow the instructions on the page -> https://www.b4x.com/b4a.html
download 32bit ( Windows x86 ) Java 8 JDK and install it
WINEPREFIX=/home/USER_DIRECTORY/.wine-B4A wine /path/to/download/jdk-8u181-windows-i586.exe
There was a problem - there are probably no fonts installed for WINE. A small key must be confirmed in a new window.
If the JDK installer does not close itself, stop it by CTRL + C
B4A_JDK_Install.png

Download the AndroidSDK archive and unpack it to some place. For me it is /home/pawel/.wine-B4A/drive_c/users/pawel/Android

Download and install B4A. I do not have the full version of B4A so I install the trial version..
WINEPREFIX=/home/USER_DIRECTORY/.wine-B4A wine /path/to/b4a-trial.exe

Now we run B4A and configure the paths. From B4A level we install Android SDK packages
WINEPREFIX=/home/USER_DIRECTORY/.wine-B4A wine /home/USER_DIRECTORY/.wine-B4A/drive_c/Program\ Files/Anywhere\ Software/Basic4android/B4A.exe
( if B4A is installed in the default path )
B4A_Run_b4a.png

Now open Tools> Configure Paths and set the path to javac.exe
B4A_set_path_java.png

Klick button Open SDK Manager and set path for sdkmanager.bat and install packages.
B4A_sdk_Manager.png

After installing the SDK packages, set the path for android.jar
B4A_set_path_android_27.png

Finally, you can create an activator for running B4A on your desktop.
B4a_aktywator.png

B4A_Bridge, B4A_Designer and Compile program works ok.

B4A_bridge_designer.jpeg
B4J in the latest version also works under WINE. The installation proceeds in the same way.
Good luck,
 
Last edited:
Upvote 0

Winni

Member
Licensed User
Hi sq8mvy,

Thank you very much for this guide -- I will check it out next week when I'm back in the office. From what I see, it seems to be a mix of the latest Wine build and the fact that you use as 32-Bit Wine-Prefix that will do the trick. I've only tried 64-Bit prefixes thus far, and the stock Wine on Ubuntu 18.04.

I'll post my feedback here once I've had a chance to test your instructions.

Again, thanks a lot for this - much appreciated!

All the best,
Winni
 
Upvote 0

sq8mvy

New Member
Licensed User
Hi Winni,

WINE has to create a 32bit environment because only in this way will the NET Framework be properly installed.
This also applies to programs using the NET Framework. To work properly, they must work in a 32-bit WINE environment.

I've always used the test versions of WINE. You can check if B4A installs under the default version of WINE.
If you continue to have problems installing B4A, I will try to help.
Sorry for my English. I'm using a Google translator

Regards
sq8mvy,
 
Upvote 0

MaFu

Well-Known Member
Licensed User
Hi,

I was able to install and run B4A v8.30 in Linux Mint 18.3, wine - 3.11. I am writing about it, because from the information on this forum it appears that the new versions of B4A can not be run under wine.


I apologize for poor English - Translated by google translator

View attachment 70155
Does it work with devices connected over USB (for App upload and debug)?
 
Upvote 0

sq8mvy

New Member
Licensed User
Hi,

I test only via WiFi / ethernet and B4A Bridge. USB support in WINE is very problematic, but it is not impossible.
If I can run a native version of ADB server (Linux version) from B4A level then the USB connection should work. In WINE by B4A-Bridge works debugging, designer, app upload. At the moment I do not see the need to use a USB connection.

I apologize for poor English - Translated by google translator,

Regards
sq8mvy
 
Upvote 0
Top