Repository: thecoshman/http (language: rust)

Issue:
Fix and/or replace Windows installer
AppVeyor currently fails to build it, I haven't changed anything, welcome to Windows, I guess


Discussion / hints:

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 03151c3..d8fd6c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ categories = ["network-programming", "web-programming::http-server"]
 license = "MIT"
 build = "build.rs"
 # Remember to also update in appveyor.yml
-version = "1.9.0"
+version = "1.9.1"
 # Remember to also update in http.md
 authors = ["thecoshman <rust@thecoshman.com>",
            "nabijaczleweli <nabijaczleweli@gmail.com>",
diff --git a/appveyor.yml b/appveyor.yml
index 08ef7be..31a41d3 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,4 +1,4 @@
-version: 1.9.0-{build}
+version: 1.9.1-{build}
 
 skip_tags: false
 
@@ -11,32 +11,33 @@ install:
   - set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%;C:\Users\appveyor\.cargo\bin
   - bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
   - bash -lc "pacman --noconfirm -Sy"
-  - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-nsis"
+  - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-nsis unzip"
   -
   - curl -SL https://win.rustup.rs/ -oC:\rustup-init.exe
   - C:\rustup-init.exe -y --default-host="x86_64-pc-windows-gnu"
   -
-  - curl -SOL https://cdn.rawgit.com/nabijaczleweli/880a4b42368c610dc5de041d73bbea58/raw/d84dfb47245c7c44af34940d957c17099dc38c2b/EnvVarUpdate.nsh
+  - curl -SOL https://cdn.rawgit.com/nabijaczleweli/880a4b42368c610dc5de041d73bbea58/raw/7f3a23efe680d06934e6c0d7c9fbe92216da0682/EnVar_plugin.zip
+  - unzip -j EnVar_plugin.zip Plugins/amd64-unicode/EnVar.dll -d C:\msys64\mingw64\share\nsis\Plugins\unicode
 
 build: off
 build_script:
   - git submodule update --init --recursive
   - cargo build --verbose --release
-  - cp target\release\http.exe http-v1.9.0.exe
-  - strip --strip-all --remove-section=.comment --remove-section=.note http-v1.9.0.exe
-  - makensis -DHTTP_VERSION=v1.9.0 "/X!include \"EnvVarUpdate.nsh\"" install.nsi
+  - cp target\release\http.exe http-v1.9.1.exe
+  - strip --strip-all --remove-section=.comment --remove-section=.note http-v1.9.1.exe
+  - makensis -DHTTP_VERSION=v1.9.1 install.nsi
 
 test: off
 test_script:
   - cargo test --verbose --release
 
 artifacts:
-  - path: http-v1.9.0.exe
-  - path: http v1.9.0 installer.exe
+  - path: http-v1.9.1.exe
+  - path: http v1.9.1 installer.exe
 
 deploy:
   provider: GitHub
-  artifact: /http.*v1.9.0.*\.exe/
+  artifact: /http.*v1.9.1.*\.exe/
   auth_token:
     secure: ZTXvCrv9y01s7Hd60w8W7NaouPnPoaw9YJt9WhWQ2Pep8HLvCikt9Exjkz8SGP9P
   on:
diff --git a/http.md b/http.md
index 75edbcd..dc20ed5 100644
--- a/http.md
+++ b/http.md
@@ -255,7 +255,7 @@ pass parameters like what port to use.
 
   `http -a 192.168.65.1`
 
-    As in the first example, but listen on address 192.168.65.21.
+    As in the first example, but listen on address 192.168.65.1.
 
     Assuming the address can be used, example output change:
       Hosting "." on port 8000 under address 192.168.65.1 without TLS and no authentication...
diff --git a/install.nsi b/install.nsi
index d3cc702..492334f 100644
--- a/install.nsi
+++ b/install.nsi
@@ -12,12 +12,19 @@ Section
 SectionEnd
 
 Section "Update PATH"
-  ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$PROGRAMFILES\http"
+  EnVar::SetHKLM
+  EnVar::AddValue "PATH" "$PROGRAMFILES\http"
+  Pop $0
+  DetailPrint "Adding $PROGRAMFILES\http to %PATH%: $0"
 SectionEnd
 
 Section "Uninstall"
   Delete "$INSTDIR\uninstall http ${HTTP_VERSION}.exe"
   Delete "$INSTDIR\http.exe"
   Delete "$INSTDIR"
-  ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$PROGRAMFILES\http"
+
+  EnVar::SetHKLM
+  EnVar::DeleteValue "PATH" "$PROGRAMFILES\http"
+  Pop $0
+  DetailPrint "deleting $PROGRAMFILES\http from %PATH%: $0"
 SectionEnd


Test patch: