Step 1: Create the necessary directories and scripts
1 |
$ mkdir -p canonical/staging |
Save the following script as: ~/.unity-bash-functions
(pastebin: http://paste.ubuntu.com/16373441/):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
function recreate-build-dir() { rm -r build mkdir build cd build } function remake-autogen-project() { ./autogen.sh --prefix=$HOME/canonical/staging --enable-debug make clean && make -j8 install } function remake-unity() { recreate-build-dir cmake .. \ -DCMAKE_BUILD_TYPE=Debug\ -DCOMPIZ_PLUGIN_INSTALL_TYPE=local \ -DCMAKE_INSTALL_PREFIX=$HOME/canonical/staging/ \ -DGSETTINGS_LOCALINSTALL=ON \ -DCMAKE_SYSCONFDIR=$HOME/canonical/staging/etc \ -DCOMPIZ_COMPOSITE_LIB=/usr/lib/x86_64-linux-gnu/compiz/libcomposite.so \ -DCOMPIZ_OPENGL_LIB=/usr/lib/x86_64-linux-gnu/compiz/libopengl.so \ -DCOMPIZ_LIB=/usr/lib/x86_64-linux-gnu/libcompiz_core.so \ -DCOMPIZ_BUILD_TESTING=OFF \ -DENABLE_UNIT_TESTS=OFF \ -DI18N_SUPPORT=OFF \ -DBOOT_LOGGER=ON \ -DBUILD_SHARED_LIBS=ON make -j8 install } function remake-unity-compiz-path() { recreate-build-dir cmake .. \ -DCMAKE_BUILD_TYPE=Debug \ -DCOMPIZ_PLUGIN_INSTALL_TYPE=local \ -DCMAKE_INSTALL_PREFIX=$HOME/canonical/staging/ \ -DGSETTINGS_LOCALINSTALL=ON \ -DCMAKE_SYSCONFDIR=$HOME/canonical/staging/etc \ -DCOMPIZ_COMPOSITE_LIB= \ ~/canonical/staging/lib/compiz/libcomposite.so \ -DCOMPIZ_OPENGL_LIB=~/canonical/staging/lib/compiz/libopengl.so \ -DCOMPIZ_LIB=~/canonical/staging/lib/libcompiz_core.so \ -DCOMPIZ_BUILD_TESTING=OFF \ -DENABLE_UNIT_TESTS=OFF \ -DI18N_SUPPORT=OFF \ -DBOOT_LOGGER=ON \ -DBUILD_SHARED_LIBS=ON } function unity-env { export PATH=~/canonical/staging/bin:$PATH export XDG_DATA_DIRS=~/.config/compiz-1/gsettings/schemas:~/canonical/staging/share:/usr/share:/usr/local/share export LD_LIBRARY_PATH=~/canonical/staging/lib:${LD_LIBRARY_PATH} export LD_RUN_PATH=~/canonical/staging/lib:${LD_RUN_PATH} export PKG_CONFIG_PATH=~/canonical/staging/lib/pkgconfig:${PKG_CONFIG_PATH} export PYTHONPATH=~/canonical/staging/lib/python2.7/site-packages:$PYTHONPATH export GI_TYPELIB_PATH=~/canonical/staging/lib/girepository-1.0:$GI_TYPELIB_PATH export XDG_CONFIG_DIRS=~/canonical/staging/etc:$XDG_CONFIG_DIRS } |
Edit the .bashrc to have this line at the end:
1 |
. ~/.unity_bash_functions |
Enter the directory staging:
1 2 3 4 |
$ cd ~/canonical/staging $ bzr branch lp:nux $ bzr branch lp:compiz $ bzr branch lp:unity |
Step 1: Build nux
1 2 3 4 5 |
$ cd ~/canonical/staging $ export PREFIX=`pwd` $ cd nux $ ./autogen.sh --prefix=$PREFIX --enable-debug $ make && make install |
Step 2: Build compiz
1 2 3 4 5 |
$ cd ~/canonical/staging/compiz $ mkdir -p build $ cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=~/canonical/staging/ -DCMAKE_BUILD_TYPE=Debug $ make && make install |
Step 3: Build unity
1 2 3 4 |
$ export COMPIZ_CONFIG_PROFILE=ubuntu $ unity-env $ remake-unity-compiz-path $ make && make install |
Run:
Switch to the Unity 7 tty press Ctrl+T to open a terminal and type:
1 2 3 |
$ export COMPIZ_CONFIG_PROFILE=ubuntu $ unity-env $ unity --replace ccp & |
or just this:
1 |
$ unity --compiz-path=~/canonical/staging/bin/compiz --replace ccp & |
Note: I use “make -j8” in my script, you might need to change that!