From 87b3b044b817eec750f7f3581609cf382b63f1a8 Mon Sep 17 00:00:00 2001 From: Maxime Vanza Date: Mon, 6 Apr 2020 11:32:04 +0000 Subject: [PATCH] [ICIJ/datashare#360] remove powershell launcher and use batch instead to avoid additionnal actions from user to run as admin --- windows/datashareStandalone.bat | 4 +++- windows/datashareStandalone.ps1 | 9 --------- windows/installDatashareStandalone.nsi | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100755 windows/datashareStandalone.ps1 diff --git a/windows/datashareStandalone.bat b/windows/datashareStandalone.bat index 74a8294..cc1359e 100755 --- a/windows/datashareStandalone.bat +++ b/windows/datashareStandalone.bat @@ -1,3 +1,5 @@ @echo off -powershell -noexit "& "".\\datashareStandalone.ps1 ${VERSION}""" +cd %APPDATA%\Datashare # needed for /dist + +java -cp "dist;\Program Files\Datashare-${VERSION}\Datashare-${VERSION}-all.jar" -DPROD_MODE=true org.icij.datashare.Main -d %APPDATA\Datashare\data --queueType memory --busType memory --dataSourceUrl jdbc:sqlite:file:%APPDATA%\Datashare\dist\datashare.db --configFile %APPDATA%\Datashare\dist\datashare.conf --mode EMBEDDED --elasticsearchDataPath %APPDATA%\Datashare\index diff --git a/windows/datashareStandalone.ps1 b/windows/datashareStandalone.ps1 deleted file mode 100755 index 657875b..0000000 --- a/windows/datashareStandalone.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$VERSION=$args[0] - -cd $Env:APPDATA\Datashare # needed for /dist - -java -cp "dist;\Program Files\Datashare-$VERSION\Datashare-$VERSION-all.jar" -DPROD_MODE=true org.icij.datashare.Main ` - -d $Env:APPDATA\Datashare\data --queueType memory --busType memory ` - --dataSourceUrl jdbc:sqlite:file:$Env:APPDATA\Datashare\dist\datashare.db ` - --configFile $Env:APPDATA\Datashare\dist\datashare.conf --mode EMBEDDED ` - --elasticsearchDataPath $Env:APPDATA\Datashare\index diff --git a/windows/installDatashareStandalone.nsi b/windows/installDatashareStandalone.nsi index c883c65..981fcf1 100644 --- a/windows/installDatashareStandalone.nsi +++ b/windows/installDatashareStandalone.nsi @@ -53,7 +53,6 @@ Function InstallDatashare exch $R0 SetOutPath "$INSTDIR" File "datashare.ico" - File "datashareStandalone.ps1" File /oname=datashareStandalone.bat "dist/datashareStandalone.bat" # Start Menu