Development:Windows Development Environment
- 1 Installing Software
- 2 Installing a Python IDE
- 3 Bazaar Client
- 4 Configuring SSH keys
- 5 Check out the latest code
- 6 Troubleshooting known problems
The various applications and packages, as well as the steps to install them are detailed on the Windows Environment page:
Installing a Python IDE
There are a number of IDEs for Python available for Windows. We recommend using PyCharm.
Main article: Bazaar
To access the source code, you will need to use Bazaar, an open source distributed version control system. Windows users can download the Bazaar client which includes TortoiseBzr. Ensure you pick the latest stable version, you may need to scroll down the page to find these.
- Download Bazaar client
In order to use Bazaar, you will need to configure SSH keys below:
Configuring SSH keys
Main article: Configuring SSH Keys on Windows
One of the things that Windows has no native support for is SSH and SSH keys, therefore you will need to use PuTTY, which is a free implementation of Telnet and SSH for Windows, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham. You will need to download the PuTTY Windows installer (we don't need PuTTYtel) and install on your computer.
- Download PuTTY
Generating Public and Private keys
Generating a keypair with PuTTY is very easy.
- Launch PuTTYgen
- Give your key a nice name (on Unix systems it's <username>@<pc_name>)
- At the bottom, select SSH2 RSA
- Set the bits to 4096
- Click the Generate button
- Click the Save private key button and save your private key to somewhere safe on your computer
- Don't close PuTTYgen just yet!
Using public and private keys
Launchpad needs to use your public key; Bazaar needs to use your private key through Pageant which is part of the PuTTY package.
Adding Your Public Key to Launchpad
- Select the text in the box that appears at the top of PuTTYgen
- Open your browser to Launchpad and log in
- Go to your home page and click on the Change details link
- Click on the SSH Keys tab
- Paste that public key into the text box at the bottom of the page
- Click the Import Public Key button at the bottom of the page
Using Pageant For SSH Key Auth
Unfortunately uploading your public key to Launchpad on it's own is not enough. You also need to make sure Bazaar can speak to your private key.
- Run Pageant (you'll see a little icon of a computer with a hat appear in your system tray
- Right-click on the icon and click View Keys
- Click the Add key button and find your private key
- Click the Close button, and you're all ready!
If you want to get Pageant to start and load your key automatically:
- Create a shortcut to Pageant in your Windows Startup menu
- Right click on that shortcut and bring up the Properties
- Change the target to add the path of your ppk file as an argument:
"C:\Program Files (x86)\PuTTY\pageant.exe" "C:\Users\username\Documents\privatekey.ppk"
Check out the latest code
OpenLP uses the Bazaar DVCS (read more about Bazaar) and the main branch is hosted at Launchpad.net. Do the following to set up your local branch:
- Open the "bzr command line tool" that was installed with Bazaar. (Bazaar's GUI rarely works)
- Identify yourself to Bazaar:
bzr whoami "Raoul Snyman <email@example.com>"
- Log in to Launchpad:
bzr launchpad-login raoul-snyman
- Create a shared repository:
bzr init-repo ~/openlp
- Checkout the latest code:
bzr checkout lp:openlp ~/openlp/trunk
If it doesn't work, try the steps below.
Troubleshooting known problems
Permission denied (publickey)
If when trying to branch the code, you get this error (usually twice),
Permission denied (publickey)
you need to set the environment variable telling Bazaar what to use for the private key:
Either use cmd (as administrator) :
Or use the control panel:
- Go to
control panel > All control panel items > System
- Click on
Advanced system settings
- In the
New, and enter in
BZR_SSHfor the name and
paramikofor the value, and then press OK.
Other things to check if it goes wrong
- Ensure that Bazaar is run as administrator
- Ensure that Pageant is run as administrator
- Ensure that the private key is loaded into pageant
- Check the environment variable