B4J Tutorial [Linux] B4J Wine Installer

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


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

Screenshot1.png
Screenshot2.png


Files:
  1. install_b4j_wine.sh
  2. uninstall_b4j_wine.sh
  3. configure_b4j_settings.sh
  4. README.md
  5. USAGE SUMMARY.md
  6. KEY TECHNICAL NOTES.md

The script is generated by AI (Qwen3.6-Plus chat)
For B4A, check [Linux] B4A Wine Installer

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/b4j-wine-installer/main/install_b4j_wine.sh
chmod +x install_b4j_wine.sh
./install_b4j_wine.sh

🤝 Contributing​

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

📄 License​

MIT License - See LICENSE file for details.
 

Attachments

  • b4j-wine-installer.zip
    15.8 KB · Views: 31
Last edited:

aeric

Expert
Licensed User
Longtime User
I get an error. Maybe due to I have installed wine and conflict happened.

B4X:
E: Conflicting values set for option Signed-By regarding source https://dl.winehq.org/wine-builds/ubuntu/
noble: /etc/apt/keyrings/winehq-archive.key != /usr/share/keyrings/winehq.gpg

Please check: https://github.com/pyhoon/b4j-wine-installer/issues/1 (Closed)
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Last edited:

walt61

Well-Known Member
Licensed User
Longtime User
Disclaimer: I haven't really fully tested it. Use it at your own risk.

Hi @aeric ,

Great job! I have fully tested it, with a Linux Mint 22.3 Cinnamon 64-bit VM in VirtualBox 🙂

Attached you'll find my version; all changes I made can be found by searching for 'original' as I didn't remove any of your code but commented it. Some changes were important (like going for the 64-bit versions instead of 32-bit), others less so. Summary:
- Wine architecture changed from 32 to 64-bit
- Commented the 'enabling 32-bit architecture' step
- Creation of the 'Additional Libraries' folders failed with an 'Access denied.' error; changed their location
- Desktop icon's Exec spec didn't work
- Added 'echo' commands at the end that contain the exact values to use in Configure Paths

Two additional things:
- It may be useful to add a comment somewhere recommending to restart B4J after its first run, as that will reduce screen flicker (at least it did here)
- The desktop icon download doesn't seem to have worked properly as the file wasn't recognised as a png here, but that might have been a temporary issue with github

EDIT: the version I downloaded (and edited) probably doesn't contain your fix from post #4 - d'oh...
 

Attachments

  • install_b4j_wine64.sh.zip
    4.6 KB · Views: 29

aeric

Expert
Licensed User
Longtime User
Hi @aeric ,

Great job! I have fully tested it, with a Linux Mint 22.3 Cinnamon 64-bit VM in VirtualBox 🙂

Attached you'll find my version; all changes I made can be found by searching for 'original' as I didn't remove any of your code but commented it. Some changes were important (like going for the 64-bit versions instead of 32-bit), others less so. Summary:
- Wine architecture changed from 32 to 64-bit
- Commented the 'enabling 32-bit architecture' step
- Creation of the 'Additional Libraries' folders failed with an 'Access denied.' error; changed their location
- Desktop icon's Exec spec didn't work
- Added 'echo' commands at the end that contain the exact values to use in Configure Paths

Two additional things:
- It may be useful to add a comment somewhere recommending to restart B4J after its first run, as that will reduce screen flicker (at least it did here)
- The desktop icon download doesn't seem to have worked properly as the file wasn't recognised as a png here, but that might have been a temporary issue with github

EDIT: the version I downloaded (and edited) probably doesn't contain your fix from post #4 - d'oh...
Hi @walt61
I have kept updated the script a few days ago. Most of the issues mentioned above actually have already solved.

I was testing on Linux Mint xfce (x11) under VirtualBox.

I am investigating why the prefix I created using the script is not as good as the default prefix I created by hand.

I will keep updating and testing the script when I am free.

Thanks for testing and commenting about the script.
 

aeric

Expert
Licensed User
Longtime User
Yeah my bad, I had immediately downloaded it when I saw your thread arrive but then hadn't revisited it before testing 🙂
No problem. I also want to apologize because I was too excited to upload the first script before I tested it. It was created by Qwen AI and the time I uploaded it was morning when I haven't gone to bed. I only found the issues when I started tested it. By the way, it is still not perfect and I will check your comments later to see any area I can improve to the script.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Worked without change in Zorin. Allthough the B4J (Wine) Icon on the desktop fails but the B4J Icon in the menu works.
Really nice work @aeric !
 

aeric

Expert
Licensed User
Longtime User
Worked without change in Zorin. Allthough the B4J (Wine) Icon on the desktop fails but the B4J Icon in the menu works.
Really nice work @aeric !
Maybe there is a slight difference between Zorin OS and Linux Mint. You can tweak the script if you want.

 
Last edited:

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Maybe there is a slight difference between Zorin OS and Linux Mint. You can tweak the script if you want.


Thanks, I will check that.
Only other issue I saw was the 'B4J_Projects' folder that was created did not seem to map to a place I could find when creating B4J projects.

But, compiling, debugging... All works well. Amazing!!!
 

aeric

Expert
Licensed User
Longtime User
the B4J (Wine) Icon on the desktop fails
I updated the launcher. Hope it works now.

B4X:
'Exec=env WINEPREFIX="${WINE_PREFIX}" wine "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\B4J\\B4J.lnk"
Exec=env WINEPREFIX="${WINE_PREFIX}" wine "${B4J_EXE}"
 
Top