1@echo off
2
3rem count # of args
4set argC=0
5for %%x in (%*) do Set /A argC+=1
6
7if not "%argC%"=="3" (
8    echo usage: %~nx0 ^<storagenode.exe input path^> ^<storagenode-updater.exe input path^> ^<msi output path^>
9    exit /B 1
10)
11
12rem copy the storagenode binaries to the installer project
13copy %1 installer\windows\storagenode.exe
14copy %2 installer\windows\storagenode-updater.exe
15
16rem install NuGet packages
17nuget install installer\windows\StorjTests\packages.config -o installer\windows\packages
18
19rem build the installer
20msbuild installer\windows\windows.sln /t:Build /p:Configuration=Release
21
22rem cleanup copied binaries
23del installer\windows\storagenode.exe
24del installer\windows\storagenode-updater.exe
25
26rem copy the MSI to the release dir
27copy installer\windows\bin\Release\storagenode.msi %3
28