-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-dev.sh
More file actions
executable file
·54 lines (47 loc) · 1.61 KB
/
install-dev.sh
File metadata and controls
executable file
·54 lines (47 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Install OpenSPP QGIS plugin for development (symlink)
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLUGIN_DIR="$SCRIPT_DIR/openspp_qgis"
# Detect QGIS plugins directory
if [ -d "$HOME/.local/share/QGIS/QGIS3/profiles/default/python/plugins" ]; then
# Linux
QGIS_PLUGINS="$HOME/.local/share/QGIS/QGIS3/profiles/default/python/plugins"
elif [ -d "$HOME/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins" ]; then
# macOS
QGIS_PLUGINS="$HOME/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins"
else
echo "Could not detect QGIS plugins directory."
echo ""
echo "Please create it manually and run:"
echo " ln -sf \"$PLUGIN_DIR\" /path/to/qgis/plugins/"
exit 1
fi
# Create plugins directory if needed
mkdir -p "$QGIS_PLUGINS"
# Remove existing installation
if [ -L "$QGIS_PLUGINS/openspp_qgis" ]; then
rm "$QGIS_PLUGINS/openspp_qgis"
echo "Removed existing symlink"
elif [ -d "$QGIS_PLUGINS/openspp_qgis" ]; then
echo "Warning: Existing directory found (not a symlink)"
echo "Please remove manually: $QGIS_PLUGINS/openspp_qgis"
exit 1
fi
# Create symlink
ln -sf "$PLUGIN_DIR" "$QGIS_PLUGINS/openspp_qgis"
echo ""
echo "Plugin installed for development!"
echo ""
echo "Symlink created:"
echo " $QGIS_PLUGINS/openspp_qgis -> $PLUGIN_DIR"
echo ""
echo "Next steps:"
echo " 1. Open QGIS"
echo " 2. Plugins → Manage and Install Plugins"
echo " 3. Go to 'Installed' tab"
echo " 4. Enable 'OpenSPP GIS'"
echo ""
echo "To reload after changes:"
echo " - Install 'Plugin Reloader' plugin, or"
echo " - Restart QGIS"