Skip to content
Commits on Source (23)
......@@ -3,7 +3,7 @@
# Setup the local working environment for the "configure" script
# Compiler: GCC
#
# $Revision: 491045 $ // by Denis Vakatov, NCBI (vakatov@ncbi.nlm.nih.gov)
# $Revision: 491630 $ // by Denis Vakatov, NCBI (vakatov@ncbi.nlm.nih.gov)
#############################################################################
......
......@@ -5,7 +5,7 @@
# OS: Linux
# Processor: Intel X86(-64)
#
# $Revision: 492739 $ // Dmitriy Beloslyudtsev, NCBI (beloslyu@ncbi.nlm.nih.gov)
# $Revision: 492694 $ // Dmitriy Beloslyudtsev, NCBI (beloslyu@ncbi.nlm.nih.gov)
#############################################################################
......
@ECHO OFF
REM $Id: build_exec.bat 430635 2014-03-27 17:34:42Z gouriano $
REM $Id: build_exec.bat 505228 2016-06-23 12:54:48Z ivanov $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
......@@ -43,6 +43,7 @@ exit 1
:be_build
set arch=Win32
if _%5_ == __CONFIGURE__ set arch=x86
if _%3_ == _64_ set arch=x64
rem Next command should be executed last! No other code after it, please.
......
@echo off
REM $Id: configure.bat 449189 2014-10-14 14:54:57Z gouriano $
REM $Id: configure.bat 505229 2016-06-23 13:04:20Z gouriano $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
......
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_DIALOG_", "UtilityProjects\_CONFIGURE_DIALOG_.vcxproj", "{6DEFDB58-C014-4026-A166-299146BD9947}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugDLL|Win32 = DebugDLL|Win32
DebugDLL|x64 = DebugDLL|x64
ReleaseDLL|Win32 = ReleaseDLL|Win32
DebugDLL|x86 = DebugDLL|x86
ReleaseDLL|x64 = ReleaseDLL|x64
ReleaseDLL|x86 = ReleaseDLL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{6DEFDB58-C014-4026-A166-299146BD9947}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{6DEFDB58-C014-4026-A166-299146BD9947}.DebugDLL|x64.Build.0 = DebugDLL|x64
{6DEFDB58-C014-4026-A166-299146BD9947}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{6DEFDB58-C014-4026-A166-299146BD9947}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{6DEFDB58-C014-4026-A166-299146BD9947}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{6DEFDB58-C014-4026-A166-299146BD9947}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA58}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_DIALOG_", "UtilityProjects\_CONFIGURE_DIALOG_.vcxproj", "{9BAE6EEC-8C80-44F0-84A9-3379631A8654}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugDLL|Win32 = DebugDLL|Win32
DebugDLL|x64 = DebugDLL|x64
ReleaseDLL|Win32 = ReleaseDLL|Win32
DebugDLL|x86 = DebugDLL|x86
ReleaseDLL|x64 = ReleaseDLL|x64
ReleaseDLL|x86 = ReleaseDLL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.DebugDLL|x64.Build.0 = DebugDLL|x64
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{9BAE6EEC-8C80-44F0-84A9-3379631A8654}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA56}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_DIALOG_", "UtilityProjects\_CONFIGURE_DIALOG_.vcxproj", "{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugDLL|Win32 = DebugDLL|Win32
DebugDLL|x64 = DebugDLL|x64
ReleaseDLL|Win32 = ReleaseDLL|Win32
DebugDLL|x86 = DebugDLL|x86
ReleaseDLL|x64 = ReleaseDLL|x64
ReleaseDLL|x86 = ReleaseDLL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.DebugDLL|x64.Build.0 = DebugDLL|x64
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{67EC51FA-3A0D-46B8-8F89-49EE209C8CB8}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAAC9}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
@ECHO OFF
REM $Id: make.bat 485599 2015-11-24 13:11:05Z ivanov $
REM $Id: make.bat 509501 2016-08-05 19:08:31Z fukanchi $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
......@@ -62,7 +62,9 @@ set libdll=%~3
set arch=%~4
set archw=Win32
set archwc=x86
if _%arch%_ == _64_ set archw=x64
if _%arch%_ == _64_ set archwc=x64
shift
shift
......@@ -152,7 +154,7 @@ if not "%with_openmp%" == "" (
time /t
echo INFO: Configure "%libdll%\%solution% [ReleaseDLL|%arch%]"
%DEVENV% %libdll%\build\%solution%.sln /build "ReleaseDLL|%archw%" /project "_CONFIGURE_"
%DEVENV% %libdll%\build\%solution%.sln /build "ReleaseDLL|%archwc%" /project "_CONFIGURE_"
if errorlevel 1 goto ABORT
if not _%cmd% == _make goto COMPLETE
......
@echo off
REM $Id: ptb.bat 434581 2014-05-08 16:47:33Z gouriano $
REM $Id: ptb.bat 507295 2016-07-18 15:40:58Z gouriano $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
......@@ -51,6 +51,10 @@ set PTBGUI="%TREE_ROOT%\src\build-system\project_tree_builder_gui\bin\ptbgui.jar
set DEFPTB_VERSION_FILE=%TREE_ROOT%\src\build-system\ptb_version.txt
set PTB_INI=%TREE_ROOT%\src\build-system\project_tree_builder.ini
set PTB_SLN=%BUILD_TREE_ROOT%\static\build\UtilityProjects\PTB.sln
set NCBICONF_MSVC=%TREE_ROOT%\include\common\config\ncbiconf_msvc_site.h
if exist "%NCBICONF_MSVC%" (
set NCBICONF_MSVC=
)
REM --- get solution dir ---
call :XSLNPATH %SLN_PATH%
......@@ -199,6 +203,9 @@ if not exist "%PTB_EXE%" (
echo ******************************************************************************
rem --- @echo msbuild "%BUILD_TREE_ROOT%\static\build\ncbi_cpp.sln" /t:"project_tree_builder_exe:Rebuild" /p:Configuration=ReleaseDLL;Platform=%PTB_PLATFORM% /maxcpucount:1
rem --- msbuild "%BUILD_TREE_ROOT%\static\build\ncbi_cpp.sln" /t:"project_tree_builder_exe:Rebuild" /p:Configuration=ReleaseDLL;Platform=%PTB_PLATFORM% /maxcpucount:1
if not "%NCBICONF_MSVC%"=="" (
echo // > "%NCBICONF_MSVC%"
)
if exist "%PTB_SLN%" (
@echo %DEVENV% "%PTB_SLN%" /rebuild "ReleaseDLL|%PTB_PLATFORM%" /project "project_tree_builder.exe"
%DEVENV% "%PTB_SLN%" /rebuild "ReleaseDLL|%PTB_PLATFORM%" /project "project_tree_builder.exe"
......@@ -206,6 +213,9 @@ if not exist "%PTB_EXE%" (
@echo %DEVENV% "%BUILD_TREE_ROOT%\static\build\ncbi_cpp.sln" /rebuild "ReleaseDLL|%PTB_PLATFORM%" /project "project_tree_builder.exe"
%DEVENV% "%BUILD_TREE_ROOT%\static\build\ncbi_cpp.sln" /rebuild "ReleaseDLL|%PTB_PLATFORM%" /project "project_tree_builder.exe"
)
if not "%NCBICONF_MSVC%"=="" (
del "%NCBICONF_MSVC%"
)
) else (
echo ******************************************************************************
echo Using PREBUILT project tree builder at %PTB_EXE%
......
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_DIALOG_", "UtilityProjects\_CONFIGURE_DIALOG_.vcxproj", "{FDC9447A-C7F1-492D-B84F-D54A1E610F16}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugDLL|Win32 = DebugDLL|Win32
DebugDLL|x64 = DebugDLL|x64
ReleaseDLL|Win32 = ReleaseDLL|Win32
DebugDLL|x86 = DebugDLL|x86
ReleaseDLL|x64 = ReleaseDLL|x64
ReleaseDLL|x86 = ReleaseDLL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.DebugDLL|x64.Build.0 = DebugDLL|x64
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{FDC9447A-C7F1-492D-B84F-D54A1E610F16}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAAA7E}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -6,28 +6,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProje
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugDLL|Win32 = DebugDLL|Win32
DebugDLL|x64 = DebugDLL|x64
ReleaseDLL|Win32 = ReleaseDLL|Win32
DebugDLL|x86 = DebugDLL|x86
ReleaseDLL|x64 = ReleaseDLL|x64
ReleaseDLL|x86 = ReleaseDLL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.DebugDLL|x64.Build.0 = DebugDLL|x64
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{E7DBEF6D-5DA9-4B0D-9375-C3F26659827B}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA105}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_DIALOG_", "UtilityProjects\_CONFIGURE_DIALOG_.vcxproj", "{EB043EAF-58D4-4179-AC32-538D9059BB8B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_CONFIGURE_", "UtilityProjects\_CONFIGURE_.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugDLL|Win32 = DebugDLL|Win32
DebugDLL|x64 = DebugDLL|x64
ReleaseDLL|Win32 = ReleaseDLL|Win32
DebugDLL|x86 = DebugDLL|x86
ReleaseDLL|x64 = ReleaseDLL|x64
ReleaseDLL|x86 = ReleaseDLL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.DebugDLL|x64.Build.0 = DebugDLL|x64
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{EB043EAF-58D4-4179-AC32-538D9059BB8B}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|x64.Build.0 = DebugDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.DebugDLL|x86.Build.0 = DebugDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
{8BC9CEB8-8B4A-11D0-8D11-AAAAAAAAA108}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
[Rule]
Priority = 127
[Linker]
subSystem = 2
[AddToProject]
SourceFiles = ../../src/gui/winmain
[Rule]
Priority = 127
[Linker]
subSystem = 2
[AddToProject]
; SourceFiles = ../../src/gui/winmain
#! /bin/sh
# $Id: build.sh 498022 2016-04-12 18:52:45Z ivanov $
# Author: Vladimir Ivanov (ivanov@ncbi.nlm.nih.gov)
#
# Build C++ Toolkit.
#---------------- Arguments ----------------
script="$0"
cfgs="${1:-DebugDLL ReleaseDLL}"
arch="$2"
#---------------- Configuration ----------------
# Configure with Unicode configurations enabled
NCBI_CONFIG____ENABLEDUSERREQUESTS__NCBI_UNICODE=1
export NCBI_CONFIG____ENABLEDUSERREQUESTS__NCBI_UNICODE
#NCBI_CONFIG____ENABLEDUSERREQUESTS__TWEAKVTUNE=1
#export NCBI_CONFIG____ENABLEDUSERREQUESTS__TWEAKVTUNE
# Bootstrap mode
#PREBUILT_PTB_EXE=bootstrap
#export PREBUILT_PTB_EXE
#PREBUILT_DATATOOL_EXE=bootstrap
#export PREBUILT_DATATOOL_EXE
#---------------- Global variables ----------------
build_trees='static dll'
sol_static="ncbi_cpp.sln gui/ncbi_gui.sln"
sol_dll="ncbi_cpp_dll.sln gui/ncbi_gui_dll.sln"
timer="date +'%H:%M'"
# TRUE if parallell project build system is enabled in Visual Studio
is_ppb=false
need_ppb_check=true
#-------------- Functions --------------
error()
{
echo "[`basename $script`] ERROR: $1"
exit 1
}
generate_vs2015_error_check_file()
{
cat <<-EOF >$1
/.*--* (Reb|B)uild( All | )started: Project:/ {
expendable = ""
}
/^--* Project:/ {
expendable = ""
}
/EXPENDABLE project/ {
expendable = \$0
}
/(| : |The source )([fatal ]*error [A-Z]*[0-9]* *: |The .* are both configured to produce|.*: error [0-9]*:|: general error |Error executing |ERROR: This project depends)/ {
if (!expendable) {
print \$0
exit
}
}
EOF
}
generate_simple_log()
{
echo Parallel project build detected! Creating simplified log.
echo
log=$1
tree=$2
sol=$3
cfg=$4
# Get solution directory
sol_dir=`echo $sol | sed 's%/[^/]*$%%'`
if [ $sol_dir = $sol ] ; then
sol_dir=''
fi
# Get built projects
projects=`grep '.*--* Build started:' $log | awk '{ sub(/^.* started:/, ""); gsub(/ /,"#"); print $0}'`
for p in $projects ; do
echo "------$p" | awk '{gsub(/[#]/," "); print}'
prj_name=`echo $p | awk '{gsub(/[#,]/," "); print $2}'`
### cfg=`echo $p | awk '{gsub(/[#,]/," "); print $4}'`
# Get path for specified project name from solution
s=`grep \"$prj_name\" $tree/build/$sol | awk '{gsub(/,/," "); print $4}' | sed -e 's%"%%g' -e 's%\\\%/%g' -e 's%.vcxproj%%'`
target_dir=`echo $s | sed 's%/[^/]*$%%'`
test $target_dir = $s && target_dir=''
target_name=`echo $s | sed 's%^.*/%%'`
# Path to regular logfile for current project
prj_log="$tree/build/$sol_dir/$target_dir/$cfg/$prj_name/$target_name.log"
# Add it to new combined log
if test ! -f "$prj_log" ; then
# Not all projects have a log file in the ${prj_name} sub-directory
prj_log_short="$tree/build/$sol_dir/$target_dir/$cfg/$target_name.log"
if test ! -f "$prj_log_short" ; then
echo "BUILD_SYSTEM_ERROR: Cannot find log file for this project: $prj_log"
echo
continue
fi
prj_log=$prj_log_short
fi
# Remove 3 first bytes from logfile (EF BB BF) and some garbage from a multi-projects build
cat $prj_log | tr -d '\357\273\277' | sed 's/\( *\)1>/\1 /g'
echo
done
grep '.*========== Build:' $log
echo
}
#---------------- Main ----------------
# Get build dir
build_dir=`dirname $script`
build_dir=`(cd "$build_dir"; pwd)`
if [ ! -d $build_dir ] ; then
error "Build directory $build_dir not found"
exit 1
fi
cd $build_dir
# Configuration to build configure
cfg_configure='ReleaseDLL'
out=".build.$$"
# Get directory for build logfiles
log_dir="$build_dir/../../logs"
mkdir $log_dir >/dev/null 2>&1
log_dir=`(cd "$log_dir"; pwd)`
rm $log_dir/* >/dev/null 2>&1
chmod +x $build_dir/build_exec.bat
rm -f $build_dir/cfgs.log
# Configure
for tree in $build_trees ; do
sols=`eval echo "$"sol_${tree}""`
for sol in $sols ; do
if test ! -f "$tree/build/$sol" ; then
echo "INFO: Solution not found, skipped."
continue
fi
alias=`echo $sol | sed -e 's|\\\\.*$||g' -e 's|_.*$||g'`
start=`eval $timer`
echo
echo Start time: $start
echo "INFO: Configure \"$tree\\$alias\""
echo "Command line: " $build_dir/build_exec.bat "$tree\\build\\$sol" build "$arch" "$cfg_configure" "_CONFIGURE_" $out
$build_dir/build_exec.bat "$tree\\build\\$sol" build "$arch" "$cfg_configure" "_CONFIGURE_" $out >/dev/null
echo
status=$?
# Wait a bit to allow compiler to exit and flush logfile
sleep 20
if $need_ppb_check; then
need_ppb_check=false
grep '^1>------ Build started:' $out >/dev/null 2>&1 && is_ppb=true
fi
if $is_ppb; then
generate_simple_log $out $tree "$sol" $cfg_configure > $out.simple
mv $out $cfg.configure.log
mv $out.simple $out
fi
cat $out
cat $out >> ${log_dir}/${tree}_${cfg_configure}.log
echo "Build time: $start - `eval $timer`"
echo STATUS = $status
if [ $status -ne 0 ] ; then
echo "FAILED: Configure $tree\\build\\$sol, $cfg_configure"
fi
rm -f $out >/dev/null 2>&1
if [ $status -ne 0 ] ; then
exit 3
fi
done
done
# Generate errors check script
check_awk=$build_dir/build_check.awk
generate_vs2015_error_check_file $check_awk
# Build
for tree in $build_trees ; do
for cfg in $cfgs ; do
if [ $tree = dll ] ; then
echo "$cfg" | grep '.*DLL$' >/dev/null || continue
fi
sols=`eval echo "$"sol_${tree}""`
for sol in $sols ; do
if test ! -f "$tree/build/$sol" ; then
echo "INFO: Solution not found, skipped."
continue
fi
alias=`echo $sol | sed -e 's|\\\\.*$||g' -e 's|_.*$||g'`
start=`eval $timer`
echo
echo Start time: $start
echo "$tree,$sol,$cfg" >> $build_dir/cfgs.log
echo "INFO: Building \"$tree\\$cfg\\$alias\""
echo "Command line: " $build_dir/build_exec.bat "$tree\\build\\$sol" build "$arch" "$cfg" "_BUILD_ALL_" $out
echo
$build_dir/build_exec.bat "$tree\\build\\$sol" build "$arch" "$cfg" "_BUILD_ALL_" $out >/dev/null
status=$?
# Wait a bit to allow compiler to exit and flush logfile
sleep 20
if $is_ppb; then
generate_simple_log $out $tree "$sol" $cfg > $out.simple
mv $out $cfg.build.log
mv $out.simple $out
fi
cat $out
cat $out >> ${log_dir}/${tree}_${cfg}.log
echo "Build time: $start - `eval $timer`"
echo STATUS = $status
if [ $status -ne 0 ] ; then
# Check on errors (skip expendable projects)
failed="1"
awk -f $check_awk $out >$out.res 2>/dev/null && test ! -s $out.res && failed="0"
if [ "$failed" = "1" ]; then
echo "FAILED: Build $tree\\build\\$sol, $cfg"
echo "FAILED: Build $tree\\build\\$sol, $cfg" > failed.build.log
echo >> failed.build.log
cat $out >> failed.build.log
cat $tree/build/${sol}_watchers.txt > failed.watchers.log
fi
rm -f $out $out.res >/dev/null 2>&1
if [ "$failed" = "1" ]; then
exit 4
fi
fi
rm -f $out >/dev/null 2>&1
done
done
done
exit 0
@ECHO OFF
REM $Id: build_exec.bat 505228 2016-06-23 12:54:48Z ivanov $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
REM National Center for Biotechnology Information
REM
REM This software/database is a "United States Government Work" under the
REM terms of the United States Copyright Act. It was written as part of
REM the author's official duties as a United States Government employee and
REM thus cannot be copyrighted. This software/database is freely available
REM to the public for use. The National Library of Medicine and the U.S.
REM Government have not placed any restriction on its use or reproduction.
REM
REM Although all reasonable efforts have been taken to ensure the accuracy
REM and reliability of the software and data, the NLM and the U.S.
REM Government do not and cannot warrant the performance or results that
REM may be obtained by using this software or data. The NLM and the U.S.
REM Government disclaim all warranties, express or implied, including
REM warranties of performance, merchantability or fitness for any particular
REM purpose.
REM
REM Please cite the author in any work or product based on this material.
REM
REM ===========================================================================
REM
REM Author: Vladimir Ivanov
REM
REM Auxiliary script for build.sh to run C++ build for specified project
REM and configuration. Cygwin cannot run devenv directly inside shell-script.
REM
REM ===========================================================================
call msvcvars.bat
if _%1% == _ goto be_abort
goto be_build
:be_abort
rem You should specify logfile or you will not see an output
echo Usage: "%0 <solution> <command> <arch> <cfg> <target> <logfile>"
exit 1
:be_build
set arch=Win32
if _%5_ == __CONFIGURE__ set arch=x86
if _%3_ == _64_ set arch=x64
rem Next command should be executed last! No other code after it, please.
%DEVENV% %1 /%2 "%4|%arch%" /project "%5" /out "%6"
#! /bin/sh
# $Id: build_util.sh 492980 2016-02-23 16:24:57Z gouriano $
# Author: Vladimir Ivanov (ivanov@ncbi.nlm.nih.gov)
#
# Utility functions for building C++ Toolkit.
#---------------- Arguments ----------------
arg="$1"
script=`basename $0`
script_dir=`dirname $0`
script_dir=`(cd "$script_dir"; pwd)`
#-------------- Functions --------------
error()
{
echo "[$script] ERROR: $1"
exit 1
}
#---------------- Main ----------------
case "$arg" in
--with-openmp )
makefile="$script_dir/../../src/build-system/Makefile.mk.in.msvc"
if [ ! -f $makefile ] ; then
error "$makefile not found"
exit 1
fi
tmp=/tmp/build_util_$$
trap "rm -f $tmp $tmp.awk" 0 1 2 15
cat <<-EOF >$tmp.awk
/^\[Compiler\]/ {
comp = 1
}
/^AdditionalOptions=/ {
if (comp == 1) {
gsub("/openmp","")
gsub("AdditionalOptions=","AdditionalOptions=/openmp ")
gsub(" ", " ")
comp = 0
}
}
/.*/ {
print
}
EOF
awk -f $tmp.awk $makefile >$tmp || exit 1
touch -r $makefile $tmp
cp -fp $tmp $makefile || exit 2
;;
* )
error "Unknown command: $arg"
;;
esac
exit 0
#! /bin/sh
# $Id: check.sh 492980 2016-02-23 16:24:57Z gouriano $
# Author: Vladimir Ivanov (ivanov@ncbi.nlm.nih.gov)
#
# Check C++ Toolkit in all previously built configurations
# (see 'cfgs.log', generated with 'build.sh' script).
#
# USAGE:
# check.sh {run | concat | concat_err | concat_cfg | load_to_db}
#
# Use 'run' command first, than use other commands.
# For 'concat_cfg' -- use 'run', 'concat' and 'concat_err' commands first.
########### Arguments
script="$0"
method="$1"
# Maximum number of parallel running test configurations
max_tasks=2
# Sleep timeout between checks on finished 'run' tasks (seconds)
sleeptime=60
########## Functions
Error()
{
echo "[`basename $script`] ERROR: $1"
exit 1
}
ParseConfig()
{
if [ -z "$1" ] ; then
Error "Unknown configuration name"
fi
x_tree=`echo $1 | sed -e 's/,.*$//'`
x_sol=`echo $1 | sed -e 's/^[^,]*,//' -e 's/,.*$//' -e 's/\.sln//' -e 's|\\\|/|g'`
x_cfg=`echo $1 | sed -e 's/^.*,//'`
}
CopyConfigLogs()
{
cat ${tasks_dir[$1]}/check.sh.log >> $res_log
cat ${tasks_dir[$1]}/check.sh.log >> \
$build_dir/check.sh.${tasks_tree[$1]}_${tasks_cfg[$1]}.log
}
########## Main
errcode=0
# Get build directory
build_dir=`dirname $script`
build_dir=`(cd "$build_dir"; pwd)`
timer="date +'%H:%M'"
if [ ! -d $build_dir ] ; then
Error "Build directory $build_dir not found"
fi
cd $build_dir || Error "Cannot change directory"
res_log="$build_dir/check.sh.log"
res_concat="$build_dir/check.sh.out"
res_concat_err="$build_dir/check.sh.out_err"
cfgs="`cat cfgs.log`"
if [ -z "$cfgs" ] ; then
Error "Build some configurations first"
fi
# --- Initialization
case "$method" in
run )
rm -f "$res_log"
rm -f "$build_dir/check.sh.*.log" > /dev/null 2>&1
# Init checks
$build_dir/../../scripts/common/check/check_make_win_cfg.sh init || \
Error "Check initialization failed"
# Init task list
i=0
while [ $i -lt $max_tasks ] ; do
tasks_name[$i]=""
tasks_tree[$i]=""
tasks_cfg[$i]=""
tasks_dir[$i]=""
tasks_start[$i]=""
i=`expr $i + 1`
done
;;
clean )
# not implemented, 'clean' method is not used on Windows
exit 0
;;
concat )
cp $res_log $res_concat
;;
concat_err )
egrep 'ERR \[|TO -' $res_log > $res_concat_err
;;
concat_cfg )
rm -f "$build_dir/check.sh.*.out_err" > /dev/null 2>&1
;;
load_to_db )
rm -f "$build_dir/test_stat_load.log" > /dev/null 2>&1
;;
* )
Error "Invalid method name"
;;
esac
# --- Run checks for each previously built configuration
for cfg in $cfgs ; do
ParseConfig $cfg
cd $build_dir
check_name=$x_tree/$x_sol/$x_cfg
check_dir="$x_tree/build/${x_sol}.check/$x_cfg"
if [ ! -d "$check_dir" ] ; then
Error "Check directory \"$check_dir\" not found"
fi
# Special processing for 'run' to allow parallel test runs
if [ "$method" = "run" ]; then
while true; do
i=0
idx=999
while [ $i -lt $max_tasks ]; do
# Find first free slot
if [ -z "${tasks_name[$i]}" ]; then
idx=$i
break
fi
# Check on finished tasks
if [ -f "${tasks_dir[$i]}/check.success" ]; then
idx=$i
fi
if [ -f "${tasks_dir[$i]}/check.failed" ]; then
idx=$i
errcode=1
fi
if [ $idx -lt $max_tasks ]; then
CopyConfigLogs $idx
echo `eval $timer`
echo CHECK_$method: finished: ${tasks_name[$idx]} \(${tasks_start[idx]} - `eval $timer`\)
tasks_name[$idx]=""
break
fi
i=`expr $i + 1`
done
if [ $idx -lt $max_tasks ]; then
# Run tests for current configuration $cfg
tasks_name[$idx]="$x_tree/$x_sol/$x_cfg"
tasks_tree[$idx]="$x_tree"
tasks_cfg[$idx]="$x_cfg"
tasks_dir[$idx]="$check_dir"
tasks_start[$idx]=`eval $timer`
echo ${tasks_start[$idx]}
echo CHECK_$method: started : ${tasks_name[$idx]}
rm ${tasks_dir[$idx]}/check.success ${tasks_dir[$idx]}/check.failed >/dev/null 2>&1
../../scripts/common/check/check_make_win_cfg.sh create "$x_sol" "$x_tree" "$x_cfg" || \
Error "Creating check script for \"$check_dir\" failed"
test -x "${tasks_dir[$idx]}/check.sh" || \
Error "Cannot find $check_dir/check.sh"
${tasks_dir[$idx]}/check.sh run >/dev/null 2>&1 &
# Move to next configuration
break
else
# All slots busy -- waiting
sleep $sleeptime
fi
done
continue
fi
# All actions except 'run'
test -x "$check_dir/check.sh" || \
Error "Run checks first. $check_dir/check.sh not found."
echo `eval $timer`
echo CHECK_$method: $check_name
case "$method" in
concat )
$check_dir/check.sh concat
cat $check_dir/check.sh.out >> $res_concat
;;
concat_err )
$check_dir/check.sh concat_err
cat $check_dir/check.sh.out_err >> $res_concat_err
;;
concat_cfg )
# Copy log entries
egrep 'ERR \[|TO -' $check_dir/check.sh.log >> $build_dir/check.sh.${x_tree}_${x_cfg}.out_err
# See below for copying of failed tests outputs,
# it should be printed after log entries for all configurations.
;;
load_to_db )
$check_dir/check.sh load_to_db
;;
esac
done
# --- Waiting unfinished tasks for 'run'
if [ "$method" = "run" ]; then
while true; do
i=0
idx=999
active=false
while [ $i -lt $max_tasks ]; do
if [ -n "${tasks_name[$i]}" ]; then
# Check on finished tasks
if [ -f "${tasks_dir[$i]}/check.success" ]; then
idx=$i
fi
if [ -f "${tasks_dir[$i]}/check.failed" ]; then
idx=$i
errcode=1
fi
if [ $idx -lt $max_tasks ]; then
CopyConfigLogs $idx
echo `eval $timer`
echo CHECK_$method: finished: ${tasks_name[$idx]} \(${tasks_start[$idx]} - `eval $timer`\)
tasks_name[$idx]=""
idx=999
else
active=true
fi
fi
i=`expr $i + 1`
done
if $active; then
sleep $sleeptime
else
break
fi
done
fi
if [ "$method" = "concat_cfg" ]; then
for cfg in $cfgs ; do
ParseConfig $cfg
cd $build_dir
check_dir="$x_tree/build/${x_sol}.check/$x_cfg"
cat $check_dir/check.sh.out_err >> $build_dir/check.sh.${x_tree}_${x_cfg}.out_err
done
fi
exit $errcode
@echo off
REM $Id: configure.bat 505229 2016-06-23 13:04:20Z gouriano $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
REM National Center for Biotechnology Information
REM
REM This software/database is a "United States Government Work" under the
REM terms of the United States Copyright Act. It was written as part of
REM the author's official duties as a United States Government employee and
REM thus cannot be copyrighted. This software/database is freely available
REM to the public for use. The National Library of Medicine and the U.S.
REM Government have not placed any restriction on its use or reproduction.
REM
REM Although all reasonable efforts have been taken to ensure the accuracy
REM and reliability of the software and data, the NLM and the U.S.
REM Government do not and cannot warrant the performance or results that
REM may be obtained by using this software or data. The NLM and the U.S.
REM Government disclaim all warranties, express or implied, including
REM warranties of performance, merchantability or fitness for any particular
REM purpose.
REM
REM Please cite the author in any work or product based on this material.
REM
REM ===========================================================================
REM
REM Author: Andrei Gourianov
REM
REM Configure MSVC solution and projects
REM
REM ===========================================================================
setlocal
set sln_name=ncbi_cpp
set use_projectlst=scripts/projects/ncbi_cpp.lst
set use_savedcfg=
set use_gui=no
set maybe_gui=yes
set use_debug=yes
set use_dll=no
set use_64=no
set use_staticstd=no
set use_arch=Win32
set use_flags=
set help_req=no
set srcroot=../..
REM -----------------------------------------------------------------------------
REM silently ignored options
set noops=
set noops=%noops% --without-optimization
set noops=%noops% --with-profiling
set noops=%noops% --with-tcheck
set noops=%noops% --with-static
set noops=%noops% --with-plugin-auto-load
set noops=%noops% --with-bin-release
set noops=%noops% --with-mt
set noops=%noops% --without-exe
set noops=%noops% --with-runpath
set noops=%noops% --with-lfs
set noops=%noops% --with-autodep
set noops=%noops% --with-build-root
set noops=%noops% --with-fake-root
set noops=%noops% --without-suffix
set noops=%noops% --with-hostspec
set noops=%noops% --without-version
set noops=%noops% --with-build-root-sfx
set noops=%noops% --without-execopy
set noops=%noops% --with-bincopy
set noops=%noops% --with-lib-rebuilds
set noops=%noops% --with-lib-rebuilds
set noops=%noops% --without-deactivation
set noops=%noops% --without-makefile-auto-update
set noops=%noops% --without-flat-makefile
set noops=%noops% --with-check
set noops=%noops% --with-check-tools
set noops=%noops% --with-ncbi-public
set noops=%noops% --with-strip
set noops=%noops% --with-pch
set noops=%noops% --with-caution
set noops=%noops% --without-caution
set noops=%noops% --without-ccache
set noops=%noops% --with-distcc
set noops=%noops% --without-ncbi-c
set noops=%noops% --without-sss
set noops=%noops% --without-utils
set noops=%noops% --without-sssdb
set noops=%noops% --with-included-sss
set noops=%noops% --with-z
set noops=%noops% --without-z
set noops=%noops% --with-bz2
set noops=%noops% --without-bz2
set noops=%noops% --with-lzo
set noops=%noops% --without-lzo
set noops=%noops% --with-pcre
set noops=%noops% --without-pcre
set noops=%noops% --with-gnutls
set noops=%noops% --without-gnutls
set noops=%noops% --with-openssl
set noops=%noops% --without-openssl
set noops=%noops% --without-sybase
set noops=%noops% --with-sybase-local
set noops=%noops% --with-sybase-new
set noops=%noops% --without-ftds
set noops=%noops% --with-ftds
set noops=%noops% --without-ftds-renamed
set noops=%noops% --without-mysql
set noops=%noops% --with-mysql
set noops=%noops% --without-opengl
set noops=%noops% --with-opengl
set noops=%noops% --without-mesa
set noops=%noops% --with-mesa
set noops=%noops% --without-glut
set noops=%noops% --with-glut
set noops=%noops% --without-wxwin
set noops=%noops% --with-wxwin
set noops=%noops% --without-wxwidgets
set noops=%noops% --with-wxwidgets
set noops=%noops% --with-wxwidgets-ucs
set noops=%noops% --without-wxwidgets-ucs
set noops=%noops% --without-freetype
set noops=%noops% --with-freetype
set noops=%noops% --without-fastcgi
set noops=%noops% --with-fastcgi
set noops=%noops% --with-fastcgi
set noops=%noops% --without-bdb
set noops=%noops% --with-bdb
set noops=%noops% --without-sp
set noops=%noops% --without-orbacus
set noops=%noops% --with-orbacus
set noops=%noops% --with-odbc
set noops=%noops% --with-python
set noops=%noops% --without-python
set noops=%noops% --with-boost
set noops=%noops% --without-boost
set noops=%noops% --with-boost-tag
set noops=%noops% --without-boost-tag
set noops=%noops% --with-sqlite
set noops=%noops% --without-sqlite
set noops=%noops% --with-sqlite3
set noops=%noops% --without-sqlite3
set noops=%noops% --with-icu
set noops=%noops% --without-icu
set noops=%noops% --with-expat
set noops=%noops% --without-expat
set noops=%noops% --with-sablot
set noops=%noops% --without-sablot
set noops=%noops% --with-libxml
set noops=%noops% --without-libxml
set noops=%noops% --with-libxslt
set noops=%noops% --without-libxslt
set noops=%noops% --with-xerces
set noops=%noops% --without-xerces
set noops=%noops% --with-xalan
set noops=%noops% --without-xalan
set noops=%noops% --with-oechem
set noops=%noops% --without-oechem
set noops=%noops% --with-sge
set noops=%noops% --without-sge
set noops=%noops% --with-muparser
set noops=%noops% --without-muparser
set noops=%noops% --with-hdf5
set noops=%noops% --without-hdf5
set noops=%noops% --with-gif
set noops=%noops% --without-gif
set noops=%noops% --with-jpeg
set noops=%noops% --without-jpeg \
set noops=%noops% --with-png
set noops=%noops% --without-png
set noops=%noops% --with-tiff
set noops=%noops% --without-tiff
set noops=%noops% --with-xpm
set noops=%noops% --without-xpm
set noops=%noops% --without-local-lbsm
set noops=%noops% --without-ncbi-crypt
set noops=%noops% --without-connext
set noops=%noops% --without-serial
set noops=%noops% --without-objects
set noops=%noops% --without-dbapi
set noops=%noops% --without-app
set noops=%noops% --without-ctools
set noops=%noops% --without-gui
set noops=%noops% --without-algo
set noops=%noops% --without-internal
set noops=%noops% --with-gbench
set noops=%noops% --without-gbench
set noops=%noops% --with-x
set initial_dir=%CD%
set script_name=%0
cd %~p0
for /f "delims=" %%a in ('cd') do (set script_dir=%%a)
cd %srcroot%
for /f "delims=" %%a in ('cd') do (set srcroot=%%a)
cd %initial_dir%
REM --------------------------------------------------------------------------------
REM parse arguments
set unknown=
set ignore_unknown=no
set dest=
:PARSEARGS
if "%1"=="" goto ENDPARSEARGS
if "%dest%"=="lst" (set use_projectlst=%1& set dest=& goto CONTINUEPARSEARGS)
if "%dest%"=="cfg" (set use_savedcfg=%~1& set dest=& goto CONTINUEPARSEARGS)
if "%1"=="--help" (set help_req=yes& goto CONTINUEPARSEARGS)
if "%1"=="--with-configure-dialog" (set use_gui=yes& goto CONTINUEPARSEARGS)
if "%1"=="--without-configure-dialog" (set use_gui=no& goto CONTINUEPARSEARGS)
if "%1"=="--with-saved-settings" (set dest=cfg& goto CONTINUEPARSEARGS)
if "%1"=="--without-debug" (set use_debug=no& goto CONTINUEPARSEARGS)
if "%1"=="--with-debug" (set use_debug=yes& goto CONTINUEPARSEARGS)
if "%1"=="--without-dll" (set use_dll=no& goto CONTINUEPARSEARGS)
if "%1"=="--with-dll" (set use_dll=yes& goto CONTINUEPARSEARGS)
if "%1"=="--with-64" (set use_64=yes& goto CONTINUEPARSEARGS)
if "%1"=="--with-static-exe" (set use_staticstd=yes& goto CONTINUEPARSEARGS)
if "%1"=="--with-projects" (set dest=lst& goto CONTINUEPARSEARGS)
if "%1"=="--ignore-unsupported-options" (set ignore_unknown=yes& goto CONTINUEPARSEARGS)
set unknown=%unknown% %1
:CONTINUEPARSEARGS
set maybe_gui=no
shift
goto PARSEARGS
:ENDPARSEARGS
if "%maybe_gui%"=="yes" (
set use_gui=yes
)
REM --------------------------------------------------------------------------------
REM check and report unknown options
set invalid_unknown=no
for %%u in (%unknown%) do (
call :CHECKUNKNOWN %%u
)
if "%invalid_unknown%"=="yes" exit /b 1
goto DONEUNKNOWN
:CHECKUNKNOWN
for %%n in (%noops%) do (
if "%1"=="%%n" (
echo Ignored: %1
goto :eof
)
)
for /f "eol=-" %%a in ('echo %1') do goto :eof
if "%ignore_unknown%"=="no" (
echo Unsupported option: %1
set invalid_unknown=yes
) else (
echo Ignored unsupported: %1
)
goto :eof
:DONEUNKNOWN
REM --------------------------------------------------------------------------------
REM print usage
:PRINTUSAGE
if "%help_req%"=="yes" (
echo USAGE:
echo %script_name% [OPTION]...
echo SYNOPSIS:
echo configure NCBI C++ toolkit for MSVC build system.
echo OPTIONS:
echo --help -- print Usage
echo --with-configure-dialog -- use Configuration GUI application
echo --without-configure-dialog -- do not use Configuration GUI application
echo --with-saved-settings=FILE -- load configuration settings from FILE
echo --without-debug -- build non-debug versions of libs and apps
echo --with-debug -- build debug versions of libs and apps
echo --without-dll -- build all toolkit libraries as static ones
echo --with-dll -- assemble toolkit libraries into DLLs
echo where requested
echo --with-64 -- compile to 64-bit code
echo --with-static-exe -- use static C++ standard libraries
echo --with-projects=FILE -- build projects listed in "%srcroot%\FILE"
echo FILE can also be a name of a subdirectory
echo examples: --with-projects=src/corelib
echo --with-projects=scripts/projects/ncbi_cpp.lst
echo --ignore-unsupported-options -- ignore unsupported options
exit /b 0
)
REM --------------------------------------------------------------------------------
REM target architecture, solution path, configuration and flags
if "%use_64%"=="yes" (
set use_arch=x64
) else (
set use_arch=Win32
)
if "%use_dll%"=="yes" (
if "%use_debug%"=="yes" (
set CONFIGURATION=DebugDLL
) else (
set CONFIGURATION=ReleaseDLL
)
) else (
if "%use_debug%"=="yes" (
if "%use_staticstd%"=="yes" (
set CONFIGURATION=DebugMT
) else (
set CONFIGURATION=DebugDLL
)
) else (
if "%use_staticstd%"=="yes" (
set CONFIGURATION=ReleaseMT
) else (
set CONFIGURATION=ReleaseDLL
)
)
)
if "%use_gui%"=="yes" (
set use_flags=%use_flags% -cfg
)
if "%use_dll%"=="yes" (
set build_results=dll
set sln_name=%sln_name%_dll
set use_flags=%use_flags% -dll
) else (
set build_results=static
)
set use_projectlst=%use_projectlst:/=\%
REM --------------------------------------------------------------------------------
REM prepare and run ptb.bat
cd %script_dir%
set PTB_PLATFORM=%use_arch%
set PTB_FLAGS=%use_flags%
set PTB_PATH=./static/bin/ReleaseDLL
set SLN_PATH=%script_dir%\%build_results%\build\%sln_name%.sln
set TREE_ROOT=%srcroot%
set BUILD_TREE_ROOT=.
set PTB_PROJECT_REQ=%use_projectlst%
if "%use_savedcfg%"=="" (
set PTB_SAVED_CFG_REQ=
) else (
if exist "%use_savedcfg%" (
set PTB_SAVED_CFG_REQ="%use_savedcfg%"
) else (
if exist "%initial_dir%\%use_savedcfg%" (
set PTB_SAVED_CFG_REQ="%initial_dir%\%use_savedcfg%"
) else (
echo ERROR: "%use_savedcfg%" not found
exit /b 1
)
)
)
call ./ptb.bat
if errorlevel 1 (
cd %initial_dir%
exit /b 1
)
REM --------------------------------------------------------------------------------
REM generate configure_make.bat
cd %script_dir%
set mk_cmnd=make.bat build %sln_name% %build_results%
if "%use_64%"=="yes" (
set mk_cmnd=%mk_cmnd% 64
) else (
set mk_cmnd=%mk_cmnd% 32
)
set mk_cmnd=%mk_cmnd% %CONFIGURATION%
echo %mk_cmnd% > configure_make.bat
REM ------------------------------------------------------------------------------
echo To build the solution %SLN_PATH%
echo execute the following commands:
echo cd %script_dir%
echo make
cd %initial_dir%
endlocal
exit /b 0
@echo off
REM $Id: datatool.bat 492980 2016-02-23 16:24:57Z gouriano $
REM ===========================================================================
REM
REM PUBLIC DOMAIN NOTICE
REM National Center for Biotechnology Information
REM
REM This software/database is a "United States Government Work" under the
REM terms of the United States Copyright Act. It was written as part of
REM the author's official duties as a United States Government employee and
REM thus cannot be copyrighted. This software/database is freely available
REM to the public for use. The National Library of Medicine and the U.S.
REM Government have not placed any restriction on its use or reproduction.
REM
REM Although all reasonable efforts have been taken to ensure the accuracy
REM and reliability of the software and data, the NLM and the U.S.
REM Government do not and cannot warrant the performance or results that
REM may be obtained by using this software or data. The NLM and the U.S.
REM Government disclaim all warranties, express or implied, including
REM warranties of performance, merchantability or fitness for any particular
REM purpose.
REM
REM Please cite the author in any work or product based on this material.
REM
REM ===========================================================================
REM
REM Author: Andrei Gourianov
REM
REM Run datatool.exe to generate sources from ASN/DTD/Schema specifications
REM
REM DO NOT ATTEMPT to run this bat file manually
REM
REM ===========================================================================
set ORIGINAL_ARGS=%*
REM ---------------- begin workaround FOR MSVC2010! ---------------------------------
set input_asn_path=
set input_asn_name=
set input_def_path=
set subtree=
set srcroot=
:PARSEARGS
if _%1==_ goto ENDPARSEARGS
if "%dest%"=="inASN" (set input_asn_path=%~1& set input_asn_name=%~n1& set dest=& goto CONTINUEPARSEARGS)
if "%dest%"=="inDEF" (set input_def_path=%~1& set dest=& goto CONTINUEPARSEARGS)
if "%dest%"=="subtree" (set subtree=%1& set dest=& goto CONTINUEPARSEARGS)
if "%dest%"=="srcroot" (set srcroot=%1& set dest=& goto CONTINUEPARSEARGS)
if "%1"=="-m" (set dest=inASN& goto CONTINUEPARSEARGS)
if "%1"=="-od" (set dest=inDEF& goto CONTINUEPARSEARGS)
if "%1"=="-or" (set dest=subtree& goto CONTINUEPARSEARGS)
if "%1"=="-oR" (set dest=srcroot& goto CONTINUEPARSEARGS)
if "%1"=="-M" (goto ENDPARSEARGS)
:CONTINUEPARSEARGS
shift
REM echo parsing %1
goto PARSEARGS
:ENDPARSEARGS
set src_subtree=%CD%\%srcroot%src\%subtree%
set dest_spec=%BUILD_TREE_ROOT%\static\build\%subtree%
if not exist "%dest_spec%" mkdir "%dest_spec%"
if not exist "%dest_spec%" set dest_spec=.
set copied_asn=0
for /f %%a in ('xcopy "%input_asn_path%" "%dest_spec%" /q /d /y') do (set copied_asn=%%a)
set copied_def=0
if not exist "%input_def_path%" echo [-] > "%input_def_path%"
if exist "%input_def_path%" for /f %%a in ('xcopy "%input_def_path%" "%dest_spec%" /q /d /y') do (set copied_def=%%a)
if not %copied_asn%==0 goto DOGENERATE
if not %copied_def%==0 goto DOGENERATE
if not exist "%src_subtree%%input_asn_name%.files" goto DOGENERATE
if not exist "%src_subtree%%input_asn_name%__.cpp" goto DOGENERATE
if not exist "%src_subtree%%input_asn_name%___.cpp" goto DOGENERATE
echo generation NOT needed
exit /b 0
:DOGENERATE
REM ---------------- end workaround --------------------------------------
set DEFDT_LOCATION=\\snowman\win-coremake\App\Ncbi\cppcore\datatool
for %%v in ("%DATATOOL_PATH%" "%TREE_ROOT%" "%BUILD_TREE_ROOT%" "%PTB_PLATFORM%") do (
if %%v=="" (
echo ERROR: required environment variable is missing
echo DO NOT ATTEMPT to run this bat file manually
exit /b 1
)
)
set DEFDT_VERSION_FILE=%TREE_ROOT%\src\build-system\datatool_version.txt
set PTB_SLN=%BUILD_TREE_ROOT%\static\build\UtilityProjects\PTB.sln
set DT=datatool.exe
call "%BUILD_TREE_ROOT%\msvcvars.bat"
REM -------------------------------------------------------------------------
REM get DT version: from DEFDT_VERSION_FILE or from PREBUILT_DATATOOL_EXE
set DEFDT_VERSION=
if exist "%DEFDT_VERSION_FILE%" (
for /f %%a in ('type "%DEFDT_VERSION_FILE%"') do (set DEFDT_VERSION=%%a& goto donedf)
:donedf
set DEFDT_VERSION=%DEFDT_VERSION: =%
)
if exist "%PREBUILT_DATATOOL_EXE%" (
set ptbver=
for /f "tokens=2" %%a in ('"%PREBUILT_DATATOOL_EXE%" -version') do (set ptbver=%%a& goto donepb)
:donepb
set ptbver=%ptbver: =%
if not "%DEFDT_VERSION%"=="%ptbver%" (
echo WARNING: requested %DT% version %ptbver% does not match default one: %DEFDT_VERSION%
set DEFDT_VERSION=%ptbver%
)
)
if "%DEFDT_VERSION%"=="" (
echo ERROR: DEFDT_VERSION not specified
exit /b 1
)
for /f "tokens=1-3 delims=." %%a in ('echo %DEFDT_VERSION%') do (set DT_VER=%%a%%b%%c& set DT_VER_MAJOR=%%a)
REM -------------------------------------------------------------------------
REM Identify DATATOOL_EXE
set DT_COPY_HERE=NO
if "%PREBUILT_DATATOOL_EXE%"=="bootstrap" (
set DEF_DT=%DATATOOL_PATH%\%DT%
) else if not "%PREBUILT_DATATOOL_EXE%"=="" (
if exist "%PREBUILT_DATATOOL_EXE%" (
set DEF_DT=%PREBUILT_DATATOOL_EXE%
) else (
echo ERROR: "%PREBUILT_DATATOOL_EXE%" not found
exit /b 1
)
) else (
set DEF_DT=%DEFDT_LOCATION%\msvc\%DEFDT_VERSION%\%DT%
if not "%COPY_DATATOOL_EXE%"=="NO" (
set DT_COPY_HERE=YES
)
)
if exist "%DEF_DT%" (
set DATATOOL_EXE=%DEF_DT%
) else (
echo %DT% not found at %DEF_DT%
set DATATOOL_EXE=%DATATOOL_PATH%\%DT%
set DT_COPY_HERE=NO
)
REM -------------------------------------------------------------------------
REM Build DATATOOL_EXE if needed
if not exist "%DATATOOL_EXE%" (
if exist "%PTB_SLN%" (
echo ******************************************************************************
echo Building %DT% locally, please wait
echo ******************************************************************************
@echo %DEVENV% "%PTB_SLN%" /rebuild "ReleaseDLL|%PTB_PLATFORM%" /project "datatool.exe"
%DEVENV% "%PTB_SLN%" /rebuild "ReleaseDLL|%PTB_PLATFORM%" /project "datatool.exe"
) else (
echo ERROR: do not know how to build %DT%
)
) else (
echo ******************************************************************************
echo Using PREBUILT %DT% at %DATATOOL_EXE%
echo ******************************************************************************
)
if not exist "%DATATOOL_EXE%" (
echo ERROR: "%DATATOOL_EXE%" not found
exit /b 1
)
REM -------------------------------------------------------------------------
REM Copy datatool from network to the local tree (to make it work faster)
set DT_LOCAL=%BUILD_TREE_ROOT%\static\build\UtilityProjects\%DEFDT_VERSION%_%DT%
if "%DT_COPY_HERE%"=="YES" (
if not exist "%DT_LOCAL%" (
xcopy "%DATATOOL_EXE%" "%BUILD_TREE_ROOT%\static\build\UtilityProjects\" /q /d /y >NUL
rename "%BUILD_TREE_ROOT%\static\build\UtilityProjects\%DT%" "%DEFDT_VERSION%_%DT%"
)
set DATATOOL_EXE=%DT_LOCAL%
)
REM -------------------------------------------------------------------------
REM Run DATATOOL_EXE
"%DATATOOL_EXE%" %ORIGINAL_ARGS%