Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installer/windows: batch file improvements #3441

Merged
merged 16 commits into from
Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ node('node') {

unstash "storagenode-binaries"

bat 'installer\\windows\\build.bat'
bat 'installer\\windows\\buildrelease.bat'

stash name: "storagenode-installer", includes: "release/**/storagenode*.msi"

Expand Down
22 changes: 17 additions & 5 deletions installer/windows/build.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
rem set the TAG env var from the release dir
for /f %%i in ('dir /B release') do set TAG=%%i
@echo off
mniewrzal marked this conversation as resolved.
Show resolved Hide resolved

rem count # of args
set argC=0
for %%x in (%*) do Set /A argC+=1

if not "%argC%"=="3" (
echo usage: %~nx0 ^<storagenode.exe input path^> ^<storagenode-updater.exe input path^> ^<msi output path^>
exit /B 1
)

rem copy the storagenode binaries to the installer project
copy release\%TAG%\storagenode_windows_amd64.exe installer\windows\storagenode.exe
copy release\%TAG%\storagenode-updater_windows_amd64.exe installer\windows\storagenode-updater.exe
copy %1 installer\windows\storagenode.exe
copy %2 installer\windows\storagenode-updater.exe

rem build the installer
msbuild installer\windows\windows.sln /t:Build /p:Configuration=Release

rem cleanup copied binaries
del installer\windows\storagenode.exe
del installer\windows\storagenode-updater.exe

rem copy the MSI to the release dir
copy installer\windows\bin\Release\storagenode.msi release\%TAG%\storagenode_windows_amd64.msi
copy installer\windows\bin\Release\storagenode.msi %3
6 changes: 6 additions & 0 deletions installer/windows/buildrelease.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off

rem build msi installer for each release directory
for /d %%d in (release\*) do (
call %~dp0build.bat %%d\storagenode_windows_amd64.exe %%d\storagenode-updater_windows_amd64.exe %%d\storagenode_windows_amd64.msi
)
17 changes: 17 additions & 0 deletions installer/windows/install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@echo off

rem count # of args
set argC=0
for %%x in (%*) do Set /A argC+=1

if not "%argC%"=="1" (
echo usage: %~nx0 ^<msi path^>
exit /B 1
)

rem uninstall existing storagenode product
echo uninstalling storagenode
msiexec /uninstall %1

echo installing storagenode from %1
msiexec /i %1 /passive /qb /norestart /log %~dp1install.log STORJ_WALLET="0x0000000000000000000000000000000000000000" STORJ_EMAIL="user@mail.example" STORJ_PUBLIC_ADDRESS="127.0.0.1:10000"
7 changes: 7 additions & 0 deletions installer/windows/installrelease.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

rem NB: only installs from *first* release directory
bryanchriswhite marked this conversation as resolved.
Show resolved Hide resolved
for /d %%d in (release\*) do (
call %~dp0install.bat %%d\storagenode_windows_amd64.msi
goto :EOF
)