Project

General

Profile

LegacyDevelopersWin32Environment » History » Version 26

Dan Smith, 12/31/2022 05:19 PM

1 26 Dan Smith
# THIS IS OUTDATED NOW
2
3
This is only for setting up a *legacy* development environment, which is not useful for current (as of 2022) CHIRP development. See [[DevelopersPython3Environment]] for the proper instructions. It is preserved here only because it may be necessary for some time to be able to create bug fixes for legacy CHIRP.
4
5 1 Dan Smith
h1. Setting up a Win32 Development Environment
6
7 9 Robert Terzi
{{toc}}
8
9 14 Robert Terzi
h2. Overview
10
11 15 Robert Terzi
Chirp is written in Python, an interpreted language. To run the chirp code directly you need Python installed as well as several other external libraries:
12 14 Robert Terzi
13
 * PyGTK - GTK cross-platform GUI,
14
 * PySerial - serial port connectivity for Python
15
 * PyLibXML2 - XML processing
16
17 15 Robert Terzi
For MS windows, chirp is distributed as a compiled .exe file that installs the compiled code and the necessary runtime dependencies. The compiled .exe files eliminate the need for the Python interpreter. Additional downloads and steps are needed to create chirp installer (.exe) files if you need to distribute your work to other systems for testing.
18 1 Dan Smith
19 15 Robert Terzi
To summarize the steps are:
20
21
 # install python
22
 # install additional python libraries PyGTK, PySerial, PyLibXML2
23
24 13 Robert Terzi
h2. Installing Python
25 1 Dan Smith
26 15 Robert Terzi
To run chirp you will need to install Python 2.7.x from either "Python.org":http://python.org or "ActiveState":http://www.activestate.com/activepython.  Do not install Python 3 as chirp is currently written for Python 2.7 and above, but will generally run on Python 2.6.x.
27 13 Robert Terzi
28
 * "Python 2.7.x":http://python.org/download/releases/2.7.6/
29
 * "ActivePython Community Edition":http://www.activestate.com/activepython/downloads
30
31
See the steps below to add Python to your system's path after installation.
32
 
33
34 1 Dan Smith
h2. Library and Runtime Prerequisites
35
36 13 Robert Terzi
In addition to Python, several other libraries are needed for the GTK cross-platform GUI, serial port connectivity, and XML processing.
37
38 1 Dan Smith
Get and install the following in this order:
39 7 Jens Jensen
40 1 Dan Smith
 # "PyGTK Win32 All-in-one installer":http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/
41
 # "PyLibXML2":http://users.skynet.be/sbi/libxml-python/
42
 # "PyWin32":http://sourceforge.net/projects/pywin32/files/pywin32/
43
 # "PySerial":http://sourceforge.net/projects/pyserial/files/pyserial/2.5/
44
45 3 Dan Smith
Notes:
46 4 Dan Smith
47 3 Dan Smith
 * For any of the above, be sure to get the latest version, and the py27 variant if/when available.
48 12 Robert Terzi
 * If you are on 64-bit Windows, you must download the versions with the same bitness (either 64-bit or 32-bit) in order for everything to work together, all 32-bit or all 64-bit. 
49 3 Dan Smith
 ** If your intent is to be able to build an .exe for others to test/use, you should use only the 32-bit versions to ensure the generated .exe will install and run on the widest range of Windows systems.
50 24 Bernhard Hailer
 * On Windows 7, 8.1, and 10, the PyLibXML2 installer will generate an error during the installation about not being able to modify the runtime directory. (This appears to be benign.)
51 1 Dan Smith
52 13 Robert Terzi
When everything is installed, you will want to make sure that Python is in your system PATH variable:
53
54
55
h2. Putting Python in your path.
56
57
After installing python, you will need to add it to your path.  The Active State Python installer for ActivePython handles this for you.  If you installed from python.org follow these instructions.
58
59 5 Dan Smith
h3. Windows XP
60
61
 * On the Desktop or in the Start menu, right-click on *My Computer* and choose *Properties*
62
 * In the dialog that opens, on the *Advanced* tab, click on *Environment Variables*
63
 * Under *System variables*, find *Path*, select it, and then edit *Edit*
64 8 Jens Jensen
 * At the end of the existing value, add exactly this string: @;C:\Python27@ (obviously adjust this path if you installed it elsewhere. Don't forget the leading semicolon)
65 5 Dan Smith
 * Click the *OK* buttons until you're done.
66
67
h3. Windows Vista/7
68
69 1 Dan Smith
 * In the Windows menu, right-click on the *Computer* item and choose *Properties*
70 5 Dan Smith
 * Click on *Advanced System Settings* on the left
71 1 Dan Smith
 * In the dialog that opens, click on *Environment Variables*
72
 * Under *System variables*, find *Path*, select it, and then edit *Edit*
73
 * At the end of the existing value, add exactly this string: @;C:\Python27\bin@ (obviously adjust this path if you installed it elsewhere. Don't forget the leading semicolon)
74
 * Click the *OK* buttons until you're done.
75
76 5 Dan Smith
h1. CHIRP source code and development process.
77 15 Robert Terzi
78 25 Dan Smith
Get chirp from [github](https://github.com/kk7ds/chirp)
79 15 Robert Terzi
80 22 Patrick Lang
h1. Run chirp
81 15 Robert Terzi
82
Python should be in your search path from the install, but if not, put it in the system PATH environment variable. Once you do that, you should be able to enter the directory that was created in the clone step above, and run chirpw with python:
83 2 Dan Smith
84
<pre>
85 25 Dan Smith
C:\MyWorkspace> cd chirp.git
86
C:\MyWorkspace\chirp.git> python chirpw
87 1 Dan Smith
</pre>