Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
About The Best Formula In The World
Architecture details
Benchmarks
Books
By Reference Argument Passing
Compatibility between versions
Creating And Using Libraries
Database Datatype Mapping
Database Request Quoting
Date & time management
Dates and calendars
DBus and Gambas
Differences Between Shell And Exec
Differences From Visual Basic
Distributions & Operating Systems
Drag & Drop
DrawingArea Internal Behaviour
External functions datatype mapping
Frequently Asked Questions
Gambas Farm Server Protocol
Gambas Mailing List Netiquette
Gambas Markdown Syntax
Gambas Naming Conventions
Gambas Object Model
Gambas Scripting
Gambas Server Pages
Gambas Unit Testing
Gambas Wiki Markup Syntax
Getting Started With Gambas
Hall Of Fame
Housekeeping, cleaning up
Image Management In Gambas
Including Help Comments in Source Code
Interpreter limits
Introduction
Just In Time Compiler
Just In Time Compiler (old version)
License
Localisation and Internationalization
Mailing Lists & Forums
Naming Conventions
Network Programming
ODBC Component Documentation
PCRE Pattern Syntax
Porting from Gambas 2 to Gambas 3
Previous News
Project Directory Structure
Release Notes
Gambas 2.23.0
Gambas 2.23.1
Gambas 2.24.0
Gambas 3.0.0
Gambas 3.1.0
Gambas 3.1.1
Gambas 3.2.0
Gambas 3.2.1
Gambas 3.3.0
Gambas 3.3.1
Gambas 3.3.2
Gambas 3.3.3
Gambas 3.3.4
Gambas 3.4.0
Gambas 3.4.1
Gambas 3.4.2
Gambas 3.5.0
Gambas 3.5.1
Gambas 3.5.2
Gambas 3.5.3
Gambas 3.5.4
Gambas 3.6.0
Gambas 3.6.1
Gambas 3.6.2
Gambas 3.7.0
Gambas 3.7.1
Gambas 3.8.0
Gambas 3.8.1
Gambas 3.8.2
Gambas 3.8.3
Gambas 3.8.4
Gambas 3.9.0
Gambas 3.9.1
Gambas 3.9.2
Gambas 3.10.0
Gambas 3.11.0
Gambas 3.11.1
Gambas 3.11.2
Gambas 3.11.3
Gambas 3.11.4
Gambas 3.12.0
Gambas 3.12.1
Gambas 3.12.2
Gambas 3.13.0
Gambas 3.14.0
Gambas 3.14.1
Gambas 3.14.2
Gambas 3.14.3
Gambas 3.15.0
Gambas 3.15.1
Gambas 3.15.2
Gambas 3.16.0
Gambas 3.16.1
Gambas 3.16.2
Gambas 3.16.3
Gambas 3.17.0
Gambas 3.17.1
Gambas 3.17.2
Gambas 3.17.3
Gambas 3.18.0
Gambas 3.18.1
Gambas 3.18.2
Gambas 3.18.3
Gambas 3.18.4
Gambas 3.19.0
Gambas 3.19.1
Gambas 3.19.2
Gambas 3.19.3
Gambas 3.19.4
Gambas 3.19.5
Gambas 3.19.6
Gambas 3 RC1
Gambas 3 RC2
Gambas 3 RC3
Gambas 3 RC4
Gambas 3 RC5
Gambas 3 RC6
Gambas 3 RC7
Reporting a problem, a bug or a crash
Rich Text Syntax
Screenshots
Text highlighting definition file syntax
The Program has stopped unexpectedly by raising signal #11
Variable Naming Convention
WebPage Syntax
Web site home page
What Is Gambas?
Window & Form Management
Window Activation & Deactivation
Window Life Cycle
XML APIs
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Gambas 3 RC4

What's new

This release is the fourth release candidate of Gambas 3.

More that 60 bugs were fixed, and the following new features were added:
  • Better support for LXDE.

  • A trick that allows the interpreter to watch existing file descriptors obtained through external function calls.

  • Many interpreter optimizations, especially in the String class.

  • Support for connections to local sockets in the gb.db.mysql component.

  • Clean-up of the following components: gb.net.curl, gb.pdf, gb.v4l.

  • Catalan, spanish and french translations were updated.

As usual, please report any compilation and packaging problem on the mailing-list!

Thanks in advance.

ChangeLog

[DEVELOPMENT ENVIRONMENT]
* BUG: When hitting F11 to show the console, the console parent tab is now
  automatically made visible.
* BUG: When converting a Gambas 2 project, the IDE now checks that the
  project is not already opened somewhere else, and does not leave the
  backup project locked if the conversion has succeeded.
* BUG: Fix desktop detection in the system information dialog.
* BUG: Recent projects are correctly filtered now the second time the 'open
  project dialog' is opened.
* BUG: Ignore ValueBox.MaxLength property when converting a Gambas 2 form.
* BUG: Now just print a warning when creating the project directory icon is
  impossible.
* BUG: When converting a Gambas 2 project, do not try to convert symbolic
  links.
* BUG: Do not use Editor.ShowCursorPosition flag anymore.
* BUG: In the menu editor, pasting menus works correctly now.
* BUG: Selecting the movie of a MovieBox control only allows to select a
  path located in the project.
* BUG: Selecting a virtual class in the help browser tree now correctly
  shows its documentation page.
* BUG: TRY is taken into account now when converting a Gambas 2 OPEN
  instruction.
* BUG: Don't crash if a library cannot be found.
* NEW: Catalan translation updated.
* NEW: Update Catalan tips.
* NEW: When inserting an existing module, class, form... the file view
  automatically show hidden files so that the ".src" directory inside
  Gambas projects is always visible.
* NEW: Languages are sorted in the help browser's language menu.
* NEW: The help browser now shows an animation while loading a page.
* NEW: Add support for LXDE terminal in option dialog.
* NEW: Display a big message in the library tab of the project property
  dialog to tell that library must be stored in the same directory as the
  project using them.
* NEW: Spanish translation updated.
* OPT: The contents of a project item is loaded from disk only if the
  project item is visible.

[WIKI CGI SCRIPT]
* BUG: Fix the english TODO page showing not-documented symbols.
* BUG: Symbol syntax for array writing has been fixed.
* NEW: Do not use the cache anymore.
* NEW: Updated Catalan translation.

[EXAMPLES]
* BUG: Fix some form layout in the Database example.
* NEW: Updated WebBrowser Catalan translation.
* NEW: Updated TreeView Catalan translation.
* NEW: Update example project titles.
* NEW: AnalogWatch has been rewritten with the Paint class.
* NEW: Apply the gb.pdf changes to the PDFViewer example.
* NEW: Fix video examples according to the last changes in gb.v4l.

[INTERPRETER]
* BUG: Fix a type transitivity bug in Trim().
* BUG: DateAdd() does not raise an overflow error anymore when used on a
  time value.
* BUG: Really fix the way Trim() handle null strings. Now there is no
  memory leaks anymore.
* BUG: Fix a crash in stack backtrace management.
* BUG: Fix Byte[].FromString() method.
* BUG: Remove the deprecated Object.LastEventName property.
* BUG: Now incrementing or decrementing a boolean raises an error.
* BUG: Fix the declaration of SizeOf() syntax.
* BUG: When opening an existing file descriptor, correctly check the mode
  compatibility.
* BUG: Fix String.Pos(), and String.InStr() with a third argument.
* BUG: Arrays of classes exported from a component or a library are now
  automatically exported too.
* NEW: New syntax for GB.AddString() and GB.ExtendString() interpreter API.
  Do not pass the string by reference anymore.
* NEW: GB.AddChar() is a new API for adding just a char to a string.
* NEW: Split System and Application class implementation in two different
  source files.
* NEW: A trick to watch existing file descriptors: opening ".XX" in direct
  mode, where "XX" is the file descritor value.
* NEW: When opening an existing file descriptor, check that it is opened
  with a compatible mode. Otherwise raise an "Access forbidden" error.
* NEW: When opening an existing file descriptor, check its validity
  immediately.
* NEW: Param.All is a new property that returns all extra arguments as an
  array.
* OPT: Optimize some string functions by not using arguments passed by
  reference.
* OPT: Integrate the "=" operator function into the main execution loop to
  save one function call.
* OPT: Optimize string comparison functions on x86 and x64_64 architectures
  by comparing eight bytes in one shot.
* OPT: Don't use glibc memcmp() to compare strings. My own routine is a
  little faster according to valgrind.
* OPT: The UTF-8 String class routines Left(), Mid() and Right() have been
  optimized. The positions of the first 256 characters of the last string
  processed by the String class are cached.
* OPT: Some native methods can be called like any other native subroutines.
  But that can be used only inside the interpreter, not in a component.
* OPT: The '&' operator is faster now when it takes two arguments only (the
  most frequent case).
* OPT: A little optimization in string allocation.
* OPT: Optimize returning from a function.
* OPT: A little optimization in conditonal jump.
* OPT: Optimize case insensitive string comparison. Hash table code is
  consequently a bit faster.
* OPT: Optimize the inequality comparison operators by putting them into
  the gbx_exec_loop.c source file.
* OPT: Internal conversions between unicode and utf-8 have been optimized.
* OPT: String.UCase(), String.LCase() and String.Chr() have been optimized.
* OPT: Some optimizations in date formatting.
* OPT: Now() has been optimized when run multiple times during the same
  second.
* OPT: Some little optimization in natural comparison routine.

[COMPILER]
* BUG: Fix compilation of function calls having more than 32 ByRef
  arguments.

[GB.DB.FORM]
* BUG: DataBrowser is correctly updated now when its DataSource changes.
* NEW: Updated Catalan translation.

[GB.DB.MYSQL]
* NEW: If the connection host starts with a slash, then we supposed that we
  are connecting to localhost, and that the host is actually the path of
  the socket to use.

[GB.DB.NET]
* BUG: Fix ignored system call return values.

[GB.DB.SQLITE2]
* BUG: Fix ignored system call return values.

[GB.DB.SQLITE3]
* BUG: Fix ignored system call return values.
* BUG: Fix some error messages.

[GB.EVAL]
* BUG: Eval() correctly returns a value again.

[GB.FORM]
* BUG: FileView now ignores unreadable directories.
* BUG: FileView works correctly again.
* BUG: Fix the management of the ShowHidden property in FileView.
* BUG: Fix how FileView settings are saved and restored.
* BUG: Fix InputBox layout.
* NEW: DirView.Settings is a new property that allows the Settings class to
  automatically save or restore settings through its Read and Write
  methods.
* NEW: Add a Click and a Change event to the DateBox control. The Click
  event is raised when the popup is closed.

[GB.FORM.MDI]
* BUG: Workspace with bottom orientation correctly shows its tabbar again.
* BUG: Fix the shortcut editor dialog.
* NEW: Action.ConfigureToolbar has been hidden as Action._ConfigureToolbar.

[GB.GTK]
* BUG: Fix initial window position.
* BUG: Do not crash if a null key is used for a stock picture. Just return
  a null reference.
* NEW: Action.Register has been hidden as Action._Register.
* NEW: Setting the current GridView row to a valid value now automatically
  set the current column to zero if there is no current column.

[GB.NET]
* NEW: Remove the Net.MaxPathLength constant.

[GB.NET.CURL]
* BUG: Disable error code constants for unsupported curl features.
* BUG: Disable pointless constants inherited from gb.net Net class.
* BUG: Add missing error opcodes in old curl libraries.
* BUG: Really fix compilation on old versions of libcurl.
* NEW: Update CURL error codes and add some missing constants.
* NEW: Curl.ErrorText is a new property that returns the error string
  associated with the error code returned by the curl library. If
  Curl.Status is positive, then a null string is returned.
* NEW: Disable other error code constants.
* NEW: A lot of code clean-up.

[GB.PDF]
* BUG: Fix the retrieveing of index titles.
* BUG: Some fixes in classes description.
* BUG: Remove a debugging message and fix the return value of the Find()
  method.
* NEW: Add a PdfRect class systematically used for returning the
  coordinates of page elements or search results.

[GB.QT4]
* BUG: GridView: Fix how the Change event is raised in single selection
  mode.
* BUG: GridView: Fix automatic column resizing when the Resizable property
  is TRUE.
* BUG: Fix TextArea.Foreground property.
* NEW: Action.Register has been hidden as Action._Register.
* NEW: Setting the current GridView row to a valid value now automatically
  set the current column to zero if there is no current column.

[GB.QT4.EXT]
* BUG: Remove unused Editor.ShowWord() method and two unused flag
  constants.
* BUG: Fix a crash in folding procedure, by strictly folding between
  procedure limits, and by not trying to be clever with comments.
* NEW: Change the keyboard shortcuts for moving between lines having the
  same indentation. Now they are CTRL+ALT+UP and CTRL+ALT+DOWN.

[GB.REPORT]
* NEW: Updated Catalan translation.

[GB.SDL]
* BUG: Disable Cursor handling, as it is buggy and incomplete. Only default
  cursor is available.

[GB.SETTINGS]
* BUG: Settings.ReadWindow() and Settings.WriteWindow() are now private.
* NEW: Remove the useless Settings.Array() method.

[GB.V4L]
* BUG: Remove some unused local variables.
* BUG: Fix all Contrast, Hue, Bright, Color and Whiteness properties in
  VideoDevice.
* BUG: Remove the VideoDevice.Features property.

[GB.WEB]
* BUG: WebPage class is not exported anymore.
* BUG: Support for posted requests whose charset is specified in the
  "Content-Type" header.

Requirements

To compile Gambas, you must install the following libraries on your system :

Component Requirements
Compilation gcc g++ automake autoconf libtool > 2.0
Interpreter libffi
gb.compress.bzlib2 libbz2.so
gb.compress.zlib libz.so
gb.cairo cairo
gb.crypt libcrypt.so
gb.db.mysql libmysqlclient.so, libz.so
gb.db.odbc libodbc.so
gb.db.postgresql libpq.so
gb.db.sqlite2 libsqlite.so
gb.db.sqlite3 libsqlite3.so
gb.desktop libXtst.so
gb.gtk All GTK+ libraries >= 2.10 librsvg2.so cairo
gb.image.io gdk-pixbuf
gb.image.imlib imlib
gb.net.curl libcurl.so
gb.opengl gb.opengl.glsl libGL.so, libGLEW.so
gb.opengl.glu libGLU.so
gb.pcre libpcre.so
gb.pdf libpoppler.so
gb.qt4 gb.qt4.ext gb.qt4.opengl gb.qt4.webkit All qt 4 libraries >= Qt 4.5
gb.sdl libSDL.so, libSDL_ttf.so, libGL.so, libGLEW.so
gb.sdl.sound libSDL.so, libSDL_mixer.so
gb.v4l libjpeg.so, libpng.so,Video4Linux >= 2.0
gb.xml libxml-2.0
gb.xml.xslt libxslt

And do not forget to install all related development packages!

Try to always use a recent version of these libraries.

In order to compile the development environment, you have to compile the following components: You must have the right to write to /tmp, otherwise Gambas will not work.

This package was done with the following versions of GNU tools on Ubuntu 10.10:
  • automake 1.11.1

  • autoconf 2.67

  • libtool 2.2.6b

Compilation & Installation

Check installation

First, check that you installed all the needed libraries, and especially all the development packages.

Do not forget to look at the Compilation & Installation page. Maybe you will find important information specific to your distribution.

Source package configuration

When you are sure that everything is installed, type the following magic sentences in a shell.

'$' represents your shell prompt, and '...' are the messages printed during the configuration and compilation.

First, type that to create the configuration scripts.

$ ./reconf-all

Then type that to analyze the current system and configure the package:

$ ./configure -C
...

If a library or a development package is missing, then you will be warned that some components are disabled.

There are more 'configure' specific explanations in the INSTALL file located in the top-level source directory. I invite you to read them.

Compilation

If everything is configured without error, then run this command to compile the program:

$ make
...

Installation

If everything compiles without error, then enter this command to install everything:

You must be root to install Gambas on your system.

$ su -c "make install"
Password: <Type the root password here>
...

or

$ sudo make install
Password: <Type your password here>
...

Troubleshooting

If you did several successive compilations, after having updated the source from the subversion repository for example, and if something fails during all this process, you can try to "reconfigure" the configuration scripts by typing the following command:

$ ./reconf-all

Then you can run ./configure -C again

If it does not work, I need to know what happened exactly. To do so, type the following command :

$ ( ./configure -C; make; make install ) > output.txt 2>&1

And send me the file "output.txt" by mail, with every other detail about your computer and your distribution you find useful.

Running Gambas

If everything was fine, type "gambas3" to run the development environment.

Enjoy it !

See also