mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 15:39:36 -05:00
Modified Windows Build Environment
- Removed commandline switch "version" - Added MinGit for determining version information during compile process - Added sigcheck to determine version of the executable
This commit is contained in:
parent
c7563f1efd
commit
617ed25a19
@ -1,23 +1,23 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
%cecho% info "Build %SourceName%"
|
%cecho% info "Build %SourceName%"
|
||||||
call "%~dp0build\build.bat" 32 release tor version autologin plugins
|
call "%~dp0build\build.bat" 32 release tor autologin plugins
|
||||||
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Pack %SourceName%"
|
%cecho% info "Pack %SourceName%"
|
||||||
call "%~dp0build\pack.bat" 32 release tor
|
call "%~dp0build\pack.bat" 32 release tor
|
||||||
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
%cecho% info "Build %SourceName%"
|
%cecho% info "Build %SourceName%"
|
||||||
call "%~dp0build\build.bat" 32 release version autologin plugins
|
call "%~dp0build\build.bat" 32 release autologin plugins
|
||||||
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Pack %SourceName%"
|
%cecho% info "Pack %SourceName%"
|
||||||
call "%~dp0build\pack.bat" 32 release
|
call "%~dp0build\pack.bat" 32 release
|
||||||
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,81 +1,79 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env-msys2.bat"
|
call "%EnvPath%\env-msys2.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Initialize base environment
|
:: Initialize base environment
|
||||||
call "%~dp0env-base.bat" %*
|
call "%~dp0env-base.bat" %*
|
||||||
if errorlevel 2 exit /B 2
|
if errorlevel 2 exit /B 2
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Install needed things
|
:: Install needed things
|
||||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core"
|
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core"
|
||||||
|
|
||||||
:: Plugins
|
:: Plugins
|
||||||
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat" %*
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 2 exit /B 2
|
if errorlevel 2 exit /B 2
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo === Version
|
echo === Version
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
title Build - %SourceName%-%RsBuildConfig% [Version]
|
title Build - %SourceName%-%RsBuildConfig% [Version]
|
||||||
|
|
||||||
pushd "%SourcePath%\retroshare-gui\src\gui\images"
|
pushd "%SourcePath%\retroshare-gui\src\gui\images"
|
||||||
:: Touch resource file
|
:: Touch resource file
|
||||||
copy /b retroshare_win.rc +,,
|
copy /b retroshare_win.rc +,,
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if not exist "%RsBuildPath%" mkdir "%RsBuildPath%"
|
if not exist "%RsBuildPath%" mkdir "%RsBuildPath%"
|
||||||
pushd "%RsBuildPath%"
|
pushd "%RsBuildPath%"
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo === qmake
|
echo === qmake
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
title Build - %SourceName%-%RsBuildConfig% [qmake]
|
title Build - %SourceName%-%RsBuildConfig% [qmake]
|
||||||
|
|
||||||
set RS_QMAKE_CONFIG="CONFIG+=%RsBuildConfig%"
|
set RS_QMAKE_CONFIG="CONFIG+=%RsBuildConfig%"
|
||||||
if "%ParamVersion%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=version_detail_bash_script"
|
if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_autologin"
|
||||||
if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_autologin"
|
if "%ParamPlugins%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=retroshare_plugins"
|
||||||
if "%ParamPlugins%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=retroshare_plugins"
|
|
||||||
if "%ParamRetroTor%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=retrotor"
|
call "%ToolsPath%\msys2-path.bat" "%SourcePath%" MSYS2SourcePath
|
||||||
|
call "%ToolsPath%\msys2-path.bat" "%EnvMSYS2Path%" MSYS2EnvMSYS2Path
|
||||||
call "%ToolsPath%\msys2-path.bat" "%SourcePath%" MSYS2SourcePath
|
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-g++ %RS_QMAKE_CONFIG%"
|
||||||
call "%ToolsPath%\msys2-path.bat" "%EnvMSYS2Path%" MSYS2EnvMSYS2Path
|
if errorlevel 1 goto error
|
||||||
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-g++ %RS_QMAKE_CONFIG%"
|
|
||||||
if errorlevel 1 goto error
|
echo.
|
||||||
|
echo === make
|
||||||
echo.
|
echo.
|
||||||
echo === make
|
|
||||||
echo.
|
title Build - %SourceName%-%RsBuildConfig% [make]
|
||||||
|
|
||||||
title Build - %SourceName%-%RsBuildConfig% [make]
|
%EnvMSYS2Cmd% "make -j 4"
|
||||||
|
|
||||||
%EnvMSYS2Cmd% "make -j 4"
|
:error
|
||||||
|
popd
|
||||||
:error
|
|
||||||
popd
|
title %COMSPEC%
|
||||||
|
|
||||||
title %COMSPEC%
|
if errorlevel 1 echo.& echo Build failed& echo.
|
||||||
|
exit /B %ERRORLEVEL%
|
||||||
if errorlevel 1 echo.& echo Build failed& echo.
|
|
||||||
exit /B %ERRORLEVEL%
|
:error_env
|
||||||
|
echo Failed to initialize environment.
|
||||||
:error_env
|
endlocal
|
||||||
echo Failed to initialize environment.
|
exit /B 1
|
||||||
endlocal
|
|
||||||
exit /B 1
|
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env-msys2.bat"
|
call "%EnvPath%\env-msys2.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
call "%~dp0env.bat" %*
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 2 exit /B 2
|
if errorlevel 2 exit /B 2
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
if not exist "%RsBuildPath%" exit /B 0
|
if not exist "%RsBuildPath%" exit /B 0
|
||||||
call "%ToolsPath%\remove-dir.bat" "%RsBuildPath%"
|
call "%ToolsPath%\remove-dir.bat" "%RsBuildPath%"
|
||||||
|
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,97 +1,93 @@
|
|||||||
:: Process commandline parameter
|
:: Process commandline parameter
|
||||||
set Param32=0
|
set Param32=0
|
||||||
set Param64=0
|
set Param64=0
|
||||||
set ParamRelease=0
|
set ParamRelease=0
|
||||||
set ParamDebug=0
|
set ParamDebug=0
|
||||||
set ParamVersion=0
|
set ParamAutologin=0
|
||||||
set ParamAutologin=0
|
set ParamPlugins=0
|
||||||
set ParamPlugins=0
|
set ParamTor=0
|
||||||
set ParamTor=0
|
|
||||||
|
:parameter_loop
|
||||||
:parameter_loop
|
if "%~1" NEQ "" (
|
||||||
if "%~1" NEQ "" (
|
for /f "tokens=1,2 delims==" %%a in ("%~1") do (
|
||||||
for /f "tokens=1,2 delims==" %%a in ("%~1") do (
|
if "%%~a"=="32" (
|
||||||
if "%%~a"=="32" (
|
set Param32=1
|
||||||
set Param32=1
|
) else if "%%~a"=="64" (
|
||||||
) else if "%%~a"=="64" (
|
set Param64=1
|
||||||
set Param64=1
|
) else if "%%~a"=="release" (
|
||||||
) else if "%%~a"=="release" (
|
set ParamRelease=1
|
||||||
set ParamRelease=1
|
) else if "%%~a"=="debug" (
|
||||||
) else if "%%~a"=="debug" (
|
set ParamDebug=1
|
||||||
set ParamDebug=1
|
) else if "%%~a"=="autologin" (
|
||||||
) else if "%%~a"=="version" (
|
set ParamAutologin=1
|
||||||
set ParamVersion=1
|
) else if "%%~a"=="plugins" (
|
||||||
) else if "%%~a"=="autologin" (
|
set ParamPlugins=1
|
||||||
set ParamAutologin=1
|
) else if "%%~a"=="tor" (
|
||||||
) else if "%%~a"=="plugins" (
|
set ParamTor=1
|
||||||
set ParamPlugins=1
|
) else (
|
||||||
) else if "%%~a"=="tor" (
|
echo.
|
||||||
set ParamTor=1
|
echo Unknown parameter %1
|
||||||
) else (
|
goto :usage
|
||||||
echo.
|
)
|
||||||
echo Unknown parameter %1
|
)
|
||||||
goto :usage
|
shift /1
|
||||||
)
|
goto parameter_loop
|
||||||
)
|
)
|
||||||
shift /1
|
|
||||||
goto parameter_loop
|
if "%Param32%"=="1" (
|
||||||
)
|
if "%Param64%"=="1" (
|
||||||
|
echo.
|
||||||
if "%Param32%"=="1" (
|
echo 32-bit or 64-bit?
|
||||||
if "%Param64%"=="1" (
|
goto :usage
|
||||||
echo.
|
)
|
||||||
echo 32-bit or 64-bit?
|
|
||||||
goto :usage
|
set RsBit=32
|
||||||
)
|
set RsArchitecture=x86
|
||||||
|
set RsMSYS2Architecture=i686
|
||||||
set RsBit=32
|
)
|
||||||
set RsArchitecture=x86
|
|
||||||
set RsMSYS2Architecture=i686
|
if "%Param64%"=="1" (
|
||||||
)
|
set RsBit=64
|
||||||
|
set RsArchitecture=x64
|
||||||
if "%Param64%"=="1" (
|
set RsMSYS2Architecture=x86_64
|
||||||
set RsBit=64
|
)
|
||||||
set RsArchitecture=x64
|
|
||||||
set RsMSYS2Architecture=x86_64
|
if "%RsBit%"=="" goto :usage
|
||||||
)
|
|
||||||
|
if "%ParamRelease%"=="1" (
|
||||||
if "%RsBit%"=="" goto :usage
|
if "%ParamDebug%"=="1" (
|
||||||
|
echo.
|
||||||
if "%ParamRelease%"=="1" (
|
echo Release or Debug?
|
||||||
if "%ParamDebug%"=="1" (
|
goto :usage
|
||||||
echo.
|
)
|
||||||
echo Release or Debug?
|
|
||||||
goto :usage
|
set RsBuildConfig=release
|
||||||
)
|
) else if "%ParamDebug%"=="1" (
|
||||||
|
set RsBuildConfig=debug
|
||||||
set RsBuildConfig=release
|
) else goto :usage
|
||||||
) else if "%ParamDebug%"=="1" (
|
|
||||||
set RsBuildConfig=debug
|
if "%ParamTor%"=="1" (
|
||||||
) else goto :usage
|
set RsType=-tor
|
||||||
|
) else (
|
||||||
if "%ParamTor%"=="1" (
|
set RsType=
|
||||||
set RsType=-tor
|
)
|
||||||
) else (
|
|
||||||
set RsType=
|
|
||||||
)
|
exit /B 0
|
||||||
|
|
||||||
|
:usage
|
||||||
exit /B 0
|
echo.
|
||||||
|
echo Usage: 32^|64 release^|debug [version autologin plugins]
|
||||||
:usage
|
echo.
|
||||||
echo.
|
echo Mandatory parameter
|
||||||
echo Usage: 32^|64 release^|debug [version autologin plugins]
|
echo 32^|64 32-bit or 64-bit Version
|
||||||
echo.
|
echo release^|debug Build release or debug version
|
||||||
echo Mandatory parameter
|
echo.
|
||||||
echo 32^|64 32-bit or 64-bit Version
|
echo Optional parameter (need clean when changed)
|
||||||
echo release^|debug Build release or debug version
|
echo autologin Build with autologin
|
||||||
echo.
|
echo plugins Build plugins
|
||||||
echo Optional parameter (need clean when changed)
|
echo.
|
||||||
echo version Create version information from git
|
echo Parameter for pack
|
||||||
echo autologin Build with autologin
|
echo tor Pack tor version
|
||||||
echo plugins Build plugins
|
echo.
|
||||||
echo.
|
exit /B 2
|
||||||
echo Parameter for pack
|
|
||||||
echo tor Pack tor version
|
|
||||||
echo.
|
|
||||||
exit /B 2
|
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
call "%~dp0env-base.bat" %*
|
call "%~dp0env-base.bat" %*
|
||||||
if errorlevel 2 exit /B 2
|
if errorlevel 2 exit /B 2
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
set MSYSTEM=MINGW%RsBit%
|
set MSYSTEM=MINGW%RsBit%
|
||||||
|
|
||||||
set BuildPath=%EnvRootPath%\builds
|
set BuildPath=%EnvRootPath%\builds
|
||||||
set DeployPath=%EnvRootPath%\deploy
|
set DeployPath=%EnvRootPath%\deploy
|
||||||
|
|
||||||
if not exist "%BuildPath%" mkdir "%BuildPath%"
|
if not exist "%BuildPath%" mkdir "%BuildPath%"
|
||||||
if not exist "%DeployPath%" mkdir "%DeployPath%"
|
if not exist "%DeployPath%" mkdir "%DeployPath%"
|
||||||
|
|
||||||
:: Get Qt version
|
:: Get Qt version
|
||||||
call "%ToolsPath%\get-qt-version.bat" QtVersion
|
call "%ToolsPath%\get-qt-version.bat" QtVersion
|
||||||
if "%QtVersion%"=="" %cecho% error "Cannot get Qt version." & exit /B 1
|
if "%QtVersion%"=="" %cecho% error "Cannot get Qt version." & exit /B 1
|
||||||
|
|
||||||
set RsMinGWPath=%EnvMSYS2BasePath%\mingw%RsBit%
|
set RsMinGWPath=%EnvMSYS2BasePath%\mingw%RsBit%
|
||||||
|
|
||||||
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsArchitecture%-%RsBuildConfig%
|
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsArchitecture%-%RsBuildConfig%
|
||||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsArchitecture%-%RsBuildConfig%
|
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsArchitecture%-%RsBuildConfig%
|
||||||
set RsPackPath=%DeployPath%
|
set RsPackPath=%DeployPath%
|
||||||
set RsArchiveAdd=
|
set RsArchiveAdd=
|
||||||
|
|
||||||
if not exist "%~dp0env-mod.bat" goto no_mod
|
if not exist "%~dp0env-mod.bat" goto no_mod
|
||||||
call "%~dp0env-mod.bat"
|
call "%~dp0env-mod.bat"
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
:no_mod
|
:no_mod
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
@ -1,118 +1,118 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set NoAsk=
|
set NoAsk=
|
||||||
if "%~2"=="no-ask" set NoAsk=1
|
if "%~2"=="no-ask" set NoAsk=1
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env-msys2.bat"
|
call "%EnvPath%\env-msys2.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
call "%~dp0env.bat" %*
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 2 exit /B 2
|
if errorlevel 2 exit /B 2
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Check git executable
|
:: Check git executable
|
||||||
set GitPath=
|
set GitPath=
|
||||||
call "%ToolsPath%\find-in-path.bat" GitPath git.exe
|
call "%ToolsPath%\find-in-path.bat" GitPath git.exe
|
||||||
if "%GitPath%"=="" echo Git executable not found in PATH.& exit /B 1
|
if "%GitPath%"=="" echo Git executable not found in PATH.& exit /B 1
|
||||||
|
|
||||||
:: Get compiled revision
|
:: Get compiled revision
|
||||||
set GetRsVersion=%SourcePath%\build_scripts\Windows\tools\get-rs-version.bat
|
set GetRsVersion=%SourcePath%\build_scripts\Windows\tools\get-rs-version.bat
|
||||||
if not exist "%GetRsVersion%" (
|
if not exist "%GetRsVersion%" (
|
||||||
echo File not found
|
echo File not found
|
||||||
echo %GetRsVersion%
|
echo %GetRsVersion%
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_REVISION_STRING RsRevision
|
call "%GetRsVersion%" RS_REVISION_STRING RsRevision
|
||||||
if "%RsRevision%"=="" echo Revision not found.& exit /B 1
|
if "%RsRevision%"=="" echo Revision not found.& exit /B 1
|
||||||
|
|
||||||
:: Get compiled version
|
:: Get compiled version
|
||||||
call "%GetRsVersion%" RS_REVISION_STRING RsRevision
|
call "%GetRsVersion%" RS_REVISION_STRING RsRevision
|
||||||
if "%RsRevision%"=="" echo Revision not found.& exit /B 1
|
if "%RsRevision%"=="" echo Revision not found.& exit /B 1
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_MAJOR_VERSION RsMajorVersion
|
call "%GetRsVersion%" RS_MAJOR_VERSION RsMajorVersion
|
||||||
if "%RsMajorVersion%"=="" echo Major version not found.& exit /B 1
|
if "%RsMajorVersion%"=="" echo Major version not found.& exit /B 1
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_MINOR_VERSION RsMinorVersion
|
call "%GetRsVersion%" RS_MINOR_VERSION RsMinorVersion
|
||||||
if "%RsMinorVersion%"=="" echo Minor version not found.& exit /B 1
|
if "%RsMinorVersion%"=="" echo Minor version not found.& exit /B 1
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_BUILD_NUMBER RsBuildNumber
|
call "%GetRsVersion%" RS_BUILD_NUMBER RsBuildNumber
|
||||||
if "%RsBuildNumber%"=="" echo Build number not found.& exit /B 1
|
if "%RsBuildNumber%"=="" echo Build number not found.& exit /B 1
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_BUILD_NUMBER_ADD RsBuildNumberAdd
|
call "%GetRsVersion%" RS_BUILD_NUMBER_ADD RsBuildNumberAdd
|
||||||
|
|
||||||
set RsVersion=%RsMajorVersion%.%RsMinorVersion%.%RsBuildNumber%%RsBuildNumberAdd%
|
set RsVersion=%RsMajorVersion%.%RsMinorVersion%.%RsBuildNumber%%RsBuildNumberAdd%
|
||||||
|
|
||||||
:: Check WMIC is available
|
:: Check WMIC is available
|
||||||
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& exit /B 1
|
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& exit /B 1
|
||||||
|
|
||||||
:: Use WMIC to retrieve date in format YYYYMMDD
|
:: Use WMIC to retrieve date in format YYYYMMDD
|
||||||
set RsDate=
|
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%
|
||||||
|
|
||||||
:: Get last revision
|
:: Get last revision
|
||||||
set RsLastRefFile=%BuildPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%-LastRef.txt
|
set RsLastRefFile=%BuildPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%-LastRef.txt
|
||||||
set RsLastRef=
|
set RsLastRef=
|
||||||
if exist "%RsLastRefFile%" set /P RsLastRef=<"%RsLastRefFile%"
|
if exist "%RsLastRefFile%" set /P RsLastRef=<"%RsLastRefFile%"
|
||||||
|
|
||||||
if "%NoAsk%"=="1" goto no_ask_for_last_revision
|
if "%NoAsk%"=="1" goto no_ask_for_last_revision
|
||||||
if not "%RsLastRef%"=="" echo Last Revision was %RsLastRef%
|
if not "%RsLastRef%"=="" echo Last Revision was %RsLastRef%
|
||||||
set /P RsLastRefInput=Last Revision:
|
set /P RsLastRefInput=Last Revision:
|
||||||
if "%RsLastRefInput%" NEQ "" set RsLastRef=%RsLastRefInput%
|
if "%RsLastRefInput%" NEQ "" set RsLastRef=%RsLastRefInput%
|
||||||
:no_ask_for_last_revision
|
:no_ask_for_last_revision
|
||||||
|
|
||||||
:: Get current revision
|
:: Get current revision
|
||||||
pushd "%SourcePath%"
|
pushd "%SourcePath%"
|
||||||
call "%ToolsPath%\get-git-ref.bat" RsRef
|
call "%ToolsPath%\get-git-ref.bat" RsRef
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if errorlevel 1 exit /B 1
|
if errorlevel 1 exit /B 1
|
||||||
if "%RsRef%"=="" echo Cannot get git revision.& exit /B 1
|
if "%RsRef%"=="" echo Cannot get git revision.& exit /B 1
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Creating log from %RsLastRef%
|
echo Creating log from %RsLastRef%
|
||||||
echo to %RsRef%
|
echo to %RsRef%
|
||||||
|
|
||||||
if "%NoAsk%"=="1" goto no_confirm
|
if "%NoAsk%"=="1" goto no_confirm
|
||||||
choice /M "Do you want to proceed?"
|
choice /M "Do you want to proceed?"
|
||||||
if %errorlevel%==2 exit /B 1
|
if %errorlevel%==2 exit /B 1
|
||||||
:no_confirm
|
:no_confirm
|
||||||
|
|
||||||
if "%RsBuildConfig%" NEQ "release" (
|
if "%RsBuildConfig%" NEQ "release" (
|
||||||
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%-msys2%RsArchiveAdd%-%RsBuildConfig%.txt
|
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%-msys2%RsArchiveAdd%-%RsBuildConfig%.txt
|
||||||
) else (
|
) else (
|
||||||
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%-msys2%RsArchiveAdd%.txt
|
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%-msys2%RsArchiveAdd%.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
title %SourceName%-%RsBuildConfig% [git log]
|
title %SourceName%-%RsBuildConfig% [git log]
|
||||||
|
|
||||||
pushd "%SourcePath%"
|
pushd "%SourcePath%"
|
||||||
if "%RsLastRef%"=="" (
|
if "%RsLastRef%"=="" (
|
||||||
git log %RsRef% >"%RsGitLog%"
|
git log %RsRef% >"%RsGitLog%"
|
||||||
) else (
|
) else (
|
||||||
if "%RsLastRef%"=="%RsRef%" (
|
if "%RsLastRef%"=="%RsRef%" (
|
||||||
git log %RsRef% --max-count=1 >"%RsGitLog%"
|
git log %RsRef% --max-count=1 >"%RsGitLog%"
|
||||||
) else (
|
) else (
|
||||||
git log %RsLastRef%..%RsRef% >"%RsGitLog%"
|
git log %RsLastRef%..%RsRef% >"%RsGitLog%"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
title %COMSPEC%
|
title %COMSPEC%
|
||||||
|
|
||||||
echo %RsRef%>"%RsLastRefFile%"
|
echo %RsRef%>"%RsLastRefFile%"
|
||||||
|
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,222 +1,213 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set Quite=^>nul
|
set Quite=^>nul
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env-msys2.bat"
|
call "%EnvPath%\env-msys2.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat" %*
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 2 exit /B 2
|
if errorlevel 2 exit /B 2
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Remove deploy path
|
:: Remove deploy path
|
||||||
if exist "%RsDeployPath%" rmdir /S /Q "%RsDeployPath%"
|
if exist "%RsDeployPath%" rmdir /S /Q "%RsDeployPath%"
|
||||||
|
|
||||||
:: Check compilation
|
:: Check compilation
|
||||||
if not exist "%RsBuildPath%\Makefile" echo Project is not compiled.& goto error
|
if not exist "%RsBuildPath%\Makefile" echo Project is not compiled.& goto error
|
||||||
|
|
||||||
:: Get compiled revision
|
:: Get compiled revision
|
||||||
set GetRsVersion=%SourcePath%\build_scripts\Windows\tools\get-rs-version.bat
|
set GetRsVersion=%SourcePath%\build_scripts\Windows\tools\get-rs-version.bat
|
||||||
if not exist "%GetRsVersion%" (
|
if not exist "%GetRsVersion%" (
|
||||||
echo File not found
|
%cecho% error "File not found"
|
||||||
echo %GetRsVersion%
|
echo %GetRsVersion%
|
||||||
goto error
|
goto error
|
||||||
)
|
)
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_REVISION_STRING RsRevision
|
:: Get compiled version
|
||||||
if "%RsRevision%"=="" echo Revision not found.& goto error
|
call "%GetRsVersion%" "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare.exe" RsVersion
|
||||||
|
if errorlevel 1 %cecho% error "Revision not found."& goto error
|
||||||
:: Get compiled version
|
|
||||||
call "%GetRsVersion%" RS_MAJOR_VERSION RsMajorVersion
|
if "%RsVersion.Major%"=="" %cecho% error "Major version not found."& goto error
|
||||||
if "%RsMajorVersion%"=="" echo Major version not found.& goto error
|
if "%RsVersion.Minor%"=="" %cecho% error "Minor version not found."& goto error
|
||||||
|
if "%RsVersion.Mini%"=="" %cecho% error "Mini number not found".& goto error
|
||||||
call "%GetRsVersion%" RS_MINOR_VERSION RsMinorVersion
|
if "%RsVersion.Extra%"=="" %cecho% error "Extra number not found".& goto error
|
||||||
if "%RsMinorVersion%"=="" echo Minor version not found.& goto error
|
|
||||||
|
set RsVersion=%RsVersion.Major%.%RsVersion.Minor%.%RsVersion.Mini%
|
||||||
call "%GetRsVersion%" RS_BUILD_NUMBER RsBuildNumber
|
|
||||||
if "%RsBuildNumber%"=="" echo Build number not found.& goto error
|
:: Check WMIC is available
|
||||||
|
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& goto error
|
||||||
call "%GetRsVersion%" RS_BUILD_NUMBER_ADD RsBuildNumberAdd
|
|
||||||
|
:: Use WMIC to retrieve date in format YYYYMMDD
|
||||||
set RsVersion=%RsMajorVersion%.%RsMinorVersion%.%RsBuildNumber%%RsBuildNumberAdd%
|
set RsDate=
|
||||||
|
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
||||||
:: Check WMIC is available
|
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
||||||
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& goto error
|
|
||||||
|
if "%ParamTor%"=="1" (
|
||||||
:: Use WMIC to retrieve date in format YYYYMMDD
|
:: Check for tor executable
|
||||||
set RsDate=
|
if not exist "%EnvDownloadPath%\tor\Tor\tor.exe" (
|
||||||
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
%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"
|
||||||
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
goto error
|
||||||
|
)
|
||||||
if "%ParamTor%"=="1" (
|
)
|
||||||
:: Check for tor executable
|
|
||||||
if not exist "%EnvDownloadPath%\tor\Tor\tor.exe" (
|
set QtMainVersion=%QtVersion:~0,1%
|
||||||
echo Tor binary not found. Please download Tor Expert Bundle from
|
set QtSharePath=%RsMinGWPath%\share\qt%QtMainVersion%\
|
||||||
echo https://www.torproject.org/download/download.html.en
|
|
||||||
echo and unpack to
|
rem Qt 4 = QtSvg4.dll
|
||||||
echo %EnvDownloadPath%\tor
|
rem Qt 5 = Qt5Svg.dll
|
||||||
goto error
|
set QtMainVersion1=
|
||||||
)
|
set QtMainVersion2=
|
||||||
)
|
if "%QtMainVersion%"=="4" set QtMainVersion2=4
|
||||||
|
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
||||||
set QtMainVersion=%QtVersion:~0,1%
|
|
||||||
set QtSharePath=%RsMinGWPath%\share\qt%QtMainVersion%\
|
if "%RsBuildConfig%" NEQ "release" (
|
||||||
|
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%-msys2%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
||||||
rem Qt 4 = QtSvg4.dll
|
) else (
|
||||||
rem Qt 5 = Qt5Svg.dll
|
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%-msys2%RsType%%RsArchiveAdd%.7z
|
||||||
set QtMainVersion1=
|
)
|
||||||
set QtMainVersion2=
|
|
||||||
if "%QtMainVersion%"=="4" set QtMainVersion2=4
|
if exist "%Archive%" del /Q "%Archive%"
|
||||||
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
|
||||||
|
:: Create deploy path
|
||||||
if "%RsBuildConfig%" NEQ "release" (
|
mkdir "%RsDeployPath%"
|
||||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%-msys2%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
|
||||||
) else (
|
title Pack - %SourceName%%RsType%-%RsBuildConfig% [copy files]
|
||||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%-msys2%RsType%%RsArchiveAdd%.7z
|
|
||||||
)
|
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
||||||
|
set Extensions=
|
||||||
if exist "%Archive%" del /Q "%Archive%"
|
for /f %%e in ('type "%ExtensionsFile%" ^| sed.exe -n "s/^.*\/\(extensions[^/]*\)\/.*$/\1/p" ^| sed.exe -n "1,1p"') do set Extensions=%%e
|
||||||
|
if "%Extensions%"=="" echo Folder for extensions not found in %ExtensionsFile%& goto error
|
||||||
:: Create deploy path
|
|
||||||
mkdir "%RsDeployPath%"
|
:: Copy files
|
||||||
|
mkdir "%RsDeployPath%\Data\%Extensions%"
|
||||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [copy files]
|
mkdir "%RsDeployPath%\imageformats"
|
||||||
|
mkdir "%RsDeployPath%\qss"
|
||||||
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
mkdir "%RsDeployPath%\stylesheets"
|
||||||
set Extensions=
|
mkdir "%RsDeployPath%\sounds"
|
||||||
for /f %%e in ('type "%ExtensionsFile%" ^| sed.exe -n "s/^.*\/\(extensions[^/]*\)\/.*$/\1/p" ^| sed.exe -n "1,1p"') do set Extensions=%%e
|
mkdir "%RsDeployPath%\translations"
|
||||||
if "%Extensions%"=="" echo Folder for extensions not found in %ExtensionsFile%& goto error
|
|
||||||
|
copy nul "%RsDeployPath%\portable" %Quite%
|
||||||
:: Copy files
|
|
||||||
mkdir "%RsDeployPath%\Data\%Extensions%"
|
echo copy binaries
|
||||||
mkdir "%RsDeployPath%\imageformats"
|
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\RetroShare*.exe" "%RsDeployPath%" %Quite%
|
||||||
mkdir "%RsDeployPath%\qss"
|
copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe" "%RsDeployPath%" %Quite%
|
||||||
mkdir "%RsDeployPath%\stylesheets"
|
|
||||||
mkdir "%RsDeployPath%\sounds"
|
echo copy extensions
|
||||||
mkdir "%RsDeployPath%\translations"
|
for /D %%D in ("%RsBuildPath%\plugins\*") do (
|
||||||
|
call :copy_extension "%%D" "%RsDeployPath%\Data\%Extensions%"
|
||||||
copy nul "%RsDeployPath%\portable" %Quite%
|
call :copy_dependencies "%RsDeployPath%\Data\%Extensions%\%%~nxD.dll" "%RsDeployPath%"
|
||||||
|
)
|
||||||
echo copy binaries
|
|
||||||
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\RetroShare*.exe" "%RsDeployPath%" %Quite%
|
echo copy dependencies
|
||||||
copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe" "%RsDeployPath%" %Quite%
|
call :copy_dependencies "%RsDeployPath%\retroshare.exe" "%RsDeployPath%"
|
||||||
|
|
||||||
echo copy extensions
|
echo copy Qt DLL's
|
||||||
for /D %%D in ("%RsBuildPath%\plugins\*") do (
|
copy "%RsMinGWPath%\bin\Qt%QtMainVersion1%Svg%QtMainVersion2%.dll" "%RsDeployPath%" %Quite%
|
||||||
call :copy_extension "%%D" "%RsDeployPath%\Data\%Extensions%"
|
|
||||||
call :copy_dependencies "%RsDeployPath%\Data\%Extensions%\%%~nxD.dll" "%RsDeployPath%"
|
if "%QtMainVersion%"=="5" (
|
||||||
)
|
mkdir "%RsDeployPath%\platforms"
|
||||||
|
copy "%QtSharePath%\plugins\platforms\qwindows.dll" "%RsDeployPath%\platforms" %Quite%
|
||||||
echo copy dependencies
|
mkdir "%RsDeployPath%\audio"
|
||||||
call :copy_dependencies "%RsDeployPath%\retroshare.exe" "%RsDeployPath%"
|
copy "%QtSharePath%\plugins\audio\qtaudio_windows.dll" "%RsDeployPath%\audio" %Quite%
|
||||||
|
)
|
||||||
echo copy Qt DLL's
|
|
||||||
copy "%RsMinGWPath%\bin\Qt%QtMainVersion1%Svg%QtMainVersion2%.dll" "%RsDeployPath%" %Quite%
|
if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
||||||
|
echo Copy styles
|
||||||
if "%QtMainVersion%"=="5" (
|
mkdir "%RsDeployPath%\styles" %Quite%
|
||||||
mkdir "%RsDeployPath%\platforms"
|
copy "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" "%RsDeployPath%\styles" %Quite%
|
||||||
copy "%QtSharePath%\plugins\platforms\qwindows.dll" "%RsDeployPath%\platforms" %Quite%
|
)
|
||||||
mkdir "%RsDeployPath%\audio"
|
|
||||||
copy "%QtSharePath%\plugins\audio\qtaudio_windows.dll" "%RsDeployPath%\audio" %Quite%
|
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
||||||
)
|
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
||||||
|
|
||||||
if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
echo copy qss
|
||||||
echo Copy styles
|
xcopy /S "%SourcePath%\retroshare-gui\src\qss" "%RsDeployPath%\qss" %Quite%
|
||||||
mkdir "%RsDeployPath%\styles" %Quite%
|
|
||||||
copy "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" "%RsDeployPath%\styles" %Quite%
|
echo copy stylesheets
|
||||||
)
|
xcopy /S "%SourcePath%\retroshare-gui\src\gui\qss\chat" "%RsDeployPath%\stylesheets" %Quite%
|
||||||
|
rmdir /S /Q "%RsDeployPath%\stylesheets\compact" %Quite%
|
||||||
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
rmdir /S /Q "%RsDeployPath%\stylesheets\standard" %Quite%
|
||||||
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
rmdir /S /Q "%RsDeployPath%\stylesheets\__MACOSX__Bubble" %Quite%
|
||||||
|
|
||||||
echo copy qss
|
echo copy sounds
|
||||||
xcopy /S "%SourcePath%\retroshare-gui\src\qss" "%RsDeployPath%\qss" %Quite%
|
xcopy /S "%SourcePath%\retroshare-gui\src\sounds" "%RsDeployPath%\sounds" %Quite%
|
||||||
|
|
||||||
echo copy stylesheets
|
echo copy translation
|
||||||
xcopy /S "%SourcePath%\retroshare-gui\src\gui\qss\chat" "%RsDeployPath%\stylesheets" %Quite%
|
copy "%SourcePath%\retroshare-gui\src\translations\qt_tr.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
rmdir /S /Q "%RsDeployPath%\stylesheets\compact" %Quite%
|
copy "%QtSharePath%\translations\qt_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
rmdir /S /Q "%RsDeployPath%\stylesheets\standard" %Quite%
|
if "%QtMainVersion%"=="5" (
|
||||||
rmdir /S /Q "%RsDeployPath%\stylesheets\__MACOSX__Bubble" %Quite%
|
copy "%QtSharePath%\translations\qtbase_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
|
copy "%QtSharePath%\translations\qtscript_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
echo copy sounds
|
copy "%QtSharePath%\translations\qtquick1_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
xcopy /S "%SourcePath%\retroshare-gui\src\sounds" "%RsDeployPath%\sounds" %Quite%
|
copy "%QtSharePath%\translations\qtmultimedia_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
|
copy "%QtSharePath%\translations\qtxmlpatterns_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||||
echo copy translation
|
)
|
||||||
copy "%SourcePath%\retroshare-gui\src\translations\qt_tr.qm" "%RsDeployPath%\translations" %Quite%
|
|
||||||
copy "%QtSharePath%\translations\qt_*.qm" "%RsDeployPath%\translations" %Quite%
|
echo copy bdboot.txt
|
||||||
if "%QtMainVersion%"=="5" (
|
copy "%SourcePath%\libbitdht\src\bitdht\bdboot.txt" "%RsDeployPath%" %Quite%
|
||||||
copy "%QtSharePath%\translations\qtbase_*.qm" "%RsDeployPath%\translations" %Quite%
|
|
||||||
copy "%QtSharePath%\translations\qtscript_*.qm" "%RsDeployPath%\translations" %Quite%
|
echo copy changelog.txt
|
||||||
copy "%QtSharePath%\translations\qtquick1_*.qm" "%RsDeployPath%\translations" %Quite%
|
copy "%SourcePath%\retroshare-gui\src\changelog.txt" "%RsDeployPath%" %Quite%
|
||||||
copy "%QtSharePath%\translations\qtmultimedia_*.qm" "%RsDeployPath%\translations" %Quite%
|
|
||||||
copy "%QtSharePath%\translations\qtxmlpatterns_*.qm" "%RsDeployPath%\translations" %Quite%
|
if exist "%SourcePath%\libresapi\src\webui" (
|
||||||
)
|
echo copy webui
|
||||||
|
mkdir "%RsDeployPath%\webui"
|
||||||
echo copy bdboot.txt
|
xcopy /S "%SourcePath%\libresapi\src\webui" "%RsDeployPath%\webui" %Quite%
|
||||||
copy "%SourcePath%\libbitdht\src\bitdht\bdboot.txt" "%RsDeployPath%" %Quite%
|
)
|
||||||
|
|
||||||
echo copy changelog.txt
|
if "%ParamTor%"=="1" (
|
||||||
copy "%SourcePath%\retroshare-gui\src\changelog.txt" "%RsDeployPath%" %Quite%
|
echo copy tor
|
||||||
|
echo n | copy /-y "%EnvDownloadPath%\tor\Tor\*.*" "%RsDeployPath%" %Quite%
|
||||||
if exist "%SourcePath%\libresapi\src\webui" (
|
)
|
||||||
echo copy webui
|
|
||||||
mkdir "%RsDeployPath%\webui"
|
rem pack files
|
||||||
xcopy /S "%SourcePath%\libresapi\src\webui" "%RsDeployPath%\webui" %Quite%
|
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
||||||
)
|
|
||||||
|
"%EnvSevenZipExe%" a -mx=9 -t7z "%Archive%" "%RsDeployPath%\*"
|
||||||
if "%ParamTor%"=="1" (
|
|
||||||
echo copy tor
|
title %COMSPEC%
|
||||||
echo n | copy /-y "%EnvDownloadPath%\tor\Tor\*.*" "%RsDeployPath%" %Quite%
|
|
||||||
)
|
call :cleanup
|
||||||
|
|
||||||
rem pack files
|
endlocal
|
||||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
exit /B 0
|
||||||
|
|
||||||
"%EnvSevenZipExe%" a -mx=9 -t7z "%Archive%" "%RsDeployPath%\*"
|
:error
|
||||||
|
call :Cleanup
|
||||||
title %COMSPEC%
|
endlocal
|
||||||
|
exit /B 1
|
||||||
call :cleanup
|
|
||||||
|
:cleanup
|
||||||
endlocal
|
goto :EOF
|
||||||
exit /B 0
|
|
||||||
|
:error_env
|
||||||
:error
|
echo Failed to initialize environment.
|
||||||
call :Cleanup
|
endlocal
|
||||||
endlocal
|
exit /B 1
|
||||||
exit /B 1
|
|
||||||
|
:copy_extension
|
||||||
:cleanup
|
if exist "%~1\%RsBuildConfig%\%~n1.dll" (
|
||||||
goto :EOF
|
copy "%~1\%RsBuildConfig%\%~n1.dll" %2 %Quite%
|
||||||
|
)
|
||||||
:error_env
|
goto :EOF
|
||||||
echo Failed to initialize environment.
|
|
||||||
endlocal
|
:copy_dependencies
|
||||||
exit /B 1
|
set CopyDependenciesCopiedSomething=0
|
||||||
|
for /F "usebackq" %%A in (`%ToolsPath%\depends.bat list %1`) do (
|
||||||
:copy_extension
|
if not exist "%~2\%%A" (
|
||||||
if exist "%~1\%RsBuildConfig%\%~n1.dll" (
|
if exist "%RsMinGWPath%\bin\%%A" (
|
||||||
copy "%~1\%RsBuildConfig%\%~n1.dll" %2 %Quite%
|
set CopyDependenciesCopiedSomething=1
|
||||||
)
|
copy "%RsMinGWPath%\bin\%%A" %2 %Quite%
|
||||||
goto :EOF
|
)
|
||||||
|
)
|
||||||
:copy_dependencies
|
)
|
||||||
set CopyDependenciesCopiedSomething=0
|
if "%CopyDependenciesCopiedSomething%"=="1" goto copy_dependencies
|
||||||
for /F "usebackq" %%A in (`%ToolsPath%\depends.bat list %1`) do (
|
goto :EOF
|
||||||
if not exist "%~2\%%A" (
|
|
||||||
if exist "%RsMinGWPath%\bin\%%A" (
|
|
||||||
set CopyDependenciesCopiedSomething=1
|
|
||||||
copy "%RsMinGWPath%\bin\%%A" %2 %Quite%
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if "%CopyDependenciesCopiedSomething%"=="1" goto copy_dependencies
|
|
||||||
goto :EOF
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
call :make_path SourcePath "%~dp0..\.."
|
call :make_path SourcePath "%~dp0..\.."
|
||||||
call :make_path RootPath "%SourcePath%\.."
|
call :make_path RootPath "%SourcePath%\.."
|
||||||
call :source_name SourceName "%SourcePath%"
|
call :source_name SourceName "%SourcePath%"
|
||||||
set ToolsPath=%~dp0tools
|
set ToolsPath=%~dp0tools
|
||||||
set EnvPath=%~dp0env
|
set EnvPath=%~dp0env
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:make_path
|
:make_path
|
||||||
setlocal
|
setlocal
|
||||||
set Var=%~1
|
set Var=%~1
|
||||||
pushd %2
|
pushd %2
|
||||||
set CD=%cd%
|
set CD=%cd%
|
||||||
popd
|
popd
|
||||||
endlocal & set %Var%=%CD%
|
endlocal & set %Var%=%CD%
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:source_name
|
:source_name
|
||||||
set %~1=%~nx2
|
set %~1=%~nx2
|
||||||
|
74
build_scripts/Windows-msys2/env/env-msys2.bat
vendored
74
build_scripts/Windows-msys2/env/env-msys2.bat
vendored
@ -1,37 +1,37 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call env-msys2.bat [reinstall|clean]
|
:: call env-msys2.bat [reinstall|clean]
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
IF DEFINED ProgramFiles(x86) (
|
IF DEFINED ProgramFiles(x86) (
|
||||||
:: x64
|
:: x64
|
||||||
set MSYS2Architecture=x86_64
|
set MSYS2Architecture=x86_64
|
||||||
set MSYS2Base=64
|
set MSYS2Base=64
|
||||||
) else (
|
) else (
|
||||||
:: x86
|
:: x86
|
||||||
set MSYS2Architecture=i686
|
set MSYS2Architecture=i686
|
||||||
set MSYS2Base=32
|
set MSYS2Base=32
|
||||||
)
|
)
|
||||||
|
|
||||||
set CHERE_INVOKING=1
|
set CHERE_INVOKING=1
|
||||||
|
|
||||||
set EnvMSYS2Path=%EnvRootPath%\msys2
|
set EnvMSYS2Path=%EnvRootPath%\msys2
|
||||||
set EnvMSYS2BasePath=%EnvMSYS2Path%\msys%MSYS2Base%
|
set EnvMSYS2BasePath=%EnvMSYS2Path%\msys%MSYS2Base%
|
||||||
|
|
||||||
call "%~dp0tools\prepare-msys2.bat" %1
|
call "%~dp0tools\prepare-msys2.bat" %1
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
set EnvMSYS2SH=%EnvMSYS2BasePath%\usr\bin\sh.exe
|
set EnvMSYS2SH=%EnvMSYS2BasePath%\usr\bin\sh.exe
|
||||||
if not exist "%EnvMSYS2SH%" if errorlevel 1 goto error_env
|
if not exist "%EnvMSYS2SH%" if errorlevel 1 goto error_env
|
||||||
|
|
||||||
set EnvMSYS2Cmd="%EnvMSYS2SH%" -lc
|
set EnvMSYS2Cmd="%EnvMSYS2SH%" -lc
|
||||||
|
|
||||||
set PATH=%EnvMSYS2BasePath%\usr\bin;%PATH%
|
set PATH=%EnvMSYS2BasePath%\usr\bin;%PATH%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
52
build_scripts/Windows-msys2/env/env.bat
vendored
52
build_scripts/Windows-msys2/env/env.bat
vendored
@ -1,26 +1,26 @@
|
|||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
set EnvRootPath=%RootPath%\%SourceName%-msys2
|
set EnvRootPath=%RootPath%\%SourceName%-msys2
|
||||||
set EnvToolsPath=%EnvRootPath%\tools
|
set EnvToolsPath=%EnvRootPath%\tools
|
||||||
set EnvTempPath=%EnvRootPath%\tmp
|
set EnvTempPath=%EnvRootPath%\tmp
|
||||||
set EnvDownloadPath=%EnvRootPath%\download
|
set EnvDownloadPath=%EnvRootPath%\download
|
||||||
|
|
||||||
set EnvWgetExe=%EnvToolsPath%\wget.exe
|
set EnvWgetExe=%EnvToolsPath%\wget.exe
|
||||||
set EnvSevenZipExe=%EnvToolsPath%\7z.exe
|
set EnvSevenZipExe=%EnvToolsPath%\7z.exe
|
||||||
set EnvDependsExe=%EnvToolsPath%\depends.exe
|
set EnvDependsExe=%EnvToolsPath%\depends.exe
|
||||||
set EnvCEchoExe=%EnvToolsPath%\cecho.exe
|
set EnvCEchoExe=%EnvToolsPath%\cecho.exe
|
||||||
set cecho=call "%ToolsPath%\cecho.bat"
|
set cecho=call "%ToolsPath%\cecho.bat"
|
||||||
|
|
||||||
:: Create folders
|
:: Create folders
|
||||||
if not exist "%EnvRootPath%" mkdir "%EnvRootPath%"
|
if not exist "%EnvRootPath%" mkdir "%EnvRootPath%"
|
||||||
if not exist "%EnvToolsPath%" mkdir "%EnvToolsPath%"
|
if not exist "%EnvToolsPath%" mkdir "%EnvToolsPath%"
|
||||||
if not exist "%EnvDownloadPath%" mkdir "%EnvDownloadPath%"
|
if not exist "%EnvDownloadPath%" mkdir "%EnvDownloadPath%"
|
||||||
|
|
||||||
call "%~dp0tools\prepare-tools.bat"
|
call "%~dp0tools\prepare-tools.bat"
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,57 +1,57 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call prepare-msys2.bat [reinstall|clean]
|
:: call prepare-msys2.bat [reinstall|clean]
|
||||||
|
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
if "%EnvMSYS2Path%"=="" exit /B 1
|
if "%EnvMSYS2Path%"=="" exit /B 1
|
||||||
if "%MSYS2Architecture%"=="" exit /B 1
|
if "%MSYS2Architecture%"=="" exit /B 1
|
||||||
if "%MSYS2Base%"=="" exit /B 1
|
if "%MSYS2Base%"=="" exit /B 1
|
||||||
if not exist "%EnvRootPath%"=="" exit /B 1
|
if not exist "%EnvRootPath%"=="" exit /B 1
|
||||||
|
|
||||||
copy "%~dp0root\update-msys2.bat" "%EnvRootPath%" >nul
|
copy "%~dp0root\update-msys2.bat" "%EnvRootPath%" >nul
|
||||||
|
|
||||||
if "%~1"=="clean" (
|
if "%~1"=="clean" (
|
||||||
%cecho% info "Clean MSYS2"
|
%cecho% info "Clean MSYS2"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvMSYS2Path%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvMSYS2Path%"
|
||||||
goto exit
|
goto exit
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\pacman.exe" (
|
if exist "%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\pacman.exe" (
|
||||||
if "%~1"=="reinstall" (
|
if "%~1"=="reinstall" (
|
||||||
choice /M "Found existing MSYS2 version. Do you want to proceed?"
|
choice /M "Found existing MSYS2 version. Do you want to proceed?"
|
||||||
if !ERRORLEVEL!==2 goto exit
|
if !ERRORLEVEL!==2 goto exit
|
||||||
) else (
|
) else (
|
||||||
goto exit
|
goto exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
set MSYS2Install=msys2-base-%MSYS2Architecture%-20180531.tar.xz
|
set MSYS2Install=msys2-base-%MSYS2Architecture%-20180531.tar.xz
|
||||||
set MSYS2Url=http://sourceforge.net/projects/msys2/files/Base/%MSYS2Architecture%/%MSYS2Install%/download
|
set MSYS2Url=http://sourceforge.net/projects/msys2/files/Base/%MSYS2Architecture%/%MSYS2Install%/download
|
||||||
|
|
||||||
%cecho% info "Remove previous MSYS2 version"
|
%cecho% info "Remove previous MSYS2 version"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvMSYS2Path%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvMSYS2Path%"
|
||||||
|
|
||||||
%cecho% info "Download installation files"
|
%cecho% info "Download installation files"
|
||||||
if not exist "%EnvDownloadPath%\%MSYS2Install%" call "%ToolsPath%\download-file.bat" "%MSYS2Url%" "%EnvDownloadPath%\%MSYS2Install%"
|
if not exist "%EnvDownloadPath%\%MSYS2Install%" call "%ToolsPath%\download-file.bat" "%MSYS2Url%" "%EnvDownloadPath%\%MSYS2Install%"
|
||||||
if not exist "%EnvDownloadPath%\%MSYS2Install%" %cecho% error "Cannot download MSYS" & goto error
|
if not exist "%EnvDownloadPath%\%MSYS2Install%" %cecho% error "Cannot download MSYS" & goto error
|
||||||
|
|
||||||
%cecho% info "Unpack MSYS2"
|
%cecho% info "Unpack MSYS2"
|
||||||
"%EnvSevenZipExe%" x -so "%EnvDownloadPath%\%MSYS2Install%" | "%EnvSevenZipExe%" x -y -si -ttar -o"%EnvMSYS2Path%"
|
"%EnvSevenZipExe%" x -so "%EnvDownloadPath%\%MSYS2Install%" | "%EnvSevenZipExe%" x -y -si -ttar -o"%EnvMSYS2Path%"
|
||||||
|
|
||||||
set MSYS2SH=%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\sh
|
set MSYS2SH=%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\sh
|
||||||
|
|
||||||
%cecho% info "Initialize MSYS2"
|
%cecho% info "Initialize MSYS2"
|
||||||
"%MSYS2SH%" -lc "pacman -Sy"
|
"%MSYS2SH%" -lc "pacman -Sy"
|
||||||
"%MSYS2SH%" -lc "pacman --noconfirm --needed -S bash pacman pacman-mirrors msys2-runtime"
|
"%MSYS2SH%" -lc "pacman --noconfirm --needed -S bash pacman pacman-mirrors msys2-runtime"
|
||||||
|
|
||||||
call "%EnvMSYS2Path%\msys%MSYS2Base%\autorebase.bat"
|
call "%EnvMSYS2Path%\msys%MSYS2Base%\autorebase.bat"
|
||||||
call "%EnvRootPath%\update-msys2.bat"
|
call "%EnvRootPath%\update-msys2.bat"
|
||||||
call "%EnvRootPath%\update-msys2.bat"
|
call "%EnvRootPath%\update-msys2.bat"
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error
|
:error
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,79 +1,91 @@
|
|||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
if "%EnvRootPath%"=="" exit /B 1
|
if "%EnvRootPath%"=="" exit /B 1
|
||||||
|
|
||||||
set CEchoUrl=https://github.com/lordmulder/cecho/releases/download/2015-10-10/cecho.2015-10-10.zip
|
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 CEchoInstall=cecho.2015-10-10.zip
|
||||||
set SevenZipUrl=https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805.msi/download
|
set SevenZipUrl=https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805.msi/download
|
||||||
set SevenZipInstall=7z1805.msi
|
set SevenZipInstall=7z1805.msi
|
||||||
set WgetUrl=https://eternallybored.org/misc/wget/1.19.4/32/wget.exe
|
set WgetUrl=https://eternallybored.org/misc/wget/1.19.4/32/wget.exe
|
||||||
set WgetInstall=wget.exe
|
set WgetInstall=wget.exe
|
||||||
set DependsUrl=http://www.dependencywalker.com/depends22_x86.zip
|
set DependsUrl=http://www.dependencywalker.com/depends22_x86.zip
|
||||||
set DependsInstall=depends22_x86.zip
|
set DependsInstall=depends22_x86.zip
|
||||||
|
set SigcheckInstall=Sigcheck.zip
|
||||||
if not exist "%EnvToolsPath%\wget.exe" (
|
set SigcheckUrl=https://download.sysinternals.com/files/%SigcheckInstall%
|
||||||
echo Download Wget installation
|
|
||||||
|
if not exist "%EnvToolsPath%\wget.exe" (
|
||||||
if not exist "%EnvDownloadPath%\%WgetInstall%" call "%ToolsPath%\winhttpjs.bat" %WgetUrl% -saveTo "%EnvDownloadPath%\%WgetInstall%"
|
echo Download Wget installation
|
||||||
if not exist "%EnvDownloadPath%\%WgetInstall%" %cecho% error "Cannot download Wget installation" & goto error
|
|
||||||
|
if not exist "%EnvDownloadPath%\%WgetInstall%" call "%ToolsPath%\winhttpjs.bat" %WgetUrl% -saveTo "%EnvDownloadPath%\%WgetInstall%"
|
||||||
echo Copy Wget
|
if not exist "%EnvDownloadPath%\%WgetInstall%" %cecho% error "Cannot download Wget installation" & goto error
|
||||||
copy "%EnvDownloadPath%\wget.exe" "%EnvToolsPath%"
|
|
||||||
)
|
echo Copy Wget
|
||||||
|
copy "%EnvDownloadPath%\wget.exe" "%EnvToolsPath%"
|
||||||
if not exist "%EnvToolsPath%\7z.exe" (
|
)
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
|
||||||
mkdir "%EnvTempPath%"
|
if not exist "%EnvToolsPath%\7z.exe" (
|
||||||
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
echo Download 7z installation
|
mkdir "%EnvTempPath%"
|
||||||
|
|
||||||
if not exist "%EnvDownloadPath%\%SevenZipInstall%" call "%ToolsPath%\download-file.bat" "%SevenZipUrl%" "%EnvDownloadPath%\%SevenZipInstall%"
|
echo Download 7z installation
|
||||||
if not exist "%EnvDownloadPath%\%SevenZipInstall%" echo Cannot download 7z installation& goto error
|
|
||||||
|
if not exist "%EnvDownloadPath%\%SevenZipInstall%" call "%ToolsPath%\download-file.bat" "%SevenZipUrl%" "%EnvDownloadPath%\%SevenZipInstall%"
|
||||||
echo Unpack 7z
|
if not exist "%EnvDownloadPath%\%SevenZipInstall%" echo Cannot download 7z installation& goto error
|
||||||
msiexec /a "%EnvDownloadPath%\%SevenZipInstall%" /qb TARGETDIR="%EnvTempPath%"
|
|
||||||
copy "%EnvTempPath%\Files\7-Zip\7z.dll" "%EnvToolsPath%"
|
echo Unpack 7z
|
||||||
copy "%EnvTempPath%\Files\7-Zip\7z.exe" "%EnvToolsPath%"
|
msiexec /a "%EnvDownloadPath%\%SevenZipInstall%" /qb TARGETDIR="%EnvTempPath%"
|
||||||
|
copy "%EnvTempPath%\Files\7-Zip\7z.dll" "%EnvToolsPath%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
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%"
|
if not exist "%EnvToolsPath%\cecho.exe" (
|
||||||
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
echo Download cecho installation
|
mkdir "%EnvTempPath%"
|
||||||
|
|
||||||
if not exist "%EnvDownloadPath%\%CEchoInstall%" call "%ToolsPath%\download-file.bat" "%CEchoUrl%" "%EnvDownloadPath%\%CEchoInstall%"
|
echo Download cecho installation
|
||||||
if not exist "%EnvDownloadPath%\%cCEhoInstall%" echo Cannot download cecho installation& goto error
|
|
||||||
|
if not exist "%EnvDownloadPath%\%CEchoInstall%" call "%ToolsPath%\download-file.bat" "%CEchoUrl%" "%EnvDownloadPath%\%CEchoInstall%"
|
||||||
echo Unpack cecho
|
if not exist "%EnvDownloadPath%\%cCEhoInstall%" echo Cannot download cecho installation& goto error
|
||||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%"
|
|
||||||
copy "%EnvTempPath%\cecho.exe" "%EnvToolsPath%"
|
echo Unpack cecho
|
||||||
|
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
copy "%EnvTempPath%\cecho.exe" "%EnvToolsPath%"
|
||||||
)
|
|
||||||
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
if not exist "%EnvToolsPath%\depends.exe" (
|
)
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
|
||||||
mkdir "%EnvTempPath%"
|
if not exist "%EnvToolsPath%\depends.exe" (
|
||||||
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
%cecho% info "Download Dependency Walker installation"
|
mkdir "%EnvTempPath%"
|
||||||
|
|
||||||
if not exist "%EnvDownloadPath%\%DependsInstall%" call "%ToolsPath%\winhttpjs.bat" %DependsUrl% -saveTo "%EnvDownloadPath%\%DependsInstall%"
|
%cecho% info "Download Dependency Walker installation"
|
||||||
if not exist "%EnvDownloadPath%\%DependsInstall%" %cecho% error "Cannot download Dependendy Walker installation" & goto error
|
|
||||||
|
if not exist "%EnvDownloadPath%\%DependsInstall%" call "%ToolsPath%\winhttpjs.bat" %DependsUrl% -saveTo "%EnvDownloadPath%\%DependsInstall%"
|
||||||
%cecho% info "Unpack Dependency Walker"
|
if not exist "%EnvDownloadPath%\%DependsInstall%" %cecho% error "Cannot download Dependendy Walker installation" & goto error
|
||||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%DependsInstall%"
|
|
||||||
copy "%EnvTempPath%\*" "%EnvToolsPath%"
|
%cecho% info "Unpack Dependency Walker"
|
||||||
|
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%DependsInstall%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
copy "%EnvTempPath%\*" "%EnvToolsPath%"
|
||||||
)
|
|
||||||
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
:exit
|
)
|
||||||
endlocal
|
|
||||||
exit /B 0
|
if not exist "%EnvToolsPath%\sigcheck.exe" (
|
||||||
|
%cecho% info "Download Sigcheck installation"
|
||||||
:error
|
|
||||||
endlocal
|
if not exist "%EnvDownloadPath%\%SigcheckInstall%" call "%ToolsPath%\download-file.bat" "%SigcheckUrl%" "%EnvDownloadPath%\%SigcheckInstall%"
|
||||||
exit /B 1
|
if not exist "%EnvDownloadPath%\%SigcheckInstall%" %cecho% error "Cannot download Sigcheck installation" & goto error
|
||||||
|
|
||||||
|
%cecho% info "Unpack Sigcheck"
|
||||||
|
"%EnvSevenZipExe%" x -o"%EnvToolsPath%" "%EnvDownloadPath%\%SigcheckInstall%" sigcheck.exe
|
||||||
|
)
|
||||||
|
|
||||||
|
:exit
|
||||||
|
endlocal
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
:error
|
||||||
|
endlocal
|
||||||
|
exit /B 1
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
if exist "%~dp0msys2\msys32" call :update 32
|
if exist "%~dp0msys2\msys32" call :update 32
|
||||||
if exist "%~dp0msys2\msys64" call :update 64
|
if exist "%~dp0msys2\msys64" call :update 64
|
||||||
|
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:update
|
:update
|
||||||
set MSYSSH=%~dp0msys2\msys%~1\usr\bin\sh
|
set MSYSSH=%~dp0msys2\msys%~1\usr\bin\sh
|
||||||
|
|
||||||
echo Update MSYS2 %~1
|
echo Update MSYS2 %~1
|
||||||
"%MSYSSH%" -lc "pacman -Sy"
|
"%MSYSSH%" -lc "pacman -Sy"
|
||||||
"%MSYSSH%" -lc "pacman --noconfirm -Su"
|
"%MSYSSH%" -lc "pacman --noconfirm -Su"
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
endlocal
|
endlocal
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call cecho.bat [info|error|std] "text"
|
:: call cecho.bat [info|error|std] "text"
|
||||||
|
|
||||||
if "%~1"=="std" echo %~2
|
if "%~1"=="std" echo %~2
|
||||||
if "%~1"=="info" "%EnvCEchoExe%" green "%~2"
|
if "%~1"=="info" "%EnvCEchoExe%" green "%~2"
|
||||||
if "%~1"=="error" "%EnvCEchoExe%" red "%~2"
|
if "%~1"=="error" "%EnvCEchoExe%" red "%~2"
|
||||||
|
@ -1,40 +1,40 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call depends.bat [list^|missing] file
|
:: call depends.bat [list^|missing] file
|
||||||
|
|
||||||
if "%2"=="" (
|
if "%2"=="" (
|
||||||
echo Usage: %~nx0 [list^|missing] File
|
echo Usage: %~nx0 [list^|missing] File
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
if not exist "%EnvDependsExe%" echo depends.exe not found in %EnvToolsPath%.& exit /B 1
|
if not exist "%EnvDependsExe%" echo depends.exe not found in %EnvToolsPath%.& exit /B 1
|
||||||
|
|
||||||
set CutPath=
|
set CutPath=
|
||||||
call "%ToolsPath%\find-in-path.bat" CutPath cut.exe
|
call "%ToolsPath%\find-in-path.bat" CutPath cut.exe
|
||||||
if "%CutPath%"=="" echo cut.exe not found in PATH.& exit /B 1
|
if "%CutPath%"=="" echo cut.exe not found in PATH.& exit /B 1
|
||||||
|
|
||||||
start /wait "" "%EnvDependsExe%" /c /oc:"%~dp0depends.tmp" %2
|
start /wait "" "%EnvDependsExe%" /c /oc:"%~dp0depends.tmp" %2
|
||||||
if "%1"=="missing" (
|
if "%1"=="missing" (
|
||||||
cut.exe --delimiter=, --fields=1,2 "%~dp0depends.tmp" >"%~dp0depends1.tmp"
|
cut.exe --delimiter=, --fields=1,2 "%~dp0depends.tmp" >"%~dp0depends1.tmp"
|
||||||
for /F "tokens=1,2 delims=," %%A in (%~sdp0depends1.tmp) do (
|
for /F "tokens=1,2 delims=," %%A in (%~sdp0depends1.tmp) do (
|
||||||
if "%%A"=="?" (
|
if "%%A"=="?" (
|
||||||
echo %%~B
|
echo %%~B
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%1"=="list" (
|
if "%1"=="list" (
|
||||||
cut.exe --delimiter=, --fields=2 "%~dp0depends.tmp" >"%~dp0depends1.tmp"
|
cut.exe --delimiter=, --fields=2 "%~dp0depends.tmp" >"%~dp0depends1.tmp"
|
||||||
for /F "tokens=1 delims=," %%A in (%~sdp0depends1.tmp) do (
|
for /F "tokens=1 delims=," %%A in (%~sdp0depends1.tmp) do (
|
||||||
if "%%A" NEQ "Module" (
|
if "%%A" NEQ "Module" (
|
||||||
echo %%~A
|
echo %%~A
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%~dp0depends.tmp" del /Q "%~dp0depends.tmp"
|
if exist "%~dp0depends.tmp" del /Q "%~dp0depends.tmp"
|
||||||
if exist "%~dp0depends1.tmp" del /Q "%~dp0depends1.tmp"
|
if exist "%~dp0depends1.tmp" del /Q "%~dp0depends1.tmp"
|
||||||
|
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 0
|
exit /B 0
|
@ -1,13 +1,13 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call download-file.bat url file
|
:: call download-file.bat url file
|
||||||
|
|
||||||
if "%~2"=="" (
|
if "%~2"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
::"%EnvCurlExe%" -L -k "%~1" -o "%~2"
|
::"%EnvCurlExe%" -L -k "%~1" -o "%~2"
|
||||||
"%EnvWgetExe%" --no-check-certificate --continue "%~1" --output-document="%~2"
|
"%EnvWgetExe%" --no-check-certificate --continue "%~1" --output-document="%~2"
|
||||||
|
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call find-in-path.bat variable file
|
:: call find-in-path.bat variable file
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set Var=%~1
|
set Var=%~1
|
||||||
set File=%~2
|
set File=%~2
|
||||||
|
|
||||||
if "%File%"=="" (
|
if "%File%"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
set FoundPath=
|
set FoundPath=
|
||||||
|
|
||||||
SET PathTemp="%Path:;=";"%"
|
SET PathTemp="%Path:;=";"%"
|
||||||
FOR %%P IN (%PathTemp%) DO (
|
FOR %%P IN (%PathTemp%) DO (
|
||||||
IF EXIST "%%~P.\%File%" (
|
IF EXIST "%%~P.\%File%" (
|
||||||
set FoundPath=%%~P
|
set FoundPath=%%~P
|
||||||
goto :found
|
goto :found
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:found
|
:found
|
||||||
endlocal & set %Var%=%FoundPath%
|
endlocal & set %Var%=%FoundPath%
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
REM Usage:
|
REM Usage:
|
||||||
REM call get-git-ref.bat Variable [Branch]
|
REM call get-git-ref.bat Variable [Branch]
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set Variable=%~1
|
set Variable=%~1
|
||||||
if "%Variable%"=="" (
|
if "%Variable%"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error
|
echo Parameter error
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
set Ref=
|
set Ref=
|
||||||
|
|
||||||
:: Check git executable
|
:: Check git executable
|
||||||
set GitPath=
|
set GitPath=
|
||||||
call "%~dp0find-in-path.bat" GitPath git.exe
|
call "%~dp0find-in-path.bat" GitPath git.exe
|
||||||
if "%GitPath%"=="" (
|
if "%GitPath%"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Git executable not found in PATH.
|
echo Git executable not found in PATH.
|
||||||
goto exit
|
goto exit
|
||||||
)
|
)
|
||||||
|
|
||||||
set GitParameter=
|
set GitParameter=
|
||||||
set Branch=%~2
|
set Branch=%~2
|
||||||
if "%Branch%"=="" (
|
if "%Branch%"=="" (
|
||||||
set Branch=HEAD
|
set Branch=HEAD
|
||||||
set GitParameter=--head
|
set GitParameter=--head
|
||||||
)
|
)
|
||||||
|
|
||||||
for /F "tokens=1*" %%A in ('git show-ref %GitParameter% %Branch%') do (
|
for /F "tokens=1*" %%A in ('git show-ref %GitParameter% %Branch%') do (
|
||||||
if "%%B"=="%Branch%" (
|
if "%%B"=="%Branch%" (
|
||||||
set Ref=%%A
|
set Ref=%%A
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
endlocal & set %Variable%=%Ref%
|
endlocal & set %Variable%=%Ref%
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call get-qt-version.bat variable
|
:: call get-qt-version.bat variable
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set Var=%~1
|
set Var=%~1
|
||||||
if "%Var%"=="" (
|
if "%Var%"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
set QtVersion=
|
set QtVersion=
|
||||||
|
|
||||||
%EnvMSYS2Cmd% "qmake -version" >"%~dp0qtversion.tmp"
|
%EnvMSYS2Cmd% "qmake -version" >"%~dp0qtversion.tmp"
|
||||||
for /F "tokens=1,2,3,4" %%A in (%~sdp0qtversion.tmp) do (
|
for /F "tokens=1,2,3,4" %%A in (%~sdp0qtversion.tmp) do (
|
||||||
if "%%A"=="Using" (
|
if "%%A"=="Using" (
|
||||||
set QtVersion=%%D
|
set QtVersion=%%D
|
||||||
goto exit
|
goto exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
if exist "%~dp0qtversion.tmp" del /Q "%~dp0qtversion.tmp"
|
if exist "%~dp0qtversion.tmp" del /Q "%~dp0qtversion.tmp"
|
||||||
|
|
||||||
endlocal & set %Var%=%QtVersion%
|
endlocal & set %Var%=%QtVersion%
|
||||||
exit /B 0
|
exit /B 0
|
@ -1,33 +1,38 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call get-rs-version.bat Define Variable
|
:: call get-rs-version.bat Executable Variable
|
||||||
|
::
|
||||||
setlocal
|
:: Variable.Major
|
||||||
|
:: Variable.Minor
|
||||||
set Define=%~1
|
:: Variable.Mini
|
||||||
set Variable=%~2
|
:: Variable.Extra
|
||||||
if "%Variable%"=="" (
|
|
||||||
echo.
|
setlocal
|
||||||
echo Parameter error.
|
|
||||||
exit /B 1
|
set Executable=%~1
|
||||||
)
|
set Variable=%~2
|
||||||
|
if "%Variable%"=="" (
|
||||||
set Result=
|
echo.
|
||||||
set VersionFile="%~dp0..\..\..\libretroshare\src\retroshare\rsversion.h"
|
echo Parameter error.
|
||||||
|
exit /B 1
|
||||||
if not exist "%VersionFile%" (
|
)
|
||||||
echo.
|
|
||||||
echo Version file doesn't exist.
|
if not exist "%Executable%" (
|
||||||
echo %VersionFile%
|
echo.
|
||||||
exit /B1
|
echo File %Executable% doesn't exist.
|
||||||
)
|
exit /B1
|
||||||
|
)
|
||||||
for /F "usebackq tokens=1,2,3" %%A in (%VersionFile%) do (
|
|
||||||
if "%%A"=="#define" (
|
set VersionMajor=
|
||||||
if "%%B"=="%Define%" (
|
set VersionMinor=
|
||||||
set Result=%%~C
|
set VersionMini=
|
||||||
)
|
set VersionExtra=
|
||||||
)
|
|
||||||
)
|
for /F "tokens=1,2,3,* delims=.-" %%A in ('%EnvToolsPath%\sigcheck.exe -nobanner -n %Executable%') do (
|
||||||
|
set VersionMajor=%%A
|
||||||
endlocal & set %Variable%=%Result%
|
set VersionMinor=%%B
|
||||||
|
set VersionMini=%%C
|
||||||
|
set VersionExtra=%%D
|
||||||
|
)
|
||||||
|
|
||||||
|
endlocal & set %Variable%.Major=%VersionMajor%& set %Variable%.Minor=%VersionMinor%& set %Variable%.Mini=%VersionMini%& set %Variable%.Extra=%VersionExtra%&
|
||||||
exit /B 0
|
exit /B 0
|
@ -1,20 +1,20 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call msys2-path.bat path variable
|
:: call msys2-path.bat path variable
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set WinPath=%~1
|
set WinPath=%~1
|
||||||
set MSYS2Var=%~2
|
set MSYS2Var=%~2
|
||||||
|
|
||||||
if "%MSYS2Var%"=="" (
|
if "%MSYS2Var%"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
set MSYS2Path=/%WinPath:~0,1%/%WinPath:~3%
|
set MSYS2Path=/%WinPath:~0,1%/%WinPath:~3%
|
||||||
set MSYS2Path=%MSYS2Path:\=/%
|
set MSYS2Path=%MSYS2Path:\=/%
|
||||||
|
|
||||||
endlocal & set %MSYS2Var%=%MSYS2Path%
|
endlocal & set %MSYS2Var%=%MSYS2Path%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call remove-dir.bat path
|
:: call remove-dir.bat path
|
||||||
|
|
||||||
if "%~1"=="" (
|
if "%~1"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist %1 (
|
if exist %1 (
|
||||||
del /s /f /q %1 >nul
|
del /s /f /q %1 >nul
|
||||||
rmdir /s /q %1
|
rmdir /s /q %1
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,27 +1,27 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
%cecho% info "Build libraries"
|
%cecho% info "Build libraries"
|
||||||
call "%~dp0build-libs\build-libs.bat"
|
call "%~dp0build-libs\build-libs.bat"
|
||||||
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Build %SourceName%"
|
%cecho% info "Build %SourceName%"
|
||||||
call "%~dp0build\build.bat" release tor version autologin plugins
|
call "%~dp0build\build.bat" release tor autologin plugins
|
||||||
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Pack %SourceName%"
|
%cecho% info "Pack %SourceName%"
|
||||||
call "%~dp0build\pack.bat" release tor
|
call "%~dp0build\pack.bat" release tor
|
||||||
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
%cecho% info "Build libraries"
|
%cecho% info "Build libraries"
|
||||||
call "%~dp0build-libs\build-libs.bat"
|
call "%~dp0build-libs\build-libs.bat"
|
||||||
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Build %SourceName%"
|
%cecho% info "Build %SourceName%"
|
||||||
call "%~dp0build\build.bat" release version autologin plugins
|
call "%~dp0build\build.bat" release autologin plugins
|
||||||
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Pack %SourceName%"
|
%cecho% info "Pack %SourceName%"
|
||||||
call "%~dp0build\pack.bat" release
|
call "%~dp0build\pack.bat" release
|
||||||
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Build installer"
|
%cecho% info "Build installer"
|
||||||
call "%~dp0build\build-installer.bat"
|
call "%~dp0build\build-installer.bat"
|
||||||
if errorlevel 1 %cecho% error "Failed to build installer." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build installer." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -31,15 +31,13 @@ set NSIS_PARAM=%NSIS_PARAM% /DOUTDIR="%RsPackPath%"
|
|||||||
set NSIS_PARAM=%NSIS_PARAM% /DINSTALLERADD="%RsArchiveAdd%"
|
set NSIS_PARAM=%NSIS_PARAM% /DINSTALLERADD="%RsArchiveAdd%"
|
||||||
set NSIS_PARAM=%NSIS_PARAM% /DEXTERNAL_LIB_DIR="%BuildLibsPath%\libs"
|
set NSIS_PARAM=%NSIS_PARAM% /DEXTERNAL_LIB_DIR="%BuildLibsPath%\libs"
|
||||||
|
|
||||||
:: Scan version from source
|
:: Get compiled version
|
||||||
set RsRevision=
|
call "%ToolsPath%\get-rs-version.bat" "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare.exe" RsVersion
|
||||||
set RsBuildAdd=
|
if errorlevel 1 %cecho% error "Version not found."& exit /B 1
|
||||||
call "%ToolsPath%\get-rs-version.bat" RS_REVISION_STRING RsRevision
|
|
||||||
if "%RsRevision%"=="" echo Revision not found.& exit /B 1
|
|
||||||
call "%ToolsPath%\get-rs-version.bat" RS_BUILD_NUMBER_ADD RsBuildAdd
|
|
||||||
if errorlevel 1 exit /B 1
|
|
||||||
|
|
||||||
set NSIS_PARAM=%NSIS_PARAM% /DREVISION=%RsRevision% /DBUILDADD=%RsBuildAdd%
|
if "%RsVersion.Extra%"=="" %cecho% error "Extra number not found".& exit /B 1
|
||||||
|
|
||||||
|
set NSIS_PARAM=%NSIS_PARAM% /DREVISION=%RsVersion.Extra%
|
||||||
|
|
||||||
set QtMainVersion=%QtVersion:~0,1%
|
set QtMainVersion=%QtVersion:~0,1%
|
||||||
|
|
||||||
|
@ -22,13 +22,12 @@ set /P LibsGCCVersion=<"%BuildLibsPath%\libs\gcc-version"
|
|||||||
if "%LibsGCCVersion%" NEQ "%GCCVersion%" %cecho% error "Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%)." & exit /B 1
|
if "%LibsGCCVersion%" NEQ "%GCCVersion%" %cecho% error "Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%)." & exit /B 1
|
||||||
|
|
||||||
:: Check git executable
|
:: Check git executable
|
||||||
if "%ParamVersion%"=="0" goto found_git
|
|
||||||
set GitPath=
|
set GitPath=
|
||||||
call "%ToolsPath%\find-in-path.bat" GitPath git.exe
|
call "%ToolsPath%\find-in-path.bat" GitPath git.exe
|
||||||
if "%GitPath%" NEQ "" goto found_git
|
if "%GitPath%"=="" (
|
||||||
choice /M "Git not found in PATH. Version information cannot be calculated. Do you want to proceed?"
|
%cecho% error "Git not found in PATH. Version information cannot be determined."
|
||||||
if %errorlevel%==2 exit /B 1
|
exit /B 1
|
||||||
:found_git
|
)
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo === Version
|
echo === Version
|
||||||
@ -75,7 +74,7 @@ popd
|
|||||||
|
|
||||||
title %COMSPEC%
|
title %COMSPEC%
|
||||||
|
|
||||||
if errorlevel 1 echo.& echo Build failed& echo.
|
if errorlevel 1 %cecho% error "\nBuild failed\n"
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
:: Process commandline parameter
|
:: Process commandline parameter
|
||||||
set ParamRelease=0
|
set ParamRelease=0
|
||||||
set ParamDebug=0
|
set ParamDebug=0
|
||||||
set ParamVersion=0
|
|
||||||
set ParamAutologin=0
|
set ParamAutologin=0
|
||||||
set ParamPlugins=0
|
set ParamPlugins=0
|
||||||
set ParamTor=0
|
set ParamTor=0
|
||||||
@ -13,8 +12,6 @@ if "%~1" NEQ "" (
|
|||||||
set ParamRelease=1
|
set ParamRelease=1
|
||||||
) else if "%%~a"=="debug" (
|
) else if "%%~a"=="debug" (
|
||||||
set ParamDebug=1
|
set ParamDebug=1
|
||||||
) else if "%%~a"=="version" (
|
|
||||||
set ParamVersion=1
|
|
||||||
) else if "%%~a"=="autologin" (
|
) else if "%%~a"=="autologin" (
|
||||||
set ParamAutologin=1
|
set ParamAutologin=1
|
||||||
) else if "%%~a"=="plugins" (
|
) else if "%%~a"=="plugins" (
|
||||||
@ -95,7 +92,6 @@ echo Mandatory parameter
|
|||||||
echo release^|debug Build release or debug version
|
echo release^|debug Build release or debug version
|
||||||
echo.
|
echo.
|
||||||
echo Optional parameter (need clean when changed)
|
echo Optional parameter (need clean when changed)
|
||||||
echo version Create version information from git
|
|
||||||
echo autologin Build with autologin
|
echo autologin Build with autologin
|
||||||
echo plugins Build plugins
|
echo plugins Build plugins
|
||||||
echo.
|
echo.
|
||||||
|
@ -32,27 +32,21 @@ if not exist "%RsBuildPath%\Makefile" echo Project is not compiled.& goto error
|
|||||||
:: Get compiled revision
|
:: Get compiled revision
|
||||||
set GetRsVersion=%SourcePath%\build_scripts\Windows\tools\get-rs-version.bat
|
set GetRsVersion=%SourcePath%\build_scripts\Windows\tools\get-rs-version.bat
|
||||||
if not exist "%GetRsVersion%" (
|
if not exist "%GetRsVersion%" (
|
||||||
echo File not found
|
%cecho% error "File not found"
|
||||||
echo %GetRsVersion%
|
echo %GetRsVersion%
|
||||||
goto error
|
goto error
|
||||||
)
|
)
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_REVISION_STRING RsRevision
|
|
||||||
if "%RsRevision%"=="" echo Revision not found.& goto error
|
|
||||||
|
|
||||||
:: Get compiled version
|
:: Get compiled version
|
||||||
call "%GetRsVersion%" RS_MAJOR_VERSION RsMajorVersion
|
call "%GetRsVersion%" "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare.exe" RsVersion
|
||||||
if "%RsMajorVersion%"=="" echo Major version not found.& goto error
|
if errorlevel 1 %cecho% error "Version not found."& goto error
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_MINOR_VERSION RsMinorVersion
|
if "%RsVersion.Major%"=="" %cecho% error "Major version not found."& goto error
|
||||||
if "%RsMinorVersion%"=="" echo Minor version not found.& goto error
|
if "%RsVersion.Minor%"=="" %cecho% error "Minor version not found."& goto error
|
||||||
|
if "%RsVersion.Mini%"=="" %cecho% error "Mini number not found".& goto error
|
||||||
|
if "%RsVersion.Extra%"=="" %cecho% error "Extra number not found".& goto error
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_BUILD_NUMBER RsBuildNumber
|
set RsVersion=%RsVersion.Major%.%RsVersion.Minor%.%RsVersion.Mini%
|
||||||
if "%RsBuildNumber%"=="" echo Build number not found.& goto error
|
|
||||||
|
|
||||||
call "%GetRsVersion%" RS_BUILD_NUMBER_ADD RsBuildNumberAdd
|
|
||||||
|
|
||||||
set RsVersion=%RsMajorVersion%.%RsMinorVersion%.%RsBuildNumber%%RsBuildNumberAdd%
|
|
||||||
|
|
||||||
:: Check WMIC is available
|
:: Check WMIC is available
|
||||||
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& goto error
|
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& goto error
|
||||||
@ -65,10 +59,7 @@ set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
|||||||
if "%ParamTor%"=="1" (
|
if "%ParamTor%"=="1" (
|
||||||
:: Check for tor executable
|
:: Check for tor executable
|
||||||
if not exist "%EnvDownloadPath%\tor\Tor\tor.exe" (
|
if not exist "%EnvDownloadPath%\tor\Tor\tor.exe" (
|
||||||
echo Tor binary not found. Please download Tor Expert Bundle from
|
%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"
|
||||||
echo https://www.torproject.org/download/download.html.en
|
|
||||||
echo and unpack to
|
|
||||||
echo %EnvDownloadPath%\tor
|
|
||||||
goto error
|
goto error
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -83,9 +74,9 @@ if "%QtMainVersion%"=="4" set QtMainVersion2=4
|
|||||||
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
||||||
|
|
||||||
if "%RsBuildConfig%" NEQ "release" (
|
if "%RsBuildConfig%" NEQ "release" (
|
||||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
||||||
) else (
|
) else (
|
||||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%%RsArchiveAdd%.7z
|
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%%RsType%%RsArchiveAdd%.7z
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%Archive%" del /Q "%Archive%"
|
if exist "%Archive%" del /Q "%Archive%"
|
||||||
@ -98,7 +89,7 @@ title Pack - %SourceName%%RsType%-%RsBuildConfig% [copy files]
|
|||||||
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
||||||
set Extensions=
|
set Extensions=
|
||||||
for /f %%e in ('type "%ExtensionsFile%" ^| "%EnvSedExe%" -n "s/^.*\/\(extensions[^/]*\)\/.*$/\1/p" ^| "%EnvSedExe%" -n "1,1p"') do set Extensions=%%e
|
for /f %%e in ('type "%ExtensionsFile%" ^| "%EnvSedExe%" -n "s/^.*\/\(extensions[^/]*\)\/.*$/\1/p" ^| "%EnvSedExe%" -n "1,1p"') do set Extensions=%%e
|
||||||
if "%Extensions%"=="" echo Folder for extensions not found in %ExtensionsFile%& goto error
|
if "%Extensions%"=="" %cecho% error "Folder for extensions not found in %ExtensionsFile%"& goto error
|
||||||
|
|
||||||
:: Copy files
|
:: Copy files
|
||||||
mkdir "%RsDeployPath%\Data\%Extensions%"
|
mkdir "%RsDeployPath%\Data\%Extensions%"
|
||||||
|
44
build_scripts/Windows/env/env-msys.bat
vendored
44
build_scripts/Windows/env/env-msys.bat
vendored
@ -1,22 +1,22 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call env-msys.bat [reinstall|clean]
|
:: call env-msys.bat [reinstall|clean]
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
set EnvMSYSPath=%EnvRootPath%\msys
|
set EnvMSYSPath=%EnvRootPath%\msys
|
||||||
|
|
||||||
call "%~dp0tools\prepare-msys.bat" %1
|
call "%~dp0tools\prepare-msys.bat" %1
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
set EnvMSYSSH=%EnvMSYSPath%\msys\1.0\bin\sh.exe
|
set EnvMSYSSH=%EnvMSYSPath%\msys\1.0\bin\sh.exe
|
||||||
if not exist "%EnvMSYSSH%" if errorlevel 1 goto error_env
|
if not exist "%EnvMSYSSH%" if errorlevel 1 goto error_env
|
||||||
|
|
||||||
set EnvMSYSCmd="%EnvMSYSSH%" --login -i -c
|
set EnvMSYSCmd="%EnvMSYSSH%" --login -i -c
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
46
build_scripts/Windows/env/env-qt.bat
vendored
46
build_scripts/Windows/env/env-qt.bat
vendored
@ -1,23 +1,23 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call env-qt4.bat version [reinstall|clean]
|
:: call env-qt4.bat version [reinstall|clean]
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
set EnvQtBasePath=%EnvRootPath%\qt
|
set EnvQtBasePath=%EnvRootPath%\qt
|
||||||
|
|
||||||
:: Create folders
|
:: Create folders
|
||||||
if not exist "%EnvQtBasePath%" mkdir "%EnvQtBasePath%"
|
if not exist "%EnvQtBasePath%" mkdir "%EnvQtBasePath%"
|
||||||
|
|
||||||
call "%~dp0tools\prepare-qt.bat" %1 %2
|
call "%~dp0tools\prepare-qt.bat" %1 %2
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
if "%MinGWDir%" NEQ "" set PATH=%MinGWDir%\bin;%PATH%
|
if "%MinGWDir%" NEQ "" set PATH=%MinGWDir%\bin;%PATH%
|
||||||
if "%QtDir%" NEQ "" set PATH=%QtDir%\bin;%PATH%
|
if "%QtDir%" NEQ "" set PATH=%QtDir%\bin;%PATH%
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
8
build_scripts/Windows/env/env.bat
vendored
8
build_scripts/Windows/env/env.bat
vendored
@ -24,7 +24,13 @@ if not exist "%EnvToolsPath%" mkdir "%EnvToolsPath%"
|
|||||||
if not exist "%EnvDownloadPath%" mkdir "%EnvDownloadPath%"
|
if not exist "%EnvDownloadPath%" mkdir "%EnvDownloadPath%"
|
||||||
|
|
||||||
call "%~dp0tools\prepare-tools.bat"
|
call "%~dp0tools\prepare-tools.bat"
|
||||||
exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
:: Add MinGit to PATH
|
||||||
|
set PATH=%EnvToolsPath%\MinGit\cmd;%PATH%
|
||||||
|
set HOME=%EnvToolsPath%\MinGit\home
|
||||||
|
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
|
408
build_scripts/Windows/env/tools/prepare-qt.bat
vendored
408
build_scripts/Windows/env/tools/prepare-qt.bat
vendored
@ -1,204 +1,204 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call prepare-qt.bat version [reinstall|clean]
|
:: call prepare-qt.bat version [reinstall|clean]
|
||||||
|
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
if "%EnvQtBasePath%"=="" exit /B 1
|
if "%EnvQtBasePath%"=="" exit /B 1
|
||||||
if not exist "%EnvRootPath%"=="" exit /B 1
|
if not exist "%EnvRootPath%"=="" exit /B 1
|
||||||
|
|
||||||
set EnvQtVersion=%~1
|
set EnvQtVersion=%~1
|
||||||
if "%EnvQtVersion%"=="" (
|
if "%EnvQtVersion%"=="" (
|
||||||
%cecho% error "Please specify Qt version"
|
%cecho% error "Please specify Qt version"
|
||||||
goto error
|
goto error
|
||||||
)
|
)
|
||||||
|
|
||||||
for /f "tokens=1,2 delims=." %%A in ("%EnvQtVersion%") do set EnvQtMainVersion=%%A& set EnvQtBaseVersion=%%A.%%B
|
for /f "tokens=1,2 delims=." %%A in ("%EnvQtVersion%") do set EnvQtMainVersion=%%A& set EnvQtBaseVersion=%%A.%%B
|
||||||
set EnvQtPath=%EnvQtBasePath%\%EnvQtVersion%
|
set EnvQtPath=%EnvQtBasePath%\%EnvQtVersion%
|
||||||
|
|
||||||
if "%~2"=="clean" (
|
if "%~2"=="clean" (
|
||||||
%cecho% info "Clean Qt %EnvQtVersion%"
|
%cecho% info "Clean Qt %EnvQtVersion%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvQtPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvQtPath%"
|
||||||
goto exit
|
goto exit
|
||||||
)
|
)
|
||||||
|
|
||||||
set CheckQmakeExe=
|
set CheckQmakeExe=
|
||||||
if "%EnvQtMainVersion%"=="4" (
|
if "%EnvQtMainVersion%"=="4" (
|
||||||
set CheckQmakeExe=%EnvQtPath%\Qt\bin\qmake.exe
|
set CheckQmakeExe=%EnvQtPath%\Qt\bin\qmake.exe
|
||||||
) else (
|
) else (
|
||||||
if "%EnvQtMainVersion%" GEQ "5" (
|
if "%EnvQtMainVersion%" GEQ "5" (
|
||||||
call :get_mingw_version EnvQtMinGWVersion "%EnvQtPath%\%EnvQtBaseVersion%"
|
call :get_mingw_version EnvQtMinGWVersion "%EnvQtPath%\%EnvQtBaseVersion%"
|
||||||
if "!EnvQtMinGWVersion!" NEQ "" (
|
if "!EnvQtMinGWVersion!" NEQ "" (
|
||||||
set CheckQmakeExe=%EnvQtPath%\%EnvQtBaseVersion%\!EnvQtMinGWVersion!\bin\qmake.exe
|
set CheckQmakeExe=%EnvQtPath%\%EnvQtBaseVersion%\!EnvQtMinGWVersion!\bin\qmake.exe
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%CheckQmakeExe%" NEQ "" (
|
if "%CheckQmakeExe%" NEQ "" (
|
||||||
if exist "%CheckQmakeExe%" (
|
if exist "%CheckQmakeExe%" (
|
||||||
if "%~2"=="reinstall" (
|
if "%~2"=="reinstall" (
|
||||||
choice /M "Found existing Qt %EnvQtVersion% version. Do you want to proceed?"
|
choice /M "Found existing Qt %EnvQtVersion% version. Do you want to proceed?"
|
||||||
if !ERRORLEVEL!==2 goto exit
|
if !ERRORLEVEL!==2 goto exit
|
||||||
) else (
|
) else (
|
||||||
goto exit
|
goto exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
set QtInstall=qt-opensource-windows-x86-mingw-%EnvQtVersion%.exe
|
set QtInstall=qt-opensource-windows-x86-mingw-%EnvQtVersion%.exe
|
||||||
set QtInstallWildcard=qt-opensource-windows-x86-mingw*-%EnvQtVersion%.exe
|
set QtInstallWildcard=qt-opensource-windows-x86-mingw*-%EnvQtVersion%.exe
|
||||||
set QtUrl=http://download.qt.io/official_releases/qt/%EnvQtBaseVersion%/%EnvQtVersion%
|
set QtUrl=http://download.qt.io/official_releases/qt/%EnvQtBaseVersion%/%EnvQtVersion%
|
||||||
|
|
||||||
%cecho% info "Remove previous Qt %EnvQtVersion% version"
|
%cecho% info "Remove previous Qt %EnvQtVersion% version"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvQtPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvQtPath%"
|
||||||
|
|
||||||
%cecho% info "Download Qt installation files"
|
%cecho% info "Download Qt installation files"
|
||||||
if not exist "%EnvDownloadPath%\%QtInstall%" (
|
if not exist "%EnvDownloadPath%\%QtInstall%" (
|
||||||
call "%ToolsPath%\download-file-wildcard.bat" "%QtUrl%" "%QtInstallWildcard%" "%EnvDownloadPath%" QtInstallDownload
|
call "%ToolsPath%\download-file-wildcard.bat" "%QtUrl%" "%QtInstallWildcard%" "%EnvDownloadPath%" QtInstallDownload
|
||||||
if "!QtInstallDownload!"=="" %cecho% error "Cannot download Qt %EnvQtVersion%" & goto error
|
if "!QtInstallDownload!"=="" %cecho% error "Cannot download Qt %EnvQtVersion%" & goto error
|
||||||
ren "%EnvDownloadPath%\!QtInstallDownload!" "%QtInstall%"
|
ren "%EnvDownloadPath%\!QtInstallDownload!" "%QtInstall%"
|
||||||
)
|
)
|
||||||
if not exist "%EnvDownloadPath%\%QtInstall%" %cecho% error "Cannot download Qt %EnvQtVersion%" & goto error
|
if not exist "%EnvDownloadPath%\%QtInstall%" %cecho% error "Cannot download Qt %EnvQtVersion%" & goto error
|
||||||
|
|
||||||
mkdir "%EnvQtPath%"
|
mkdir "%EnvQtPath%"
|
||||||
|
|
||||||
if "%EnvQtMainVersion%"=="4" (
|
if "%EnvQtMainVersion%"=="4" (
|
||||||
rem Qt 4
|
rem Qt 4
|
||||||
goto install_qt4
|
goto install_qt4
|
||||||
)
|
)
|
||||||
if "%EnvQtMainVersion%" GEQ "5" (
|
if "%EnvQtMainVersion%" GEQ "5" (
|
||||||
rem Qt >= 5
|
rem Qt >= 5
|
||||||
goto install_qt5
|
goto install_qt5
|
||||||
)
|
)
|
||||||
|
|
||||||
%cecho% error "Unknown Qt version %EnvQtVersion%"
|
%cecho% error "Unknown Qt version %EnvQtVersion%"
|
||||||
|
|
||||||
:error
|
:error
|
||||||
endlocal & set QtDir=& set MinGWDir=
|
endlocal & set QtDir=& set MinGWDir=
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
set QtDir=
|
set QtDir=
|
||||||
set MinGWDir=
|
set MinGWDir=
|
||||||
|
|
||||||
if "%EnvQtMainVersion%"=="4" (
|
if "%EnvQtMainVersion%"=="4" (
|
||||||
rem Qt 4
|
rem Qt 4
|
||||||
set QtDir=%EnvQtBasePath%\%EnvQtVersion%\Qt
|
set QtDir=%EnvQtBasePath%\%EnvQtVersion%\Qt
|
||||||
set MinGWDir=%EnvQtBasePath%\%EnvQtVersion%\mingw32
|
set MinGWDir=%EnvQtBasePath%\%EnvQtVersion%\mingw32
|
||||||
) else (
|
) else (
|
||||||
if "%EnvQtMainVersion%" GEQ "5" (
|
if "%EnvQtMainVersion%" GEQ "5" (
|
||||||
call :get_mingw_version EnvQtToolsMinGWVersion "%EnvQtPath%\Tools"
|
call :get_mingw_version EnvQtToolsMinGWVersion "%EnvQtPath%\Tools"
|
||||||
|
|
||||||
set QtDir=%EnvQtPath%\%EnvQtBaseVersion%\!EnvQtMinGWVersion!
|
set QtDir=%EnvQtPath%\%EnvQtBaseVersion%\!EnvQtMinGWVersion!
|
||||||
set MinGWDir=%EnvQtPath%\Tools\!EnvQtToolsMinGWVersion!
|
set MinGWDir=%EnvQtPath%\Tools\!EnvQtToolsMinGWVersion!
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
endlocal & set QtDir=%QtDir%& set MinGWDir=%MinGWDir%
|
endlocal & set QtDir=%QtDir%& set MinGWDir=%MinGWDir%
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:get_mingw_version
|
:get_mingw_version
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
set Variable=%~1
|
set Variable=%~1
|
||||||
set Result=
|
set Result=
|
||||||
|
|
||||||
for /D %%A in (%~2\*) do set Name=%%~nA& if "!Name:~0,5!"=="mingw" set Result=!Name!
|
for /D %%A in (%~2\*) do set Name=%%~nA& if "!Name:~0,5!"=="mingw" set Result=!Name!
|
||||||
endlocal & set %Variable%=%Result%
|
endlocal & set %Variable%=%Result%
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:replace
|
:replace
|
||||||
set InFile=%~1
|
set InFile=%~1
|
||||||
set InFileName=%~nx1
|
set InFileName=%~nx1
|
||||||
set OutFile=%~1.tmp
|
set OutFile=%~1.tmp
|
||||||
set SearchText=%~2
|
set SearchText=%~2
|
||||||
set ReplaceText=%~3
|
set ReplaceText=%~3
|
||||||
|
|
||||||
if exist "%OutFile%" del /Q "%OutFile%"
|
if exist "%OutFile%" del /Q "%OutFile%"
|
||||||
|
|
||||||
for /f "tokens=1* delims=]" %%A in ('find /n /v ""^<%InFile%') do (
|
for /f "tokens=1* delims=]" %%A in ('find /n /v ""^<%InFile%') do (
|
||||||
set string=%%B
|
set string=%%B
|
||||||
|
|
||||||
if "!string!"=="" (
|
if "!string!"=="" (
|
||||||
echo.>>%OutFile%
|
echo.>>%OutFile%
|
||||||
) else (
|
) else (
|
||||||
set modified=!string:%SearchText%=%ReplaceText%!
|
set modified=!string:%SearchText%=%ReplaceText%!
|
||||||
echo !modified!>> %OutFile%
|
echo !modified!>> %OutFile%
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
del "%InFile%"
|
del "%InFile%"
|
||||||
rename "%OutFile%" "%InFileName%"
|
rename "%OutFile%" "%InFileName%"
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:install_qt4
|
:install_qt4
|
||||||
set MinGWInstall=i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z
|
set MinGWInstall=i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z
|
||||||
set MinGWUrl=http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/4.8.2/threads-posix/dwarf/%MinGWInstall%/download
|
set MinGWUrl=http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/4.8.2/threads-posix/dwarf/%MinGWInstall%/download
|
||||||
|
|
||||||
%cecho% info "Download MinGW installation files"
|
%cecho% info "Download MinGW installation files"
|
||||||
if not exist "%EnvDownloadPath%\%MinGWInstall%" call "%ToolsPath%\download-file.bat" "%MinGWUrl%" "%EnvDownloadPath%\%MinGWInstall%"
|
if not exist "%EnvDownloadPath%\%MinGWInstall%" call "%ToolsPath%\download-file.bat" "%MinGWUrl%" "%EnvDownloadPath%\%MinGWInstall%"
|
||||||
if not exist "%EnvDownloadPath%\%MinGWInstall%" %cecho% error "Cannot download MinGW" & goto error
|
if not exist "%EnvDownloadPath%\%MinGWInstall%" %cecho% error "Cannot download MinGW" & goto error
|
||||||
|
|
||||||
%cecho% info "Unpack Qt %EnvQtVersion%"
|
%cecho% info "Unpack Qt %EnvQtVersion%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
mkdir "%EnvTempPath%"
|
mkdir "%EnvTempPath%"
|
||||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%QtInstall%" $_14_
|
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%QtInstall%" $_14_
|
||||||
move "%EnvTempPath%\$_14_" "%EnvQtPath%\Qt"
|
move "%EnvTempPath%\$_14_" "%EnvQtPath%\Qt"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
|
|
||||||
%cecho% info "Unpack MinGW"
|
%cecho% info "Unpack MinGW"
|
||||||
"%EnvSevenZipExe%" x -o"%EnvQtPath%" "%EnvDownloadPath%\%MinGWInstall%"
|
"%EnvSevenZipExe%" x -o"%EnvQtPath%" "%EnvDownloadPath%\%MinGWInstall%"
|
||||||
|
|
||||||
echo Prepare Qt %EnvQtVersion%
|
echo Prepare Qt %EnvQtVersion%
|
||||||
echo [Paths]>"%EnvQtPath%\Qt\bin\qt.conf"
|
echo [Paths]>"%EnvQtPath%\Qt\bin\qt.conf"
|
||||||
echo Prefix=..>>"%EnvQtPath%\Qt\bin\qt.conf"
|
echo Prefix=..>>"%EnvQtPath%\Qt\bin\qt.conf"
|
||||||
|
|
||||||
goto exit
|
goto exit
|
||||||
|
|
||||||
:install_qt5
|
:install_qt5
|
||||||
set EnvQtInstallerFrameworkVersion=2.0.3
|
set EnvQtInstallerFrameworkVersion=2.0.3
|
||||||
|
|
||||||
set QtInstallerFrameworkInstall=QtInstallerFramework-%EnvQtInstallerFrameworkVersion%-win-x86.exe
|
set QtInstallerFrameworkInstall=QtInstallerFramework-%EnvQtInstallerFrameworkVersion%-win-x86.exe
|
||||||
set QtInstallerFrameworkUrl=http://download.qt.io/official_releases/qt-installer-framework/%EnvQtInstallerFrameworkVersion%/QtInstallerFramework-win-x86.exe
|
set QtInstallerFrameworkUrl=http://download.qt.io/official_releases/qt-installer-framework/%EnvQtInstallerFrameworkVersion%/QtInstallerFramework-win-x86.exe
|
||||||
|
|
||||||
%cecho% info "Download QtInstallerFramework installation files"
|
%cecho% info "Download QtInstallerFramework installation files"
|
||||||
if not exist "%EnvDownloadPath%\%QtInstallerFrameworkInstall%" call "%ToolsPath%\download-file.bat" "%QtInstallerFrameworkUrl%" "%EnvDownloadPath%\%QtInstallerFrameworkInstall%"
|
if not exist "%EnvDownloadPath%\%QtInstallerFrameworkInstall%" call "%ToolsPath%\download-file.bat" "%QtInstallerFrameworkUrl%" "%EnvDownloadPath%\%QtInstallerFrameworkInstall%"
|
||||||
if not exist "%EnvDownloadPath%\%QtInstallerFrameworkInstall%" %cecho% error "Cannot download Qt Installer Framework %EnvQtInstallerFrameworkVersion%" & goto error
|
if not exist "%EnvDownloadPath%\%QtInstallerFrameworkInstall%" %cecho% error "Cannot download Qt Installer Framework %EnvQtInstallerFrameworkVersion%" & goto error
|
||||||
|
|
||||||
%cecho% info "Unpack Qt Installer Framework"
|
%cecho% info "Unpack Qt Installer Framework"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
mkdir "%EnvTempPath%"
|
mkdir "%EnvTempPath%"
|
||||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%QtInstallerFrameworkInstall%" bin\devtool.exe
|
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%QtInstallerFrameworkInstall%" bin\devtool.exe
|
||||||
move "%EnvTempPath%\bin\devtool.exe" "%EnvQtPath%"
|
move "%EnvTempPath%\bin\devtool.exe" "%EnvQtPath%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
|
|
||||||
%cecho% info "Unpack Qt %EnvQtVersion%"
|
%cecho% info "Unpack Qt %EnvQtVersion%"
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
mkdir "%EnvTempPath%"
|
mkdir "%EnvTempPath%"
|
||||||
"%EnvQtPath%\devtool.exe" "%EnvDownloadPath%\%QtInstall%" --dump "%EnvTempPath%"
|
"%EnvQtPath%\devtool.exe" "%EnvDownloadPath%\%QtInstall%" --dump "%EnvTempPath%"
|
||||||
|
|
||||||
pushd "%EnvTempPath%"
|
pushd "%EnvTempPath%"
|
||||||
del /S *vcredist*.7z
|
del /S *vcredist*.7z
|
||||||
del /S *qtcreator*.7z
|
del /S *qtcreator*.7z
|
||||||
del /S *1installer-changelog.7z
|
del /S *1installer-changelog.7z
|
||||||
for /R %%F in (*.7z) do "%EnvSevenZipExe%" x -y -o"%EnvQtPath%" "%%F"
|
for /R %%F in (*.7z) do "%EnvSevenZipExe%" x -y -o"%EnvQtPath%" "%%F"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
|
|
||||||
call :get_mingw_version EnvQtMinGWVersion "%EnvQtPath%\%EnvQtBaseVersion%"
|
call :get_mingw_version EnvQtMinGWVersion "%EnvQtPath%\%EnvQtBaseVersion%"
|
||||||
|
|
||||||
%cecho% info "Prepare Qt %EnvQtVersion%"
|
%cecho% info "Prepare Qt %EnvQtVersion%"
|
||||||
echo [Paths]>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
echo [Paths]>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
||||||
echo Documentation=../../Docs/Qt-%EnvQtBaseVersion%>>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
echo Documentation=../../Docs/Qt-%EnvQtBaseVersion%>>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
||||||
echo Examples=../../Examples/Qt-%EnvQtBaseVersion%>>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
echo Examples=../../Examples/Qt-%EnvQtBaseVersion%>>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
||||||
echo Prefix=..>>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
echo Prefix=..>>"%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\bin\qt.conf"
|
||||||
|
|
||||||
call :replace "%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\mkspecs\qconfig.pri" "Enterprise" "OpenSource"
|
call :replace "%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\mkspecs\qconfig.pri" "Enterprise" "OpenSource"
|
||||||
|
|
||||||
for /R "%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\lib" %%A in (*.pc) do (
|
for /R "%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\lib" %%A in (*.pc) do (
|
||||||
call :replace "%%A" "c:/Users/qt/work/install" "%EnvQtPath:\=\\%\%EnvQtBaseVersion%\\%EnvQtMinGWVersion%"
|
call :replace "%%A" "c:/Users/qt/work/install" "%EnvQtPath:\=\\%\%EnvQtBaseVersion%\\%EnvQtMinGWVersion%"
|
||||||
call :replace "%%A" "c:\Users\qt\work\install" "%EnvQtPath:\=/%\%EnvQtBaseVersion%/%EnvQtMinGWVersion%"
|
call :replace "%%A" "c:\Users\qt\work\install" "%EnvQtPath:\=/%\%EnvQtBaseVersion%/%EnvQtMinGWVersion%"
|
||||||
)
|
)
|
||||||
for /R "%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\lib" %%A in (*.prl) do (
|
for /R "%EnvQtPath%\%EnvQtBaseVersion%\%EnvQtMinGWVersion%\lib" %%A in (*.prl) do (
|
||||||
call :replace "%%A" "c:/Users/qt/work/install" "%EnvQtPath:\=\\%\%EnvQtBaseVersion%\\%EnvQtMinGWVersion%"
|
call :replace "%%A" "c:/Users/qt/work/install" "%EnvQtPath:\=\\%\%EnvQtBaseVersion%\\%EnvQtMinGWVersion%"
|
||||||
call :replace "%%A" "c:\Users\qt\work\install" "%EnvQtPath:\=/%\%EnvQtBaseVersion%/%EnvQtMinGWVersion%"
|
call :replace "%%A" "c:\Users\qt\work\install" "%EnvQtPath:\=/%\%EnvQtBaseVersion%/%EnvQtMinGWVersion%"
|
||||||
)
|
)
|
||||||
goto exit
|
goto exit
|
||||||
|
@ -19,6 +19,11 @@ set UnixToolsInstall=UnxUpdates.zip
|
|||||||
set NSISUrl=http://prdownloads.sourceforge.net/nsis/nsis-3.0-setup.exe?download
|
set NSISUrl=http://prdownloads.sourceforge.net/nsis/nsis-3.0-setup.exe?download
|
||||||
set NSISInstall=nsis-3.0-setup.exe
|
set NSISInstall=nsis-3.0-setup.exe
|
||||||
set NSISInstallPath=%EnvToolsPath%\NSIS
|
set NSISInstallPath=%EnvToolsPath%\NSIS
|
||||||
|
set MinGitInstall=MinGit-2.19.1-32-bit.zip
|
||||||
|
set MinGitUrl=https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/%MinGitInstall%
|
||||||
|
set MinGitInstallPath=%EnvToolsPath%\MinGit
|
||||||
|
set SigcheckInstall=Sigcheck.zip
|
||||||
|
set SigcheckUrl=https://download.sysinternals.com/files/%SigcheckInstall%
|
||||||
|
|
||||||
if not exist "%EnvToolsPath%\wget.exe" (
|
if not exist "%EnvToolsPath%\wget.exe" (
|
||||||
echo Download Wget installation
|
echo Download Wget installation
|
||||||
@ -143,7 +148,7 @@ if not exist "%EnvToolsPath%\sed.exe" (
|
|||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
)
|
)
|
||||||
|
|
||||||
if not exist "%EnvToolsPath%\NSIS\nsis.exe" (
|
if not exist "%NSISInstallPath%\nsis.exe" (
|
||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
mkdir "%EnvTempPath%"
|
mkdir "%EnvTempPath%"
|
||||||
|
|
||||||
@ -160,6 +165,26 @@ if not exist "%EnvToolsPath%\NSIS\nsis.exe" (
|
|||||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not exist "%MinGitInstallPath%\cmd\git.exe" (
|
||||||
|
%cecho% info "Download MinGit installation"
|
||||||
|
|
||||||
|
if not exist "%EnvDownloadPath%\%MinGitInstall%" call "%ToolsPath%\download-file.bat" "%MinGitUrl%" "%EnvDownloadPath%\%MinGitInstall%"
|
||||||
|
if not exist "%EnvDownloadPath%\%MinGitInstall%" %cecho% error "Cannot download MinGit installation" & goto error
|
||||||
|
|
||||||
|
%cecho% info "Unpack MinGit"
|
||||||
|
"%EnvSevenZipExe%" x -o"%MinGitInstallPath%" "%EnvDownloadPath%\%MinGitInstall%"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%EnvToolsPath%\sigcheck.exe" (
|
||||||
|
%cecho% info "Download Sigcheck installation"
|
||||||
|
|
||||||
|
if not exist "%EnvDownloadPath%\%SigcheckInstall%" call "%ToolsPath%\download-file.bat" "%SigcheckUrl%" "%EnvDownloadPath%\%SigcheckInstall%"
|
||||||
|
if not exist "%EnvDownloadPath%\%SigcheckInstall%" %cecho% error "Cannot download Sigcheck installation" & goto error
|
||||||
|
|
||||||
|
%cecho% info "Unpack Sigcheck"
|
||||||
|
"%EnvSevenZipExe%" x -o"%EnvToolsPath%" "%EnvDownloadPath%\%SigcheckInstall%" sigcheck.exe
|
||||||
|
)
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
!include ifexist.nsh
|
!include ifexist.nsh
|
||||||
|
|
||||||
# Needed defines
|
# Needed defines
|
||||||
;!define BUILDADD ""
|
;!define REVISION ""
|
||||||
;!define RELEASEDIR ""
|
;!define RELEASEDIR ""
|
||||||
;!define QTDIR ""
|
;!define QTDIR ""
|
||||||
;!define MINGWDIR ""
|
;!define MINGWDIR ""
|
||||||
@ -13,10 +13,6 @@
|
|||||||
;!define OUTDIR ""
|
;!define OUTDIR ""
|
||||||
|
|
||||||
# Check needed defines
|
# Check needed defines
|
||||||
!ifndef BUILDADD
|
|
||||||
!error "BUILDADD is not defined"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!ifndef RELEASEDIR
|
!ifndef RELEASEDIR
|
||||||
!error "RELEASEDIR is not defined"
|
!error "RELEASEDIR is not defined"
|
||||||
!endif
|
!endif
|
||||||
@ -44,7 +40,7 @@
|
|||||||
|
|
||||||
# Get version from executable
|
# Get version from executable
|
||||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
||||||
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}${BUILDADD}
|
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}
|
||||||
;!define REVISION ${VERSION_4}
|
;!define REVISION ${VERSION_4}
|
||||||
|
|
||||||
# Get version of Qt
|
# Get version of Qt
|
||||||
@ -56,10 +52,6 @@
|
|||||||
!error "REVISION is not defined"
|
!error "REVISION is not defined"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifndef REVISION
|
|
||||||
!error "REVISION is not defined"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# Date
|
# Date
|
||||||
!define /date Date "%Y%m%d"
|
!define /date Date "%Y%m%d"
|
||||||
|
|
||||||
@ -254,7 +246,7 @@ ${!defineifexist} PLUGIN_VOIP_EXISTS "${RELEASEDIR}\plugins\VOIP\release\VOIP.dl
|
|||||||
File "${RELEASEDIR}\plugins\FeedReader\release\FeedReader.dll"
|
File "${RELEASEDIR}\plugins\FeedReader\release\FeedReader.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifdef PLUGIN_VOIP_EXISTS
|
!ifdef PLUGIN_VOIP_EXISTS
|
||||||
Section $(Section_Plugin_VOIP) Section_Plugin_VOIP
|
Section $(Section_Plugin_VOIP) Section_Plugin_VOIP
|
||||||
SetOutPath "$DataDir\extensions6"
|
SetOutPath "$DataDir\extensions6"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
!include ifexist.nsh
|
!include ifexist.nsh
|
||||||
|
|
||||||
# Needed defines
|
# Needed defines
|
||||||
;!define BUILDADD ""
|
;!define REVISION ""
|
||||||
;!define RELEASEDIR ""
|
;!define RELEASEDIR ""
|
||||||
;!define QTDIR ""
|
;!define QTDIR ""
|
||||||
;!define MINGWDIR ""
|
;!define MINGWDIR ""
|
||||||
@ -13,10 +13,6 @@
|
|||||||
;!define OUTDIR ""
|
;!define OUTDIR ""
|
||||||
|
|
||||||
# Check needed defines
|
# Check needed defines
|
||||||
!ifndef BUILDADD
|
|
||||||
!error "BUILDADD is not defined"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!ifndef RELEASEDIR
|
!ifndef RELEASEDIR
|
||||||
!error "RELEASEDIR is not defined"
|
!error "RELEASEDIR is not defined"
|
||||||
!endif
|
!endif
|
||||||
@ -44,7 +40,7 @@
|
|||||||
|
|
||||||
# Get version from executable
|
# Get version from executable
|
||||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
||||||
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}${BUILDADD}
|
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}
|
||||||
;!define REVISION ${VERSION_4}
|
;!define REVISION ${VERSION_4}
|
||||||
|
|
||||||
# Get version of Qt
|
# Get version of Qt
|
||||||
@ -56,10 +52,6 @@
|
|||||||
!error "REVISION is not defined"
|
!error "REVISION is not defined"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifndef REVISION
|
|
||||||
!error "REVISION is not defined"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# Date
|
# Date
|
||||||
!define /date Date "%Y%m%d"
|
!define /date Date "%Y%m%d"
|
||||||
|
|
||||||
@ -276,7 +268,7 @@ ${!defineifexist} PLUGIN_VOIP_EXISTS "${RELEASEDIR}\plugins\VOIP\release\VOIP.dl
|
|||||||
File "${RELEASEDIR}\plugins\FeedReader\release\FeedReader.dll"
|
File "${RELEASEDIR}\plugins\FeedReader\release\FeedReader.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifdef PLUGIN_VOIP_EXISTS
|
!ifdef PLUGIN_VOIP_EXISTS
|
||||||
Section $(Section_Plugin_VOIP) Section_Plugin_VOIP
|
Section $(Section_Plugin_VOIP) Section_Plugin_VOIP
|
||||||
SetOutPath "$DataDir\extensions6"
|
SetOutPath "$DataDir\extensions6"
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call qt-cmd.bat <Qt version> [command]
|
:: call qt-cmd.bat <Qt version> [command]
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set QtVersion=%~1
|
set QtVersion=%~1
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env-qt.bat" %QtVersion%
|
call "%EnvPath%\env-qt.bat" %QtVersion%
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
if "%~2"=="" (
|
if "%~2"=="" (
|
||||||
"%ComSpec%"
|
"%ComSpec%"
|
||||||
) else (
|
) else (
|
||||||
"%ComSpec%" /c %2 %3 %4 %5 %6 %7 %8 %9
|
"%ComSpec%" /c %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
:error_env
|
:error_env
|
||||||
echo Failed to initialize environment.
|
echo Failed to initialize environment.
|
||||||
endlocal
|
endlocal
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,46 +1,46 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call download-file-wildcard.bat url file-wildcard download-path variable
|
:: call download-file-wildcard.bat url file-wildcard download-path variable
|
||||||
|
|
||||||
if "%~4"=="" (
|
if "%~4"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%EnvTempPath%"=="" (
|
if "%EnvTempPath%"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Environment error.
|
echo Environment error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set Url=%~1
|
set Url=%~1
|
||||||
set FileWildcard=%~2
|
set FileWildcard=%~2
|
||||||
set DownloadPath=%~3
|
set DownloadPath=%~3
|
||||||
set Var=%~4
|
set Var=%~4
|
||||||
set File=
|
set File=
|
||||||
|
|
||||||
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
||||||
mkdir "%EnvTempPath%"
|
mkdir "%EnvTempPath%"
|
||||||
|
|
||||||
"%EnvWgetExe%" --recursive --continue --no-directories --no-parent -A "%FileWildcard%" --directory-prefix="%EnvTempPath%" "%Url%"
|
"%EnvWgetExe%" --recursive --continue --no-directories --no-parent -A "%FileWildcard%" --directory-prefix="%EnvTempPath%" "%Url%"
|
||||||
|
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
||||||
endlocal & set %Var%=
|
endlocal & set %Var%=
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
)
|
)
|
||||||
|
|
||||||
for %%A in (%EnvTempPath%\%FileWildcard%) do set File=%%~nxA
|
for %%A in (%EnvTempPath%\%FileWildcard%) do set File=%%~nxA
|
||||||
if "%File%"=="" (
|
if "%File%"=="" (
|
||||||
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
||||||
endlocal & set %Var%=
|
endlocal & set %Var%=
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
)
|
)
|
||||||
|
|
||||||
move "%EnvTempPath%\%File%" "%DownloadPath%"
|
move "%EnvTempPath%\%File%" "%DownloadPath%"
|
||||||
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
call "%~dp0remove-dir.bat" "%EnvTempPath%"
|
||||||
|
|
||||||
endlocal & set %Var%=%File%
|
endlocal & set %Var%=%File%
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call download-file.bat url file
|
:: call download-file.bat url file
|
||||||
|
|
||||||
if "%~2"=="" (
|
if "%~2"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
::"%EnvCurlExe%" -L -k "%~1" -o "%~2"
|
::"%EnvCurlExe%" -L -k "%~1" -o "%~2"
|
||||||
"%EnvWgetExe%" --no-check-certificate --continue "%~1" --output-document="%~2"
|
"%EnvWgetExe%" --no-check-certificate --continue "%~1" --output-document="%~2"
|
||||||
|
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call get-rs-version.bat Define Variable
|
:: call get-rs-version.bat Executable Variable
|
||||||
|
::
|
||||||
|
:: Variable.Major
|
||||||
|
:: Variable.Minor
|
||||||
|
:: Variable.Mini
|
||||||
|
:: Variable.Extra
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set Define=%~1
|
set Executable=%~1
|
||||||
set Variable=%~2
|
set Variable=%~2
|
||||||
if "%Variable%"=="" (
|
if "%Variable%"=="" (
|
||||||
echo.
|
echo.
|
||||||
@ -11,23 +16,23 @@ if "%Variable%"=="" (
|
|||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
set Result=
|
if not exist "%Executable%" (
|
||||||
set VersionFile="%~dp0..\..\..\libretroshare\src\retroshare\rsversion.h"
|
|
||||||
|
|
||||||
if not exist "%VersionFile%" (
|
|
||||||
echo.
|
echo.
|
||||||
echo Version file doesn't exist.
|
echo File %Executable% doesn't exist.
|
||||||
echo %VersionFile%
|
|
||||||
exit /B1
|
exit /B1
|
||||||
)
|
)
|
||||||
|
|
||||||
for /F "usebackq tokens=1,2,3" %%A in (%VersionFile%) do (
|
set VersionMajor=
|
||||||
if "%%A"=="#define" (
|
set VersionMinor=
|
||||||
if "%%B"=="%Define%" (
|
set VersionMini=
|
||||||
set Result=%%~C
|
set VersionExtra=
|
||||||
)
|
|
||||||
)
|
for /F "tokens=1,2,3,* delims=.-" %%A in ('%EnvToolsPath%\sigcheck.exe -nobanner -n %Executable%') do (
|
||||||
|
set VersionMajor=%%A
|
||||||
|
set VersionMinor=%%B
|
||||||
|
set VersionMini=%%C
|
||||||
|
set VersionExtra=%%D
|
||||||
)
|
)
|
||||||
|
|
||||||
endlocal & set %Variable%=%Result%
|
endlocal & set %Variable%.Major=%VersionMajor%& set %Variable%.Minor=%VersionMinor%& set %Variable%.Mini=%VersionMini%& set %Variable%.Extra=%VersionExtra%&
|
||||||
exit /B 0
|
exit /B 0
|
@ -1,15 +1,15 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call remove-dir.bat path
|
:: call remove-dir.bat path
|
||||||
|
|
||||||
if "%~1"=="" (
|
if "%~1"=="" (
|
||||||
echo.
|
echo.
|
||||||
echo Parameter error.
|
echo Parameter error.
|
||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist %1 (
|
if exist %1 (
|
||||||
del /s /f /q %1 >nul
|
del /s /f /q %1 >nul
|
||||||
rmdir /s /q %1
|
rmdir /s /q %1
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user