mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
81a7d5a365
Winhhtpjs triggered some antivirus software Use powershell for downloads
50 lines
1.6 KiB
Batchfile
50 lines
1.6 KiB
Batchfile
setlocal
|
|
|
|
if "%EnvRootPath%"=="" exit /B 1
|
|
|
|
set CEchoUrl=https://github.com/lordmulder/cecho/releases/download/2015-10-10/cecho.2015-10-10.zip
|
|
set CEchoInstall=cecho.2015-10-10.zip
|
|
set SevenZipUrl=https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805.msi/download
|
|
set SevenZipInstall=7z1805.msi
|
|
|
|
if not exist "%EnvToolsPath%\7z.exe" (
|
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
|
mkdir "%EnvTempPath%"
|
|
|
|
echo Download 7z installation
|
|
|
|
if not exist "%EnvDownloadPath%\%SevenZipInstall%" call "%ToolsPath%\download-file.bat" "%SevenZipUrl%" "%EnvDownloadPath%\%SevenZipInstall%"
|
|
if not exist "%EnvDownloadPath%\%SevenZipInstall%" echo Cannot download 7z installation& goto error
|
|
|
|
echo Unpack 7z
|
|
msiexec /a "%EnvDownloadPath%\%SevenZipInstall%" /qb TARGETDIR="%EnvTempPath%"
|
|
copy "%EnvTempPath%\Files\7-Zip\7z.dll" "%EnvToolsPath%"
|
|
copy "%EnvTempPath%\Files\7-Zip\7z.exe" "%EnvToolsPath%"
|
|
|
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
|
)
|
|
|
|
if not exist "%EnvToolsPath%\cecho.exe" (
|
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
|
mkdir "%EnvTempPath%"
|
|
|
|
echo Download cecho installation
|
|
|
|
if not exist "%EnvDownloadPath%\%CEchoInstall%" call "%ToolsPath%\download-file.bat" "%CEchoUrl%" "%EnvDownloadPath%\%CEchoInstall%"
|
|
if not exist "%EnvDownloadPath%\%cCEhoInstall%" echo Cannot download cecho installation& goto error
|
|
|
|
echo Unpack cecho
|
|
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%"
|
|
copy "%EnvTempPath%\cecho.exe" "%EnvToolsPath%"
|
|
|
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
|
)
|
|
|
|
:exit
|
|
endlocal
|
|
exit /B 0
|
|
|
|
:error
|
|
endlocal
|
|
exit /B 1
|