Installation in windows

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Prepare installation as an EXE file)
(Client application)
 
(21 intermediate revisions by one user not shown)
Line 1: Line 1:
Installation i windows
+
Back to [[Regbot]] main page.
  
== Klientprogram ==
+
Installation for windows (7 or later?)
  
===Windows===
+
== Client application ==
  
Der skal installeres
+
A REGBOT GUI for windows is packed into a single (big) exe-file. This is available on the course page or downloaded from the SVN in directory
  
* Installation af driver https://www.pjrc.com/teensy/td_download.html - seriel driver installation med https://www.pjrc.com/teensy/serial_install.exe
+
qtgui/dist/regbot.exe.
  
Klienten er en Python2.7 (QT4/5) applikation, som kræver
+
The application is also a python script that can run on windows
  
* Installation af python - version 2.7 fra https://www.python.org/downloads/windows/
+
It is on a subversion (SVN) repository, first install subversion on the PC.
  
* installation af QT4 GUI library - fra http://www.riverbankcomputing.co.uk/software/pyqt/download.
+
Using subversion (from a 'cmd' prompt).
Installation af http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt4-4.11.3-gpl-Py2.7-Qt4.8.6-x64.exe
+
  svn co svn://repos.gbar.dtu.dk/jcan/regbot/qtgui
NB! det skal være QT4 og der skal indgå 'Py2.7' i filnavnet (eller sammenhæng mellem Python version og PyX.X i QT4 filnavnet.
+
  
* installation af python seriel kommunikation fra https://pypi.python.org/pypi/pyserial - igen skal version passe med Python, i.e. 2.7.
+
If using another svn client, then use only the repository name svn://repos.gbar.dtu.dk/jcan/regbot/qtgui .
  
=== Prepare installation as an EXE file ===
+
==Tool installation - client ==
  
install pyinstaller use pip (python installer) som installeres sammen med python 2.7
+
This is not needed to run the client, but is needed to create new versions of the client (on Windows) or to run the python source directly.
  
Use pyinstaller ... @todo
+
====Python and QT====
  
=== Linux (debian based) ===
+
To be able to change the user interface (regbot.py) python (version 2.7), PyQt4 and pyserial needs to be installed:
  
* install python  
+
* Installation of python - version 2.7 from https://www.python.org/downloads/windows/
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.
+
* installation of QT4 GUI library - fra http://www.riverbankcomputing.co.uk/software/pyqt/download.
 +
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'
  
== Teensy 3.1 code ==
+
* installation of python serial kommunikation from https://pypi.python.org/pypi/pyserial - again version must fit with Python, i.e. 2.7.
 +
Simple way is from command line
 +
pip install pyserial
 +
 
 +
* Installation of PyQtGraph is needed for the plotting, this requires Numpy, and this in turn requires Microsoft Visual C++ 9.0 compiler for Python:
 +
* get the compiler: from http://aka.ms/vcpython27 download the installer "VCForPython27" and run it.
 +
* install numpy (from the command line)
 +
pip install numpy
 +
* install PyQtGraph-0.9.10.win32
 +
pip install pyqtgraph
 +
 
 +
=== Tools to make the 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 get this error, when you 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!
 +
 
 +
== Teensy code ==
  
 
To compile code to Teensy 3.1, and download to the robot requires a bit more
 
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 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.
+
- Code uses an arduino library, but is written in C (compiled with a C++ compiler), this requires further installation
 +
 
 +
To make the Makefile work you need to install
 +
 
 +
MinGW (Minimalist GNU for Windows) from http://www.mingw.org/Welcome_to_MinGW_org
 +
 
 +
Then it should be possible to re-establish the symbolic links described in the http://rsewiki.elektro.dtu.dk/index.php/Software_installation#Regbot_software
 +
 
 +
and compile the code to a ".hex" file that can be loaded to the teensy.

Latest revision as of 16:54, 24 January 2020

Back to Regbot main page.

Installation for windows (7 or later?)

Contents

[edit] Client application

A REGBOT GUI for windows is packed into a single (big) exe-file. This is available on the course page or downloaded from the SVN in directory

qtgui/dist/regbot.exe.

The application is also a python script that can run on windows

It is on a subversion (SVN) repository, first install subversion on the PC.

Using subversion (from a 'cmd' prompt).

 svn co svn://repos.gbar.dtu.dk/jcan/regbot/qtgui

If using another svn client, then use only the repository name svn://repos.gbar.dtu.dk/jcan/regbot/qtgui .

[edit] Tool installation - client

This is not needed to run the client, but is needed to create new versions of the client (on Windows) or to run the python source directly.

[edit] 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
  • Installation of PyQtGraph is needed for the plotting, this requires Numpy, and this in turn requires Microsoft Visual C++ 9.0 compiler for Python:
  • get the compiler: from http://aka.ms/vcpython27 download the installer "VCForPython27" and run it.
  • install numpy (from the command line)
pip install numpy
  • install PyQtGraph-0.9.10.win32
pip install pyqtgraph

[edit] Tools to make the 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 get this error, when you 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

[edit] 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!

[edit] Teensy 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

To make the Makefile work you need to install

MinGW (Minimalist GNU for Windows) from http://www.mingw.org/Welcome_to_MinGW_org

Then it should be possible to re-establish the symbolic links described in the http://rsewiki.elektro.dtu.dk/index.php/Software_installation#Regbot_software

and compile the code to a ".hex" file that can be loaded to the teensy.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox