Documentation de Gambas - /doc/release/3.0.0

/doc/release/3.0.0

# Gambas 3.0.0

- What's new

- ChangeLog

- Requirements

- Compilation & Installation

  - Check installation

  - Source package configuration

  - Compilation

  - Installation

  - Troubleshooting

  - Running Gambas

## What's new

At least, here is Gambas 3!

There were many many last minute changes since the last release candidate, but I like being near the danger. :-)

A few noticeable points:

- The special mathematical functions of glibc are correctly detected and used now.

- Floating point numbers should be printed in a better way.

- French, Czech and Catalan translations were updated.

And two security holes were closed:

- String hashing algorithm has been randomized. See that document for the details.

- In the IDE, you cannot get the project version by running a program (what a stupid idea!). Now you get it from a text file located in a parent directory of the project.

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

Thanks in advance.

## ChangeLog

    [CONFIGURATION]
    * BUG: Correctly detect libc mathematical functions.
    * NEW: Use the "get version from file" option everywhere.
    * NEW: Update copyrights.

    [DEVELOPMENT ENVIRONMENT]
    * BUG: The "Browse again" button in the search list now does nothing if
      there is no search string defined.
    * BUG: Fix connection renaming.
    * BUG: Fix report border dialog synchronisation detection.
    * BUG: Copying button is enabled now in the SQL editor.
    * BUG: Don't crash when changing the Count value of a MultiContainer
      control.
    * BUG: Remove the "get version from program" feature, that was a big
      security risk!
    * BUG: When the "get version from file" option is checked, get the version
      as soon as the program is compiled.
    * BUG: Fix property sheet error message position.
    * BUG: Changing the X or Y property of a form does nothing visually.
    * NEW: Some little look changes.
    * NEW: A button to show or hide the system tables in the database editor.
    * NEW: SQL highlighting.
    * NEW: Database properties now can be edited even if there is no connection
      property defined in the form.
    * NEW: Add a "get version from file" option, that automatically gets the
      version from a file named "VERSION" that must be located in a parent
      directory.
    * NEW: Update Catalan translation.
    * NEW: Update Czech translation.
    * NEW: Nice symbolic background for workspace, form editor and icon editor.

    [WIKI CGI SCRIPT]
    * NEW: Update Czech translation.
    * NEW: Updated Catalan translation.

    [WEB SITE MAKER]
    * NEW: Update Czech translation.
    * NEW: Update Czech translation.
    * NEW: Changes for Gambas 3 release.

    [EXAMPLES]
    * BUG: Fix the main dialog layout.
    * NEW: Update Czech translations for all examples.
    * NEW: Rewrite the OnScreenDisplay example with the Paint class.
    * NEW: Updated Catalan translations.
    * NEW: New report example.

    [INTERPRETER]
    * BUG: Calling native methods on an anonymous reference now correctly casts
      the return value to a Variant.
    * BUG: Remove all Array class methods that break the inheritance rules.
    * BUG: No more than 15 digits for Floating point values.
    * BUG: The number of digits in default floating point formats was too high
      for the available precision.
    * BUG: Floating point to string conversion fix.
    * BUG: Fix support for Single constants.
    * NEW: Object[].FindByRef and Object[].ExistByRef are two new methods that
      do not take the _compare special method into account. They compare
      objects by reference only.
    * NEW: Put a condom on our string hash routine. You can call it hash
      randomization if you prefer.

    [GB.DB.FORM]
    * BUG: Fix DataBrowser layout for all orientations.
    * NEW: Update in Czech translation.
    * NEW: DataBrowser.Border is a new property to define if a border should be
      displayed or not.
    * NEW: Updated Catalan translation.

    [GB.DB.FORM.MDI]
    * NEW: Updated Catalan translation.

    [GB.DB.MYSQL]
    * BUG: Try to make connection timeout work as expected, without success.
      It seems sticked to be at least one minute. :-(

    [GB.DB.POSTGRESQL]
    * BUG: Fix bad schema request (see issue #168).

    [GB.DBUS]
    * BUG: Do not use ffprinf(), it is useless.

    [GB.DESKTOP]
    * NEW: Desktop.Open() now interprets "~" as the home directory.

    [GB.EVAL.HIGHLIGHT]
    * NEW: SQL highlighting routine.

    [GB.FORM]
    * BUG: Fix borderless TabPanel.
    * BUG: The SidePanel separator is now visible in all orientations.
    * BUG: IconView now behaves correctly when an item has no text. It uses
      there new array methods that search items by reference only.
    * BUG: TabPanel.Remove() now works correctly.
    * BUG: Fix TabPanel layout when adding a new tab.
    * BUG: Remove the useless _TabPanelContainer.Container property.
    * BUG: Fix an arrangement bug in TabPanel.
    * BUG: TabPanel now should not crash if there is no tab visible.
    * BUG: The first visible TabPanel button is now drawn correctly if its
      index is not zero.
    * BUG: Fix a crash when decreasing the Count property.
    * BUG: The DirView root picture is correctly initialized.
    * NEW: Update in Czech translation.
    * NEW: TabPanel tabs now have a Visible property.
    * NEW: TabPanel.Highlight is a new property that makes the current tab more
      visible by using a darker background for the other tabs.
    * NEW: TabPanel.Closable is a new property that works exactly like
      TabStrip.Closable.
    * NEW: ScrollArea is more clever with mouse wheel events.

    [GB.FORM.DIALOG]
    * BUG: Dialog.OpenFile() does not return anymore when no file is selected.

    [GB.FORM.MDI]
    * NEW: Update in Czech translation.
    * NEW: Workspace now uses a TabPanel instead of a TabStrip.
    * NEW: Add a Workspace.Border property to set if the Workspace has a border
      or not.
    * NEW: Workspace.Picture is a new property that allows to define a tile
      picture that will be drawn in the workspace background when it has no
      windows.

    [GB.GTK]
    * BUG: Settings the width and height of a top-level window indepently now
      works as expected.
    * BUG: Cached DrawingArea Background color now works correctly.
    * BUG: Fix a GTK+ warning in Draw.Style.Arrow().
    * BUG: Client properties now work correctly for containers that inherit
      UserContainer.
    * BUG: Found a workaround for the "bug" in gtk-oxygen style that sets
      the border of TreeView controls without being asked.
    * BUG: Fix initial position of windows so that window manager constraints
      are not overrided.
    * BUG: Setting a control to a null size now make the container arrange its
      children.

    [GB.QT4]
    * BUG: Fix cached DrawingArea resizing.
    * BUG: Separator now really uses the Color.LightBackground color.
    * BUG: Cached DrawingArea Background color now works correctly.
    * BUG: Now changing Panel.Border correctly arranges the control.

    [GB.QT4.EXT]
    * BUG: Braces are now highlighted even if they are not on the same line.
    * NEW: Editor.HighlightCurrent flag has been renamed HighlightImmediately.
    * NEW: Editor.HideMargin is a new flag to hide the editor left margin.

    [GB.REPORT]
    * BUG: Correct a shame bug that block all reports.
    * BUG: Make the report refresh really reset all values and clear
      all computed pages.
    * BUG: Fix a bug on the fixed elements calculation (int/float again)
    * BUG: Allow really the multiple recursions of containers. Take the current
      repeat state into account.
    * BUG: Remove a really stupid bug. Now all seems to work fine.
    * BUG: Use the current painting Resolution to calculate the size of a text.
    * BUG: Finalize the change between StrechMode and Strech property name.
    * NEW: Update in Czech translation..
    * NEW: Property OnePiece that tells the container to change page if it is
      taller than the remaining space.
    * NEW: Updated Catalan translation.
    * NEW: Rename StretchMode property as just Stretch.
    * NEW: Move the Stretch property constants to the Report class.
    * OPT: Allow recursive containers calls.
    * OPT: Some cleanup and adding the index to the current layout objet
      in Horizontal, column, full, and none arrangement.
    * OPT: Make a demo for recurssive calls.
    * OPT: Do not export Paint Class and mask a variable into Report Class.

    [GB.SETTINGS]
    * BUG: Fix the use of Array class.

## 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:

- gb.db

- gb.db.form

- gb.debug

- gb.desktop

- gb.eval

- gb.eval.highlight

- gb.form

- gb.form.dialog

- gb.form.mdi

- gb.image

- gb.image.effect

- gb.qt4

- gb.qt4.ext

- gb.qt4.webkit

- gb.settings

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

- Compilation & Installation