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 2: | Line 2: | ||
<pre style="overflow:auto;"> | <pre style="overflow:auto;"> | ||
@echo off | @echo off | ||
net session >nul 2>&1 | net session >nul 2>&1 | ||
if not %ERRORLEVEL%==0 ( | |||
echo Please run as administator! | |||
pause | pause | ||
exit | exit | ||
Line 14: | Line 13: | ||
set solution_dir=bin15 | set solution_dir=bin15 | ||
set configuration=Release | set configuration=Release | ||
set | set miranda=%ProgramFiles%\Miranda NG | ||
set | set vs=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community | ||
set msbuild=% | set msbuild=%vs%\MSBuild\15.0\Bin\MSBuild.exe | ||
call "%vs%\Common7\Tools\vsdevcmd.bat" -arch=amd64 -host_arch=amd64 -no_logo | |||
call "% | |||
if exist "%sources%\%solution_dir%\%configuration%64" rd /s /q "%sources%\%solution_dir%\%configuration%64" | |||
cd /d "%sources%" | cd /d "%sources%" | ||
call cleaner.bat | call cleaner.bat | ||
TortoiseGitProc /command:pull /path:"%sources%" | TortoiseGitProc /command:pull /path:"%sources%" | ||
: | "%msbuild%" "%sources%\%solution_dir%\tdlib.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 | ||
if not %ERRORLEVEL%==0 ( | |||
echo ********** tdlib build failed ********** | |||
pause | |||
exit | |||
) | |||
"%msbuild%" "%sources%\%solution_dir%\my.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 | "%msbuild%" "%sources%\%solution_dir%\my.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 | ||
if | if not %ERRORLEVEL%==0 ( | ||
echo ********** | echo ********** Miranda build failed ********** | ||
pause | pause | ||
exit ) | exit | ||
) | |||
"%msbuild%" "%sources%\%solution_dir%\my_icons.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 | "%msbuild%" "%sources%\%solution_dir%\my_icons.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 | ||
if | if not %ERRORLEVEL%==0 ( | ||
echo ********** | echo ********** Icons build failed ********** | ||
pause | pause | ||
exit ) | exit | ||
) | |||
cd /d "%sources%\%solution_dir%\%configuration%64" | cd /d "%sources%\%solution_dir%\%configuration%64" | ||
rd /q /s Obj | rd /q /s Obj | ||
for /r %%i in (*.ilk,*.iobj,*.ipdb) do del /q /s %%i | for /r %%i in (*.ilk,*.iobj,*.ipdb) do del /q /s %%i | ||
for /r Icons %%j in (*.pdb) do del /q /s %%j | for /r Icons %%j in (*.pdb) do del /q /s %%j | ||
for /r %%k in (*.pdb) do move %%k "%sources%\%solution_dir%\%configuration%64" | for /r %%k in (*.pdb) do move %%k "%sources%\%solution_dir%\%configuration%64" | ||
Taskkill /f /im Miranda64.exe | Taskkill /f /im Miranda64.exe | ||
if exist "%TEMP%\Miranda_backup" rd /q /s "%TEMP%\Miranda_backup" | |||
if exist "%TEMP%\Miranda_backup" rd /q /s "%TEMP%\Miranda_backup" | xcopy /i /s /y "%miranda%" "%TEMP%\Miranda_backup" | ||
xcopy /i /s /y "% | |||
xcopy /i /s /y "%sources%\%solution_dir%\%configuration%64" "%miranda%" | |||
xcopy /i /s /y "%sources%\%solution_dir%\%configuration%64" "% | |||
cd %TEMP% | cd %TEMP% | ||
curl https://www.miranda-ng.org/distr/pdb_x64/miranda64.zip -o miranda64.zip | curl https://www.miranda-ng.org/distr/pdb_x64/miranda64.zip -o miranda64.zip | ||
NanaZipG e miranda64.zip libcrypto* libssl* -r -aoa | |||
for %%n in (libcrypto | for %%n in (libcrypto-1_1.mir) do xcopy /y %%n "%miranda%\Libs" | ||
for %%n in (libcrypto | for %%n in (libcrypto-1_1.pdb) do xcopy /y %%n "%miranda%" | ||
:: dirty hack to prevent the app from inheriting elevated permissions | :: dirty hack to prevent the app from inheriting elevated permissions | ||
explorer "%miranda%\Miranda64.exe" | explorer "%miranda%\Miranda64.exe" |
Revision as of 20:16, 14 December 2022
build.bat:
@echo off net session >nul 2>&1 if not %ERRORLEVEL%==0 ( echo Please run as administator! pause exit ) set sources=D:\dev\miranda-ng set solution_dir=bin15 set configuration=Release set miranda=%ProgramFiles%\Miranda NG set vs=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community set msbuild=%vs%\MSBuild\15.0\Bin\MSBuild.exe call "%vs%\Common7\Tools\vsdevcmd.bat" -arch=amd64 -host_arch=amd64 -no_logo if exist "%sources%\%solution_dir%\%configuration%64" rd /s /q "%sources%\%solution_dir%\%configuration%64" cd /d "%sources%" call cleaner.bat TortoiseGitProc /command:pull /path:"%sources%" "%msbuild%" "%sources%\%solution_dir%\tdlib.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 if not %ERRORLEVEL%==0 ( echo ********** tdlib build failed ********** pause exit ) "%msbuild%" "%sources%\%solution_dir%\my.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 if not %ERRORLEVEL%==0 ( echo ********** Miranda build failed ********** pause exit ) "%msbuild%" "%sources%\%solution_dir%\my_icons.sln" /m /t:Rebuild /p:Configuration=Release /p:Platform=x64 if not %ERRORLEVEL%==0 ( echo ********** Icons build failed ********** pause exit ) cd /d "%sources%\%solution_dir%\%configuration%64" rd /q /s Obj for /r %%i in (*.ilk,*.iobj,*.ipdb) do del /q /s %%i for /r Icons %%j in (*.pdb) do del /q /s %%j for /r %%k in (*.pdb) do move %%k "%sources%\%solution_dir%\%configuration%64" Taskkill /f /im Miranda64.exe if exist "%TEMP%\Miranda_backup" rd /q /s "%TEMP%\Miranda_backup" xcopy /i /s /y "%miranda%" "%TEMP%\Miranda_backup" xcopy /i /s /y "%sources%\%solution_dir%\%configuration%64" "%miranda%" cd %TEMP% curl https://www.miranda-ng.org/distr/pdb_x64/miranda64.zip -o miranda64.zip NanaZipG e miranda64.zip libcrypto* libssl* -r -aoa for %%n in (libcrypto-1_1.mir) do xcopy /y %%n "%miranda%\Libs" for %%n in (libcrypto-1_1.pdb) do xcopy /y %%n "%miranda%" :: dirty hack to prevent the app from inheriting elevated permissions explorer "%miranda%\Miranda64.exe" exit
my.sln and my_icons.sln are my custom solutions.