• Diff for "C++Compiling"
  • Immutable Page
  • Info
  • Attachments
Differences between revisions 1 and 22 (spanning 21 versions)
Revision 1 as of 2009-01-16 18:43:17
Size: 3109
Editor: c-67-174-177-80
Comment:
Revision 22 as of 2010-03-11 19:54:25
Size: 6798
Editor: c-76-25-101-6
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
=== Building and Installing Compiz++ ===
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/ 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.
=== 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 headers 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 4: Line 4:
=== Obtain the source ===
Line 6: Line 5:
The source code can be acquired from git. We'll demonstrate how to install compiz, bcop and libcompizconfig and an example plugin in that order. Important notes about cmake: Choose a location in which to store the code that does not contain spaces or any questionable characters. The compiz source will be built in a different directory than where the code is actually contained. After you begin, do not move this directory or it may cause future problems when updating or uninstalling. That said, here we go.
1) Download the source with git
== 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:
Line 9: Line 14:
mkdir -p /usr/local/src/compiz; cd /usr/local/src/compiz
git clone git://anongit.freedesktop.org/git/xorg/app/compiz compiz++
git clone git://anongit.compiz-fusion.org/fusion/libraries/bcop bcop++
git clone git://anongit.compiz-fusion.org/fusion/compizconfig/libcompizconfig libcompizconfig++}}}
2) You must switch to the compiz++ branch for each repo you clone. From each directory do the following
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:
Line 15: Line 25:
git checkout -b compiz++ --track origin/compiz++}}}
3) Create a directory in which to build the source and run cmake
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
}}}
Line 18: Line 31:
mkdir -p /usr/local/src/compiz/compiz_build; cd /usr/local/src/compiz/compiz_build
cmake -DCMAKE_INSTALL_PREFIX=/opt/compiz++ /usr/local/src/compiz/compiz++}}}
4) After cmake succeeds (meaning all dependencies were met) compile and install
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

!LibCompizConfig:

Libcompizconfig will provide ccp (compiz config plugin) which will ultimately allow ccsm to function properly. Libcompizconfig still uses the autogen/configure script buildsystem but first you want to make sure to set the pkgconfig path correctly.
Line 22: Line 42:
make
sudo make install}}}
5) Build and install bcop
1. $ export LD_LIBRARY_PATH=$PREFIX/lib/pkgconfig (here, PREFIX is the path where we've installed core)
2. $ git clone git://anongit.compiz.org/compiz/compizconfig/libcompizconfig (checkout the source)
3. $ ./autogen.sh --prefix=$PREFIX (or use ./configure)
4. $ make && [sudo] make install (build and install)
}}}

!CompizConfig-Python:

Compizconfig-python is needed to allow ccsm to interface with libcompizconfig. Again, make sure LD_LIBRARY_PATH is set correctly.
Line 26: Line 52:
cd /usr/local/src/compiz/bcop++
./autogen.sh --prefix=/opt/compiz++
./configure --prefix=/opt/compiz++
make
sudo make install}}}
6) Now that compiz and bcop are installed to /opt/compiz++ we'll set some environment variables so we can build libcompizconfig and other plugins
1. $ git clone git://anongit.compiz.org/compiz/compizconfig/compizconfig-python (checkout the source)
2. $ ./autogen.sh --prefix=$PREFIX (or use ./configure)
3. $ make && [sudo] make install (build and install)
}}}

CCSM:

CCSM is the Compiz Config Settings Manager. It will allow configuration of compiz through use of the ccp plugin.
Line 33: Line 61:
export LD_LIBRARY_PATH=/opt/compiz++/lib/
export PKG_CONFIG_PATH=/opt/compiz++/lib/pkgconfig:/opt/compiz++/share/pkgconfig}}}
7) Build and install libcompizconfig
1. $ git clone git://anongit.compiz.org/compiz/compizconfig/ccsm (checkout the source)
2. READ the INSTALL file. (Instructions to install ccsm)
3. $ LD_LIBRARY_PATH=$PREFIX/lib/ PYTHONPATH=$PREFIX/lib/python2.6/site-packages $PREFIX/bin/ccsm (Run ccsm)
}}}
To run ccsm, we want to make sure to set these env vars correctly and of course, PREFIX is the same place to where we've been installing everything so far.

Plugins:

Currently all already ported plugins are in the compiz/plugins/* repositiores.
Line 37: Line 72:
cd /usr/local/src/compiz/libcompizconfig++
./autogen.sh --prefix=/opt/compiz++
./configure --prefix=/opt/compiz++
make
sudo make install}}}
8) Build any additional plugins
1. $ git clone git://anongit.compiz-fusion.org/compiz/plugins/[plugin] (Checkout a already ported plugin)
2. $ cd [plugin]
3. $ mkdir build
4. $ cd build
}}}
4.5 If you want, you can install the plugin globally. This is required for
plugins that are used by other plugins:
Line 44: Line 80:
mkdir -p /usr/local/src/compiz/plugins; cd /usr/local/src/compiz/plugins
git clone git://git.compiz-fusion.org/users/smspillaz/example example
cd example
git checkout -b compiz++ --track
make
BUILD_GLOBAL=true sudo -E make install}}}
9) Run compiz
   $ export BUILD_GLOBAL=true cmake .. or cmake .. -DCOMPIZ_PLUGIN_INSTALL_TYPE="compiz"
}}}
INSTEAD of step 5.
4.7 If you are using a prefix other than /usr/local and have another compiz
installation, you will need to do
Line 52: Line 86:
LD_LIBRARY_PATH=/opt/compiz++/lib/ /opt/compiz++/bin/compiz --replace ccp}}}
10) For ccsm
   $ cmake .. -DCMAKE_INSTALL_PREFIX=[/path/to/prefix]
}}}
INSTEAD of step 5. Just add this argument if you are doing step 5.5 as well.
Line 55: Line 90:
LD_LIBRARY_PATH=/opt/compiz++/lib/ ccsm}}} 5. $ cmake .. (configure the plugin)
}}}

The plugin will be installed into you home directory unless you do step 4.5.
{{{
6. $ make
7. $ [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
}}}

Plugin packs:

Most all plugins have been ported to 0.9 and added to their respective plugin-packs using git submodules.

{{{
1. $ git clone git://anongit.compiz.org/compiz/plugins-(main|extra|unsupported)
2. $ cd [plugin-pack]
3. $ git submodule init
4. $ git submodule update
5. $ mkdir build
6. $ cd build
7. $ cmake ..
8. $ make
9. $ [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.

Running compiz:

If you've installed to a nonstandard prefix, you will want to set LD_LIBRARY_PATH accordingly. If your drivers are capable of direct rendering (nvidia or drivers using DRI2), you can omit --indirect-rendering. Read more about ccp above.
{{{
1. $ LD_LIBRARY_PATH=$PREFIX/lib compiz --replace --indirect-rendering ccp
}}}

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 headers 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

LibCompizConfig:

Libcompizconfig will provide ccp (compiz config plugin) which will ultimately allow ccsm to function properly. Libcompizconfig still uses the autogen/configure script buildsystem but first you want to make sure to set the pkgconfig path correctly.

1. $ export LD_LIBRARY_PATH=$PREFIX/lib/pkgconfig (here, PREFIX is the path where we've installed core)
2. $ git clone git://anongit.compiz.org/compiz/compizconfig/libcompizconfig (checkout the source)
3. $ ./autogen.sh --prefix=$PREFIX (or use ./configure)
4. $ make && [sudo] make install (build and install)

CompizConfig-Python:

Compizconfig-python is needed to allow ccsm to interface with libcompizconfig. Again, make sure LD_LIBRARY_PATH is set correctly.

1. $ git clone git://anongit.compiz.org/compiz/compizconfig/compizconfig-python (checkout the source)
2. $ ./autogen.sh --prefix=$PREFIX (or use ./configure)
3. $ make && [sudo] make install (build and install)

CCSM:

CCSM is the Compiz Config Settings Manager. It will allow configuration of compiz through use of the ccp plugin.

1. $ git clone git://anongit.compiz.org/compiz/compizconfig/ccsm (checkout the source)
2. READ the INSTALL file. (Instructions to install ccsm)
3. $ LD_LIBRARY_PATH=$PREFIX/lib/ PYTHONPATH=$PREFIX/lib/python2.6/site-packages $PREFIX/bin/ccsm (Run ccsm)

To run ccsm, we want to make sure to set these env vars correctly and of course, PREFIX is the same place to where we've been installing everything so far.

Plugins:

Currently all already ported plugins are in the compiz/plugins/* repositiores.

1.  $ git clone git://anongit.compiz-fusion.org/compiz/plugins/[plugin] (Checkout a already ported plugin)
2.  $ cd [plugin]
3.  $ mkdir build
4.  $ cd build

4.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 5. 4.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 5. Just add this argument if you are doing step 5.5 as well.

5. $ cmake .. (configure the plugin)

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

6. $ make
7. $ [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

Plugin packs:

Most all plugins have been ported to 0.9 and added to their respective plugin-packs using git submodules.

1. $ git clone git://anongit.compiz.org/compiz/plugins-(main|extra|unsupported)
2. $ cd [plugin-pack]
3. $ git submodule init
4. $ git submodule update
5. $ mkdir build
6. $ cd build
7. $ cmake ..
8. $ make
9. $ [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.

Running compiz:

If you've installed to a nonstandard prefix, you will want to set LD_LIBRARY_PATH accordingly. If your drivers are capable of direct rendering (nvidia or drivers using DRI2), you can omit --indirect-rendering. Read more about ccp above.

1. $ LD_LIBRARY_PATH=$PREFIX/lib compiz --replace --indirect-rendering ccp

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