Documenting openHAB 2

I also had to port some stuff from C:\openHAB2\runtime\bin\setenv.bat to the wrapper.conf like:

From:

:: set java options
set JAVA_OPTS=%JAVA_OPTS% ^
  -Dopenhab.home=%OPENHAB_HOME% ^
  -Dopenhab.conf=%OPENHAB_CONF% ^
  -Dopenhab.runtime=%OPENHAB_RUNTIME% ^
  -Dopenhab.userdata=%OPENHAB_USERDATA% ^
  -Dopenhab.logdir=%OPENHAB_LOGDIR% ^
  -Dfelix.cm.dir=%OPENHAB_USERDATA%\config ^
  -Dorg.osgi.service.http.port=%HTTP_PORT% ^
  -Dorg.osgi.service.http.port.secure=%HTTPS_PORT%

To:

wrapper.java.additional.10=-Dopenhab.home=C:\openHAB2
[...]
wrapper.java.additional.16=-Dorg.osgi.service.http.port=8080
wrapper.java.additional.17=-Dorg.osgi.service.http.port.secure=8443

because with only the oh2_dir_layout variables included in the wrapper.conf, I was still getting some errors.

With these 2 changes, I got the windows service working… but…still… I am not sure if the system is stable now… I may have missed some parameter or other environment variable in the wrapper.conf that will show it’s ugly face later down the road…

As @ThomDietrich suggested: The right move here is to create a script (which will be distributed with OH2) that produces a proper wrapper.conf file (and maybe takes care of the service installation commands also) so that people will not have to customize it to make it work. We need some scripting support to make this happen… @xsnrg made a very nice script for linux (for upgrading a manual OH2 installation) but we need 2 scripts for windows also (one for manual upgrades and one for generating a proper wrapper.conf/installing the windows service automatically)