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: 686
  • Screenshot4.png
    Screenshot4.png
    94.7 KB · Views: 395
Last edited:

aeric

Expert
Licensed User
Longtime User
You can always search how to resolve the problem by googling the error by Google AI.

To fix Wine 11 stable installation issues on Ubuntu 24.04 (Noble Numbat), you need to ensure the correct WineHQ repository and GPG keys are configured and update your multiarch architecture settings.

Fix Broken Installation Steps
Run the following commands in your terminal in order to set up and install Wine 11 stable properly:
    • Enable 32-bit architecture (required for Windows applications):
      bash
      sudo dpkg --add-architecture i386
      Use code with caution.
    • Create the keyring directory and download the official WineHQ signing key:
      bash
      sudo mkdir -pm755 /etc/apt/keyrings
      sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

      Use code with caution.
    • Update your package lists and install Wine stable:
      bash
      sudo apt update
      sudo apt install --install-recommends winehq-stable
      Use code with caution.

Troubleshooting Common Problems
    • "Unable to locate package winehq-stable": Ensure you added the .sources repository file correctly for noble as shown in step 3, and ran sudo apt update right after. [1, 2]
    • Unmet Dependencies: If apt complains about broken packages, it is usually because older repository lists conflict. Remove old lists (such as winehq-jammy.sources) from /etc/apt/sources.list.d/ before running sudo apt update again.
 

johnaaronrose

Active Member
Licensed User
Longtime User
Followed above procedure but still had same problem. So I deleted /etc/apt/sources.list.d/winehq.sources and did "sudo apt update" which went Ok followed by "sudo apt install --install-recommends winehq-stable" which gave:

john@Desktop:~$ sudo apt install --install-recommends winehq-stable
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
winehq-stable : Depends: wine-stable (= 11.0.0.0~noble-1)
E: Unable to correct problems, you have held broken packages.

PS Interestingly Synaptic says that no packages are broken and "sudo apt autoremove" says
"0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade."
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Followed above procedure but still had same problem. So I deleted /etc/apt/sources.list.d/winehq.sources and did "sudo apt update" which went Ok followed by "sudo apt install --install-recommends winehq-stable" which gave:

john@Desktop:~$ sudo apt install --install-recommends winehq-stable
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
winehq-stable : Depends: wine-stable (= 11.0.0.0~noble-1)
E: Unable to correct problems, you have held broken packages.

PS Interestingly Synaptic says that no packages are broken and "sudo apt autoremove" says
"0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade."
I think Ubuntu 24.04 is pointing to Wine version 9 which causes conflict with the Wine-stable version from WineHQ.
I suggest to remove all wine-stable installation for Ubuntu 24.04 and run the script.
I think sudo apt autoremove will not clean up the old version.
To make it easier, better to use Linux Mint.
 

johnaaronrose

Active Member
Licensed User
Longtime User
There are no packages whose names start with wine installed currently.
There's NO chance of my moving to Linux Mint.
 
Top