Jump to content

Photo

raptorBASIC+ for Linux


13 replies to this topic

#1 joeyaage OFFLINE  

joeyaage

    Space Invader

  • 26 posts

Posted Sat Oct 22, 2016 5:26 AM

Hello. There is a Basic to C converter for Linux based on BCX. Would it be feasible to set up a Linux RaptorBasic+ development environment?

This idea stems from the fact I have a new PC and can't seem to get Virtual Jaguar working properly on my windows 8.1 installation

(runs for about 30 seconds and then the screen goes white). I have yet to try virtual jaguar on my debian Linux install but I have faith

in it working.



#2 omf OFFLINE  

omf

    Dragonstomper

  • 749 posts

Posted Sat Oct 22, 2016 7:52 AM

its called 'wine'

 

:ponder:



#3 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Sun Oct 23, 2016 5:49 AM

So far so good. Using my old debian wheezy installation for tests. Have compiled virtual jaguar for Linux (works but is slow on a 3GHz pentium 4). Have installed wine and run the RaptorBASIC+ install.exe. Install works okay. All the files are in the right place. Running the wine cmd and checking the PATH environment variable shows the correct settings for windows. I can run the build.bat script but there are multiple file not found errors.
So I think the PATH variable needs looking at, alternatively convert the batch file to a bash shell script and use the Linux version of virtual jaguar.

#4 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Sun Oct 23, 2016 5:49 AM

Hi,

In the past I've tested rb+ on linux using wine (or wineconsole, I forget which one) and it worked fine. Just unzip the version from bitbucket or github anywhere in your disk and try 'wine build.bat' (or 'wineconsole build.bat') and you should get some instructions.

Let us know what happens.

#5 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Sun Oct 23, 2016 12:46 PM

I have tried running the BUILD.bat file with 'wineconsole' and 'wine cmd' and get the same results. About 12 or 13 file not found errors and 2 syntax errors followed by the usage information. If you pass build.bat a project file as a parameter it does not find the project file and so does not go to the building part of the batch file. It does echo a list of the projects in the directory though after the usage information.
So I need to either edit the batch file or convert it to a shell script (preferable). If I do this I can use the Linux version of virtual jaguar as well.
I will test that the windows raptor binaries all work with wine first by hand building a project.

Any ideas why my windows version of virtual jaguar does not work on my new PC. Works fine on my XP system (slow) and on my windows 7 laptop (slow) but my new windows 8.1 PC, runs for about 30 seconds before the virtual jaguar screen turns white. I can hear sound working in the background so it has not crashed.

#6 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Tue Oct 25, 2016 1:31 AM

I am still studying the BUILD.bat file. Got about half way through writing a shell script version and discovered that issuing a 'wine cmd /c "buildtool"' command within the script means that you can't check error codes from the command.
I suppose I could 'grep' the build.log file.

Decided to go back to editing the BUILD.bat file. wine seems to handle the file a bit differently to DOS. I put some quotes around the header 'ECHO' statements because wine seems to parse the pipes and slashes as file descriptors and stuff. This stops all the file not found errors. Mostly the for loop construct needs to be looked at as it currently fails in 'wine cmd'. Thus the CURRENTPATH variable is not set and BUILDPATH is not made. These need setting to the correct values. For some reason the 'IF %PROJECTNAME% NEQ [] GOTO :dobuild' check before the usage info does not work either and so I had to change this. I can now make an .abs with the batch file but it bails out when checking the size of the .abs (for loop, again). I tried to run the .abs with virtual jaguar but no luck yet with it working (hmmm).

#7 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Tue Oct 25, 2016 4:58 AM

Sorry, I only read both your posts just now. The file not found errors could simply be a upper/lower case problem as linux is case sensitive in filenames. Could you reply here with the console output if you try to build any project in a plain unmodified build.bat?



#8 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Wed Oct 26, 2016 2:34 PM

Okay. I have a working build batch file. Some of the 'if' statements don't work on error checking the compilation but if the file makes okay then it works. Size checking on .abs files does not work either. These are 'wine cmd' limitations. I had to use the windows version of virtual jaguar with 'wine' from the build batch file to run the project. I could not get the Linux version to run the project (!?!).

Now I have a new idea. A version of 'cmd.exe' from windows could be used with wine to run the batch file. This would then run the build batch file without any errors. I might try this.

So I just need to put everything on the new PC so I get some adequate speed out of virtual jaguar.

Btw. The windows version of virtual jaguar reports 'ANOMALY:REX error' or something similar when the screen goes white. I haven't looked into this much but perhaps it is something to do with the AMD processor I have.

#9 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Fri Oct 28, 2016 4:41 AM

Well all this is very weird for me so I had to find out for myself again.

So I tried it on my Peppermint 5 install (which is ubuntu 14.04 based), checked out a fresh copy straight out of git and wrote "wineconsole build.bat doger". The console opened up and straight up went and built the program. Everything worked. No problems with if statements, it printed the size of the .abs file with no problems. Not a hitch except it couldn't start virtualjaguar but then again I tried this from VNC so it might be a limitation there.

Also for the record wine --version showed 1.6.2.

So I dunno what to suggest. It works ok here and I have no time to setup and install VMs just to test on various configurations. Could you state what your configuration is? Or maybe if you could set up a machine or vm with something ubuntu 14.04 based and try there?

#10 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Sat Oct 29, 2016 9:43 AM

Everything works perfectly now with Linux.

#11 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Sun Oct 30, 2016 1:15 AM

Everything works perfectly now with Linux.


Care to elaborate? :) Did you change anything or did you replicate my system above?

#12 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Sun Oct 30, 2016 9:02 AM

Out of the box to working. Install 'wine'. Install raptor basic with wine ('wine rb+install.exe'). I am using a 64 bit PC and the default virtual jaguar in raptor basic+ is 64bit, but I had to download the 32bit executable and use that in place. Next, copy 'cmd.exe' from windows XP 'c:\windows\system32\' to the %RBTOOLS% directory and rename it to
'rbcmd.exe'. Run 'wine rbcmd /c build doger'. Builds the .abs and runs virtual jaguar. No errors! I can also use the Linux virtual jaguar I have made to run the .abs

Using a proper microsoft cmd.exe and not the wine version was the key to getting it working!

Thanks for the support, ggn and thanks to omf for pointing me towards wine.

PS. Have installed notepad++ with wine to use as an editor.

#13 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,911 posts

Posted Sun Oct 30, 2016 10:01 AM

There are distros where you can save a snapshot.. perhaps as a live CD.  I think a RaptorBASIC+ LiveCD should be a thing.  Using it in a VMPlayer container would guaruntee everyone has the same configuration and tools.



#14 joeyaage OFFLINE  

joeyaage

    Space Invader

  • Topic Starter
  • 26 posts

Posted Wed May 24, 2017 11:53 PM

Good idea, havn't made a live cd snapshot of Raptor Basic+ yet but have completed the development cycle starting from coding up to playing .abs binary program on real hardware to a television. Live situation, worked well.



Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users