image: Visual Studio 2017
environment:
  nodejs_version: 10
  pfx_secret:
    secure: S/Mj90+79mE3WTzcInLLI9L5Dpq25dagZUJ4FuVUZH1phPYvveBdDYKBVoL2nCqtlpVMhm22iv/meRCVptVtSg==
install:
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- cmd: >-
    appveyor-tools\secure-file -decrypt native\windows\signcertfile.pfx.enc -out signcertfile.pfx -secret %pfx_secret%

    powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311.exe', 'wix311.exe')"

    wix311.exe /install /quiet /norestart

    npm i
build_script:
- cmd: >-
    npm run win32

    copy native\windows\BlockstackSetup\bin\Release\en-us\BlockstackSetup.msi .\

    powershell -Command "& @((Resolve-Path -Path '%ProgramFiles(x86)%\Windows Kits\10\bin\10*\x86\signtool.exe').Path)[0] sign /n Blockstack /f signcertfile.pfx BlockstackSetup.msi"
artifacts:
- path: BlockstackSetup.msi
image: Visual Studio 2017
environment:
  nodejs_version: 10
  pfx_secret:
    secure: S/Mj90+79mE3WTzcInLLI9L5Dpq25dagZUJ4FuVUZH1phPYvveBdDYKBVoL2nCqtlpVMhm22iv/meRCVptVtSg==
install:
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- cmd: >-
    appveyor-tools\secure-file -decrypt native\windows\signcertfile.pfx.enc -out signcertfile.pfx -secret %pfx_secret%

    powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311.exe', 'wix311.exe')"

    wix311.exe /install /quiet /norestart

    npm i
build_script:
- cmd: >-
    npm run win32

    copy native\windows\BlockstackSetup\bin\Release\en-us\BlockstackSetup.msi .\

    powershell -Command "& @((Resolve-Path -Path '%ProgramFiles(x86)%\Windows Kits\10\bin\10*\x86\signtool.exe').Path)[0] sign /t http://timestamp.verisign.com/scripts/timstamp.dll /n Blockstack /f signcertfile.pfx BlockstackSetup.msi"
artifacts:
- path: BlockstackSetup.msi
Add timestamp arg to signtool
Add timestamp arg to signtool
