Gambas

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Gambas

Post by RDNZL »

Image
<h2>Gambas</h2>I don't like this kind of seafood, but this programming environment is very cool, running on Linux, and you get it for free too!
This section is dedicated to getting the latest version 2.9 from svn to compile and install.
The official version of 2.9 will be release any day now.
You need to have a bit of Linux knowledge to be able to get through this guide.
At the bottom you will find reference links, where you can find other Gambas related info.

I will describe a Debian/Ubuntu setup, other distro's are similar and you can find notes how to install it on the gambasdoc wiki here:
http://www.gambasdoc.org/help/install

<h3>Ubuntu Install</h3>Download the desktop iso called 'ubuntu-8.04.1-desktop-i386.iso' or the latest Intrepid Ibex 'ubuntu-8.10-desktop-i386.iso' and burn it to disc.
If you don't have a CD-ROM or DVD drive create a boot-able USB key with the use of the tool UNetbootin.

If you have an Asus eee-box use this guide to create a bootable usb key:
http://openclue.org/tag/gadgets/
If you have a Asus eee-pc install Ubuntu-eee on it.

After the install procedure (search the web if you don't know how to complete this) you end up with a basic desktop environment.
Update all the packages with the update manager, reboot and continue...

If you want remote login, install ssh and nomachine's nx:

Code: Select all

$ sudo apt-get ssh
I use nx for remote X sessions, but you can also use something else like vnc for example ...

Code: Select all

$ mkdir ~/install/nx
$ cd ~/install/nx

$ wget http://64.34.161.181/download/3.2.0/Linux/nxclient_3.2.0-14_i386.deb
$ wget http://64.34.161.181/download/3.2.0/Linux/nxnode_3.2.0-13_i386.deb
$ wget http://64.34.161.181/download/3.2.0/Linux/FE/nxserver_3.2.0-16_i386.deb

$ sudo dpkg -i nxclient_3.2.0-14_i386.deb
$ sudo dpkg -i nxnode_3.2.0-13_i386.deb
$ sudo dpkg -i nxserver_3.2.0-16_i386.deb
You can download clients here:
http://www.nomachine.com/download.php
<h3>Pre-requisites</h3>
Install pre-requisite packages for building Gambas:

Code: Select all

$ sudo apt-get install subversion build-essential g++ automake autoconf libbz2-dev libmysqlclient15-dev \
libgtk2.0-dev libcurl3-dev libgtkglext1-dev libqt3-mt-dev libpcre3-dev libsdl-sound1.2-dev \
libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev libcos4-dev librsvg2-dev \
libpoppler-dev libpoppler-glib-dev libasound2-dev libartsc0-dev libesd0-dev libesd-alsa0 libdirectfb-dev \
libaa1-dev libarts1-dev kdelibs4-dev libffi4-dev libxtst-dev gettext mysql-client-5.0 mysql-server-5.0

NOTE: Replace 'libffi4-dev' above with 'libffi-dev' if you are running Ubuntu 8.10.

This will use a whooping 425Mb of disk-space, but don't worry it's well spent .. :-)

Remember the MySQL root password you entered, you need it later.

Cleanup afterwards ...

Code: Select all

$ sudo apt-get clean all
<h3>Get Gambas</h3>
Getting latest source code.

Code: Select all

$ mkdir -p  ~/install/gambas
$ cd ~/install/gambas
$ svn checkout https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/branches/2.0
$ cd 2.0
Note: If you want to update your copy later to the latest version, you just type 'svn update' inside this directory and repeat the steps below.
<h3>Configure Gambas</h3>

Code: Select all

$ ./reconf-all && ./configure -C
This will take a bit of time ... and you will get this in the end:

THESE COMPONENTS ARE DISABLED:

- gb.db.firebird
- gb.db.odbc
- gb.db.postgresql
- gb.db.sqlite2
- gb.db.sqlite3
- gb.qte

These are unused database drivers and the QT embedded component which is not needed ...
<h3>Build Gambas</h3>

Code: Select all

$ sudo make install
You are ready to start Gambas IDE and look at the examples that came with it.
If you don't have a gambas menu entry below Application/Programming you can start it manually from a terminal window by typing gambas2
Or you can make a Application Launcher with right click on the desktop which has
Command gambas2
Logo ~/install/gambas/2.0/app/src/gambas2/img/logo/new-logo.png

To be continued ...

<h2>Reference Links</h2><h3>Offical</h3>http://gambas.sourceforge.net
http://www.gambasdoc.org
<h3>Forums</h3>http://forum.stormweb.no/index.php
http://www.gambas-club.de/

http://www.expertaccess.com.br/forum/fo ... FID=9&PN=0
http://www.linuxbasic.net/index.php?PHP ... 7f6d2a;www
http://www.gambas-it.org/gmbs/modules/newbb/
<h3>Tips and Tricks</h3>http://de.wikibooks.org/wiki/Gambas [ur ... rgmini.htm
http://gambas.noxqs.org/
http://gambaslinux.wordpress.com/
http://andreabertini.wordpress.com/
http://www.linux.com/feature/122049
<h3>Example programs</h3>The first one is Gambas IDE itself.
Point your project browser to ~/install/gambas/2.0/app/src...
http://gambas.magic-systems.net/
<h3>Manuals/Books</h3>http://vectorlinux.osuosl.org/Uelsk8s/g ... -guide.pdf
http://www.geocities.com/nalinivasudeva ... gambas.pdf
http://www.linuxformat.co.uk/pdfs/downl ... gambas.pdf
http://mercury.chem.pitt.edu/~sasha/Lin ... 3-0329.pdf
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Gambas

Post by Snelvuur »

Debian says :

Package libffi4-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libffi4-dev has no installation candidate

maybe my debian is too old, i hardly upgrade if its working like it should.. doing that right now..


// Erik (binkey.nl)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Gambas

Post by RDNZL »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by snelvuur</i>
<br />Debian says :

Package libffi4-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libffi4-dev has no installation candidate

maybe my debian is too old, i hardly upgrade if its working like it should.. doing that right now..


// Erik (binkey.nl)
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I have a Debian 4.0etch3 machine.
And have it installed, so I guess it will work after your update...

Code: Select all

# apt-cache search libffi
libffi4 - Foreign Function Interface library runtime
libffi4-dev - Foreign Function Interface library (development files)

# apt-get install libffi4-dev
Reading package lists... Done
Building dependency tree... Done
libffi4-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Gambas

Post by Snelvuur »

running unstable, so that must be it.. however it did work the configure...

trying to get nx to work, never used that before. fails on connecting.. reading google at the moment.. :)

debian:/usr/NX/bin# ./nxserver --usercheck riemers
NX> 900 Verifying public key authentication for NX user: riemers.
NXSERVER - Version 3.2.0-16 - LFE
Fri Oct 24 14:49:07 2008 running as user: 'root' (uid: 0, pid: 1092) on ''
Info: selected user 'riemers' is not authenticated no password available (NXNodeExec)
Info: preferred auth method is 'publickey' (NXNodeExec)
Info: selected NX Node with host name '127.0.0.1', port '22' (NXNodeExec)
Info: selected publickey method to login NX Node (NXNodeExec)
Info: nxssh command line is '/usr/NX/bin/nxssh -nxservermode -l riemers 127.0.0.1 -p 22 -x -2 -i /usr/NX/etc/keys/node.localhost.id_dsa -o 'PubkeyAuthentication yes' -o 'RSAAuthentication yes' -o 'RhostsAuthentication no' -o 'PasswordAuthentication no' -o 'RhostsRSAAuthentication no' -o 'StrictHostKeyChecking no' /usr/NX/bin/nxnode' (NXNodeExec)
Info: nxssh child pid is: 1098 (NXNodeExec)
Info: received data in err channel from NX Node: 'ssh_exchange_identification: Connection closed by remote host
' (NXNodeExec)
Info: NX Node out channel was closed (NXNodeExec)
Info: Removing not recognized buffer from stdout:[] (NXNodeExec)
Info: NX Node err channel was closed (NXNodeExec)
Info: closing nxssh's in, out, err FDs (flagfinished is: 0) (NXNodeExec)
Error: no 'CONNECTED' message from NX Node (NXNodeExec)
NX> 595 ERROR: A fatal error occurred in NX Server.
NX> 595 ERROR: The exception id is: 4AA1F6ED. To get detailed information about
NX> 595 ERROR: the error search for the string 4AA1F6ED in the system log
NX> 595 ERROR: file (usually '/var/log/messages').
NX> 500 ERROR: Last operation failed.


// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Gambas

Post by Snelvuur »

adding it to my hosts.allow helps.. i have "denyhosts" installed because i got hammered to much.. now it works the nxserver part aswell if i install the client.

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Gambas

Post by Snelvuur »

so far so good..

Image

// Erik (binkey.nl)
francisb
Member
Member
Posts: 54
Joined: Sat Sep 29, 2007 8:53 pm
Location: Netherlands
Contact:

Gambas

Post by francisb »

Nice howto!!

but i gett this error:

Code: Select all

francis@Domotic:~/install/gambas/2.0$ ./reconf-all && ./configure -C
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 186.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 186.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Gambas

Post by Snelvuur »

are you trying to run this on a mac? if so..

export LIBTOOLIZE=/usr/bin/glibtoolize

otherwise, which o.s.?

// Erik (binkey.nl)
francisb
Member
Member
Posts: 54
Joined: Sat Sep 29, 2007 8:53 pm
Location: Netherlands
Contact:

Gambas

Post by francisb »

He Snelvuur,

Alles goed?

I am using Ubuntu Hardy 8.10, the error does not stop the installation and afterwards it looks and works ok.

Francis
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Gambas

Post by RDNZL »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by francisb</i>
<br />He Snelvuur,

Alles goed?

I am using Ubuntu Hardy 8.10, the error does not stop the installation and afterwards it looks and works ok.

Francis
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I upgraded my Ubuntu also to 8.10, but it wasn't stable at all when I ran my project. (signal 11 errors)
The libtoolize error is caused by a different version of libtool, gambas doesn't support it yet.

I'm not sure if my unstable installed was due to that fact.

I went back to 8.04.1 to be honest.

In the mean time Benoit fixed a number of bugs in Serial and Socketport code of Gambas - which I use extensively in my program, so maybe it works better now, but don't have the time to try it out again at this time.

Regards,
Ron.
francisb
Member
Member
Posts: 54
Joined: Sat Sep 29, 2007 8:53 pm
Location: Netherlands
Contact:

Gambas

Post by francisb »

He RDNZL,

Can i play with you software, i haven't got a big setup only power en gas measurements with RFXCOM but thats enough for me now. Can i download it somewhere?

gr,

Francis
Esteban
Forum Moderator
Forum Moderator
Posts: 677
Joined: Sun Jan 13, 2008 6:39 pm
Location: Netherlands

Gambas

Post by Esteban »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by francisb</i>
<br />
Can i play with you software,... Can i download it somewhere?
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Hi Francis,

RDNZL hasn't released the code or software yet. But he will when it is ready, so yes you'll be able to download it and give it a go.

Ciao,
Esteban
francisb
Member
Member
Posts: 54
Joined: Sat Sep 29, 2007 8:53 pm
Location: Netherlands
Contact:

Gambas

Post by francisb »

I can't wait, it looks soooo good, i very jealous, because you guys know how to program.
Post Reply

Return to “DomotiGa Forum”