1. Quanta from CVS
  2. Quanta BE from CVS
  3. Cervisia - getting it to work
  4. Toolbars - creating your own and getting it to load automatically
  5. Quanta and PHP
  6. Window Docking
  7. Misc Notes

Quanta from CVS

The following instructions show you how to download and install the most up to date version of the stable Quanta branch.
These instructions will create a directory called quanta as a subdir of whatever directory you run the cvs command from.

  1. Find a CVS mirror: Check out http://developer.kde.org/source/anoncvs.html for a mirror close to you.
  2. Login to the CVS server:
    [~]$ cvs -d :pserver:anonymous@anoncvs.kde.org:/home/kde login
    Logging in to :pserver:anonymous@anoncvs.kde.org:/home/kde
    CVS password:
    [~]$
    At the password prompt, enter a blank password by hitting <enter>
  3. Checkout the Quanta module:
    [~]$ cvs -z4 -d :pserver:anonymous@anoncvs.kde.org:/home/kde checkout -P -r KDE_3_2_BRANCH quanta
    [~]$
  4. Compile Quanta:
    [~]$ cd quanta
    [~/quanta]$ make -f Makefile.cvs
    [~/quanta]$ ./configure
    [~/quanta]$ make
    [~/quanta]$ su -c make install
    [~/quanta]$
  5. Update the Quanta sandbox at a later date, and recompile.
    [~]$ cd quanta
    [~/quanta]$ cvs update -dP
    [~/quanta]$ make -f Makefile.cvs
    [~/quanta]$ ./configure
    [~/quanta]$ make
    [~/quanta]$ su -c make install
    [~/quanta]$
    Note: There is no need to re-login to the CVS server because the password has been saved in ~/.cvspass

Quanta BE

Quanta_BE is the "bleeding edge" branch of the development tree. Some might want to label it the "unstable" version, but that doesn't do justice to it. This branch is normally just as stable as the "stable" branch.

The following instructions create a directory called kdewebdev as a subdir of the directory you run the cvs command from.

  1. Find a CVS mirror: Check out http://developer.kde.org/source/anoncvs.html for a mirror close to you.
  2. Login to the CVS server:
    [~]$ cvs -d :pserver:anonymous@anoncvs.kde.org:/home/kde login
    Logging in to :pserver:anonymous@anoncvs.kde.org:/home/kde
    CVS password:
    [~]$
    At the password prompt, enter a blank password by hitting <enter>
  3. Checkout the quanta_be branch of the Quanta module:
    [~]$ cvs -z4 -d :pserver:anonymous@anoncvs.kde.org:/home/kde checkout -P kdewebdev
    [~]$
  4. Compile Quanta_be
    [~/quanta]$ make -f Makefile.cvs
    [~/quanta]$ ./configure
    [~/quanta]$ make
    [~/quanta]$ su -c make install
    [~/quanta]$
  5. Update the Quanta_be sandbox at a later date, and recompile.
    [~]$ cd quanta
    [~/quanta]$ cvs update -dP
    [~/quanta]$ make -f Makefile.cvs
    [~/quanta]$ ./configure
    [~/quanta]$ make
    [~/quanta]$ su -c make install
    [~/quanta]$
    Note: There is no need to re-login to the CVS server because the password has been saved in ~/.cvspass

Cervisia - getting it to work with an existing sandbox

The following guidelines do not include instructions for checking out or creating a sandbox from scratch. They assume that the files and directories listed in the project or file tree down the left hand side of the Quanta window are part of an existing sandbox.

Before you begin:
Due to a quirk in either Quanta or Cervisia (I have no idea where the problem lies), within Quanta, you need to have a file open (ie the file contents are viewable in Quanta's edit window) that lives within the sandbox you're trying to use with Quanta/Cervisia.
If you don't have a file open, the following procedure will still work, but you will have to repeat steps 5 -> the end every time you click on the Cervisia icon.

  1. Initially you need to make sure that Cervisia is installed on your system.

    If you're not sure if it's there or not, run:

    $ which cervisia
    The output of this command will either tell you the location of the cervisia binary (probably something like /usr/bin/cervisia), or it will tell you it can't find it.
    If you need to install cervisia, it's commonly part of the kdesdk package.

  2. Find out where the right cervisia library lives on your computer.

    By default, Quanta looks for kde3/libcervisiapart.la, but on my system at least, that's the wrong filename and location.
    Once Cervisia is installed, run:

    $ locate libcervisia
    If it finds a file called libcervisiapart.la, well and good. Write down the location.
    If it doesn't find that filename, it should find libcervisia.la, in which case, write down the path where it can be found.

  3. Plugins -> Edit
    Click on the CVS Management (Cervisia) list entry
    In the Filename: field enter the full path of the cervisia library file you found in the previous step.
    Click on OK to close that window, and then OK again to close the Configure Plugin window.

    On my system the completed config looks like:

  4. Plugins -> Validate

    Check that Quanta does actually recognise the plugin by clicking on the Validate entry of the Plugins menu
    ???????? (emailed ML about this one - the plugin validates even if you feed it complete garbage)

  5. Setting up Cervisia

    Click on the Cervisia icon (looks like a red brick wall) or select Plugins -> CVS Management
    In all probability you'll get an error message saying "This is not a CVS directory". Don't worry about this and click on OK.
    You'll see that the CVS Management window has been activated despite the error message. Activating the CVS plugin has the effect of adding extra menus and extra entries within existing menus.
    If you haven't already configured Cervisia, you can do so by choosing Settings -> Configure Cervisia.

  6. The Sandbox

    The final step is to choose File -> Open Sandbox.
    This will pop up the Open Sandbox dialogue box. Browse to the location of the sandbox you wish to open. Now it's not enough to simply click on the directory name and click OK. You have to make sure that the directory name appears in the location box at the top of this dialogue window.
    Click on OK and the sandbox should appear within the CVS Management tab in Quanta.


Toolbars - creating your own and getting it to load automatically

These instructions are for the creation and autoloading of a toolbar not associated with a particular project.

There's a bit of background needed in order to understand how this all works.
The toolbar you create and save using the following instructions is associated with a particular Document Type.

Quanta is capable of editing a huge variety of documents, from HTML, to XML, CSS and Docbook (for a full list, have a look in DTD -> Change the DTD and have a look at the list of entries in the drop down box ).

If you are the sort of user that is fully aware of all these DTDs and what they do and which documents you've assigned which particular DTD to, then you should be able to modify the instructions below to suit your situation.

If you've never fiddled around with Quanta's DTD types and haven't changed any DTD settings from the default, then in all probability the DTD is "HTML Transitional".

You can confirm the default DTD Quanta uses on your system by selecting Settings -> Configure Quanta, choosing the Environment tab and seeing what it says in the field marked "Default DTD".

The instructions below attempt to be generic enough so that they can be used by everyone. To that end, you need to work out the values of several variables I've used below as they apply to your system:

$KDEHOME: where the kde files are kept for your user name. For me, that's ~/.kde.
$DOCTYPE: the DTD type you want the toolbar to be associated with.
Probably your default DTD. In my case, that's XHTML Transitional.
$PREFIX: where the global share/apps/quanta directory lives. On my system, $PREFIX=/usr
  1. Create a Toolbar:

    • Toolbars -> Add User Toolbar
    • Enter a name for the toolbar, click OK.

    You'll see your new toolbar has been added along side the existing ones, but doesn't have any icons in it.

  2. Configure the Toolbar:

    Put some icons on your toolbar by choosing: Settings -> Configure Toolbars.
    After you've added all the icons and rearranged them as you want them, click on OK and the Configure Toolbars dialogue box will close you'll see your finished toolbar.

  3. Save the Toolbar

    • Toolbars -> Save Toolbars -> Save as Local Toolbar
    • In the "Please Select a Toolbar" dialogue box, choose the name of your new toolbar from the drop down box, and click OK.
      You'll then see the "Save As" dialogue box. Browse to: $KDEHOME/share/apps/quanta/toolbars/$DOCTYPE.
      If the DTD you've chosen is one of html-strict, html-frameset or html transitional, the directory you want here is simply called HTML.
      In the "Location:" box down the bottom, type the filename you want your toolbar to be saved as (probably just use the toolbar name) and click "Save".
      Your toolbar will be saved with the extension .toolbar.tgz
  4. Setup Autoloading of Toolbar

    • cd $KDEHOME/share/apps/quanta/dtep/$DOCTYPE
      cp $PREFIX/share/apps/quanta/dtep/$DOCTYPE/description.rc .
      

    • Edit description.rc and find the section near the top with the heading [Toolbars].
      Within that heading you'll find a line that starts with: Names =
      Add the name of your custom-built toolbar to this list. You need to type here the filename that your toolbar was saved as, minus the .toolbar.tgz.
      For example, I saved my toolbar Hamster as Hamster.toolbar.tgz, and my DTD is XHTML-Transitional, so my descriptions.rc file now reads: Names = Hamster, standard, fonts, tables, lists, forms, other

      Note: Where you place the name of your toolbar in this list determines the order in which these toolbars are displayed within Quanta itself. I've added Hamster first, that means it will appear as the first (and default) toolbar.

    • The last step you need to do is to copy or link all the tag definition files from the Quanta source directory to the equivalent directory in $KDEHOME. If you don't do this, when you right click on a tag and choose "Edit Current Tag" you'll find quanta returns a "tag unknown" error message.

      I choose to create links to the quanta supplied tag files. If you wish, you can copy the tag files rather than linking.

      To link, run the following script from $KDEHOME/share/apps/quanta/dtep/$DOCTYPE :

      [~/.kde/share/apps/quanta/dtep/xhtml ]$ for file in $PREFIX/share/apps/quanta/dtep/$DOCTYPE/*.tag; do ln -s $file `basename $file`; done

      To copy, run this script from $KDEHOME/share/apps/quanta/dtep/$DOCTYPE :

      [~/.kde/share/apps/quanta/dtep/xhtml ]$ for file in $PREFIX/share/apps/quanta/dtep/$DOCTYPE/*.tag; do cp $file .; done
  5. Test

    Quit and restart Quanta, and your toolbar will appear.

Just be aware that if you change the DTD type from the one you saved this toolbar under, it will disappear. There's nothing stopping you though from saving the toolbar in each dtep/dtd-type directory and recopying the tags and descriptions.rc file for that DTD type.


Quanta and PHP

When attempting to open a PHP file under Quanta, it's common to have Quanta complain about it being an "unknown filetype".
It's very easy to fix this problem.

Many (if not most) distros seem to ship with the PHP mimetype as application/x-php.
In order for Quanta to recognise PHP files, the mime type needs to exist in the "text" category.

All you need to do is open the KDE Control Centre, and under the File Associations menu, add a new mime type for text/x-php. Add the extensions *.php, *.php3 and *.php4 and Quanta will be able to open PHP files without a problem.


Window Docking

When part of Quanta becomes undocked from the the rest of the work area, there are two ways to fix this, depending on which version you are running.

If you're using Quanta BE or Quanta 3.2, select Settings -> Configure Quanta -> Layout and select the default window layout.

For other versions you need to:

  1. Quit all running instances of Quanta.
  2. open $KDEHOME/share/config/quantarc
  3. Delete everything under the heading: [dock_setting_default]
  4. Restart Quanta

Misc Notes