|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 | import sys
|
3 |
| -try: |
4 |
| - sys.path.append( |
5 |
| - "D:\eclipse\plugins\org.python.pydev.core_7.1.0.201902031515\pysrc") |
6 |
| - from pydevd import * |
7 |
| -except ImportError: |
8 |
| - None |
9 |
| - |
10 |
| -from QGIS_FMV.utils.QgsFmvInstaller import WindowsInstaller |
| 3 | +from QGIS_FMV.utils.QgsFmvInstaller import WindowsInstaller, LinuxInstaller |
11 | 4 | import platform
|
12 | 5 | windows = platform.system() == 'Windows'
|
13 | 6 | from QGIS_FMV.utils.QgsUtils import QgsUtils as qgsu
|
|
19 | 12 | from qgis.PyQt.QtWidgets import QApplication
|
20 | 13 |
|
21 | 14 | # Check dependencies
|
22 |
| -if windows: |
23 |
| - try: |
24 |
| - QApplication.setOverrideCursor(Qt.PointingHandCursor) |
25 |
| - QApplication.processEvents() |
| 15 | +try: |
| 16 | + QApplication.setOverrideCursor(Qt.PointingHandCursor) |
| 17 | + QApplication.processEvents() |
| 18 | + |
| 19 | + if windows: # Windows Installer |
| 20 | + try: |
| 21 | + sys.path.append( |
| 22 | + "D:\eclipse\plugins\org.python.pydev.core_7.1.0.201902031515\pysrc") |
| 23 | + from pydevd import * |
| 24 | + except ImportError: |
| 25 | + None |
| 26 | + |
26 | 27 | WindowsInstaller()
|
27 |
| - reloadPlugin('QGIS_FMV') |
28 |
| - iface.messageBar().pushMessage("QGIS FMV", "QGIS Full Motion Video installed correctly", QGis.Info, 3) |
29 |
| - QApplication.restoreOverrideCursor() |
30 |
| - except Exception as e: |
31 |
| - QApplication.restoreOverrideCursor() |
32 |
| - None |
| 28 | + else: # Linux Installer |
| 29 | + try: |
| 30 | + sys.path.append( |
| 31 | + "/home/fran/Escritorio/eclipse/plugins/org.python.pydev.core_7.2.1.201904261721/pysrc") |
| 32 | + from pydevd import * |
| 33 | + except ImportError: |
| 34 | + None |
| 35 | + LinuxInstaller() |
| 36 | + |
| 37 | + reloadPlugin('QGIS_FMV') |
| 38 | + iface.messageBar().pushMessage("QGIS FMV", "QGIS Full Motion Video installed correctly", QGis.Info, 3) |
| 39 | + QApplication.restoreOverrideCursor() |
| 40 | +except Exception as e: |
| 41 | + QApplication.restoreOverrideCursor() |
| 42 | + None |
33 | 43 | # buttonReply = qgsu.CustomMessage("QGIS FMV", "", "you need to restart your QGIS,Do you really close?", icon="Information")
|
34 | 44 | # if buttonReply == QMessageBox.Yes:
|
35 | 45 | # # TODO : Restart QGIS
|
|
0 commit comments