Regbot GUI

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(= The regbot.exe version for Windows)
(Make a windows EXE file)
Line 118: Line 118:
 
== Make a windows EXE file ==
 
== Make a windows EXE file ==
  
If you installed all the python stuff, then you don't need the exe file.
+
If you installed all the python stuff, you don't need the exe file.
  
To make a single exe-file without need to install anything, then it is a bit more complicated (for me at least)
+
To make a single exe-file without the need to install anything, then it is a bit more complicated (for me at least)
 
+
The Microsoft version failed in creating the exe-file
+
  
 
===Install python===
 
===Install python===
 
* Remove already installed python
 
  
 
* Install python (tested with version 3.8) from https://www.python.org/downloads/ - select 'all users' in install options and also select 'add to path'.
 
* Install python (tested with version 3.8) from https://www.python.org/downloads/ - select 'all users' in install options and also select 'add to path'.
  
After installation, start 'cmd' terminal windows as administrator (rightclick on 'cmd' select 'as administrator'), to install additional packages using 'pip'. (may work as user - i Haven't tested).
+
After installation, start 'cmd' terminal windows as administrator (right-click on 'cmd' and select 'as administrator') to install additional packages using 'pip'.
  
 
  > pip install pyqt5
 
  > pip install pyqt5
Line 138: Line 134:
 
  > exit
 
  > exit
  
Open a 'cmd' terminal window as normal user
+
Open a 'cmd' terminal window as a normal user
  
 
Then make the EXE-file from the directory with the REGBOT GUI
 
Then make the EXE-file from the directory with the REGBOT GUI
  
  > cd Downloads\regbotgui
+
  > cd Downloads\regbot_gui
 
  > pyinstaller --onefile regbot.py
 
  > pyinstaller --onefile regbot.py
  
Line 151: Line 147:
 
  > regbot.exe
 
  > regbot.exe
  
PS! tried also with Python 3.9, but regbot.exe failed with error: "PyQt5.sip not found".
+
PS! tried also with Python 3.9, but regbot.exe failed with the error: "PyQt5.sip not found".

Revision as of 16:19, 13 February 2023

Back to Regbot

Back to Robobot


Contents

Install Python

On a windows computer:

Start the command window by searching for 'cmd' after pressing the windows button.

On a Linux computer, install pip (Python install program)

sudo apt install pip

In the command window, start python

python
Python 3.6.9 (default, Oct  8 2020, 12:12:24) 
on win32
Type "help", "copyright", "credits" or "license" for more information. 
>>> quit()

This should start python and write the version number. Version must be 3.X.X.

If not installed, then install from Microsoft store, you will probably be directed directly, if not installed.

Install packages

At the CMD prompt, install:

> pip install pyqt5
> pip install pyqtgraph
> pip install pyserial

If everything goes well, then you are ready to run the GUI from the Python script.

Linux (or Apple)

If you run Linux, the above are the packages you need here too.

I haven't tested on Apple, but maybe.

Get REGBOT GUI

Install SVN

The source is on a SVN repository, if not available, then install:

Install TortoiseSVN from https://subversion.apache.org On left menu find "Binary packages" and from here the 'Windows' section

  • Download TortoiseSVN
  • Install, and remember to add 'command line' support.
  • restart a 'cmd' terminal after installation

get the GUI

The file-browser may have support for SVN (or it can be added), in this case 'checkout' the regbot_gui on this address

svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui

On Linux (and maybe Apple) install subversion (Linux: sudo apt install subversion)

The checkout with the command

svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui


Get GUI with command-line

At the windows command terminal, do a checkout. Change to the Downloads folder (makes it easier to find (under Overførsler på dansk))

> cd Downloads
> svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui


Regbot GUI use

See the User interface

run the GUI

The python version

In the regbot_gui directory, run the regbot.py script.

  • On Linux, this command line should work:
cd regbot_gui
python3 regbot.py
  • On Windows

Find the directory in your file browser (Stifinder)

Start the file 'regbot.py' - maybe create a shortcut on the desktop.

If there are errors about libraries, then check if they are installed (from the list above).

The regbot.exe version for Windows

A windows executable is generated (using the instructions below); this is found in a subdirectory called "dist".

> cd Downloads
> cd regbot
> cd regbot_gui
> cd dist
> regbot


Use the browser to locate the file and execute it. As it also holds all the needed python-libraries, it takes a long time to start.

NB! the version from 2022 does not work anymore, it has to have a date from 2023.

Make a windows EXE file

If you installed all the python stuff, you don't need the exe file.

To make a single exe-file without the need to install anything, then it is a bit more complicated (for me at least)

Install python

After installation, start 'cmd' terminal windows as administrator (right-click on 'cmd' and select 'as administrator') to install additional packages using 'pip'.

> pip install pyqt5
> pip install pyqtgraph
> pip install pyserial
> pip install pyinstaller
> exit

Open a 'cmd' terminal window as a normal user

Then make the EXE-file from the directory with the REGBOT GUI

> cd Downloads\regbot_gui
> pyinstaller --onefile regbot.py

This takes some time, and the regbot.exe should be found in a 'dist' subdirectory.

Try:

> cd dist
> regbot.exe

PS! tried also with Python 3.9, but regbot.exe failed with the error: "PyQt5.sip not found".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox