Installation in windows

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(To make python exe file)
(Windows)
Line 5: Line 5:
 
===Windows===
 
===Windows===
  
Der skal installeres
+
====Serial driver====
 +
 
 +
To be able to run anything with the robot, a driver needs to be installed:
  
 
* Installation af driver https://www.pjrc.com/teensy/td_download.html - seriel driver installation med https://www.pjrc.com/teensy/serial_install.exe
 
* Installation af driver https://www.pjrc.com/teensy/td_download.html - seriel driver installation med https://www.pjrc.com/teensy/serial_install.exe
  
Klienten er en Python2.7 (QT4/5) applikation, som kræver
+
====Python and QT====
 +
 
 +
To be able to change the user interface (regbot.py) python (version 2.7), PyQt4 and pyserial needs to be installed:
  
* Installation af python - version 2.7 fra https://www.python.org/downloads/windows/
+
* Installation of python - version 2.7 from https://www.python.org/downloads/windows/
  
* installation af QT4 GUI library - fra http://www.riverbankcomputing.co.uk/software/pyqt/download.
+
* installation of QT4 GUI library - fra http://www.riverbankcomputing.co.uk/software/pyqt/download.
Installation af http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt4-4.11.3-gpl-Py2.7-Qt4.8.6-x32.exe
+
Installation of http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt4-4.11.3-gpl-Py2.7-Qt4.8.6-x32.exe
NB! det skal være QT4 og x32 (ikke x64) og der skal indgå 'Py2.7' i filnavnet (eller sammenhæng mellem Python version og PyX.X i QT4 filnavnet.
+
NB! it must be QT4 and x32 (not x64) and filename must include 'Py2.7'
  
* installation af python seriel kommunikation fra https://pypi.python.org/pypi/pyserial - igen skal version passe med Python, i.e. 2.7.
+
* installation of python serial kommunikation from https://pypi.python.org/pypi/pyserial - again version must fit with Python, i.e. 2.7.
Installeres bedst fra kommadolinien med
+
Simple way is from command line
 
  pip install pyserial
 
  pip install pyserial
  
==== Tools to make exe file ====
+
=== Tools to make exe file ===
  
To pack an application to an exe-file for windows.
+
To pack an application as an exe-file for windows a pyinstaller is needed.
  
 
Install from cmd line
 
Install from cmd line

Revision as of 07:48, 11 January 2015

Installation i windows

Contents

Klientprogram

Windows

Serial driver

To be able to run anything with the robot, a driver needs to be installed:

Python and QT

To be able to change the user interface (regbot.py) python (version 2.7), PyQt4 and pyserial needs to be installed:

Installation of http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt4-4.11.3-gpl-Py2.7-Qt4.8.6-x32.exe NB! it must be QT4 and x32 (not x64) and filename must include 'Py2.7'

Simple way is from command line

pip install pyserial

Tools to make exe file

To pack an application as an exe-file for windows a pyinstaller is needed.

Install from cmd line

pip install pyinstaller

If you then try

pyinstaller
Error: Pyinstaller for Python 2.6+ needs pywin32 ...

Then go to http://sourceforge.net/projects/pywin32/?source=typ_redirect then the link "browse all files"-> "pywin32" -> "build..." and find pywin32-XXX-win32-py2.7.exe

Run this installation

make EXE file

Make the python script to a single exe-file

in a windows cmd prompt, go to the directory with the main python script

pyinstaller --onefile regbot.py

This will make a subdirectoty called dist. This holds the new application exe-file that can be copied to another windows (without administrator prviledes) and run!

Linux (debian based)

  • install python
sudo apt-get install python-dev
sudo apt-get install pyqt5-dev

If python version 3 is used, then further packages are needed, and some code may have to change.

Teensy 3.1 code

To compile code to Teensy 3.1, and download to the robot requires a bit more

- Code loader - see https://www.pjrc.com/teensy/loader.html - Code uses an arduino library, but is written in C (compiled with a C++ compiler), this requires further installation: @todo - see Nilas' report.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox