Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create #22

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
32 changes: 32 additions & 0 deletions Installers/Ubuntu-Install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

echo Please enter your password to continue...

# Install the following dependencies from repositories without asking questions, git-core can be removed afterwords as it's only used to initialise a local git repository
echo Installing dependencies
sudo apt-get -y install git-core libusb-1.0.0 libudev-dev python3 cython3 python3-pip python3-pil python3-setuptools

cd /tmp
pip3 install hidapi click
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click is available as a debian package, python3-click. Setuptools would install it when using setup.py anyway.


# Build within /tmp
cd /tmp

# If the git repository already exists then delete it
if [ -d "python-evic" ]; then
rm -Rf python-evic
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like removing directories from users home. Maybe create a temp directory for cloning?

Copy link
Contributor

@ReservedField ReservedField Aug 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second. An installer touching an existing (possibly dirty) tree is bad. By the way, wouldn't an user need to have already cloned the repo to have this script anyway?
I'd check git config --get remote.origin.url. If the user cloned, just install. If not, it means the user downloaded the script directly from Github, so mktemp -d and clone since most likely he isn't interested in pulling updates.

fi

# Clone the pythin-evic repository the change directory into it
echo Cloning python-evic repository
git clone git://github.com/Ban3/python-evic.git && cd ./python-evic

# Install python-evic
echo Installing python-evic
sudo python3 setup.py install

# Cleanup
cd ../
rm -Rf python-evic

echo Installation complete. Run \"sudo evic-usb upload /path/to/firmware.bin\" to install a new firmware.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of recommending users to use sudo you should copy the udev rules to /etc/udev/rules.d/

Could this file be renamed to debian-install.sh

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the capitalization also be removed? using installers instead of Installers

12 changes: 10 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Supported devices
* Vaporflask Classic*
* Vaporflask Lite*
* Vaporflask Stout*
* Reuleaux RX200*
* Reuleaux RX200
* Reuleaux RX200S

\*Untested

Expand All @@ -29,6 +30,8 @@ Tested firmware versions

* Evic VTC Mini <=3.02
* Presa TC75W 1.02\*
* RX200 3.10
* RX200S 4.10
* Examples from `evic-sdk <https://github.com/ReservedField/evic-sdk>`_

\*Flashing Presa firmware to a VTC Mini requires changing the hardware version
Expand All @@ -37,14 +40,19 @@ on some devices. Backup your data flash before flashing!
Installation
-------------

Installing on Ubuntu:
^^^^^^^^^^^^^^^^^^^^^^
Download Ubuntu-Install.sh from the Installers directory. Right click > Properties > Mark Executable.
It will automatically download and install all of the required dependencies and evic-usb.

Install from source:
^^^^^^^^^^^^^^^^^^^^^^

Using ``evic-usb`` requires ``cython-hidapi``. You can install it using ``pip``:

::

$ pip install hidapi
$ pip install hidapi click setuptools pil
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove click, setuptools and pil from this. They are installed automatically using setuptools. That line is meant for the USB dependencies


Building ``cython-hidapi`` requires libusb headers and cython. On Arch Linux they can be obtained from the repositories by installing packages ``libusb`` and ``cython``. Debian based distributions will have packages ``libusb-1.0-0-dev`` and ``cython``.

Expand Down
6 changes: 4 additions & 2 deletions evic/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class HIDTransfer(object):
'W010': "Classic",
'W011': "Lite",
'W013': "Stout",
'W014': "Reuleaux RX200"}
'W014': "Reuleaux RX200",
'W033': "Reuleaux RX200S"}
supported_product_ids = {'E052': ['E052', 'W007'],
'E056': ['E056'],
'E060': ['E060'],
Expand All @@ -72,7 +73,8 @@ class HIDTransfer(object):
'W010': ['W010'],
'W011': ['W011'],
'W013': ['W013'],
'W014': ['W014']}
'W014': ['W014'],
'W064': ['W064']}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this should be W033 instead

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RX200S support is already merged, you need to update your fork.

supported_logo_size = {'E052': (64, 40),
'E056': (64, 40),
'E060': (64, 40),
Expand Down