User:Dart Raiden/Build Miranda: Difference between revisions
Jump to navigation
Jump to search
Dart Raiden (talk | contribs) No edit summary |
Dart Raiden (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
start.bat: | |||
<pre style="overflow:auto;"> | <pre style="overflow:auto;"> | ||
@echo off | @echo off | ||
start /wait elevate -c -w build.bat | |||
start "" "%PROGRAMFILES%\Miranda NG\Miranda64.exe" | |||
exit | |||
echo | </pre> | ||
build.bat: | |||
<pre style="overflow:auto;"> | |||
@echo off | |||
set sources=D:\dev\miranda-ng | set sources=D:\dev\miranda-ng | ||
Line 42: | Line 45: | ||
:kill | :kill | ||
call Taskkill /im Miranda64.exe | call Taskkill /im Miranda64.exe /f | ||
:backup | :backup | ||
Line 62: | Line 65: | ||
if exist "%sources%\%solution_dir%\%configuration%64" rd /q /s "%sources%\%solution_dir%\%configuration%64" >nul | if exist "%sources%\%solution_dir%\%configuration%64" rd /q /s "%sources%\%solution_dir%\%configuration%64" >nul | ||
if exist "%sources%\include\m_version.h" del /q /s "%sources%\include\m_version.h" | if exist "%sources%\include\m_version.h" del /q /s "%sources%\include\m_version.h" | ||
exit | exit | ||
</pre> | </pre> | ||
[http://code.kliu.org/misc/elevate/ Here] you can download elevate utility. |
Revision as of 22:51, 21 July 2019
start.bat:
@echo off start /wait elevate -c -w build.bat start "" "%PROGRAMFILES%\Miranda NG\Miranda64.exe" exit
build.bat:
@echo off set sources=D:\dev\miranda-ng set solution_dir=bin15 set configuration=Release set miranda_path=%PROGRAMFILES%\Miranda NG set vspath=%PROGRAMFILES(X86)%\Microsoft Visual Studio\2017\Community set msbuild=%vspath%\MSBuild\15.0\Bin\MSBuild.exe :set_vs_variables call "%vspath%\Common7\Tools\vsdevcmd.bat" -arch=amd64 -host_arch=amd64 -no_logo -vcvars_spectre_libs=spectre :clean_old_build cd /d "%sources%\%solution_dir%" if exist "%sources%\%solution_dir%\%configuration%64" rd /q /s "%sources%\%solution_dir%\%configuration%64" >nul if exist "%sources%\include\m_version.h" del /q /s "%sources%\include\m_version.h" call "%sources%\cleaner.bat" :update_sources call TortoiseGitProc /command:pull /path:"%sources%" :build call "%msbuild%" %sources%\%solution_dir%\my.sln /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 if errorlevel 1 ( echo ********** BUILD FAIL ********** pause exit ) :sort cd /d "%sources%\%solution_dir%\%configuration%64" rd /q /s "%sources%\%solution_dir%\%configuration%64\Obj" >nul for /r "%sources%\%solution_dir%\%configuration%64" %%i in (*.ilk,*.iobj,*.ipdb) do del /q /s %%i >nul for /r "%sources%\%solution_dir%\%configuration%64" %%i in (*.pdb) do move %%i "%sources%\%solution_dir%\%configuration%64" >nul :kill call Taskkill /im Miranda64.exe /f :backup if exist "%miranda_path%\Plugin Updates\Backups" rd /q /s "%miranda_path%\Plugin Updates\Backups" >nul if exist "%TEMP%\Miranda_backup" rd /q /s "%TEMP%\Miranda_backup" >nul xcopy /i /s /y "%miranda_path%" "%TEMP%\Miranda_backup" >nul :replace cd /d "%sources%\%solution_dir%\%configuration%64" for %%i in (exe,mir,pdb) do del /q /s "%miranda_path%\*.%%i" >nul for %%i in (Core,Plugins) do rd /q /s "%miranda_path%\%%i" >nul xcopy /i /s /y "%sources%\%solution_dir%\%configuration%64" "%miranda_path%" >nul for %%i in (libeay32.mir,ssleay32.mir) do xcopy /y "%TEMP%\Miranda_backup\Libs\%%i" "%miranda_path%\Libs" >nul for %%i in (libeay32.pdb,ssleay32.pdb) do xcopy /y "%TEMP%\Miranda_backup\%%i" "%miranda_path%" >nul xcopy /y "%TEMP%\Miranda_backup\Plugins\historypp.dll" "%miranda_path%\Plugins" >nul :clean cd /d "%sources%\%solution_dir%" if exist "%sources%\%solution_dir%\%configuration%64" rd /q /s "%sources%\%solution_dir%\%configuration%64" >nul if exist "%sources%\include\m_version.h" del /q /s "%sources%\include\m_version.h" exit
Here you can download elevate utility.