Merge lp:~sladen/unity-2d/unity-2d-coding-documentation into lp:unity-2d

Proposed by Paul Sladen
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 939
Merged at revision: 976
Proposed branch: lp:~sladen/unity-2d/unity-2d-coding-documentation
Merge into: lp:unity-2d
Diff against target: 70 lines (+66/-0)
1 file modified
HACKING.txt (+66/-0)
To merge this branch: bzr merge lp:~sladen/unity-2d/unity-2d-coding-documentation
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Review via email: mp+94565@code.launchpad.net

This proposal supersedes a proposal from 2012-02-24.

Description of the change

HACKING.txt: summary developer documentation to get people started
Includes link to: https://wiki.ubuntu.com/Unity2D#Coding
with details about proposing and merges any changes afterwards.

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

40 + gconftool-2 --set --type=bool /apps/metacity/general/compositing_manager false
41 + killall metacity
42 + killall -9 unity-2d

No need to change the gconf key, just go `metacity --replace --no-composite`. There is no "unity-2d" process, either. You also need to kill unity-2d-shell twice for the first time, 'cause gnome-session respawns it.

--8<--

47 + gconftool-2 --set --type=bool /apps/metacity/general/compositing_manager true
48 + killall metacity
49 + killall -9 unity-2d

Same as above - `metacity --replace --composite` and there's no "unity-2d" process.

--8<--

60 +If you want to proposed and merge your changes back into the main tree, see:

Maybe "If you want to propose your changes for merging back into the main tree, see:"?

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

Seems Michał's comments were not addressed in this new MR

review: Needs Fixing
938. By Paul Sladen

Tweak HACKING.txt compositing and contributoring advice (thanks to Michał Sawicz)

Revision history for this message
Paul Sladen (sladen) wrote :

Michał: thanks for the suggestions, Albert to picking up that they'd acted upon yet.

Revision history for this message
Albert Astals Cid (aacid) wrote :

You need the
  killall -9 unity-2d-shell
twice also in your TL;DR: and step 4

Actually the double killall is only needed the first time. From then on it's only needed once

review: Needs Fixing
Revision history for this message
Paul Sladen (sladen) wrote :

Albert: right, so which /exact/ wording would you like. I'm happy to put in anything you want. Most people seem to use:

  killall unity-2d-shell
  killall unity-2d-shell

twice, whereas I use:

  killall -9 unity-2d-shell

once.

Revision history for this message
Albert Astals Cid (aacid) wrote :

  killall -9 unity-2d-shell
once doesn't work, unity-2d-shell will still be autorestarted if it is the first time you do call killall after login into unity2d

So in the TLDR i'd write
make -j4 && (killall unity-2d-shell; sleep 1; killall unity-2d-shell; sleep 1 && ./shell/app/unity-2d-shell &)

And then in the more detailed steps i'd write that you actually just need to killall unity-2d-shell twice the first time you execute the killall after a session login

939. By Paul Sladen

HACKING.txt: document more specifically the first-time double killall requirements (thanks to (Albert Astals Cid)

Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'HACKING.txt'
2--- HACKING.txt 1970-01-01 00:00:00 +0000
3+++ HACKING.txt 2012-03-08 12:12:21 +0000
4@@ -0,0 +1,66 @@
5+TL;DR:
6+
7+ sudo apt-get build-dep unity-2d
8+ cmake .
9+ make -j4 && (killall unity-2d-shell; sleep 1; killall unity-2d-shell; sleep 1 && ./shell/app/unity-2d-shell &)
10+
11+
12+Longer version
13+
14+To build trunk:
15+
16+ 1. Install build dependencies (on Ubuntu):
17+
18+ apt-get build-dep unity-2d
19+
20+ 2. Qt/QML preprocessing/preparation stage (the '.' is essential):
21+
22+ cmake .
23+
24+ 3. Compile (in parallel on four CPUs):
25+
26+ make -j4
27+
28+ 4. Test:
29+
30+ killall unity-2d-shell
31+ killall unity-2d-shell
32+ ./shell/app/unity-2d-shell &
33+
34+ To do iterative compile+test, you can use the command:
35+
36+ make -j4 && (killall unity-2d-shell; sleep 1 && ./shell/app/unity-2d-shell &)
37+
38+ (A double killall is only needed the first time after session
39+ login. This is to break the default automagic respawn cycle).
40+
41+ 5. Test again with non-compositing window-manager mode (eg. different assets
42+ such as './shell/common/artwork/desktop_dash_background_no_transparency.sci'):
43+
44+ killall unity-2d-shell
45+ killall unity-2d-shell
46+ metacity --replace --no-composite
47+
48+ 6. Restore compositing mode:
49+
50+ killall unity-2d-shell
51+ killall unity-2d-shell
52+ metacity --replace --composite
53+
54+ (The double killall is to defeat the auto-respawn)
55+
56+
57+Debugging output:
58+
59+ a. From Qt C++ code:
60+
61+ qDebug() << "foobar=" << foobar;
62+
63+Finally:
64+
65+If you want to propose your changes for merging back into the main tree, see:
66+
67+ http://wiki.ubuntu.com/Unity2D#Coding
68+
69+
70+Have fun! -Paul Sladen, 2012-02-24 from advices of the DX team!

Subscribers

People subscribed via source and target branches