From e61d0a0fc4d85dfdd577d929a4cb0b6f64cb0271 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Wed, 15 Nov 2017 23:28:31 +0400 Subject: [PATCH 1/2] added obtaining version number of mm and commit hash in build script --- marketmaker_build_32_64.cmd | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/marketmaker_build_32_64.cmd b/marketmaker_build_32_64.cmd index bac8df5e0..730081702 100644 --- a/marketmaker_build_32_64.cmd +++ b/marketmaker_build_32_64.cmd @@ -32,6 +32,39 @@ rem MSBuild /help MSBuild marketmaker.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64 MSBuild marketmaker.sln /t:Rebuild /p:Configuration=Release /p:Platform=x86 +rem Obtain version number and latest git commit number + +FOR /F "tokens=* USEBACKQ" %%F IN (`find /i "LP_MAJOR_VERSION" "iguana\exchanges\LP_include.h"`) DO ( +SET LP_MAJOR_VERSION_STR=%%F +) +FOR /F "tokens=* USEBACKQ" %%F IN (`find /i "LP_MINOR_VERSION" "iguana\exchanges\LP_include.h"`) DO ( +SET LP_MINOR_VERSION_STR=%%F +) +FOR /F "tokens=* USEBACKQ" %%F IN (`find /i "LP_BUILD_NUMBER" "iguana\exchanges\LP_include.h"`) DO ( +SET LP_BUILD_NUMBER_STR=%%F +) + +for /f delims^=^"^ tokens^=2 %%a in ('echo %LP_MAJOR_VERSION_STR%') do ( +set LP_MAJOR_VERSION=%%a +) +for /f delims^=^"^ tokens^=2 %%a in ('echo %LP_MINOR_VERSION_STR%') do ( +set LP_MINOR_VERSION=%%a +) +for /f delims^=^"^ tokens^=2 %%a in ('echo %LP_BUILD_NUMBER_STR%') do ( +set LP_BUILD_NUMBER=%%a +) + +rem Check if git command exist and if does - receive latest GIT_COMMIT +git --version >nul 2>&1 && ( + for /f "tokens=1" %%a in ('git rev-parse --short HEAD') do ( + set GIT_COMMIT=_%%a + ) +) || ( + set GIT_COMMIT= +) + +rem echo Marketmaker_%LP_MAJOR_VERSION%.%LP_MINOR_VERSION%_%LP_BUILD_NUMBER%%GIT_COMMIT% + rem Using to add in marketmaker_release.7z set host=%COMPUTERNAME% IF "%host%"=="VM-81" ( @@ -39,9 +72,11 @@ IF "%host%"=="VM-81" ( mkdir package_content\win64 copy /y Release\marketmaker.exe package_content\win32 copy /y x64\Release\marketmaker.exe package_content\win64 + echo Marketmaker_%LP_MAJOR_VERSION%.%LP_MINOR_VERSION%_%LP_BUILD_NUMBER%%GIT_COMMIT% > package_content\version.txt cd package_content "C:\Program Files\7-Zip\7z.exe" a C:\komodo\marketmaker_release\marketmaker_release.7z win32\marketmaker.exe "C:\Program Files\7-Zip\7z.exe" a C:\komodo\marketmaker_release\marketmaker_release.7z win64\marketmaker.exe + "C:\Program Files\7-Zip\7z.exe" a C:\komodo\marketmaker_release\marketmaker_release.7z version.txt cd .. rd package_content /s /q ) From e2e6c5091986361c155870bb6f384a8b350078c2 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Thu, 16 Nov 2017 17:10:45 +0300 Subject: [PATCH 2/2] fix structure alignment issue on Windows (error LP_sendwait pubkeys) structure alignment on Windows should be same as on Unix, when you have to start compiled marketmaker first line should be: Marketmaker 0.1 15000 rsize.248 451196191 rsize = 248. otherwise you will get this error on every swap: waitfor timedout didnt get pubkeys error LP_sendwait pubkeys finish swap.0000008AC93A3100 --- marketmaker.vcxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/marketmaker.vcxproj b/marketmaker.vcxproj index 0dbe62279..7d3862568 100644 --- a/marketmaker.vcxproj +++ b/marketmaker.vcxproj @@ -87,7 +87,7 @@ Level2 Disabled _CRT_SECURE_NO_WARNINGS;NATIVE_WINDOWS;WIN32;_DEBUG;_CONSOLE;IGUANA_LOG2PACKETSIZE=20;IGUANA_MAXPACKETSIZE=1572864;%(PreprocessorDefinitions) - 1Byte + 8Bytes .\iguana;%(AdditionalIncludeDirectories) @@ -104,7 +104,7 @@ Level3 Disabled _DEBUG;_CONSOLE;NATIVE_WINDOWS;WIN32;IGUANA_LOG2PACKETSIZE=20;IGUANA_MAXPACKETSIZE=1572864;%(PreprocessorDefinitions) - 1Byte + 8Bytes Console @@ -122,7 +122,7 @@ true true _CRT_SECURE_NO_WARNINGS;NATIVE_WINDOWS;WIN32;_CONSOLE;NDEBUG;IGUANA_LOG2PACKETSIZE=20;IGUANA_MAXPACKETSIZE=1572864;%(PreprocessorDefinitions) - 1Byte + 8Bytes MachineX86 @@ -142,7 +142,7 @@ true true WIN64;_WIN64;_CRT_SECURE_NO_WARNINGS;NATIVE_WINDOWS;WIN32;WIN32_LEAN_AND_MEAN;_CONSOLE;NDEBUG;IGUANA_LOG2PACKETSIZE=20;IGUANA_MAXPACKETSIZE=1572864;%(PreprocessorDefinitions) - 1Byte + 8Bytes MultiThreaded