= Unity 2D = || /!\ '''Notice:''' The information on this page is likely to change soon as we switch our development focus to the !UnityNext project. For more information about !UnityNext, please read [[UnityNextSpec|the spec]].|| Unity 2D's goal is to provide the [[http://unity.ubuntu.com/|Unity desktop shell]] on hardware platforms that cannot currently support Unity's OpenGL requirements (see [[DesktopExperienceTeam/UnityHardwareRequirements|Hardware Requirements for Unity]] for more details). If you are running 12.10+ then see below. Its architecture is very close to Unity's as it only replaces the user interface elements but still shares all the same backend components. Specifically, Unity 2D replaces the panel, launcher and places components as defined in [[attachment:Unity_Architecture.pdf|Unity's architecture overview]]. Moreover it does not enforce the use of Compiz as a window manager but instead uses a slightly tweaked version of Metacity. == Testing == The most current version of Unity 2D is published every day in the [[https://launchpad.net/~unity-team/+archive/staging|unity-team staging PPA]]. To add it, follow the instructions relevant for your Ubuntu version below. === Precise (12.10+) === Ubuntu-2d has been discontinued starting from 12.10. Use regular ubuntu session. Old news story on this [[http://www.omgubuntu.co.uk/2012/08/unity-2d-removed-from-ubuntu-12-10|topic]]. === Precise (12.04) === Type the following commands in a terminal: {{{ sudo add-apt-repository ppa:unity-team/staging sudo apt-get update sudo apt-get install unity-2d }}} Then log out and log back in choosing the "Unity 2D" session in the drop-down menu at the bottom of the login screen. You will now be using the latest Unity 2D. === Oneiric (11.10) === To be confirmed. {{{#!wiki comment/dotted Type the following commands in a terminal: {{{ sudo rm -f /etc/apt/sources.list.d/unity-2d-team-unity-2d-daily-oneiric.list sudo add-apt-repository ppa:unity-team/staging sudo apt-get update sudo apt-get remove libdee-1.0-1 # IMPORTANT! Remove old libdee. Accept the removal of other packages. sudo apt-get upgrade sudo apt-get install libqtdee-dev libunity-core-5.0-dev libdee-dev libnux-2.0-dev libunity-dev sudo apt-get install nautilus # [optional] Nautilus in PPA is held back, this installs it Then log out and log back in choosing the "Unity 2D" session in the drop-down menu at the bottom of the login screen. You will now be using the latest Unity 2D. }}} == Reporting Issues == Unity 2D uses Launchpad's bug tracker. Useful links: * [[https://bugs.launchpad.net/unity-2d/+bugs|List of already reported bugs in Unity 2D]] * [[https://bugs.launchpad.net/unity-2d/+filebug|Report a bug in Unity 2D]] == Coding == Unity 2D's code is published on Launchpad using Bazaar. In order to retrieve the latest code and compile it, type the following commands in a terminal: {{{ sudo apt-get build-dep unity-2d bzr branch lp:unity-2d cd unity-2d cmake . make }}} Once compiled, each Unity 2D's component (panel, shell and spread) is runnable separately. In order to run the binary you just built, you first need to kill the running instances: since they are auto-restarted by default, you first need to disable this auto-restart behaviour by running the attached [[attachment:unity-2d-disable-restart.sh|unity-2d-disable-restart.sh]] script with root privileges, and then kill the running process. For example, to run the launcher, type the following: {{{ sudo unity-2d-disable-restart.sh pkill unity-2d-shell ./shell/app/unity-2d-shell }}} We recommend to use Qt Creator to hack on Unity 2D. Please note that you can open the CMakeList.txt as a QtCreator project and you will take advantage of syntax higlight, build from the IDE ecc... Once happy with your changes, it is time to send them to the team for review and inclusion. {{{ bzr commit bzr push lp:~`bzr lp-login`/unity-2d/NAME_OF_THE_FEATURE bzr lp-propose-merge }}} You will find coding guidelines in the [[http://bazaar.launchpad.net/~unity-2d-team/unity-2d/oneiric/view/head:/CODING|CODING]] file together with the code. The [[http://bazaar.launchpad.net/~unity-2d-team/unity-2d/oneiric/view/head:/README|README]] file can be helpful to learn more about Unity 2D. Familiarity with [[http://bazaar.canonical.com/|Bazaar]] is very useful in order to contribute code to Unity 2D. The [[http://doc.bazaar.canonical.com/latest/en/mini-tutorial/index.html|Bazaar in five minutes tutorial]] is a great place to start learning. == Code Review Policy == A code review by a member of the Unity2D team is required for any non-trivial changes to be applied to the trunk. Trivial changes are: * fixing typos in comments * removing unnecessary whitespace * adjusting bzr ignore rules Everything else must be reviewed! For bug fixes, additional features and graphical adjustments, a bug must be filed in Launchpad and the branch linked to this bug report before requesting the merge. === Review Flow === 0. Before you start, note that any community member wishing to contribute code to Unity 2D must sign the [[http://www.canonical.com/contributors|Canonical Contributor Licence Agreement]]. 1. Developer uploads their branch to Launchpad and fills out the Merge Request form, detailing the changes and bug(s) fixed if applicable. Developer should select review by [[https://launchpad.net/~unity-2d-team|unity-2d-team]] or specific member of that team. 2. A member of the [[https://launchpad.net/~unity-2d-team|Unity 2D team]] will review the branch. * If acceptable, merge request will be set as '''Approved''' and will be automatically compiled and tested by the buildbot before merged to trunk. Should merge fail, Developer will be informed. * If not acceptable, reviewer will reject merge request with detailed comments explaining why. Developer can respond to these comments and apply fixes to branch, and return to step 1. == Translating == Translations are maintained on Launchpad at: https://translations.launchpad.net/unity-2d/