Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@ In the `Project` tab:

## Install the module plugin

In the `Plugin` tab, you can install the module plugin (ie. TWW plugin). Direct install using the `Install` button is currently not implemented.
In the `Plugin` tab, you can install the module plugin (ie. TWW plugin). There are two possibilities:

* Click `Copy ZIP to directory`
* In QGIS > Extension > Install and manage extension > Install from ZIP
1. Click `Install` and it will be installed in the current QGIS profile. Note: this is possible only if running oQtopus from QGIS.
2. Click `Copy ZIP to directory`:
* You can copy the plugin zip file to a directory of your choice.
* Then in QGIS > Extension > Install and manage extension > Install from ZIP.


## oQtopus as a standalone python executable
Expand Down
32 changes: 23 additions & 9 deletions oqtopus/gui/plugin_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


class PluginWidget(QWidget, DIALOG_UI):

def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setupUi(self)
Expand Down Expand Up @@ -83,14 +82,29 @@ def __installClicked(self):
QtUtils.setFontItalic(self.info_label, True)
return

QMessageBox.warning(
self,
self.tr("Not implemented"),
self.tr(
'Installation is not implemented yet.\nAt the moment, you can only copy the plugin zip file to a directory and use "Install from ZIP" in QGIS.'
),
)
return
try:
from pyplugin_installer import instance as plugin_installer_instance

installer = plugin_installer_instance()
installer.installFromZipFile(asset_plugin.package_zip)

return

except ImportError:
QMessageBox.warning(
self,
self.tr("Error"),
self.tr("Plugin installation is not possible when oQtopus is running standalone."),
)
return

except Exception as e:
QMessageBox.warning(
self,
self.tr("Error"),
self.tr("Plugin installation failed with an exception: {0}").format(str(e)),
)
return

def __seeChangelogClicked(self):
if self.__current_module_package is None:
Expand Down