Skip to content

Commit bbd51ea

Browse files
authored
Add files via upload
1 parent 7004074 commit bbd51ea

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

windows_dev_setup.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# windows debellopour headache
2+
3+
If you want to shoot yourself in the groin or worse, follow these instructions.
4+
Else if you have any common programmer sense, use linux or at least wsl.
5+
6+
0. Have QGIS Network version installed (repeat every QGIS upgrade)
7+
8+
0. clone repos
9+
10+
# using cmd terminal (not powershell)
11+
# assuming all repos are here
12+
mkdir c:\LOCAL\fire
13+
cd c:\LOCAL\fire
14+
15+
git clone git@github.com:fire2a/C2F-W.git
16+
git clone git@github.com:fire2a/fire-analytics-qgis-processing-toolbox-plugin.git toolbox
17+
git clone git@github.com:fire2a/fire2a-lib.git lib
18+
19+
20+
0. install the plugin by making a symbolic from `toolbox` repo to plugins folder
21+
22+
```cmd
23+
mklink /D %appdata%\QGIS\QGIS3\profiles\default\python\plugins\fireanalyticstoolbox C:\LOCAL\fire\toolbox\fireanalyticstoolbox
24+
```
25+
26+
0. Build or download a `Cell2fire.exe` executable
27+
28+
A. Build:
29+
30+
Windows Build instructions : https://fire2a.github.io/docs/Cell2FireW/compile_windows.html
31+
All builds instructions : https://github.com/fire2a#developer-setup
32+
TODO VsCode Windows Local Runner Build
33+
34+
B. Download
35+
36+
Download the windows binary from https://github.com/fire2a/C2F-W/releases/latest
37+
For example: Cell2FireW_v1.0.1-Windows-x86_64-binary.zip
38+
mkdir C:\LOCAL\fire\toolbox\fireanalyticstoolbox\simulator\C2F\Cell2Fire
39+
Extract contents to C:\LOCAL\fire\toolbox\fireanalyticstoolbox\simulator\C2F\Cell2Fire
40+
So you have C:\LOCAL\fire\toolbox\fireanalyticstoolbox\simulator\C2F\Cell2Fire\Cell2Fire.exe
41+
42+
0. Install fire2a-lib in editable mode into QGIS python
43+
44+
https://fire2a.github.io/docs/qgis-management/plugins.html#osgeo4w-shell-windows
45+
46+
# keep track of git, because the next command empties the PATH
47+
> where git
48+
C:\Program Files\Git\cmd\git.exe <--- in my machine
49+
50+
# go to directory, launch and exit QGIS python
51+
> cd C:\OSGeo4W\bin
52+
> python-qgis.bat
53+
>>>exit()
54+
55+
# make sure pip is found
56+
> where pip
57+
c:\OSGeo4W\apps\Python312\Scripts\pip.bat <--- ok!
58+
C:\OSGeo4W\apps\Python312\Scripts\pip.exe
59+
60+
# make sure git is found
61+
> PATH=%PATH%;C:\Program Files\Git\cmd <--- same directory as the first where git command
62+
> where git
63+
64+
# install editable
65+
cd c:\LOCAL\fire\lib
66+
pip install -e .
67+
68+
0. Optional: To use the decision optimization module you must have a solver, cplex or gurobi is best, but cbc is open source and easy to install:
69+
70+
Got to this repository: "coin-or/Cbc"
71+
Download the latest release, it should be a fileName like `*w64-msvc17*.zip`
72+
Extract its content to path: `fireanalyticstoolbox/cbc`
73+
You should have now `fireanalyticstoolbox/cbc/bin/cbc.exe`
74+
75+
0. Make sure you disable the auto install fire2a-lib from pip by editing this file ` C:\LOCAL\fire\toolbox\fireanalyticstoolbox\dependencies_handler.txt`
76+
Set enabled to False:
77+
78+
[general]
79+
plugin_dependencies = fire2a-lib==0.3.11
80+
enabled = True <-- edit this True to False!
81+
82+
Or when prompted by the plugin dialog about not having the same version of fire2a-lib installed, make sure to click the checkbox "Do not attempt to check and install dependencies again!"
83+
Else you'll overwrite the installation, left wondering why your changes doesn't apply!
84+
85+
0. All set! Open QGIS and test it!
86+
Remember that even though the plugin can reload on the fly, the fire2a-lib module does not until QGIS restart.
87+
88+
89+
90+

0 commit comments

Comments
 (0)