Turns out I just had to change the cmake install prefix But this is how I do it now
Please Note that this will install a new unity and will overwrite you old one.
Date that I wrote this 10/1/2012
Ubuntu Version 12.10
1st) get the source code. we can make a place to build from , for this example I will use
get the source code
apt-get source unity
This will get all the source code, Or you can use bzr to get it
bzr branch lp:unity
Either way you are going to need it. You are also going to need qtcreator and all the build dependency's of Unity so
sudo apt-get install qtcreator
sudo apt-get build-dep unity
Next We open up Qt Creator,
Now We can open up are project (Unity in this case) But before we do this lets make a Build dir
Now in Qt Creator we can open Unity . Go to File->open file
Next we will be asked what file we want to open up. We want to open
Next We will be asked what Build Directory we would like to use. This is why we set up the build dir in the projects top level. IE
And this is the Directory that we will choose Then we Press Next
Next we will be asked what Arguments we want to pass on to Cmake, Now because we are building from are sandboxed (~/Desktop/unity-6-whatever/build ) folder called build. Which is one directory below the top directory we need to use
and also because by default Unity build is set up to install to
we need to also tell cmake that also So
So all together
If all goes well it should set up build files to ~/Desktop/build as shown in the screen-shot
We can now Press the Finish Button. And We will get a screen that looks like this.
Now to build Unity and test are results. The first thing that we need to do is tell Qt-creator what we want to run after compile. We do this by clicking in the Icon that looks like a monitor and then select
NOTE: There are some issues with unity stand alone and it will not run as fast nor will it render graphics as good as when installed. But when you install on to system all will be ok. I am also unsure when Unity started using Unity-standalone as before 5.10 I was a Unity 2d kinda guy :)
Now we can Run Unity press ctrl+r (keyboard shortcut) to run and Unity will compile.
Or we can press the green arrow button also in QT-Creator to Run
Well Compiling (Running) We can watch to see what is going on by pressing the
Compile Output Button
Once compile is done (takes a minute) Unity-Standalone should launch
Now we can play around with the Unity that we just built Go back to QT Creator and and Press the stop button. To Kill Unity-Standalone
Next we can start editing files if we like to make Unity more how we like
After editing we press
ctrl+s to save are work
then Run it again
and once we have Unity the way that we want it We can do One of two things
Build a debian package of it. Or Install using make. Installing with make is easy.
sudo make install
Now you can log in and out to restart and use your unity
If you want to make a debian package of it this is how you do it.
rm -r build
sudo apt-get install packaging-dev dh-make dpkg-dev
fakeroot dpkg-buildpackage -F
Then Look in the dir above where you are (~/Desktop) there should be all the packages there at this point if you made it correctly
Think that you got something that should be used by others ? or want to let your friends use it ? We can use launchpad for this. go to launchpad and make a repo (ppa)
enter in the changes that you have made and the version number and codename.Then save the file (changelog file)
debuild -S -sa
dput ppa:YOUR_LP_NAME/YOUR_PPA_NAME unity-whatever.sources.change
and let launchpad build it for you.
Now the easy way
to reset unity to default would be to purge it Nux and compiz and re-install
sudo apt-get --purge remove unity compiz libnux-3.0-*
sudo apt-get install unity compiz libnux-3.0-*
and other ways that are listed on this page.
I hope that this helps and happy hacking