| 1 |
## Install / Update / Removal |
| 2 |
|
| 3 |
### Prerequisites |
| 4 |
Make sure you have software in this section installed before the build attempt. |
| 5 |
|
| 6 |
Run a software update to get the latest version of any package for your distribution: |
| 7 |
|
| 8 |
> `sudo apt-get update` |
| 9 |
|
| 10 |
and |
| 11 |
|
| 12 |
> `sudo apt-get dist-upgrade` |
| 13 |
|
| 14 |
after conclusion, restart your sytem. |
| 15 |
|
| 16 |
#### Libindi |
| 17 |
Check if you have the libindi software suite installed: |
| 18 |
|
| 19 |
>``sudo apt-get install libindi1 libindidriver1 libindi-data libindi-dev libindi-plugins libindialignmentdriver1 libnova-0.16-0 libnova-dev libnova-dev-bin`` |
| 20 |
|
| 21 |
This should be done on Astroberry, but may be necessary on a different distribution. |
| 22 |
|
| 23 |
**Notes:** `libnova` may have a different version number on your distribution, if you can not find this particular version use a `apt-cache search libnova` to find the correct name to use. |
| 24 |
|
| 25 |
#### Development Tools and Build System |
| 26 |
Please check if cmake is installed, since its the primary build system and throw in a build-essential for good measure. |
| 27 |
|
| 28 |
>``sudo apt-get install cmake build-essential git`` |
| 29 |
|
| 30 |
Apart from cmake, this should already be installed on Astroberry, but may be necessary on a different distribution. |
| 31 |
|
| 32 |
Wait until everything is installed, and continue with building the driver. |
| 33 |
|
| 34 |
### Building and Installing the Driver |
| 35 |
1. Clone the Repository into a directory of the Pi (eg. your Home directory): |
| 36 |
> ``git clone https://github.com/kneo/indi-bresserexos2.git`` |
| 37 |
|
| 38 |
**Note** Make sure you are allowed to write to the current directory! |
| 39 |
|
| 40 |
2. Change Directory to BresserExosIIDriverForIndi: |
| 41 |
> ``cd indi-bresserexos2`` |
| 42 |
|
| 43 |
3. Create a directory "build" in the current directory: |
| 44 |
> ``mkdir build`` |
| 45 |
|
| 46 |
4. Change to the build directory: |
| 47 |
> ``cd build`` |
| 48 |
|
| 49 |
5. Run ``cmake ..`` (and wait for completion): |
| 50 |
- provide``CMAKE_INSTALL_PREFIX`` to adjust the install location of the driver binary if necessary. |
| 51 |
- provide ``XML_INSTALL_DIR`` to adjust the location of the xml file for indi if necessary. |
| 52 |
|
| 53 |
6. Run build process (and wait for the conclusion): |
| 54 |
> ``cmake --build .`` |
| 55 |
|
| 56 |
7. Install the driver (if everything seems working): |
| 57 |
> ``sudo make install`` |
| 58 |
|
| 59 |
8. Restart the indi Service or simply restart the Pi |
| 60 |
- This is necessary for the driver to be visible in the Web Manager |
| 61 |
|
| 62 |
9. Go To the Astroberry Manager Web Page: |
| 63 |
- http://ip-of-your-pi/desktop |
| 64 |
|
| 65 |
10. Remain here do not "Connect" to the desktop, rather Go To INDI Webmanager: |
| 66 |
- Click the little scope on the side bar |
| 67 |
|
| 68 |
11. Look throught the Driver list for "Exos II GoTo" |
| 69 |
- If it appears, the installation is completed. |
| 70 |
|
| 71 |
### Update The Driver |
| 72 |
Its recommended to keep the repository stored on your device for easy updating. |
| 73 |
|
| 74 |
1. Make sure the indi software does not run, it should not on a freshly rebooted system. Use: |
| 75 |
``fuser /usr/bin/indi_bresserexos2`` |
| 76 |
if it returns a number a process is still "using" the file, |
| 77 |
kill this process using: ``kill -9 PID``, where **PID** is the number the ``fuser`` command returned. |
| 78 |
|
| 79 |
2. open the root directory of the driver source code repository in a terminal. |
| 80 |
- The context menu of your prefered file manager may have an appropriate context menu entry. |
| 81 |
3. unless you changed any of the contents of the source directory the command should download all remote changes/updates. To get the changes use: |
| 82 |
``git pull`` |
| 83 |
|
| 84 |
4. go into the ``build`` directory you created in step 3. of the installation guide using: |
| 85 |
``cd build`` |
| 86 |
|
| 87 |
5. again run the ``cmake ..`` command. |
| 88 |
|
| 89 |
6. when concluded run the ``cmake --build .`` again to start the build process. |
| 90 |
|
| 91 |
7. once successfully finished, run: |
| 92 |
``sudo make install`` to replace your existing install files. |
| 93 |
|
| 94 |
8. the update is done, continue using the driver. Although is test is recommended. |
| 95 |
The ``/usr/share/indi/indi_bresserexos2.xml`` file should contain the version number of the latest version. Also the Driver should show the correct version number in the kstars EKOS panel of the driver. |
| 96 |
|
| 97 |
### Remove the Driver |
| 98 |
If you want to remove your driver, you can do so by just deleting the files installed by ``sudo make install``. The default installation paths are: |
| 99 |
- ``/usr/bin/indi_bresserexos2`` |
| 100 |
- ``/usr/share/indi/indi_bresserexos2.xml`` |
| 101 |
If you changed the paths, by eg. providing a ``CMAKE_INSTALL_PREFIX`` you have to adjust you path accordingly. |
| 102 |
|
| 103 |
Use a ``rm /usr/bin/indi_bresserexos2`` and ``rm /usr/share/indi/indi_bresserexos2.xml`` to delete the files. |
| 104 |
|
| 105 |
If you want to find out if you removed everything or don't know what to delete, use the ``find / -name "indi_bresserexos2*" 2>/dev/null`` command to find any "indi_bresserexos2*" related file on your file system. |
| 106 |
Check through the output for any remaining binary file installed on your system This command may also find them in your home directory, but these can be considered inactive. |