Tutorial:Setting up Bennu on Linux

From Bennu Wiki

Jump to: navigation, search

Bennu doesn't have an official release yet, but the release candidate versions are fully functional, and pretty stable. This page describes the process for installing Bennu through the recommended official installer or a unofficial online package repository.

Contents

[edit] Installing with the official script (for most Linux systems)

The package includes the three essential items: bgdc, bgdi and libbgdrtm.so. The first one (BennuGD Compiler) compiles your code to bytecode, which bgdi (BennuGD Interpreter) reads when you want to run your program. See their pages for more detailed info about them. In addition to these files, the package contains the official Bennu Modules.

To install Bennu on your Linux box, go to the Bennu download page and download the linux installation script to a location easy to find. Your home directory is a good choice, if you have no preference.

Now -supposing you saved the download script to your home directory- open a terminal and login as the root user and launch the installation script by doing:

   su (this logs you as the root user, it will ask for root's password, enter it)
   chmod a+x bgd-1.0.0RC7\(r99\)-linux-installer.sh (replace with the version number you downloaded)
   ./bgd-1.0.0RC7\(r99\)-linux-installer.sh (Again, replace with the installer script filename you downloaded)

or, if that fails for you:

   chmod a+x bgd-1.0.0RC7\(r99\)-linux-installer.sh (Replace with the file name you downloaded).
   sudo ./bgd-1.0.0RC7\(r99\)-linux-installer.sh (You might be asked for your password, enter it).

[edit] Installing through the Launchpad PPA (for Ubuntu)

If you are running Ubuntu or Debian in a 32 bits system, you can also install Bennu using an online repository (also known as PPA). This is very convenient, as you'll get updates automatically for Bennu, the official modules and other related software (i.e.: syntax highlighting for GTK+ based editors; like GEdit) through the system's standard tools but you'll be using a non-supported development version. This means that from time to time, and although it's unlikely, your Bennu installation might break.

Appart from that, the Launchpad PPA package is composed of the same parts as the supported one, plus many other packages not found elsewhere prepackaged for linux.

[edit] Adding the repository to your system

To install the packages from the Launchpad PPA, you have two option:

  • Preferred option: In Ubuntu Karmic & over, just go to System->Administration->Software Sources then select Other Software tab and click Add. Then paste the following line in the text box:
   ppa:josebagar/ppa

Image:Ubuntu_software_sources_aptline.png

Click on Add source and when asked, click on Reload.

Image:Ubuntu_software_sources_reload_sources.png

  • You can download this package and install it by double-clicking on the downloading file, as shown in the screenshot below. This will add the repo to the system and add the repository key to you installation so that you can be sure that the packages come from the repository and not from elsewhere.

Image:Unofficial-bennugd-repo-installation-ubuntu.png

[edit] Actually installing Bennu

Once you've added the repository, open "System->Administration->Synaptic Package Manager".

In Synaptic, click on the "Refresh" button and then search for "bennugd", as shown below. Image:Synaptic-search-bennugd.png

Once found, choose the packages from there that you want to install in your system and press "Apply".

Installing "bennugd-core" and "bennugd-modules" will give you the same setup as the official installation script, but you can also install unofficial additions to Bennu.

[edit] Testing your installation

To test the Bennu installation, you can use the Hello World example or your own code (the screenshot below shows some random code running in a Bennu installation). Save that code to a text file in a known location and navigate to that folder with a terminal.

Now, on the terminal, run:

   bgdc helloworld.prg

This will generate a new file with the name "helloworld.dcb". Now you can run it:

   bgdi helloworld

See what happens :)

[edit] IDE

To code comfortably, you want to use an IDE. This makes life much easier when it comes to coding, compiling and running your code, because it has syntax highlighting, compile/run hotkeys and more features.

For Bennu there is not yet an official IDE, so a universal one will have to be used. If you installed Bennu through the PPA, installing the "gtksourceview2.0-bennugd" package will add syntax highlighting to the standard GNOME editor, called GEdit.

[edit] Start coding

You can read on how to start coding in the Beginner's tutorial.

[edit] A note on 64 bit linux systems

Bennu doesn't yet offer a native 64 bit version. The 32 bits version (the one found in the download section of the website) should work just fine in 64 bit systems provided the required libraries are installed.

For detailed instructions on how to set up Bennu for your 64 bit system in the Setting up Bennu on 64 bit linux page.

Personal tools
site