Author Topic: ScriptBasic 64 bit Windows  (Read 14627 times)


  • Administrator
  • *****
  • Posts: 19
    • View Profile
ScriptBasic 64 bit Windows
« on: June 26, 2010, 08:43:39 AM »
I would like to thank Armando Rivera for helping out the ScriptBasic open source project once again and creating a 64 bit version of the core executables for Windows.

  • scriba - Command line interpreter
  • sbhttpd - Multi-threaded web server
  • libscriba - Runtime shared object (DLL) for your compiled ScriptBasic applications to C

Quote from: Armando Rivera
You wondered, and so did I.

Cheesy makefile, but it works.

64-BIT scriba/sbhttpd/dll (with import library named scriba_imp.a) compiled with MinGW64 for Windows.  No extension modules, though. I'll leave that to you.

If you want to compile this as 32bit, change -m64 to -m32 in the makefile.

Not tested, that's your job. The executables run, though.

« Last Edit: June 27, 2010, 02:09:10 PM by support »


  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: ScriptBasic 64 bit Windows - RC2
« Reply #1 on: June 26, 2010, 11:43:49 PM »
Armando was able to get some of the standard (non-3rd party) extensions modules compiled for the 64 bit version.

Quote from: Armando Rivera
Attached is another 64bit Windows build, this time with the standard modules (except for MT, it uses ASM in spots and I ain't translating that to GAS syntax).

You have the main Makefile for the executables in the root folder; each extension has it's own Makefile in it's associated folder.

To build all of this, just run the compile.cmd file I created to make this simple.

If you want to build this as 32 bit, you'll have to edit EACH Makefile and change the -m64 to -m32.

Anyway, there you have it.  This was a fun exercise, but I'm not doing anything else with it.  I've gotten you this far, now it's up to you to see where it goes from here...


Extension Modules
  • CGI - CGI helper functions.
  • CIO - Windows console mnemonics
  • DBG - Windows console preprocessor debugger
  • HASH - Hashing functions
  • NT - Windows specific functions (registry, ...)
  • RE - Regular Expression functions
  • SDBG - Remote (telnet) preprocessor debugger
  • T - Array, string and XML Tools
  • TRIAL - Example ScriptBasic extention module (How To)
  • MT - ScriptBasic webserver session manager
  • ODBC - Database manager extension module

  • ScriptBasic is an embeddable 32/64 bit scripting engine that runs on Windows, Linux and the Mac
  • ScriptBasic includes a command line interpreter with a debugging preprocessor (console & remote)
  • ScriptBasic includes a multi-threaded webserver with in memory session support
  • You can compile your ScriptBasic applications to a C based standalone executable for a small footprint using a shared object runtime library
  • ScriptBasic is easily expanded with extension modules that expose the ScriptBasic API to your interface and 3rd party libraries
  • Extensive user and developer documentation included
  • FREE and LGPL with no strings attached for commercial use of ScriptBasic
« Last Edit: June 27, 2010, 08:06:00 PM by support »


  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: ScriptBasic 64 bit Windows
« Reply #2 on: June 27, 2010, 06:25:06 PM »
I noticed that there isn't a default scriba.conf binary configuration file in this distribution. I attached my ScriptBasic Windows scriba.conf.txt as an example to edit and compile.

Code: [Select]
scriba -k scriba.conf.txt

The above will compile your ScriptBasic configuration text file version to it's binary format that ScriptBasic needs to see it in.

Quote from: ScriptBasic User Documentation
Win32 installation first tries to open the file `scriba.conf' if it exists in the same directory as the executable file. This is a convenient place to store the configuration file and does not require registry editing to install ScriptBasic. This is also the ultimate place for CD ROM products utilizing ScriptBasic that need running instantaneously without any installation.

If the file `scriba.conf' does not exist in the directory of the executable the configuration manager tries to open the file, which is specified in the string value, named config under the registry key HKEY_LOCAL_MACHINE\Software\ScriptBasic. If there is no name specified in this registry value ScriptBasic tries to locate the configuration file `scriba.ini' in the system directory. The system directory is determined reading the environment variable windir. If this environment variable does not exits ScriptBasic tries systemroot. It should usually exist on normal Windows installation. If ScriptBasic can not find even this environment variable it tries `C:\WINDOWS' as final try. If no configuration file can be found ScriptBasic tries to execute the program without configuration information.

Note that if for example `C:\WINNT\scriba.ini' exists and is valid, but the registry defines a different and a non-existent or invalid file ScriptBasic will fail to load the configuration file. It will try to read the file specified in the registry. The other file options are searched when the registry key does not exist or is empty.

If the command line uses the option `-f' then the argument of the option is used as configuration file and this overrides all configuration search algorithm. If the file specified in the option `-f' does not exists then ScriptBasic runs without configuration.

ScriptBasic Configuration File Help
« Last Edit: June 27, 2010, 06:33:28 PM by support »


  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: ScriptBasic 64 bit Windows - RC3
« Reply #3 on: June 27, 2010, 08:03:05 PM »
Armando completed the default ScriptBasic Windows 64-Bit distribution set with the RC3 release. This release candidate adds the MT (session manager) and ODBC extension modules to the distribution. Armando also worked on the make file (see below) and added a make clean option to clear the bin directory before a new compile.

If you want to generate a Windows 32-Bit version of ScriptBasic, change the -m64 to -m32 in the make file(s).

Quote from: Armando Rivera
The main Makefile now compiles everything that the cmd script I wrote did, so that script no longer works.  I've also added a clean target to the makefile, so you can nuke your bin folder with:  make clean.  The makefile handles the creation of the bin folder structure now.
« Last Edit: June 27, 2010, 10:42:17 PM by support »


  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: ScriptBasic 64 bit Windows - RC4
« Reply #4 on: June 27, 2010, 10:41:56 PM »
Armando added the MySQL extension module to the 64-bit version of the release.

Quote from: Armando Rivera
I downloaded the file, since I didn't want to clutter up my system using the installer with something I'm not going to be using.

In order to get the dll to work with MinGW64, I had to do the following (gcc doesn't understand the import lib that ships with the connector (or pretty much any MS generated import lib, I think):
1.   Download pexports from
2.   After unpacking, copy that to the MinGW64/bin folder
3.   Navigate to the folder containing the libmysql.dll file, and do: pexports libmysql.dll > libmysql.def
4.   Next, I created the actual import lib with:  dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
5.   Next, I copied that into the MinGW64/lib folder
6.   Then, I copied the  ibmysql.dll file into the Windows\SysWOW64 folder
7.   Finally, I copied the "include" folder that comes with the connector package to MinGW64/include, and then RENAMED IT TO "mysql".  <--very important

BTW, in case you didn't realize this, the MinGW64 package that James provided the link for on the BCX forum is 32bit.  Meaning, you can install it on your 32 bit system and use it to compile both 32 AND 64 bit binaries.

DOWNLOAD ScriptBasic 64/32 for Windows

TMD-GCC - A GCC / MinGW / MinGW-w64 compiler suite for 32-bit and 64-bit Windows

A big Thank You Armando for helping the ScriptBasic project out once again.

« Last Edit: July 05, 2010, 11:32:38 AM by support »


  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: ScriptBasic 64 bit Windows
« Reply #5 on: June 28, 2010, 04:11:30 PM »

I was crying in my beer about not having a 64-bit box to play with and Peter Verhas suggested I buy time on a 64 bit instance of Windows Server from Amazon EC2. At .52 cents an hour for a large instance virtual 64-bit system I can use to test with seems affordable.

Large Instance 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of local instance storage, 64-bit platform

Until now, small developers did not have the capital to acquire massive compute resources and insure they had the capacity they needed to handle unexpected spikes in load. Amazon EC2  enables any developer to leverage Amazon’s own benefits of massive scale with no up-front investment or performance compromises. Developers are now free to innovate knowing that no matter how successful their businesses become, it will be inexpensive and simple to ensure they have the compute capacity they need to meet their business requirements.

The “Elastic” nature of the service allows developers to instantly scale to meet spikes in traffic or demand. When computing requirements unexpectedly change (up or down), Amazon EC2 can instantly respond, meaning that developers have the ability to control how many resources are in use at any given point in time. In contrast, traditional hosting services generally provide a fixed number of resources for a fixed amount of time, meaning that users have a limited ability to easily respond when their usage is rapidly changing, unpredictable, or is known to experience large peaks at various intervals.

Amazon EC2 Running Microsoft Windows Server & SQL Server

Amazon EC2 running Microsoft Windows Server® 2003 or 2008 is a fast and dependable environment for deploying applications using the Microsoft Web Platform, including ASP.NET, ASP.NET AJAX, Silverlight™, and Internet Information Server (IIS). Amazon EC2 enables you to run any compatible Windows-based solution on AWS’ high-performance, reliable, cost-effective, cloud computing platform. Common Windows use cases include Enterprise Windows-based application hosting, website and web-service hosting, data processing, media transcoding, distributed testing, ASP.NET application hosting, and any other application requiring Windows software. Amazon EC2 also now supports the SQL Server® Express and SQL Server Standard 2005 and 2008 databases, and makes those offerings available to customers on an hourly basis.

Using Amazon EC2 with Windows Server is similar to using Amazon EC2 with any other operating system. Amazon EC2 running Windows Server 2003 or 2008 provides seamless integration with existing Amazon EC2 features like Amazon Elastic Block Store (EBS), Amazon CloudWatch, Elastic-Load Balancing, and Elastic IPs. Windows instances are available in multiple Availability Zones in all Regions.

Tips & Tricks

  • Suspended instances are not billed but retains your environment
  • Uploading to EC2 is FREE till Nov. 2010 (after that there will be a small charge / gig)
  • Max 2 suspended instances at a time. (Windows Server 2008 64-bit & Ubuntu Linux 64-bit will be my two working/suspended instances)
  • RDP (Windows Remote Desktop) is a pain to get going becuase you need to download an encrypted admin password before connecting with RDP
  • You can save a image on the Amazon S3 (storage service) easily from your control panel
  • SSH is your connection to a Linux instance
  • You have full root/administrator privileges with your instances
« Last Edit: June 29, 2010, 12:45:20 AM by support »