Author Topic: ScriptBasic 2.2 Beta Release  (Read 23458 times)

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
ScriptBasic 2.2 Beta Release
« on: July 22, 2013, 10:51:36 AM »
I hope to have a ScriptBasic 2.2 source beta release with runtime versions for the following platforms posted soon.

  • Windows 32 - make for VC10 and MinGW-gcc
  • Ubuntu 64 - make gcc (12.04 LTS)
  • Debian 64 - make gcc (7.1)
  • CentOS 64 - make gcc (6.4)


The above binary runtime versions are available as attachments to various posts on this forum. My goal today is to make the above set available as an attachment to this post. I'm confident that core ScriptBasic in it's 2.2 form continues to be production stable and bug free. (over 10 years of diverse use in various applications on multiple platforms)
« Last Edit: July 22, 2013, 10:53:59 AM by support »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
ScriptBasic 2.2 Beta - Downloads
« Reply #1 on: July 22, 2013, 10:24:18 PM »
The attached zips contain a runtime version of ScriptBasic 2.2 with a few test scripts to get you going. The following is the setup --install script interaction that builds the install.sh script you would run as root. I put the text version of the configuration file generated in the etc folder in the zip you can edit and compile with scriba -k basic.conf.txt. I'm only posting this as an installation guide if you were to install ScriptBasic on a global basis. (you need the source directory build to run the install script) If you prefer installing ScriptBasic under a user account, that works as well. just make sure your configuration module and include directories reflect their location. (or extension modules won't be found) By default ScriptBasic under Linux looks in /etc/scriba/ for it's global configuration file. You can override this with exporting SCRIBACONF to point to your configuration file full path. If your not putting scriba in the /usr/bin directory, you need to add its location to the search PATH. Feedback and example code welcome!

Note: Scriba will run without a configuration file. Nothing in the configuration file is required. The more you define the easier it is to use ScriptBasic.

Code: [Select]
jrs@U32VB:~/sb/source$ ./setup --install

This is unix cwd=/home/jrs/sb/source/
--install-docu=directory

Use this option where ScriptBasic modules should install their
documentation files when they are compiled from source and
are installed calling their 'install.sb' program file.

The default value is
/usr/share/scriba/source
please specify the value:--install-etc=directory


Use this option to specify where installation should put the
Eszter SB Application Engine start/stop script. The default
location is

/etc/init.d
please specify the value:
--install-configdir=directory

Use this option to specify the configuration directory where
the compiled configuration file is saved.

The default value is

/etc/scriba
please specify the value:
--install-include=directory

Use this option to define where the ScriptBasic module
header files are to be stored. The default value is

/usr/share/scriba/include
please specify the value:
--install-lib=directory

Use this option to specify where ScriptBasic installation should put
the ScriptBasic run-time library files. This is needed only when you
want to compile BASIC to executable via C code or compile
your own variation. The default location is

/usr/local/lib
please specify the value:
--install-bin=directory

Use this option to specify where ScriptBasic installation should
put the binary executable of the interpreter. The default value
is

/usr/bin

Install ScriptBasic into a different directory in exceptional
cases only, because most of the BASIC code will start referring
to '#! /usr/bin/scriba'

please specify the value:
--install-log=directory

Use this option to specify where ScriptBasic Eszter SB Application
Engine variation (the web server version) has to write the log files.
The default value is

/var/log/scriba
please specify the value:
--install-module=directory

Use this option to specify where ScriptBasic should store the
module shared object files. The default value is

/usr/local/lib/scriba
please specify the value:
--install-hebtemp=directory

Use this option to specify where ScriptBasic external preprocessor
HEB should store the temporary BASIC files that it generates. The
default location is


/var/cache/scriba/hebtemp
please specify the value:
--install-cache=directory

Use this option to specify where ScriptBasic has to store the
compilation cache files. The default value is

/var/cache/scriba/cache
please specify the value:
--install-source=directory

Use this option to specify where ScriptBasic should store the
sample and preprocessor source files. The default value is

/usr/share/scriba/source
please specify the value:
Now I will try to determine the largest safe value for maxlevel.
This may take a while, stay tuned...
Maxlevel is 40291
ScriptBasic was not actually installed, but I created the file
'./install.sh' that you can run as root to install ScriptBasic
with the configured installation option.

I also created the text configuration file 'scriba.conf.lsp'
that reflects the installation locations and contains a
'maxlevel' value that I measured to be safe on this machine.
'install.sh' compiles this configuration for ScriptBasic and
also tries to install all modules that were compiled successfully.
jrs@U32VB:~/sb/source$

       

FYI: I tried to build a OpenSUSE 12.2 64 bit instance on EC2. It refused to allow me to login. (timeout) The current 12.3 version has dropped image support for EC2. Sounds to me like this distribution is providing it's own funeral services as it's offering rather than trying to get along with others. Novell sold out to Attachmate and is trying to create a Red Hat like distribution model. To worsen matters, openSUSE doesn't release current changes to the open source version until months after their released. There are people still running SCO Unix, AIX, believe it or not.





« Last Edit: August 01, 2013, 10:12:05 AM by support »

kryton9

  • Guest
Ubuntu 12.04 64 bit installation problems
« Reply #2 on: September 22, 2013, 11:51:59 PM »
Here is a screenshot showing that I have my sb22-64bit Ubuntu version unzipped as sb22 to my /home/kryton/sb22 folder.

I can run scriba and get the instructions for the options in the terminal, so it is fine.

The problem is as you will see I can't scriba -k basic.conf.txt

It was empty so I set it up as seen in the screenshot as well in gedit and saved it as basic.conf.txt
I do close the gedit with the file before running scriba -k basic.conf.txt and get the error as seen in the sceenshot.

Any further help would be appreciated.


Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 2.2 Beta Release
« Reply #3 on: September 23, 2013, 01:11:47 AM »
Quote from: John - O2 forum
One thing I should mention and will be changed in the next SB 2.2 beta release is the SB include path in the configuration file doesn't work like the module path as relative to where scriba is started from. The include path is relative to where you are not where scriba lives. Once you decide where you are going to install ScriptBasic, edit the SB configuration file and use full paths for the module and include paths.  

Here is my SB startup script I run after opening a terminal window.

Code: [Select]
export PATH=/home/jrs/sb/sb22/bin:$PATH
export SCRIBACONF=/home/jrs/sb/sb22/bin/basic.conf
export UBUNTU_MENUPROXY=0

Note the last entry is because I use the classic shell and not Unity. This prevents a client area size display issue with IUP.

To rebuild your basic.conf file to its binary form, follow these steps.

You can dump the current SB configuration to the screen or file (scriba -D > basic.conf.txt) and edit it in gedit. To convert the text file version of the basic.conf to its binary form, scriba -k basic.conf.txt will create a binary form where ever SCRIBACONF path points to. Just type scriba at the command line for a list of switches.

By default scriba will try and save it's basic.conf file in the /etc/scriba/basic.conf which as a standard user you don't have rights to. This is know as a system wide install of ScriptBasic. If you get the start-up file exports going first, scriba will save the basic.conf in your user directory. The environment variable SCRIABCONF points to where the basic.conf file lives. In the SB bin directory there should be a text version of basic.conf and if not create one with the scriba -D > basic.conf.txt.


kryton9

  • Guest
Re: ScriptBasic 2.2 Beta Release
« Reply #4 on: September 24, 2013, 06:15:39 PM »
John, I think scriptbasic is working for you guys because you must have had earlier built versions from source scriptbasics.

If you download the current ubuntu2.2 64 bit version zip to a clean ubuntu install(no previous scriptbasic ever) you will see the catch 22 routine with getting a basic.conf made.
scriba runs, but anything requiring additional includes no way.

But this is not only a scriptbasic issue, I am having problems installing many languages. Only luck was code::blocks and the c and c++ compilers.

Everything is a lot easier on Windows, although Ubuntu did see all my hardware better than Windows does on new installs. But for a new user, it is too confusing.
Files are everywhere and almost all are protected except for stuff in home.

 I thought one of the beauties of linux was supposed to be the packaging systems
and its ability to download all dependencies for you, but this is not the case by my testing these few days.

I will leave Ubuntu on the dual boot, but back to windows so I can code again.

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 2.2 Beta Release
« Reply #5 on: September 24, 2013, 09:04:50 PM »
Quote from: kryton9
John, I think scriptbasic is working for you guys because you must have had earlier built versions from source scriptbasics.

If you download the current ubuntu2.2 64 bit version zip to a clean ubuntu install(no previous scriptbasic ever) you will see the catch 22 routine with getting a basic.conf made.
scriba runs, but anything requiring additional includes no way.

But this is not only a scriptbasic issue, I am having problems installing many languages. Only luck was code::blocks and the c and c++ compilers.

These beta releases are designed to unzip where you want. There are a few steps to getting hooked into the environment.

From a console:

1. Get your environment variables set.

export PATH=/home/jrs/sb/sb22/bin:$PATH
export SCRIBACONF=/home/jrs/sb/sb22/bin/basic.conf

2. Here is my minimal basic.conf I use. (change paths to meet your setup)

Code: [Select]
dll ".so"
module "/home/jrs/sb/sb22/modules/"
include "/home/jrs/sb/sb22/include/"
maxinclude 100
preproc (
  internal (
    sdbg "/home/jrs/sb/sb22/modules/sdbg.so"
   )
 )
maxstep 0
maxlocalstep 0
maxlevel 300
maxmem 0

You can edit and recompile the basic.conf with the following scriba command line option. The result will create a binary basic.conf in the directory you pointed the environment variable SCRIBACONF to.

scriba -k your_conf_text_file

The module / include directories paths in the basic.conf file are used by the ScriptBasic extension modules so you can do a IMPORT mysql and it knows where to find things. Without these paths defined you have to used full paths in your program.  :(

That should allow you to run all the SB test programs if you have all your dependencies installed. (MySQL server/client, libcurl, unixODBC, Mini-XML)


Quote from: kryton9
Everything is a lot easier on Windows, although Ubuntu did see all my hardware better than Windows does on new installs. But for a new user, it is too confusing.
Files are everywhere and almost all are protected except for stuff in home.

 I thought one of the beauties of linux was supposed to be the packaging systems
and its ability to download all dependencies for you, but this is not the case by my testing these few days.

Linux has a GUI package installer (Synaptic) and apt-get from the console. Your a man now, put the boy toys away.  ;D

If you need root level privileges then use sudo. For example if you need to copy a library you built in your user /home/you directory structure to the system /usr/lib directory, try this.

sudo cp mylib.so /usr/lib/

It will ask for your password you assigned yourself. (assuming you gave yourself admin privileges as the default user)

if you want to remain in a root shell, use sudo su.

Use exit to exit the shell your in or close the console.

 

Quote from: kryton9
I will leave Ubuntu on the dual boot, but back to windows so I can code again.

Don't give up so easy. Learning is part of the fun. I'll catch you if you fall.  ;)

« Last Edit: September 24, 2013, 09:42:18 PM by support »