mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Windows build environment
- Use date of last git commit instead of current date for filename - Added download of Tor installation - Added section Tor to installer
This commit is contained in:
parent
38bdbdfdca
commit
d38e7d2e70
18 changed files with 135 additions and 36 deletions
|
@ -22,6 +22,8 @@ set CMakeVersion=cmake-3.1.0-win32-x86
|
|||
set CMakeInstall=%CMakeVersion%.zip
|
||||
set CMakeUrl=http://www.cmake.org/files/v3.1/%CMakeInstall%
|
||||
set CMakeInstallPath=%EnvToolsPath%\cmake
|
||||
set TorProjectUrl=https://www.torproject.org
|
||||
set TorDownloadIndexUrl=%TorProjectUrl%/download/tor
|
||||
|
||||
if not exist "%EnvToolsPath%\7z.exe" (
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
|
@ -170,10 +172,33 @@ if not exist "%CMakeInstallPath%\bin\cmake.exe" (
|
|||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
)
|
||||
|
||||
rem Tor
|
||||
rem Get download link and filename from download page
|
||||
mkdir "%EnvTempPath%"
|
||||
call "%ToolsPath%\download-file.bat" "%TorDownloadIndexUrl%" "%EnvTempPath%\index.html"
|
||||
if not exist "%EnvTempPath%\index.html" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
for /F "tokens=1,2 delims= " %%A in ('%EnvSedExe% -r -n -e"s/.*href=\"^(.*^)^(tor-win32.*\.zip^)\".*/\2 \1\2/p" "%EnvTempPath%\index.html"') do set TorInstall=%%A& set TorDownloadUrl=%TorProjectUrl%%%B
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
if "%TorInstall%"=="" %cecho% error "Cannot download Tor installation" & goto error
|
||||
if "%TorDownloadUrl%"=="" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
if not exist "%EnvDownloadPath%\%TorInstall%" call "%ToolsPath%\remove-dir.bat" "%EnvTorPath%"
|
||||
if not exist "%EnvTorPath%\Tor\tor.exe" (
|
||||
%cecho% info "Download Tor installation"
|
||||
|
||||
if not exist "%EnvDownloadPath%\%TorInstall%" call "%ToolsPath%\download-file.bat" "%TorDownloadUrl%" "%EnvDownloadPath%\%TorInstall%"
|
||||
if not exist "%EnvDownloadPath%\%TorInstall%" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Tor"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTorPath%" "%EnvDownloadPath%\%TorInstall%"
|
||||
)
|
||||
|
||||
:exit
|
||||
endlocal
|
||||
exit /B 0
|
||||
|
||||
:error
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
endlocal
|
||||
exit /B 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue