Hi,
I've just bought myself a Raspberry Pi 400 PC which is using Raspberry PI OS. I'm just wondering if anyone has tried running BCX on this machine? I'm guessing that the compiler would need to be CLANG/LLVM as Pellesc is only available for Windows. I've also never used Batch commands in a Linux environment. I've only ever used DOS batch commands.
It seems that the PI 400 can also run Windows 10 IOT although support by microsoft is deprecated.
https://www.raspberrypi.com/products/raspberry-pi-400/
I'm willing to have a go getting it working if it's remotely possible. Any thoughts? Thanks.
PS On second thoughts this is probably a stupid question as BCX only emits Windows API code. However there is BaCon for Linux. I've never used this and not sure how similar it is to BCX.
I have never tried the Pi OS.
I used a Pi Ubuntu distro.
I have little interest in Linux but I still have a box I test my UbxBasic ( not supported )
https://sourceforge.net/projects/ubxbasic/files/
I have not tried the Windows version in many years and doubt it will run??
I was in on the early development of BaCon but have not used it in many years. Very good support
Then there is always FreeBasic.
James
BCX + PI = you have a lot of work ahead of you.
Possible? yes
Practical? no
Quote from: djsb on April 15, 2022, 02:46:15 AM
PS On second thoughts this is probably a stupid question as BCX only emits Windows API code. However there is BaCon for Linux. I've never used this and not sure how similar it is to BCX.
Hello djsb,
I have used Linux Mint for a few years now and have a copy of BCX for Linux that is more or less written for GTK on linux. This was originally a port of BCX for Linux by Mike Henning and others. I added some code and ported it to use GTK3 from GTK2.
It's a bit rough but works for most anything I can throw at it. It uses g++ for compiling the code. I have even ported the latest Scintilla source code control using BCX code.
Anyway, the source code and an executable can be downloaded below if you want to give it a try. If you improve/add code to LinuxBC20.bas please send me a copy.
https://app.box.com/s/bk3pp6nv99t2t26utned32zk9hmd2yz7
(https://app.box.com/s/bk3pp6nv99t2t26utned32zk9hmd2yz7)
BTW, anyone here using WSL2 on Win10?
Doyle
Quote from: mekanixx on April 15, 2022, 09:31:38 AM
Quote from: djsb on April 15, 2022, 02:46:15 AM
PS On second thoughts this is probably a stupid question as BCX only emits Windows API code. However there is BaCon for Linux. I've never used this and not sure how similar it is to BCX.
Hello djsb,
I have used Linux Mint for a few years now and have a copy of BCX for Linux that is more or less written for GTK on linux. This was originally a port of BCX for Linux by Mike Henning and others. I added some code and ported it to use GTK3 from GTK2.
It's a bit rough but works for most anything I can throw at it. It uses g++ for compiling the code. I have even ported the latest Scintilla source code control using BCX code.
Anyway, the source code and an executable can be downloaded below if you want to give it a try. If you improve/add code to LinuxBC20.bas please send me a copy.
https://app.box.com/s/bk3pp6nv99t2t26utned32zk9hmd2yz7
(https://app.box.com/s/bk3pp6nv99t2t26utned32zk9hmd2yz7)
BTW, anyone here using WSL2 on Win10?
Doyle
Hi Doyle:
Could you post C or C++ translation of LinuxBC20 ? I get a core dump when I try to translate the .bas file.
Thanks.
Quote
Hi Doyle:
Could you post C or C++ translation of LinuxBC20 ? I get a core dump when I try to translate the .bas file.
Thanks.
Hi, just uploaded a fresh c file I just compiled to the same folder on Box, Did you read the comments at the head of the LinuxBC20.bas file?
Here is my command line to compile the file: (BTW, I'm doing the linux compile from Win10 through WPL2 with my windows editor, SciTE)
g++ -Wno-int-to-pointer-cast -Wno-write-strings -lncurses `pkg-config --cflags --libs gtk+-3.0 gtksourceview-3.0` ./$1.c -o ./$1 `pkg-config --libs gtk+-3.0 gtksourceview-3.0`
You may not have the gtksourceview-3.0 libs so try the following:
g++ -Wno-int-to-pointer-cast -Wno-write-strings -lncurses `pkg-config --cflags --libs gtk+-3.0 ` ./$1.c -o ./$1 `pkg-config --libs gtk+-3.0`
Also note I'm using g++ to compile a *.c file. If you don't do this none of the OPTIONIAL code in LinuxBC20.bas will compile correctly.
HTH,
Doyle
Hi Doyle,
That is very interesting and useful information that I hope to explore in the coming months. If I can get excited about it, maybe I'll pitch in.
I quickly browsed your comments in LinuxBC20.bas and noticed you've converted some of the basic GUI controls to GTK.
And I thought I read that you did a port of Fast File Scan which was also an app that Armando Rivera ported to MaxOS.
Did I read that correctly and, if so, how did it turn out? Any cool screenshots that you can share?
Quote from: MrBcx on April 15, 2022, 05:06:02 PM
Hi Doyle,
That is very interesting and useful information that I hope to explore in the coming months. If I can get excited about it, maybe I'll pitch in.
I did have to do quite a bit of fiddling around but with the help of SciTE's lua interface I can immediately switch from a Win10 to a linux compile. Had to set up a bash file for linux paths and a regular batch file for Win10. Lua translates the Win/Linux paths automatically. I'm pretty sure this can be done in other ways besides using the lua interface. But in my case, it was handy and available so why not?
Quote
I quickly browsed your comments in LinuxBC20.bas and noticed you've converted some of the basic GUI controls to GTK.
And I thought I read that you did a port of Fast File Scan which was also an app that Armando Rivera ported to MaxOS.
Did I read that correctly and, if so, how did it turn out? Any cool screenshots that you can share?
Actually that wasn't me that ported Fast File Scan. The quotes are intermixed somewhat. I think that was Mike Henning that did that. Or Armando Rivera? You might ask Mike. We collaborated back and forth with the linux port of BCX.
Doyle
P.S. Mike did an amazing job getting the linux version to mimic the windows calls!
Quote from: mekanixx on April 15, 2022, 04:17:51 PM
Quote
Hi Doyle:
Could you post C or C++ translation of LinuxBC20 ? I get a core dump when I try to translate the .bas file.
Thanks.
Hi, just uploaded a fresh c file I just compiled to the same folder on Box, Did you read the comments at the head of the LinuxBC20.bas file?
Here is my command line to compile the file: (BTW, I'm doing the linux compile from Win10 through WPL2 with my windows editor, SciTE)
g++ -Wno-int-to-pointer-cast -Wno-write-strings -lncurses `pkg-config --cflags --libs gtk+-3.0 gtksourceview-3.0` ./$1.c -o ./$1 `pkg-config --libs gtk+-3.0 gtksourceview-3.0`
You may not have the gtksourceview-3.0 libs so try the following:
g++ -Wno-int-to-pointer-cast -Wno-write-strings -lncurses `pkg-config --cflags --libs gtk+-3.0 ` ./$1.c -o ./$1 `pkg-config --libs gtk+-3.0`
Also note I'm using g++ to compile a *.c file. If you don't do this none of the OPTIONIAL code in LinuxBC20.bas will compile correctly.
HTH,
Doyle
Thank you Doyle.
Thanks for sharing this information. I've been wanting to dig into Linux and BCX, much like I look forward to digging into BCX and Windows. I think I previously mentioned that I had played with Wine on Linux. Very cursory exploration, but it ran the .exe files (created with BCX and Pelles C) that I tried with it on my PC. I think it was under WSL2. I like what I'm seeing with WSL2 on Windows 11 (when I can make time to play with it).
Unfortunately, my best laptop caught a bad case of fan noise (sounded a lot like a rooster), it's currently in the shop for a replacement fan, and my wife's health has been declining and is taking a lot more of my time these days.
Quote from: dgarner on April 15, 2022, 08:45:16 PM
Thanks for sharing this information. I've been wanting to dig into Linux and BCX, much like I look forward to digging into BCX and Windows. I think I previously mentioned that I had played with Wine on Linux. Very cursory exploration, but it ran the .exe files (created with BCX and Pelles C) that I tried with it on my PC. I think it was under WSL2. I like what I'm seeing with WSL2 on Windows 11 (when I can make time to play with it).
Hi David, long time. Unfortunately my old PC doesn't have the specs for Windows 11 so I'll have to wait for that. I have been aiming to put some stuff on the forum about LinuxBC20 but never seem to have enough time.
Quote
Unfortunately, my best laptop caught a bad case of fan noise (sounded a lot like a rooster), it's currently in the shop for a replacement fan, and my wife's health has been declining and is taking a lot more of my time these days.
Sorry, I hope your wife is doing ok. I know your pain, my wife had a bad couple of months with her lungs (not covid, thank goodness) but the docs finally hit the right combination of meds and she's been doing really good.
BTW, I finally got time to look at some of the stuff I'd saved from the Yahoo list. Amoung the stuff I had a file named: DavidonMakeFiles.txt Probably the best explaination on creating and using make files I've ever seen. I wanted to thank you for that. My program to create make files isn't quite finished yet. :) (You mentioned me creating such a program in the text. LOL)
Doyle
I'm really enjoying reading this topic. Thank you all for your contributions.
David.
Quote from: mekanixx on April 15, 2022, 04:17:51 PM
Quote
Hi Doyle:
Could you post C or C++ translation of LinuxBC20 ? I get a core dump when I try to translate the .bas file.
Thanks.
Hi, just uploaded a fresh c file I just compiled to the same folder on Box, Did you read the comments at the head of the LinuxBC20.bas file?
Here is my command line to compile the file: (BTW, I'm doing the linux compile from Win10 through WPL2 with my windows editor, SciTE)
g++ -Wno-int-to-pointer-cast -Wno-write-strings -lncurses `pkg-config --cflags --libs gtk+-3.0 gtksourceview-3.0` ./$1.c -o ./$1 `pkg-config --libs gtk+-3.0 gtksourceview-3.0`
You may not have the gtksourceview-3.0 libs so try the following:
g++ -Wno-int-to-pointer-cast -Wno-write-strings -lncurses `pkg-config --cflags --libs gtk+-3.0 ` ./$1.c -o ./$1 `pkg-config --libs gtk+-3.0`
Also note I'm using g++ to compile a *.c file. If you don't do this none of the OPTIONIAL code in LinuxBC20.bas will compile correctly.
HTH,
Doyle
Hi Doyle:
Thanks again for the LinuxBC20.bas and instructions. After some futzing around I have got it compiling with GTK4 on Linux Fedora 36. Just translated and compiled Kevin's Con_Demo/S00.bas. Screenshot attached.
Massive changes with GTK4, gtksourceview has not yet been ported but will be soon.
Quote from: Robert on May 12, 2022, 04:02:38 PM
Hi Doyle:
Thanks again for the LinuxBC20.bas and instructions. After some futzing around I have got it compiling with GTK4 on Linux Fedora 36. Just translated and compiled Kevin's Con_Demo/S00.bas. Screenshot attached.
Massive changes with GTK4, gtksourceview has not yet been ported but will be soon.
Hi Robert,
Glad you got it working. LinuxBC20 should work for most code that is not Windows specific.
GTK4 is going to be a lot different than GTK2/GTK3 from what I've read. I've been meaning to try GTK4 but it's not yet in Linux Mint. This may get me to try Fedora when I have time.
BTW, gtksourceview is a LOT slower than Scintilla at loading/syntax coloring large files. The bc.bas code for example.
Doyle