Last active
March 12, 2023 11:15
-
-
Save deemru/e7a3aed6315741bfe9e9008849e94af1 to your computer and use it in GitHub Desktop.
ton-build-windows-64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
set WORKDIR=%~dp0 | |
set WORKDIR=%WORKDIR%ton-support\ | |
if not exist "%WORKDIR%" mkdir %WORKDIR% | |
set ZLIBPATH=%WORKDIR%zlib-1.2.11 | |
set ZLIBLIBPATH=%ZLIBPATH%\Release\zlibstatic.lib | |
set ZLIBSOURCE=https://zlib.net/zlib1211.zip | |
if not exist "%ZLIBLIBPATH%" ( | |
cd /d %WORKDIR% | |
curl -fsSL -o zlib.zip %ZLIBSOURCE% | |
7z x zlib.zip -aoa | |
del zlib.zip | |
cd %ZLIBPATH% | |
cmake -DCMAKE_C_FLAGS_RELEASE="/MT" %ZLIBPATH% | |
devenv zlib.sln /Build Release /Project zlibstatic | |
cd ..\.. | |
) | |
set OPENSSLVER=OpenSSL_1_1_1d | |
set OPENSSLDIR=%WORKDIR%openssl-%OPENSSLVER% | |
set LIBCRYPTOPATH=%OPENSSLDIR%\libcrypto.lib | |
set OPENSSLINCLUDE=%OPENSSLDIR%\include | |
set OPENSSLSOURCE=https://github.com/openssl/openssl/archive/%OPENSSLVER%.zip | |
set PATH=C:\Strawberry\perl\bin;%PATH% | |
if not exist "%LIBCRYPTOPATH%" ( | |
cd /d %WORKDIR% | |
curl -fsSL -o openssl.zip %OPENSSLSOURCE% | |
7z x openssl.zip -aoa | |
del openssl.zip | |
cd %OPENSSLDIR% | |
call perl Configure VC-WIN64A no-asm no-shared | |
call nmake build_generated libcrypto.lib | |
cd ..\.. | |
) | |
cd ton | |
git submodule init | |
git submodule update | |
cd .. | |
mkdir ton-build-64 | |
cd ton-build-64 | |
cmake -DOPENSSL_FOUND:BOOL="1" -DOPENSSL_CRYPTO_LIBRARY:FILEPATH=%LIBCRYPTOPATH% -DOPENSSL_INCLUDE_DIR:PATH=%OPENSSLINCLUDE% -DZLIB_LIBRARY:FILEPATH=%ZLIBLIBPATH% -DZLIB_INCLUDE_DIR:PATH=%ZLIBPATH% -DCMAKE_CXX_STANDARD_LIBRARIES:STRING="kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib crypt32.lib" -DCMAKE_CXX_FLAGS_RELEASE="/MT" -DCMAKE_C_FLAGS_RELEASE="/MT" -DWITH_MD_LIBRARY:BOOL="0" -DPORTABLE:BOOL="1" ../ton | |
devenv TON.sln /Build Release /Project ALL_BUILD | |
:devenv TON.sln /Build Release /Project RUN_TESTS | |
for /R %%f in (.\*.exe) do copy /y %%f . | |
del CompilerIdC.exe | |
del CompilerIdCXX.exe | |
for %%f in (.\*.exe) do appveyor PushArtifact %%f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment