3

Hello there I built my own custom unity 6.2 and I built it so that it is in my home directory. I like how it looks now and want to replace the unity that I have installed on my system with the one that I have just built.

More about the unity build

I used qtcreator to build it when it asked where I wanted to build It I gave it the path of

~Desktop/unity-6.2.0+bzr2624ubuntu0+762-build/

It builds and it is awesome I can run it and I love it. But I can not figure out how to install it.

Please let me know if you need extra info.

0

1 Answer 1

2

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

~/Desktop/

get the source code

cd ~/Desktop
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,

enter image description here

Now We can open up are project (Unity in this case) But before we do this lets make a Build dir So

cd ~/Desktop/unity-6.whatever
mkdir build

enter image description here

Now in Qt Creator we can open Unity . Go to File->open file

enter image description here

Next we will be asked what file we want to open up. We want to open CMakeList.txt

enter image description here

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 ~/Desktop/unity-6-whatever/build

And this is the Directory that we will choose Then we Press Next

enter image description here

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

/usr/local/ 

and not

/usr/  

we need to also tell cmake that also So

-DCMAKE_INSTALL_PREFIX:PATH=/usr

So all together

../ -DCMAKE_INSTALL_PREFIX:PATH=/usr

If all goes well it should set up build files to ~/Desktop/build as shown in the screen-shot

enter image description here

We can now Press the Finish Button. And We will get a screen that looks like this.

enter image description here

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

unity-standalone

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 :)

enter image description here

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

enter image description here

Well Compiling (Running) We can watch to see what is going on by pressing the

Compile Output Button

enter image description here

Once compile is done (takes a minute) Unity-Standalone should launch

enter image description here

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

enter image description here

Next we can start editing files if we like to make Unity more how we like

enter image description here

After editing we press ctrl+s to save are work then Run it again ctrl+r

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.

cd ~/Desktop/unity-6-whatever/build/
make 
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.

cd ~/Desktop/unity-6-whatever/build
make clean
cd ../
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)

then

cd ~/Desktop/unity-6-whatever/
dch -i 

enter in the changes that you have made and the version number and codename.Then save the file (changelog file) then

debuild -S -sa
cd ../
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-* 

then re-install

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .