From: Zwixx Date: Wed, 26 May 2021 15:47:17 +0000 (+0200) Subject: Add this into the install/uninstall and reindex of the service too X-Git-Tag: v1.9.2~29^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=879ef53a94f23927a7ce3e8d5c05ac3731e37e79;p=gitblit.git Add this into the install/uninstall and reindex of the service too --- diff --git a/src/main/distrib/win/installService.cmd b/src/main/distrib/win/installService.cmd index ef2ba2d0..532c63cd 100644 --- a/src/main/distrib/win/installService.cmd +++ b/src/main/distrib/win/installService.cmd @@ -11,28 +11,31 @@ @REM arch = x86, amd64, or ia32 SET ARCH=amd64 +@SET gbhome=%~dp0 +@SET gbhome=%gbhome:~0,-1% + @REM Be careful not to introduce trailing whitespace after the ^ characters. @REM Use ; or # to separate values in the --StartParams parameter. -"%CD%\%ARCH%\gitblit.exe" //IS//gitblit ^ +"%gbhome%\%ARCH%\gitblit.exe" //IS//gitblit ^ --DisplayName="gitblit" ^ --Description="a pure Java Git solution" ^ --Startup=auto ^ - --LogPath="%CD%\logs" ^ + --LogPath="%gbhome%\logs" ^ --LogLevel=INFO ^ --LogPrefix=gitblit ^ --StdOutput=auto ^ --StdError=auto ^ - --StartPath="%CD%" ^ + --StartPath="%gbhome%" ^ --StartClass=com.gitblit.GitBlitServer ^ --StartMethod=main ^ - --StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^ + --StartParams="--storePassword;gitblit;--baseFolder;%gbhome%\data" ^ --StartMode=jvm ^ - --StopPath="%CD%" ^ + --StopPath="%gbhome%" ^ --StopClass=com.gitblit.GitBlitServer ^ --StopMethod=main ^ - --StopParams="--stop;--baseFolder;%CD%\data" ^ + --StopParams="--stop;--baseFolder;%gbhome%\data" ^ --StopMode=jvm ^ - --Classpath="%CD%\gitblit.jar;%CD%\ext\*" ^ + --Classpath="%gbhome%\gitblit.jar;%gbhome%\ext\*" ^ --Jvm=auto ^ --JvmMx=1024 \ No newline at end of file diff --git a/src/main/distrib/win/reindex-tickets.cmd b/src/main/distrib/win/reindex-tickets.cmd index c9116ca2..a2226d86 100644 --- a/src/main/distrib/win/reindex-tickets.cmd +++ b/src/main/distrib/win/reindex-tickets.cmd @@ -10,7 +10,7 @@ @REM -------------------------------------------------------------------------- @if [%1]==[] goto nobasefolder -@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.ReindexTickets --baseFolder %1 +@java -cp "%~dp0gitblit.jar";"%~dp0ext\*" com.gitblit.ReindexTickets --baseFolder %1 @goto end :nobasefolder diff --git a/src/main/distrib/win/uninstallService.cmd b/src/main/distrib/win/uninstallService.cmd index e6c3b98c..a32007e8 100644 --- a/src/main/distrib/win/uninstallService.cmd +++ b/src/main/distrib/win/uninstallService.cmd @@ -1,5 +1,6 @@ + @REM arch = x86, amd64, or ia32 SET ARCH=amd64 @REM Delete the gitblit service -"%CD%\%ARCH%\gitblit.exe" //DS//gitblit \ No newline at end of file +"%~dp0%ARCH%\gitblit.exe" //DS//gitblit