Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Support

Pages: 1 ... 44 45 [46] 47 48 ... 59
676
What's New / Re: ScriptBasic 64 bit Windows
« 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

677
What's New / Re: ScriptBasic 64 bit Windows - RC2
« 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...

A.

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


FYI:
  • 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

678
What's New / 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.



679
Round Table / Re: What is inside a DLL
« on: May 08, 2010, 02:45:43 PM »
The ScriptBasic extension module DLLs are API and 3rd party interfaces with a tight integration with the ScriptBasic API. This gives ScriptBasic users a high level or Basic like interface to external functionality. ScriptBasic is well documented and the source is free to explore.

CIO Documentation

Code: Text
  1. module cio
  2.  
  3. declare sub ::gotoxy        alias "gotoxy"     lib "cio"
  4. declare sub ::kbhit         alias "sbkbhit"    lib "cio"
  5. declare sub ::getch         alias "sbgetch"    lib "cio"
  6. declare sub ::getche        alias "sbgetche"   lib "cio"
  7. declare sub ::detach        alias "sbdetach"   lib "cio"
  8. declare sub ::GetTitle      alias "sbgettitle" lib "cio"
  9. declare sub ::SetTitle      alias "sbsettitle" lib "cio"
  10. declare sub ::break         alias "sbbreak"    lib "cio"
  11. declare sub ::nobreak       alias "sbnobreak"  lib "cio"
  12.  
  13. declare sub ::SizeX         alias "sbscrx"     lib "cio"
  14. declare sub ::SizeY         alias "sbscry"     lib "cio"
  15. declare sub ::CursorX       alias "sbcurzx"     lib "cio"
  16. declare sub ::CursorY       alias "sbcury"     lib "cio"
  17. declare sub ::BufferSizeX   alias "sbsizx"     lib "cio"
  18. declare sub ::BufferSizeY   alias "sbsizy"     lib "cio"
  19. declare sub ::PossibleMaxX  alias "sbmaxx"     lib "cio"
  20. declare sub ::PossibleMaxY  alias "sbmaxy"     lib "cio"
  21.  
  22. declare sub ::SetWindow     alias "sbsetcw"    lib "cio"
  23. declare sub ::SetCursor     alias "sbsetcur"   lib "cio"
  24. declare sub ::SetColor      alias "sbsetcol"   lib "cio"
  25.  
  26. global Const FBlue      = 0x0001
  27. global Const FGreen     = 0x0002
  28. global Const FRed       = 0x0004
  29. global Const FIntense   = 0x0008
  30. global Const BBlue      = 0x0010
  31. global Const BGreen     = 0x0020
  32. global Const BRed       = 0x0040
  33. global Const BIntense   = 0x0080
  34. global Const FGrey      = 0x0007
  35. global Const FWhite     = 0x000F
  36. global Const BGrey      = 0x0070
  37. global Const BWhite     = 0x00F0
  38.  
  39. declare sub ::Cls           alias "sbcls"      lib "cio"
  40.  
  41. end module
  42.  

680
Round Table / ScriptBasic - New Build Process
« on: April 25, 2010, 04:31:52 PM »
The 2.1 release will be the last version using the original build scripts done by Peter Verhas. As of version 2.2, the Windows version will be built and offered as a Visual Studio 2008 project. The Linux/Unix version will be redone as a configure and make standard build process. Since I don't have a Mac, I'm counting on others to test the build process on that platform.

If you have built VS2008 projects or configure/make scripts and would like to help with the effort, please reply to this post.


681
Tutorials / Re: ScriptBasic namespace support
« on: April 21, 2010, 02:46:15 PM »
Here is another example but using nested MODULEs or namespaces.

Code: [Select]
MODULE One
  a = 1
  MODULE ::Two
    a = 2
    MODULE ::Three
      SUB UOut
        LOCAL a
        a = "You're Out!\n"
        PRINT a
      END SUB
      a = 3
    END MODULE
  END MODULE
END MODULE

PRINT a,"\n"
PRINT One::a,"\n"
PRINT One::Two::a,"\n"
PRINT One::Two::Three::a,"\n"
One::Two::Three::UOut
PRINT a

C:\scriptbasic\test>emod
undef
1
2
3
You're Out!
undef
C:\scriptbasic\test>

682
Round Table / Re: SB & C
« on: April 16, 2010, 11:39:24 AM »
It looks like embedding CINT into ScriptBasic may not be all that hard to do. Having a C interpreter to compliment ScriptBasic syntax should make SB more attractive as a prototyping and learning tool. The goal with ScriptBasic is to provide a BASIC scripting tool that gets the job done quickly with as little code as possible and runs on everything. ScriptBasic is extensible, embeddable and can adapt to most of your one off programming needs.

CINT Users Reference

CINT API

683
Round Table / SB & C
« on: April 15, 2010, 02:21:26 AM »
I have been playing around with the CINT C interpreter and thought I would give it a try within ScriptBasic.

Code: Text
  1. PRINT "Hello "
  2. x = EXECUTE("cint world.c",-1,p)
  3.  

Code: Text
  1. #include <stdio.h>
  2. main() {
  3.   printf("World");
  4.   }
  5.  

Output:

C:\scriptbasic\test>hello
Hello World
C:\scriptbasic\test>

Q. Can you pass variables to your C program and get the results of the C program returned back to the ScriptBasic program in a string?

A.
If the number of variables you want to pass are many, build the C program dynamically in SB and write it to a file with the embedded SB variable values as C constants. (the SB constants could be an #include file as well) If you only need to pass a couple values, then add them to the EXECUTE(cint pgm arg) and extract them from the C program's command line argument when it runs.

To return results back to SB, you need to redirect the output to a file and open it in SB after the C program runs and GET the results. If your going to use redirection or piping, you need to include the CMD processor in your EXECUTE statement.

Code: [Select]
x = EXECUTE("cmd /C \"cint your_pgm.c > results.out\"", -1, pval)

684
Tutorials / Compiling ScriptBasic for Windows
« on: April 14, 2010, 08:34:45 PM »
This tutorial will be a step-by-step guide to creating a ScriptBasic Windows binary set of executables and DLLs from source. ScriptBasic has only one set of source files for all platforms and some of the extension modules are based on cross platform open source libraries. The C compiler used in this tutorial will be the Microsoft free Visual C++ Toolkit. (VC7) This was the compiler Peter Verhas used to create the 2.1 beta and what Armando used for the final 2.1 ScriptBasic Windows release.

You can download the Visual C++ Toolkit from HERE (ScriptBasic site) or one of the many other sites on the web. This first post will show the C compiler being installed. The next post will be installing the development versions of the open source libraries used with the extension modules. The final post will show you how to compile ScriptBasic source to build the binaries.

















685
Download / Re: ScriptBasic 2.1 Linux
« on: March 26, 2010, 04:25:41 PM »
The following is the latest source. (as far as I'm aware of)

ScriptBasic Linux 2.1

Build Process

  • Uncompressed the archive. (creates a scriptbasic directory)
  • ./setup  (builds the complete ScriptBasic language from scratch) It's a good idea to remove the last bin directory that was previously created.
  • ./setup --install  (installs ScriptBasic and creates a default binary version of the configuration file)


Known Successful Builds:

  • CentOS 5.4 (32 bit)
  • Ubuntu (32 bit)

Please reply to this topic thread if you have successfully compiled ScriptBasic on a Linux version not mentioned yet.

Note: In the next build, the BDB (Berkeley DB) and PSQL (PostgreSQL) extension modules will no longer be included or supported. (use at your own risk)


686
Tutorials / Re: ScriptBasic CGI Programming Tutorial
« on: March 22, 2010, 01:11:51 PM »
Glad to hear that this tutorial helped in some way.

Are you running the ScriptBasic webserver or using scriba as a CGI scripting language? What OS you running under?


687
General Discussions / Re: How to print html code?
« on: February 21, 2010, 09:28:18 AM »
View source in your browser.

The sbhttpd server executes programs. HTML is string data to SB and whatever you send to the browser is what will be displayed in the browser.

If you asking if you can view SB code in the browser the answer is no. SB doesn't parse embedded HTML scripts like php (which is a hackers dream) but executes a CGI binary program.

You could make a copy of your SB source outside the SB proxy directory and add a .txt to the end. This way the browser sees the file as text and displays it verbatim.

Hint:

I find it easier to wrap static HTML/JavaScript text in strings and PRINT them in my output section of my script after any preprocessing that needs to be done. SB also allows (like Python) to encapsulate multiple lines of text using """ (three quotes) and it will send that string to the browser as is with line breaks, tabs, ...

688
Round Table / History of *nix
« on: February 13, 2010, 01:12:04 PM »

689
GD / Re: GD not working....
« on: February 13, 2010, 10:24:04 AM »
Can you post some code that isn't working for you?

The only issue I have had with the GD extension module is selecting a large font size. I haven't looked into it since I don't use the module on a regular basis.


690
Round Table / Re: Missing documentation for XML module
« on: February 02, 2010, 06:15:06 PM »
I'll add it to the wish list.  8)


Try GetProp(NodeHandle, PropName) as the argument structure being passed.

FYI: Save yourself a lot of time and grief by first testing your code (especially when using extension modules) with the command line interpreter (scriba) before using the app server. If it works under scriba, it will work on the app server variation.




Pages: 1 ... 44 45 [46] 47 48 ... 59