ScriptBasic

Support => Installation => Topic started by: btechint on September 11, 2009, 09:58:36 PM

Title: Windows 2.1 RC1 install
Post by: btechint on September 11, 2009, 09:58:36 PM
I installed ScriptBasic Windows 2.1 RC1 tonight. I installed by copying over the original files.
My gd graphics programs will not run, Error could not find bdg.dll
The file is dbg.bas in C:\scriptbasic\include
There is no bdg.dll

Thanks for any input


Title: Re: Windows 2.1 RC1 install
Post by: Airr on September 12, 2009, 09:08:54 PM
GD was one of the modules that was updated recently.

You'll need the dll contained in the bin folder of this file: http://www.libgd.org/releases/gd-latest-win32.zip

AIR.
Title: Re: Windows 2.1 RC1 install
Post by: Support on September 12, 2009, 09:41:52 PM
FYI

ScriptBasic 2.1 RC2 Windows was released.

Download (http://www.scriptbasic.org/download/SB_2.1_RC2_Win.zip)
Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 12:51:33 AM
New installed of ScriptBasic 2.1 RC2, same error.
Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 07:36:33 AM
 ScriptBasic sample configuration file
;
; Note that this configuration file format is from v1.0b19 or later and has to be compiled
; to internal binary format before starting ScriptBasic
-----------------
Has this file been compiled for the install, if not how is it done?

When trying to use the modules scriba gives an error message that it can not find them.

Thanks

Title: Re: Windows 2.1 RC1 install
Post by: John Spikowski on September 14, 2009, 08:59:47 AM
Armando created a zip of the current 3rd party DLLs that the extension modules use. Unzip this into \WINDOWS\System32 directory.

http://www.scriptbasic.org/download/Scriba_WIN_RC_Dll_Pack.zip

ScriptBasic uses a compiled form of it's configuration file to run. If you would like to modify your configuration then follow these steps.

Code: [Select]
scriba -k scriba.conf.txt
Code: [Select]
scriba -D > scriba.conf.txt
Check out the documentation for the configuration file structure on the ScriptBasic Wiki.

http://www.scriptbasic.org/wiki/index.php?title=ScriptBasic_Configuration_File

Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 02:02:44 PM
I put the .dll files in the \system32 dir and checked the conf file. The default file looked ok so run the command to complie. Upon testing the gd module, my program starts, but errors at the first use the the graphics module. Are the GD commands the same or have they been changed?

Is this the library that is being used?
http://www.libgd.org/Main_Page
Title: Re: Windows 2.1 RC1 install
Post by: Support on September 14, 2009, 02:13:16 PM
Can you post your code so we can have a look at what might be going wrong?

It sounds like your having issues loading the extension module. Use the -d command to debug the extension module loading part of your program before your code even starts to run.

scriba -d yourpgm.bas
Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 03:11:40 PM
G:\hdrive\sbcode\wrk\ser>scriba -d sm.sb
Searching installed module header file 'gd.bas' ...
Checking installed module header file location 'c:\scriptbasic\include\gd.bas' Result=OK
Including file 'c:\scriptbasic\include\gd.bas'
491
0
469
AA.png

error:
scriba.exe has encountered a problem and needs to close.  We are sorry for the inconvenience.

-------
It failing on the first use of gd.

the gd commands work fine in the old version, not in the new version


Title: Re: Windows 2.1 RC1 install
Post by: Support on September 14, 2009, 05:37:48 PM
Quote
the gd commands work fine in the old version, not in the new version

When you say "old version", do you mean the beta 2.1 that installs with a setup program?
Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 06:04:14 PM
Yes
Title: Re: Windows 2.1 RC1 install
Post by: Support on September 14, 2009, 07:39:39 PM
My error when building the zip, I included the "Dll_Pack" directory with the files within. Just copy the DLLs in this sub-directory back to \WINDOWS\System32. Sorry. I'll upload a new corrected zip. Here is the gdtest.sb program that comes with the distribution. It worked fine on my Windows XP SP3 box.

Code: [Select]
import gd.bas

brush = gd::Create(10,10)
white = gd::Color(brush,255,255,255)
black = gd::Color(brush,0,240,0)
gd::Line brush,0,0,10,10,black
gd::Line brush,0,10,10,0,black

' gd::SavePng brush,"brush.png"

image = gd::Create(400,300)

white = gd::Color(image,255,255,255)
gd::SetTransparentColor image,white
black = gd::Color(image,0,0,0)
red =  gd::Color(image,255,0,0)
blue =  gd::Color(image,0,0,255)
green = gd::Color(image,0,255,0)

gd::Point image,0,0,black

gd::Rectangle image,200,50,250,100,red
gd::FilledRectangle image,225,75,275,125,green

gd::Rectangle image,324,190,376,290,black
gd::SetTile image,brush
' caused stack overflow on a fine NT? Should be some poor implementation
'gd::FillToBorder image,325,191,black,gd::Tiled

gd::Circle image,350,50,40,blue
gd::FillToBorder image,350,50,blue,green
gd::Fill image,201,51,blue

gd::SetBrush image,brush
gd::Line image,300,200,300,350,gd::Brushed

gd::SetColor image,black

gd::SetFont image,gd::FontTiny
gd::print image,0,0,"THIS PICTURE WAS CREATED FROM ScriptBasic USING THE MODULE GD/PNG"
gd::print image,0,10,"x=",gd::SizeX(image)," y=",gd::SizeY(image)
gd::print image,100,100,"Tiny ",12*3+55

gd::SetFont image,gd::FontSmall
gd::print image,100,120,"Small ",55*63

gd::SetFont image,gd::FontMedium
gd::print image,100,150,"Medium ",24/19

gd::SetFont image,gd::FontLarge
gd::print image,100,190,"Large ",sin(3.1)

gd::SetFont image,gd::FontGiant
gd::print image,100,240,"Giant ",log(1000)


for i=0 to 65 step 5
  gd::Line image,i,20,65-i,75
next i

LineStyle[0] = black
LineStyle[1] = black
LineStyle[2] = undef
LineStyle[3] = undef
LineStyle[4] = red
LineStyle[5] = green
LineStyle[6] = blue
LineStyle[7] = undef
LineStyle[8] = red
LineStyle[9] = red

gd::LineStyle image,LineStyle

gd::Line image,0,90,100,90,undef

for i=0 to 65 step 5
  gd::Line image,i,100,65-i,165,undef
next i


ImagePng = gd::Png(image)

gd::Destroy image

fn = 0
open "test.png" for output as fn
binmode fn
print#fn,ImagePng
undef ImagePng
close#fn

print "done\n"
Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 08:37:10 PM
I copied the dll's to the system32 dir. The gdtest ran ok, except. If you remove the comment from the gd::SavePNG command you will see the error that I am seeing. All my gd programs have been using the save command. It must be different now. Thanks
-----------------
import gd.bas

brush = gd::Create(10,10)
white = gd::Color(brush,255,255,255)
black = gd::Color(brush,0,240,0)
gd::Line brush,0,0,10,10,black
gd::Line brush,0,10,10,0,black

gd::SavePng brush,"brush.png" <-- command does not work

error
Title: Re: Windows 2.1 RC1 install
Post by: Support on September 14, 2009, 09:20:35 PM
We are looking into the issue with SavePNG().

I noticed in Peter's (author) example program he did a raw write of the image string to disk using ScriptBasic standard file IO instead of using gd::SavePNG().  ???

Code: [Select]
fn = 0
open "test.png" for output as fn
binmode fn
print#fn,ImagePng
undef ImagePng
close#fn

I'll update this post when it's fixed.

Thanks for testing ScriptBasic, your feedback is very helpful !


John
Title: Re: Windows 2.1 RC1 install
Post by: btechint on September 14, 2009, 11:21:34 PM
Thanks, looking forward to using the new GD library. Here is one of the little jobs I do with SB. This one works now after I changed the save routine. It just makes random colored images. I did not use the transparent color before and with the new library without it the image is 1 bit grayscale. After adding it in the image became a standard color png file.
-----------------
import gd.bas
randomize

for z=1 to 20

FOR G=1 TO 3
a=RND
B=INT(A)
C=RIGHT(B,3)
print c,"\n"
D[g]=c
NEXT G

image = gd::Create(800,600)
Color = gd::Color(image,D[1],D[2],D[3])
white = gd::Color(image,255,255,255)
gd::SetTransparentColor image,white

d="txr"&z&".png"

ImagePng = gd::PNG(image)

gd::Destroy image

fn = 0
open d for output as fn
binmode fn
print#fn,ImagePng
undef ImagePng
close#fn
         
next z
end
Title: Re: Windows 2.1 RC1 install
Post by: Support on August 15, 2011, 12:08:05 AM
(http://images.bestbuy.com/BestBuy_US/images/products/2380/2380224_sa.jpg)

Ron,

You may be the first to compile ScriptBasic for the Intel Atom processor.

Were you able to get any of the extension modules to compile as well?

John