Author Topic: ScriptBasic 32 bit Windows  (Read 28951 times)

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
ScriptBasic 32 bit Windows
« on: July 04, 2010, 02:14:42 AM »
I will be posting a release candidate for the 32 bit version of Armando's work with the 64 bit ScriptBasic effort using the GCC / MinGW C/C++ compiler. Armando has sent me the ZLIB and new XML extension modules to test. I will include a batch file to convert ScriptBasic applications to a standalone executable using a shared object runtime using this same compiler.

I have noticed in the site logs that there have been daily downloads of ScriptBasic. It would be great to hear some feedback from the users for a change.  :(
« Last Edit: July 04, 2010, 02:17:12 AM by support »

Airr

  • Guest
Re: ScriptBasic 32 bit Windows
« Reply #1 on: July 04, 2010, 06:19:05 PM »
John,

The XML module is not necessarily "new", just "fixed" (somewhat).  ;D

It still requires libxml.dll, iconv.dll, and zlib1.dll files, which add up to about 2megs worth of external dependencies.

I've finished the preliminary work on a replacement xml module, called "mxml".  It requires NO external dependencies.

Using the following xml file as a test:
Code: XML
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2.  
  3.  
  4. <stufflist>
  5.         <stuff_test>This is a test!</stuff_test>
  6.         <stuff_test2>And this is another test!</stuff_test2>
  7.         <stuff_test3>
  8.                 <painting>
  9.                         <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
  10.                         <caption>This is Raphael's "Foligno" Madonna, painted in
  11.                                 <date>1511</date>.
  12.                         </caption>
  13.                 </painting>
  14.         </stuff_test3>
  15.         <books>
  16.             <book>
  17.                 <id>1</id>
  18.                 <name>Hello, world!</name>
  19.             </book>
  20.             <book>
  21.                 <id>2</id>
  22.                 <name>Hello, China!</name>
  23.             </book>
  24.         </books>
  25. </stufflist>

I can parse it like so:

Code: Text
  1. include "c:\scriptbasic\include\mxml.bas"
  2.  
  3. filename = "stuff.xml"
  4.  
  5. doc = mxml::LoadDoc(filename)
  6.  
  7. node =  mxml::GetNode(doc,"/stufflist/stuff_test")
  8. if node then print "Test1: ", mxml::GetNodeValue(node),"\n"
  9.  
  10. node =  mxml::GetNode(doc,"/stufflist/stuff_test2")
  11. if (node) then print "Test2: ", mxml::GetNodeValue(node),"\n\n"
  12.  
  13.  
  14. node = mxml::GetNode(doc,"/stufflist/stuff_test3/painting/img")
  15. if node then
  16.         print "Image: ", mxml::GetProperty(node,"src"), "\n"
  17.         print "Alt Image: ", mxml::GetProperty(node,"alt"), "\n\n"
  18. endif
  19.  
  20.  
  21. node = mxml::GetNode(doc,"/stufflist/books")
  22. child = mxml::GetChild(node)
  23.  
  24. while child
  25.         node = mxml::GetNode(child,"id")
  26.         if node then print "ID = ", mxml::GetNodeValue(node),"\n"
  27.         node = mxml::GetNode(child,"name")
  28.         if node then print "Name = ", mxml::GetNodeValue(node),"\n"
  29.        
  30.         child = mxml::GetNext(child)
  31. wend
  32.  
  33.  
  34. if doc then mxml::FreeDoc(doc)

I coded this to use an XPATH-like call to get a pointer/handle to a given node.

Here's the output:
Code: [Select]
C:\Scriptbasic\mxmltest>\Scriptbasic\bin\scriba.exe mxmltest.sb
Test1: This is a test!
Test2: And this is another test!

Image: madonna.jpg
Alt Image: Foligno Madonna, by Raphael

ID = 1
Name = Hello, world!
ID = 2
Name = Hello, China!

I'll send you the mxml module in a bit so you can test before adding to the RC.

A.


Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 32 bit Windows
« Reply #2 on: July 04, 2010, 10:47:04 PM »
I now understand that the XML extension module you sent in the Windows 32 build is a fixed version of what we had already.

Your new XML effort looks great with a slimmer look and less baggage is a welcome addition.




Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 32 bit Windows
« Reply #3 on: July 05, 2010, 12:58:54 AM »
Armando,

Your new XML extension module could be used to treat Gtk XML project files as GUI object templates. I could then load XML template files, extract the GUI definitions I'm interested in and process the request as direct calls to the Gtk-Server extension module. (which hasn't been converted to MinGW/GCC yet under Windows)

If you wanted to, you could use the web as a repository for GUI template definitions. The cURL extension module would come in handy with that task.


Just some low hanging fruit to salivate over.  :o
« Last Edit: July 05, 2010, 01:25:49 AM by support »

Ran

  • Guest
Re: ScriptBasic 32 bit Windows
« Reply #4 on: December 31, 2013, 02:11:50 AM »
Did try to run Scriptbasic under Wine (Ubuntu 12.04)
but it didn't work.
Of course Wine is not a full winows and a lot of Win Progs
do not run under Wine.
You have to be lucky here.
I run Pelle's C under Wine and Visual C++ 6.0

Ran

  • Guest
Re: ScriptBasic 32 bit Windows
« Reply #5 on: December 31, 2013, 05:28:33 AM »
But ScriptBasic 32 runs fine under windows 7 64 bits
 :)

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 32 bit Windows
« Reply #6 on: December 31, 2013, 10:16:17 AM »
I use the 32 bit version of scriba under Wine all the time. What issues are you having?

Ran

  • Guest
Re: ScriptBasic 32 bit Windows
« Reply #7 on: January 01, 2014, 12:20:12 AM »
Well, it works ok for the moment but I run normally win programs from allover dir's in Ubuntu.
So, ScriptBasic doesn't work if I do so.
I posted it here.
But I was thinking later on to run it from the C dir where Wine lives.
And yes, it runs happily there...... :D