• Diff for "C++Compiling"
  • Immutable Page
  • Info
  • Attachments
Differences between revisions 14 and 15
Revision 14 as of 2009-03-19 11:21:34
Size: 4846
Editor: CPE-58-161-137-105
Comment: New buildsystem == New guide
Revision 15 as of 2009-03-19 12:40:08
Size: 4756
Editor: CPE-58-161-137-105
Comment: Formatting
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
This is a preliminary 'rough' guide explaining how to compile and install compiz++ to a non standard prefix. This assumes you are a developer, know exactly what you're doing or do not mind breaking your system. For sake of simplicity we'll assume the prefix /opt/compiz++/ and the source will be contained and built in /usr/local/src/ but other paths work too (both paths can be in your home directory if you prefer). Make sure your regular user has write access to the source directory (do not build the source as root). The dependency list is changing and will be added later. You will need at least cmake, boost devel and git packages installed. Refer to the dep list [[http://wiki.compiz-fusion.org/Installation|here]] to get an idea of what other packages might need to be installed. This is a preliminary 'rough' guide explaining how to compile and install 0.9.x to a non standard prefix. This assumes you are a developer, know exactly what you're doing or do not mind breaking your system.. Make sure your regular user has write access to the source directory (do not build the source as root). The dependency list is changing and will be added later. You will need at least cmake, boost devel and git packages installed. Refer to the dep list [[http://wiki.compiz-fusion.org/Installation|here]] to get an idea of what other packages might need to be installed.
Line 13: Line 13:
{{{
Line 18: Line 19:
}}}
Line 22: Line 24:
{{{
Line 26: Line 29:
}}}
{{{
Line 30: Line 34:
This install the FindCompiz.cmake module into the cmake module directory. }}}
This installs the FindCompiz.cmake module into the cmake module directory.
Line 38: Line 43:
{{{
Line 43: Line 49:
}}}
Line 45: Line 52:
{{{
Line 46: Line 54:
}}}
Line 49: Line 58:
{{{
Line 50: Line 60:
}}}
Line 51: Line 62:
{{{
Line 52: Line 64:
}}}
Line 54: Line 67:
{{{
Line 56: Line 70:
}}}
Line 59: Line 74:
{{{
Line 61: Line 77:
}}}
Line 63: Line 80:
{{{
Line 64: Line 82:
}}}
Line 67: Line 86:
{{{
Line 68: Line 88:
}}}
Line 69: Line 90:
{{{
Line 72: Line 94:
}}}

Building and Installing Compiz 0.9.x

This is a preliminary 'rough' guide explaining how to compile and install 0.9.x to a non standard prefix. This assumes you are a developer, know exactly what you're doing or do not mind breaking your system.. Make sure your regular user has write access to the source directory (do not build the source as root). The dependency list is changing and will be added later. You will need at least cmake, boost devel and git packages installed. Refer to the dep list here to get an idea of what other packages might need to be installed.

Building Compiz 0.9.x

The 0.9.x development series (previously known as compiz++) is a drastic rework of compiz core and plugins. It also has a much changed buildsystem and hence it must be built in a specific way. We hope to have some kind of automated tool to do this in the future.

Core:

1. $ git clone git://anongit.compiz-fusion.org/compiz/core compiz (checkout core into compiz directory)
2. $ cd compiz
3. $ mkdir build (Building in the source directory is not supported)
4. $ cd build
5. $ cmake .. -DCMAKE_INSTALL_PREFIX=[where do you want compiz installed if not /usr/lib]

This last command will configure the build. There are also other build variables that can be set with -D[variable]=[...]. You can also use ccmake to get a more interactive configuration system.

Available Compiz cmake variables:

COMPIZ_DEFAULT_PLUGINS : default active plugin list (comma separated) that is added to the core xml/gconf schema file.
COMPIZ_DISABLE_PLUGIN_[PLUGIN NAME] : set it to On to disable building of the plugin
COMPIZ_INSTALL_GCONF_SCHEMA_DIR : directory where the gconf schema files should be installed
USE_(GCONF|GNOME|GNOME_KEYBINDINGS|GTK|METACITY|KDE4) : set it to false to disable build of the specified feature

6. $ make (build)
7. $ [sudo] make install (install)
8. $ sudo make findcompiz_install

This installs the FindCompiz.cmake module into the cmake module directory. This does only to be done once, if we don't improve this module in the future

Plugins:

Currently all already ported plugins are in compiz++ branches of the normal plugin repositiores. We will make these branches the master branches and move plugins into a new directory in the near future.

1.  $ git clone git://anongit.compiz-fusion.org/fusion/plugins/[plugin] (Checkout a already ported plugin)
2.  $ cd [plugin]
3.  $ git checkout --track -b compiz++ origin/compiz++ (checkout the compiz++ branch)
4.  $ mkdir build
5.  $ cd build

5.5 If you want, you can install the plugin globally. This is required for plugins that are used by other plugins:

   $ export BUILD_GLOBAL=true cmake .. or cmake .. -DCOMPIZ_PLUGIN_INSTALL_TYPE="compiz"

INSTEAD of step 6. 5.7 If you are using a prefix other than /usr/local and have another compiz installation, you will need to do

   $ cmake .. -DCMAKE_INSTALL_PREFIX=[/path/to/prefix]

INSTEAD of step 6. Just add this argument if you are doing step 5.5 as well.

6. $ cmake .. (configure the plugin)

The plugin will be installed into you home directory unless you do step 5.5.

7. $ make
8. $ [sudo] -E make install

If you want to compile more plugins at once: 1. Repeat the steps 1-3 from above for each plugin

2. $ cp [your compiz checkout]/cmake/all_plugins_in_folder_example-CMakeLists.txt CMakeLists.txt (copy our all plugin cmake build file)
3. $ mkdir build (create a build directory for all plugins)

3.5 If you want, you can install the plugin globally. This is required for plugins that are used by other plugins:

   $ export BUILD_GLOBAL=true cmake .. or cmake .. -DCOMPIZ_PLUGIN_INSTALL_TYPE="compiz"

INSTEAD of step 4. 3.7 If you are using a prefix other than /usr/local and have another compiz installation, you will need to do

   $ cmake .. -DCMAKE_INSTALL_PREFIX=[/path/to/prefix]

INSTEAD of step 4. Just add this argument if you are doing step 5.5 as well.

4. $ cmake ..
5. $ make
6. $ [sudo] make install

The install of the plugin may fail, if you have another version (0.8.x/0.7.x) of compiz installed. In this case pkg-config might pick the wrong compiz.pc file. There are several ways to fix this: 1. Delete the other compiz.pc (Do this only if you don't want to build any of the old compiz plugins/packages anymore) 2. Put the new compiz prefix before the old one into you PKG_CONFIG_PATH environment variable 3. If the new installation prefix is not already in your PKG_CONFIG_PATH environment variable you can use the CMAKE_INSTALL_PREFIX cmake variable also to build plugins.

C++Compiling (last edited 2012-06-27 00:20:55 by modemcable088)