• Welcome to Jose's Read Only Forum 2023.

KBasic on Ubuntu 8.04

Started by Donald Darden, May 06, 2008, 11:48:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

I now have kbasic installed and working on Ubuntu 8.04.  It was a little tricky because of some design quirks in Ubuntu, but once I figured out what was going on, I was able to deal with it.

First, if you have installed version 8.04 from scratch or as an upgrade from an earlier version, you are also going to need the alternate CD installer version on CD.  If you need to add something, then you will be asked for this CD (although it does not use the word "alternate", it does use its numbered reference).

You will likely have to install the Qt4 package.  I was shown a link that was written for Ubuntu 7.10 that used the sudo mode in a terminal console window:  sudo apt-get install libQt4-sql.  The link claims that this worked for 7.10, but I ran into a problem with 8.04.  But do it anyway, as you can resolve the problem going forward.

There are two current versions of kbasic for Linux right now:  1.6 Trial, and 1.69 Beta.  They are also working on version 2.0, but that is not currently available. What you get will be a file named something like this:  installer_kbasic_professional_linux.bin (the name may vary in the future).
However, permission to execute it not automatic - you have to right click on the file. select properties, then under permissions you have to add a check in the checkbox to make it an executable.  Even then Ubuntu does not know what to do with it.  If you are using Kubuntu, which has the KDE desktop environment rather than Gnome, they suggest you do this:
QuoteMake the installer file executable with the Konqueror (right click) and run it with the Konqueror (left click).

However, you can get the same results in Gnome by opening a Terminal Console and entering the sudo command, and calling the executable file directly like this:
$ ./installer_kbasic_professional_linux.bin

kbasic will install itself.  But it may not work, and if it doesn't, then this points up the other problem with Ubuntu:  restricted user access.

If you did the install of Qt4 as described above, you should be ready to go.  But the installer may not put the contents of this package where they need to be for kbasic to use them.  There are two general solutions to this problem:  Create symbolic links where they need to be to point to where they actually are, or to move (or copy) them to the right location.

I asked the people at kbasic about what their product was looking for, and the directed me to this link:  http://www.kbasic.com/doku.php?id=installation.  At the bottom is a list of all the libraries that kbasic requires to run.  I took this list, and using the Places/Search for Files, and designating the File System as where to search under Look in folder, I found all occurances of each one.  The arrows show where kbasic expects to find each file, and of course the search shows where they actually are.  Here is the list I copied from their web site, and what I found when I went through it trying to make sure all files were on board and properly situated:
QuoteIf your PC does not show anything after clicking on the installer file, your system does not match the requirements or has not installed all needed software in the right location as Linux Standard Base (LSB) defines it!

Dependencies are (shared libraries, which you must have installed on your system):

    libqt-mt.so.3 ⇒ /usr/lib/libqt-mt.so.3
    libXft.so.2 ⇒ /usr/lib/libXft.so.2
    libQtSql.so.4 ⇒ /usr/lib/libQtSql.so.4
    libQtGui.so.4 ⇒ /usr/lib/libQtGui.so.4
    libpng12.so.0 ⇒ /usr/lib/libpng12.so.0
    libSM.so.6 ⇒ /usr/lib/libSM.so.6
    libICE.so.6 ⇒ /usr/lib/libICE.so.6
    libXi.so.6 ⇒ /usr/lib/libXi.so.6
    libXrender.so.1 ⇒ /usr/lib/libXrender.so.1
    libXrandr.so.2 ⇒ /usr/lib/libXrandr.so.2
    libXfixes.so.3 ⇒ /usr/lib/libXfixes.so.3
    libXcursor.so.1 ⇒ /usr/lib/libXcursor.so.1
    libXinerama.so.1 ⇒ /usr/lib/libXinerama.so.1
    libfreetype.so.6 ⇒ /usr/lib/libfreetype.so.6
    libfontconfig.so.1 ⇒ /usr/lib/libfontconfig.so.1
    libXext.so.6 ⇒ /usr/lib/libXext.so.6
    libX11.so.6 ⇒ /usr/lib/libX11.so.6
    libQtCore.so.4 ⇒ /usr/lib/libQtCore.so.4
    libz.so.1 ⇒ /lib/libz.so.1
    libpthread.so.0 ⇒ /lib/libpthread.so.0
    libdl.so.2 ⇒ /lib/libdl.so.2
    libstdc++.so.6 ⇒ /usr/lib/libstdc++.so.6
    libm.so.6 ⇒ /lib/libm.so.6
    libgcc_s.so.1 ⇒ /lib/libgcc_s.so.1
    libc.so.6 ⇒ /lib/libc.so.6
    libXdmcp.so.6 ⇒ /usr/lib/libXdmcp.so.6
    libXau.so.6 ⇒ /usr/lib/libXau.so.6
    libexpat.so.1 ⇒ /usr/lib/libexpat.so.1
    ld-linux.so.2 ⇒ /lib/ld-linux.so.2

In checking through this list on my install of Ubuntu 8.04, I found the everything was in place, excep libQtGui.so.4, the fourth entry down from the top.  That was in a folder set up under the folder I had added to handle Downloads.  So the path from my home folder was Download/qt4-x11-4.3.4, and there were debian, etc, and usr.
The only subfolder contents you are concerned with is usr.  You want everything in usr to be copied to /usr.

Now here is the tricky part.  If you use this as a command in sudo mode, cp -r usr/* usr, you might get the result that I did, which is that instead of going into /usr, the cp command set up a folder Download/usr and copied the contents there.  Adn that did not work.

Apparently, even in sudo mode, Ubuntu does not want you writing into the root folders using cp.  To get around this, I positioned into the root folder that I wanted to copy into and posted the copy command this way:
Quotesudo -s
cd /usr
cp ~/Download/qt4-x11-4.3.4/usr/* .
Not that the period at the end of the cp command specifies the current folder as the destination.  This is implied in DOS, but mandatory in Linux.

After that, I was able to get the kbide to start right up. 

A problem with 1.6 on Ubuntu is that it adds three links to the desktop, and these are all locked - Gnome cannot determine the permissions assigned. Since it cannot determine the permissions, you can't change them here either.  Again, this type of problem has to be fixed via the superuser mode and a Terminal Console screen.  The kbasic folder may be locked, so enter the termnal mode and use this command:
Quotesudo -s
chmod 777 kbasic

Then you want to make sure the links on the desktop are also cleared of their locked state:
Quotesudo -s
cd Desktop
dir                                             [use toolbar Edit to copy results to clipboard]
chmod 777                               [use shift+insert to past resutls to command line]
And that should do it.  The kbasic link should now open the kbide (kbasic IDE) for you at this point.

Donald Darden

As I said before, the IDE is what tends to give you most of your impressions of the development software that you are using it with.  So it follows that if you like a particular IDE, you might want to try and use it everywhere.  If that works for you, then that may be your best option.

To tackle development software that lacks an IDE can be a problem, because it imposes more of a learning curve on you.  It may be good experience, but it can be frustrating to someone that is having a bit of a learning curve to overcome.  It also may be frustrating to someone that is accustomed to working strictly via a GUI.

Kbasic comes with its own IDE, named kbide.  I attached two screenshots, one of the kbide running on Windows in a virtual environment on Ubuntu, and the other a screenshot of kbide running in Ubuntu..

Ideally, you would want the two IDEs to look and function in exactly the same way.  That would make the migration between Windows and Linux easier because it helps flatten out the relearning curve.  But like many other things, creating an IDE can be a work in progress, and a rethink of what the IDE could look like and how it will work is far more likely than a simple plan to exactly duplicate what's been done before.

Petr Schreiber

Hi Donald,

is the Take screenshot an KBasic application, or the capture proggie did not hide soon enough :)?
Thanks a lot for showing quite interesting Linux BASIC, will try it on my Ubuntu box.

AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3


Donald Darden

I've repeated the install process with kbasic on Ubuntu 8.04.  It seems solid, and can be shorted to just these instructions:

1.  Dpwnload installer_kbasic_professional_linux.bin

2.  Make this file executable (right click, select properties, then permissions)

3.  Open a terminal console sessiona (Applications/Accessories/Terminal)

4.  Gain superuser priveleges  (type sudo -s)

5.  Use cd to change to the directory where the download above went (probably to your desktop, so type cd Desktop)

6.  Verify that the install file above is in the directory by using dir.  Then type a dot-slash (./) followed immediately by the full file name (you can highlight, use Edit/Copy, then use Shift-Insert to copy-and-paste the name directly).

7.  kbasic should install itself in directory ~/kbasic (the ~ means your user home folder, so normally you can use cd kbasic or cd ~/kbasic to get there)

8.  If you click on the kbasic link on the desktop, it will likely do nothing.  If you type ./kbasic, it will likely report an error.  The steps below will resolve this error.

9.  You need to install or verify that Qt4 is installed:  type apt-get install libqt4-sql)

10.  The necessary files will be installed to /usr/lib and to /lib, except for the Qt4Gui interface which will be added under your user account.  This needs to be moved or copiied to the corresponding root folder (or a symbolic link placed there).  We will use the copy method.

11.  Try to execute ./kbasic again.  If it reports an error for libQbGui.so.4, this indicates the related files are in the wrong place.  You can use Edit/Copy with the filename highlighted, then use Places/Search for files to locate it.  By default the search will be from your home folder, and will likely find it at that point.  But you could search the whole file system if need be.

Gnome does not have an easy way to copy files from the search to a new location.  Even if it did. you want all related files, not just this one.  So we resort to the use of the terminal console again.  But first we can highlight any given filename and use the right click to indicate we want to Save results as... then give a temporary file name to save into.  Close the search, find the file and open it with a text editor.  Now we can highlight the path for the found folder (discard the filename after the last / at the end), and use Ctrl+C to put the path in the clipboard.

12.  In the Terminal console, type cd /usr.

13.  Type cp -r [use Ctrl+V to paste source path]* ., and make sure you don't forget the space-period, which signifies the current directory as the destination (this is optional in Windows, but required in Linux).  (Hint:  The resulting command line should look something like this:  cp -r /home/username/Download/usr/* .. or perhaps cp -r /home/username/usr/* .)

14.  You are done.  If you did it right, kbasic should now start either with ./kbasic in a terminal window or by using the link on the desktop.


Donald Darden

I have exchanged some correspondence with kbasic, and hope to get more information as time goes on.  I am told that the Windows version is currently ahead in development over the Linux version, and that is partly due to the fact that the Linux version of kbasic takes a lot longer to recompile, so it is just faster to work in the Windows environment while developing it.

But I am asking the type of questions that potential buyers and users will be interested in, so stay tuned for further details as I get them from the source.  Meanwhile, check out any references to kbasic found via your search engine with care - some of the links are quite old, and you want to make sure you are dealing with the newest version, and uncovering additional sources for documentation, code, and discussion groups.

Donald Darden

I've been exchanging emails with the creator of kbasic, and I am pretty excited about the product.  For one thing,  He is only asking 24.95 (euro) for all three compilers - Windows, Linux, and MacOS.  That's about $35 U.S.  And he takes PayPal (you order online, then you are advised on how to pay).  I am also told that this will include one year of updates.  The new verson 2.0 is still many months away from release, so don't put off a buy in hopes of just buying the newer version..

Kbasic includes OOP, which some people insist that they just have to have.  There is no inline assembler support, but it will work with external libraries (read DLLs and APIs, you windows geeks).  The manual is a bit dated, still talking about a personal kbasic version and makes the point that it produces pseudo-code for cross-platform compatibiity.  But I noted that the kbide allows you to render binary files by platform, so I believe this means that you can create executables, or this may be the pseudo-code results.

Kbasic is staying away from code that is limited to just one platform.  So don't expect .Net or COM support here.  hardware-specific needs can be met with external DLLs.  Many features that are not yet incorporated in kbasic directly are supported viia Qt, but some will also be added to kbasic in the future.

The manual is well written, but is a work in progress.  The online version is being revised by contributors.  Som important links that have been recommended are:

the webiste http://www.kbasic.com/doku.php

official download http://www.kbasic.com/doku.php?id=download

manuals http://www.kbasic.com/doku.php?id=manuals

forum http://www.kbasic.com/doku.php?id=community

Examples are inlcuded in the download package.
Some of them are online http://www.kbasic.com/doku.php?id=description#examples

On yes, I was asked if I knew of a good, free bug tracking program.  A check of google shows a number of commercial and free procuts, but I haven't had time to explore them.  Any suggestions on a good package to help kbasic out?