mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 15:39:36 -05:00
Install tor if needed
This commit is contained in:
parent
03b4c69ae9
commit
a2ebf0b715
@ -20,6 +20,11 @@ if errorlevel 1 goto error_env
|
|||||||
if not "%ParamNoupdate%"=="1" (
|
if not "%ParamNoupdate%"=="1" (
|
||||||
:: Install ntldd
|
:: Install ntldd
|
||||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-ntldd-git"
|
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-ntldd-git"
|
||||||
|
|
||||||
|
:: Install tor
|
||||||
|
if "%ParamTor%"=="1" (
|
||||||
|
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-tor"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Remove deploy path
|
:: Remove deploy path
|
||||||
@ -55,14 +60,6 @@ set RsDate=
|
|||||||
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
||||||
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
||||||
|
|
||||||
if "%ParamTor%"=="1" (
|
|
||||||
:: Check for tor executable
|
|
||||||
if not exist "%EnvDownloadPath%\tor\Tor\tor.exe" (
|
|
||||||
%cecho% error "Tor binary not found. Please download Tor Expert Bundle from\nhttps://www.torproject.org/download/download.html.en\nand unpack to\n%EnvDownloadPath:\=\\%\\tor"
|
|
||||||
goto error
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
set QtMainVersion=%QtVersion:~0,1%
|
set QtMainVersion=%QtVersion:~0,1%
|
||||||
set QtSharePath=%RsMinGWPath%\share\qt%QtMainVersion%\
|
set QtSharePath=%RsMinGWPath%\share\qt%QtMainVersion%\
|
||||||
|
|
||||||
@ -124,7 +121,7 @@ if "%QtMainVersion%"=="5" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
||||||
echo Copy styles
|
echo copy styles
|
||||||
mkdir "%RsDeployPath%\styles" %Quite%
|
mkdir "%RsDeployPath%\styles" %Quite%
|
||||||
copy "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" "%RsDeployPath%\styles" %Quite%
|
copy "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" "%RsDeployPath%\styles" %Quite%
|
||||||
)
|
)
|
||||||
@ -132,6 +129,12 @@ if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
|||||||
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
||||||
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
||||||
|
|
||||||
|
if "%ParamTor%"=="1" (
|
||||||
|
echo copy tor
|
||||||
|
copy "%RsMinGWPath%\bin\tor.exe" "%RsDeployPath%" %Quite%
|
||||||
|
copy "%RsMinGWPath%\bin\tor-gencert.exe" "%RsDeployPath%" %Quite%
|
||||||
|
)
|
||||||
|
|
||||||
echo copy dependencies
|
echo copy dependencies
|
||||||
for /R "%RsDeployPath%" %%D in (*.dll, *.exe) do (
|
for /R "%RsDeployPath%" %%D in (*.dll, *.exe) do (
|
||||||
call :copy_dependencies "%%D" "%RsDeployPath%"
|
call :copy_dependencies "%%D" "%RsDeployPath%"
|
||||||
@ -183,11 +186,6 @@ if "%ParamWebui%"=="1" (
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%ParamTor%"=="1" (
|
|
||||||
echo copy tor
|
|
||||||
echo n | copy /-y "%EnvDownloadPath%\tor\Tor\*.*" "%RsDeployPath%" %Quite%
|
|
||||||
)
|
|
||||||
|
|
||||||
rem pack files
|
rem pack files
|
||||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
||||||
|
|
||||||
|
@ -50,6 +50,14 @@
|
|||||||
# Date
|
# Date
|
||||||
!define /date Date "%Y%m%d"
|
!define /date Date "%Y%m%d"
|
||||||
|
|
||||||
|
# Detect tor
|
||||||
|
${!defineifexist} TOR_EXISTS "${DEPLOYDIR}\tor.exe"
|
||||||
|
!ifdef TOR_EXISTS
|
||||||
|
!define RSTYPE "-tor"
|
||||||
|
!else
|
||||||
|
!define RSTYPE ""
|
||||||
|
!endif
|
||||||
|
|
||||||
# Application name and version
|
# Application name and version
|
||||||
!define APPNAME "RetroShare"
|
!define APPNAME "RetroShare"
|
||||||
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
||||||
@ -64,7 +72,7 @@
|
|||||||
# Main Install settings
|
# Main Install settings
|
||||||
Name "${APPNAMEANDVERSION}"
|
Name "${APPNAMEANDVERSION}"
|
||||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
||||||
OutFile "${OUTDIR_}RetroShare-${VERSION}-${Date}-${REVISION}-${ARCHITECTURE}${INSTALLERADD}-setup.exe"
|
OutFile "${OUTDIR_}RetroShare-${VERSION}-${Date}-${REVISION}-${ARCHITECTURE}${RSTYPE}${INSTALLERADD}-setup.exe"
|
||||||
BrandingText "${APPNAMEANDVERSION}"
|
BrandingText "${APPNAMEANDVERSION}"
|
||||||
RequestExecutionlevel highest
|
RequestExecutionlevel highest
|
||||||
# Use compression
|
# Use compression
|
||||||
|
Loading…
Reference in New Issue
Block a user