Android Tutorial [Linux] [B4X] Wine Installer

📦 Install B4A+B4J on Linux Mint using Wine with a single silent script​


GitHub: https://github.com/pyhoon/b4x-wine-installer


Files:
  1. install_b4x_wine.sh
  2. uninstall_b4x_wine.sh
  3. configure_b4x_settings.sh
  4. README.md
Archived:
  1. install_b4a_wine.sh
  2. install_b4j_wine.sh
  3. uninstall_b4a_wine.sh
  4. uninstall_b4j_wine.sh
  5. configure_b4a_settings.sh
  6. configure_b4j_settings.sh
  7. repair_b4a_launcher.sh
  8. repair_b4j_launcher.sh
The script is modified from the combination of B4A Wine Installer and B4J Wine Installer script generated by AI (Qwen3.6-Plus chat)
Using a single wine prefix saved you 3GB+ of diskspace.

Disclaimer: I haven't really fully tested it. Use it at your own risk.

🚀 How to use​

Just 3 lines of commands (You can copy and paste in one go).
Bash:
wget https://raw.githubusercontent.com/pyhoon/b4x-wine-installer/main/install_b4x_wine.sh
chmod +x install_b4x_wine.sh
./install_b4x_wine.sh

⚠️ Note / Reminder​

  1. When you double-click on a launcher (desktop icon), Linux Mint will prompt you to choose "Launch Anyway" or "Mark Executable". Choose the latter so it won't ask you again.
  2. Remember to comment the #CustomBuildAction: folders ready for RoboCopy.exe or Shared Files
  3. Even if you have run "configure_b4x_settings.sh", B4A still pops up asking you to set the Paths, just click "Ok" to save the settings.
  4. Make sure you have deleted old scripts and you are not downloaded the new script which renamed to .sh1 extension. Otherwise you are not executing the new script.
  5. Tips: To run winetricks, run winetricks prefix=.wine_b4x

🤝 Contributing​

Found an issue or have an improvement?
  1. Fork the repository
  2. Create a feature branch
  3. Submit a Pull Request

🙏 Credits​

Special thanks to B4X members who have contributed tutorial/guides in the past so that AI could use them as references to assist me to generate this script.
@Mihai Rainer Jr. @walt61 @Raboebie

📄 License​

MIT License - See LICENSE file for details.
 

Attachments

  • Screenshot3.png
    Screenshot3.png
    87.8 KB · Views: 742
  • Screenshot4.png
    Screenshot4.png
    94.7 KB · Views: 441
Last edited:

aeric

Expert
Licensed User
Longtime User
My understanding is, even latest version of Wine 11 is 64-bit, we can add 32-bit architecture
B4X:
sudo dpkg --add-architecture i386
which has already handled by the script before downloading the winehq key and source list.

Adding 32-bit support is only helping for installing .Net Framework 4.52 dependencies.
 

johnaaronrose

Active Member
Licensed User
Longtime User
Finally worked out why Wine stable from WineHQ would not install. Some time back I did a rather stupid thing: I installed Ubuntu Pro (with ESM Apps, ESM Infra & Kernel Livepatch). I eventually realised my mistake and stupidly removed it in the wrong way (i.e. by merely disabling it in Ubuntu's 'Software & Updates). I've now re-enabled Ubuntu Pro and then removed it in the correct way. If anybody has done the same and wants to know how to do this, please contact me.

I have now installed B4A (including latest stable Wine from WineHQ) using the script referred to in post #1 and B4A works correctly.
 
Top