Project

General

Profile

LegacyDevelopersWin32Environment » History » Version 28

Alexandre J. Raymond, 05/24/2024 10:01 AM
Make chirp uppercase throughout

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 27 Alexandre J. Raymond
# Setting up a Win32 Development Environment
6 1 Dan Smith
7 27 Alexandre J. Raymond
## Overview
8 14 Robert Terzi
9 28 Alexandre J. Raymond
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:
10 14 Robert Terzi
11 27 Alexandre J. Raymond
 * PyGTK - GTK cross-platform GUI
12 14 Robert Terzi
 * PySerial - serial port connectivity for Python
13
 * PyLibXML2 - XML processing
14 1 Dan Smith
15 28 Alexandre J. Raymond
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.
16 15 Robert Terzi
17
To summarize the steps are:
18 1 Dan Smith
19 27 Alexandre J. Raymond
1. install python
20
1. install additional python libraries PyGTK, PySerial, PyLibXML2
21 1 Dan Smith
22 27 Alexandre J. Raymond
## Installing Python
23 13 Robert Terzi
24 28 Alexandre J. Raymond
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.
25 1 Dan Smith
26 27 Alexandre J. Raymond
* [Python 2.7.x](https://python.org/download/releases/2.7.6)
27
* [ActivePython Community Edition](http://www.activestate.com/activepython/downloads)
28 1 Dan Smith
29
See the steps below to add Python to your system's path after installation.
30
 
31 27 Alexandre J. Raymond
## Library and Runtime Prerequisites
32 1 Dan Smith
33
In addition to Python, several other libraries are needed for the GTK cross-platform GUI, serial port connectivity, and XML processing.
34
35 7 Jens Jensen
Get and install the following in this order:
36 1 Dan Smith
37 27 Alexandre J. Raymond
1. [PyGTK Win32 All-in-one installer](https://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24)
38
1. [PyLibXML2](https://users.skynet.be/sbi/libxml-python)
39
1. [PyWin32](https://sourceforge.net/projects/pywin32/files/pywin32)
40
1. [PySerial](https://sourceforge.net/projects/pyserial/files/pyserial/2.5)
41 3 Dan Smith
42 1 Dan Smith
Notes:
43 27 Alexandre J. Raymond
* For any of the above, be sure to get the latest version, and the py27 variant if/when available.
44
* 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. 
45
** 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.
46
* 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.)
47 24 Bernhard Hailer
48 1 Dan Smith
When everything is installed, you will want to make sure that Python is in your system PATH variable:
49 13 Robert Terzi
50 27 Alexandre J. Raymond
## Putting Python in your path.
51 13 Robert Terzi
52
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.
53
54 27 Alexandre J. Raymond
### Windows XP
55 5 Dan Smith
56
 * On the Desktop or in the Start menu, right-click on *My Computer* and choose *Properties*
57
 * In the dialog that opens, on the *Advanced* tab, click on *Environment Variables*
58
 * Under *System variables*, find *Path*, select it, and then edit *Edit*
59 27 Alexandre J. Raymond
 * 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)
60 5 Dan Smith
 * Click the *OK* buttons until you're done.
61
62 27 Alexandre J. Raymond
### Windows Vista/7
63 5 Dan Smith
64 1 Dan Smith
 * In the Windows menu, right-click on the *Computer* item and choose *Properties*
65 5 Dan Smith
 * Click on *Advanced System Settings* on the left
66 1 Dan Smith
 * In the dialog that opens, click on *Environment Variables*
67
 * Under *System variables*, find *Path*, select it, and then edit *Edit*
68 27 Alexandre J. Raymond
 * 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)
69 1 Dan Smith
 * Click the *OK* buttons until you're done.
70
71 27 Alexandre J. Raymond
# CHIRP source code and development process.
72 15 Robert Terzi
73 27 Alexandre J. Raymond
Get CHIRP from [GitHub](https://github.com/kk7ds/chirp)
74 15 Robert Terzi
75 27 Alexandre J. Raymond
# Run CHIRP
76 15 Robert Terzi
77 28 Alexandre J. Raymond
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:
78 2 Dan Smith
79
<pre>
80 25 Dan Smith
C:\MyWorkspace> cd chirp.git
81
C:\MyWorkspace\chirp.git> python chirpw
82 1 Dan Smith
</pre>