If the environment variable `NIM_STATUS_CLIENT_DEV` is not empty then the
`./data` dir is created/used relative to the current working directory, as was
always the case prior to the changes introduced in this commit.
`NIM_STATUS_CLIENT_DEV` is set to `t` when doing `make run`. To get the
production behavior in development do:
```
$ NIM_STATUS_CLIENT_DEV="" make run
```
or on Windows in a Bash shell:
```
$ NIM_STATUS_CLIENT_DEV="" mingw32-make run
```
Closes#391
Replaces #82, which in any case is out-of-date re: the current state of this
repo's Makefile.
Introduces the ability to build `nim_status_client.exe` directly on Windows,
i.e. without needing to use Windows Subsystem for Linux or otherwise
cross-compile on Linux.
Note: this commit does not introduce packaging or code signing for the Windows
build as those pieces are still a work in progress.
The `make` targets should be run in a Bash shell, e.g. in *Git Bash* as
included in the installation of [Git for Windows][git-win].
[Microsoft Visual C++ Build Tools][ms-build] must be installed.
Qt's `MSVC 2017 64-bit` and `MinGW 7.3.0 64-bit` toolchains must both be
installed, e.g. with the Qt Online Installer tool.
CMake needs to be installed; it is available via the Qt Online Installer tool
under *Developer and Designer Tools* (`CMake 3.17.1 64-bit`).
A couple of additional tools need to be installed (e.g. with [scoop][scoop])
and availble in `PATH`:
* findutils
* go
For `.dll` resolution to function as needed, in a Bash shell `PATH` should be
modified like this (might be different depending on how/where things were
installed):
```bash
export QTBASE="/c/Qt"
export QTDIR="${QTBASE}/5.14.2/msvc2017_64"
export PATH="${HOME}/scoop/shims:${PATH}"
export PATH="${QTDIR}/bin:${PATH}"
export PATH="${QTBASE}/Tools/mingw730_64/bin:${PATH}"
export PATH="${QTBASE}/Tools/CMake_64/bin:${PATH}"
```
With those modifications in place, to build `nim_status_client.exe` do:
```
mingw32-make.exe V=1
```
To run the executable do:
```
mingw32-make.exe run
```
[git-win]: https://gitforwindows.org/
[ms-build]: https://visualstudio.microsoft.com/visual-cpp-build-tools/
[scoop]: https://scoop.sh/