You can code ? You want to create your own applet or improve another one in C or in another language via the DBus plug-in ? Or you want to write some patches ?
So you can and you want to help us with some lines of source code. These modifications should be integrated in our development branch ? So read this page in order to learn more about the advantages of BZR
Rem : If you want to help us, contact us via our forum
There is also a Cairo-Dock's API for C language : http://doc.glx-dock.org
This page will show you some features of bzr for devs. To compile source code, go there : From BZR (Generic Method)
Use the last stable packages of bzr (optional) To use all these features we advice you to use the last stable packages of bzr. For Ubuntu users there is a ppa 'bzr'. To use it : sudo -v
echo "deb http://ppa.launchpad.net/bzr/ppa/ubuntu $(lsb_release -sc) main ## bzr" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C6C1EFD
sudo apt-get dist-upgrade
About branches
Launchpad - You need a launchpad account on launchpad.net.
- You have to add your SSH public key on launchpad (it needs 'openssh-client' package) :
- Check if you have installed 'bzr' (bzrtools installs some plug-ins and bzr-gtk is a GUI which can be useful)
- Link your PC with your lp account :
bzr launchpad-login YOUR_LOGIN_ON_LP
- You can change the name associated with your ssh key. To see it : To change it :
bzr whoami "Your name, nickname, email or what you want"
Download branches - Create a repertory with user right. For example:
mkdir ~/cairo-dock_bzr/
cd ~/cairo-dock_bzr/
- Initialise the repertory:
Cairo-Dock-Core & Cairo-Dock-Plug-ins If you want make some change on the C API of Cairo-Dock and/or its plug-ins download these two branch :bzr branch lp:cairo-dock-core
bzr branch lp:cairo-dock-plug-ins Rem : maybe you should give the passphrase associated with your SSH public key.
Cairo-Dock-Plug-ins-Extras External applet with DBus (third-party)
If you want to add you own applet or modify another (you are welcomed ), download the trunk branch of Extras Plug-ins:bzr branch lp:cairo-dock-plug-ins-extras
How to update these branches? Go to these all these new repertories (cairo-dock-core, cairo-dock-plug-ins and/or cairo-dock-plug-ins-extras) and launch this command:bzr pull # maybe the first time you have to give which is the master branch ; e.g.:
bzr pull lp:cairo-dock-plug-ins-extra
BZR only to add your external applet (summary) After having read and applied commands given before: cd cairo-dock-plug-ins-extras
bzr pull lp:cairo-dock-plug-ins-extras ## in order to have the latest rev.
bzr add MY_APPLET
bzr commit -m "Added a new applet MY_APPLET (...) "
bzr push lp:~YOUR_LOGIN_ON_LP/cairo-dock-plug-ins-extras/MY_APPLET After that you can propose your branch for merging into the trunk branch. Simply go to web page of your branch (https://code.launchpad.net/~YOUR_LOGIN_ON_LP/cairo-dock-plug-ins-extras/MY_APPLET) et click on "Propose for merging into another branch" button.
The use of bazaar It's really like svn if you know !
Management of files The use of bzr is very easy :
- Add files :
- Remove files : (you can use it with '--force' in order to remove these files from your computer)
- Move (or rename) a file :
bzr mv MY_OLD_FILE MY_NEW_FILE
- Create a directory and add it in bzr:
Create a new rev You can check the status with this command :
To create a new rev : bzr commit -m "A DESCRIPTION OF YOUR COMMIT"
Upload to your own branch After a 'bzr commit' you can upload these modifications on your own branch (only the "Cairo-Dock Team" on lp can upload on main branches).
It's very easy !
- For Cairo-Dock-Core :
bzr push lp:~YOUR_LOGIN_ON_LP/cairo-dock-core/NAME_OF_YOUR_BRANCH
- For Cairo-Dock-Plug-ins :
bzr push lp:~YOUR_LOGIN_ON_LP/cairo-dock-plug-ins/NAME_OF_YOUR_BRANCH
- Example :
bzr push lp:~matttbe/cairo-dock-plug-ins/my_applet
Only modified files are uploaded on your branch but this new branch will have the others files.
After a few minutes/secondes, you can see the result here
Merge Proposed If you want propose your modifications you can do it "officially" with Launchpad (but you can also do it on our forum !). Go to the web page of your branch (https://code.launchpad.net/~YOUR_LOGIN_ON_LP/cairo-dock-core/NAME_OF_YOUR_BRANCH) et click on "Propose for merging into another branch" button.
Propose for merging into the trunk branch with a comment. We will receive an email about this purpose.
(You can also use 'bzr send' but read man page for more informations about this command)
Create a new branch You can create a new branch easily :
- Initialise your repertory
- Create a new directory
bzr branch MY_BRANCH && cd MY_BRANCH
- Use 'bzr add', 'bzr commit -m "..."', etc.
- Upload your new files :
- Core :
bzr push lp:~YOUR_LOGIN_ON_LP/cairo-dock-core/NAME_OF_YOUR_BRANCH --use-existing-dir
- Plug-ins :
bzr push lp:~YOUR_LOGIN_ON_LP/cairo-dock-plug-ins/NAME_OF_YOUR_BRANCH --use-existing-dir
Tips
Multiple ssh keys You need to tell Launchpad which key to use.
Edit your ~/.ssh/config file (if one doesn't exist simply create a new one) and add the following:Host bazaar.launchpad.net
IdentityFile ~/.ssh/your_launchpad_key
User your-launchpad-user-name
Fix a bug on lp bug tracker with a commit Use this command bzr commit --fixes lp:1234 -m "..." where '1234' is the bug number.
Resources |