• Diff for "C++Compiling"
  • Immutable Page
  • Info
  • Attachments
Differences between revisions 11 and 41 (spanning 30 versions)
Revision 11 as of 2009-02-10 03:56:48
Size: 4786
Editor: c-67-174-177-80
Comment:
Revision 41 as of 2012-06-27 00:20:55
Size: 2325
Editor: modemcable088
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/ 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.
=== Installing Compiz Development ===
All the source files have now been moved to one repository on launchpad. 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 as follows.
Line 4: Line 4:
=== Obtain the source === === Dependencies: ===
{{{
bzr git-core cmake libcairo2-dev librsvg2-dev libglib2.0-dev libpng12-dev libdbus-1-dev libboost-dev libboost-serialization-dev libxml2-dev libgl1-mesa-dev libglu1-mesa-dev libwnck-dev libgconf2-dev libx11-xcb-dev libxslt1-dev libnotify-dev libmetacity-dev python-gtk2-dev libgnome-window-settings-dev libgnome-desktop-dev gnome-control-center-dev intltool cython python2.7-dev libglibmm-2.4-dev libprotobuf-dev python-pyrex }}}
Line 6: Line 8:
The source code can be downloaded from git. We'll demonstrate how to install compiz, bcop libcompizconfig, compizconfig-python, ccsm 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. Compiz++ will be built in a different location than where the code is actually contained. After you begin, do not move or rename this directory because it may cause future problems when updating or uninstalling. That said, here we go. == Building Compiz 0.9.x ==
Line 8: Line 10:
1) Grab the source using git As of version 0.9.8.0, all the sources were merged into one repository for easier development on launchpad. The history remains in tact.
Line 10: Line 12:
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++
git clone git://anongit.compiz-fusion.org/fusion/compizconfig/compizconfig-python compizconfig-python++
git clone git://anongit.compiz-fusion.org/fusion/compizconfig/ccsm ccsm++}}}
2) You must switch to the compiz++ branch for each repo you clone. From each directory do the following
1. bzr branch lp:compiz
2. mkdir -P compiz/build
3. cd compiz/build
4. 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 18: Line 22:
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|GSETTINGS) : set it to false to disable build of the specified feature
}}}
Line 21: Line 28:
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
7. $ [sudo] make install
8. $ [sudo] make findcompiz_install
9. $ [sudo] make findcompizconfig_install
}}}

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

Running compiz:

If you've installed to a nonstandard prefix, you will want to set LD_LIBRARY_PATH accordingly.
Line 25: Line 41:
make
sudo make install}}}
5) Build and install bcop
{{{
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, we'll set some environment variables so we can build libcompizconfig and other components
{{{
export LD_LIBRARY_PATH=/opt/compiz++/lib/
export PKG_CONFIG_PATH=/opt/compiz++/lib/pkgconfig:/opt/compiz++/share/pkgconfig}}}
7) Build and install libcompizconfig
{{{
cd /usr/local/src/compiz/libcompizconfig++
./autogen.sh --prefix=/opt/compiz++
./configure --prefix=/opt/compiz++
make
sudo make install}}}
8) Build compizconfig-python and ccsm. NOTE: compizconfig-python needs to be rebuilt to work with the compiz++ branch of libcompizconfig but has no changes in the source specific to compiz++, so there is no compiz++ branch. CCSM does not have a compiz++ branch either nor does it need rebuilding but it can't hurt.
{{{
cd /usr/local/src/compiz/compizconfig-python++
./autogen.sh --prefix=/opt/compiz++
./configure --prefix=/opt/compiz++
make
sudo make install

cd /usr/local/src/compiz/ccsm++
sudo python setup.py install --prefix=/opt/compiz++}}}
9) Build any additional plugins, alternatively setting BUILD_GLOBAL and installing as root to install into PREFIX as opposed to ~/.compiz
{{{
mkdir -p /usr/local/src/compiz/plugins; cd /usr/local/src/compiz/plugins
git clone git://anongit.compiz-fusion.org/fusion/plugins/crashhandler example
cd example
git checkout -b compiz++ --track
make
BUILD_GLOBAL=true sudo -E make install}}}
10) Run compiz and ccsm. NOTE: Make sure any previous decorator processes are killed before starting compiz++. If you have compiz installed as well, it may be necessary to disable window decoration, start compiz++, then renable it to insure the correct verion of the plugin is loaded.
{{{
LD_LIBRARY_PATH=/opt/compiz++/lib/ /opt/compiz++/bin/compiz --replace ccp
PYTHONPATH=/opt/compiz++/lib/python2.5/site-packages /opt/compiz++/bin/ccsm}}}

=== Build System Switches ===

See the current configuration by running ccmake . from the build directory after running cmake at least once. By default the following compiz++ switches are enabled:
{{{
-DUSE_GCONF=false
-DUSE_GNOME=false
-DUSE_GNOME_KEYBINDINGS=false
-DUSE_GTK=false
-DUSE_KDE4=false
-DUSE_METACITY=false}}}
1. $ LD_LIBRARY_PATH=$PREFIX/lib $PREFIX/bin/compiz --replace --indirect-rendering ccp
}}}

Installing Compiz Development

All the source files have now been moved to one repository on launchpad. 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 as follows.

Dependencies:

bzr git-core cmake libcairo2-dev librsvg2-dev libglib2.0-dev libpng12-dev libdbus-1-dev libboost-dev libboost-serialization-dev libxml2-dev libgl1-mesa-dev libglu1-mesa-dev libwnck-dev libgconf2-dev libx11-xcb-dev libxslt1-dev libnotify-dev libmetacity-dev python-gtk2-dev libgnome-window-settings-dev libgnome-desktop-dev gnome-control-center-dev intltool cython python2.7-dev libglibmm-2.4-dev libprotobuf-dev python-pyrex 

Building Compiz 0.9.x

As of version 0.9.8.0, all the sources were merged into one repository for easier development on launchpad. The history remains in tact.

1. bzr branch lp:compiz
2. mkdir -P compiz/build
3. cd compiz/build
4. 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|GSETTINGS) : set it to false to disable build of the specified feature

6. $ make
7. $ [sudo] make install
8. $ [sudo] make findcompiz_install
9. $ [sudo] make findcompizconfig_install

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

Running compiz:

If you've installed to a nonstandard prefix, you will want to set LD_LIBRARY_PATH accordingly.

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

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