maphew

Installing Leo Editor on Windows

This is for a virgin system without python etc installed. Skip any step not needed. Consider this a placeholder. Eventually this page or something like it will be folded into the Leo docs and this will be irrelevant.

lightly updated April 2013

  1. Install Python 2.x - There are many sources, but from http://www.python.org/download/releases/is good.
  2. Install PyQt - acquire and run Binary Package from http://www.riverbankcomputing.co.uk/software/pyqt/download which matches installed Python version (so for python 2.7 scan for the Py2.7 in filename)
  3. Install Leo
  • Head to http://sourceforge.net/projects/leo/ and slap [Download Now]
  • You can unpack the .zip file anywhere, including Python's site-packages folder, for example, C:\Python27\Lib\site-packages\leo-4-10-final
  • [optional] Generate/update a junction link from unpacked leo-4-10-final to …\site-packages\leo:

    cd C:\Python27\Lib\site-packages
    mklink /j leo leo-4-6-2-final
  • Create windows shortcut with following properties (edit paths as necessary; change leo to leo-4-10-final if you didn't create a junction):
    • r-click on Desktop > New > Shortcut > Target: c:\Python27\pythonw.exe > Name: Leo Editor > ok, ok
    • Select shortcut > Properties:

      Target = C:\Python27\pythonw.exe C:\Python27\Lib\site-packages\leo\launchLeo.py
      
      Start in = "%userprofile%\My Documents"

      (change to wherever you like to save your work)

  • Tell Windows how to handle .leo files:

    ftype LeoFile=C:\Python27\pythonw.exe C:\Python27\Lib\site-packages\leo\launchLeo.py "%1"
    assoc .leo=LeoFile

Optional#

  • Put this leo.bat in %PATH%:

    @start /b "Leo" C:\Python27\python.exe -i C:\Python27\Lib\site-packages\leo\launchLeo.py %*
  • Add to r-click-->new context menu:
    • save this empty template leofile.leo to %windir%\ShellNew\ (alternatively, from a command prompt run leo %windir%\ShellNew\leofile.leo, save and exit)
    • merge leo-shell-new.reg.txt to your registry.

Further reading / Sources used:#


date: 2010-05-06
tags: [howto, leo]
category: HowTo