diff --git a/CMakeLists.txt b/CMakeLists.txt index eb72ca9..56b5779 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,10 +82,16 @@ endforeach() # COMPILING DINOSAUR ############################################################################# -execute_process(COMMAND mvn package -Pconf -DskipTests -Ddir=${CMAKE_CURRENT_BINARY_DIR}/dinosaur WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ext/dinosaur RESULT_VARIABLE MVN_RESULT) +if (MSVC) + set(MVN_CMD mvn.cmd) +else (MSVC) + set(MVN_CMD mvn) +endif (MSVC) + +execute_process(COMMAND ${MVN_CMD} package -Pconf -DskipTests -Ddir=${CMAKE_CURRENT_BINARY_DIR}/dinosaur WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ext/dinosaur OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/dinosaur_maven_stdout.txt ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/dinosaur_maven_stderr.txt RESULT_VARIABLE MVN_RESULT) if(NOT "${MVN_RESULT}" STREQUAL "0") - message(FATAL_ERROR "Cannot create module Dinosaur, mvn execution failed") + message(FATAL_ERROR "Cannot create module Dinosaur, mvn execution failed: ${MVN_RESULT}") endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dinosaur/Dinosaur-1.1.3.free.jar ${CMAKE_SOURCE_DIR}/ext/advParams_dinosaur_targeted.txt DESTINATION ${JAR_PATH}) diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index 8bbbc90..11ea013 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -149,6 +149,25 @@ if not exist "%PWIZ_DIR%\lib" ( for /r pwiz %%x in (*.hpp, *.h) do copy "%%x" include\ /Y > NUL ) +set MVN_BASE=apache-maven-3.6.1 +set MVN_URL=http://ftp.unicamp.br/pub/apache/maven/maven-3/3.6.1/binaries/%MVN_BASE%-bin.zip +if not exist "%INSTALL_DIR%\%MVN_BASE%" ( + echo Downloading and installing CMake + call :downloadfile %MVN_URL% %INSTALL_DIR%\mvn.zip + %ZIP_EXE% x "%INSTALL_DIR%\mvn.zip" -o"%INSTALL_DIR%" > NUL +) +setlocal +set PATH=%PATH%;%INSTALL_DIR%\%MVN_BASE%\bin + +set JAVA_BASE=openjdk-8u212-b04 +set JAVA_URL=https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u212-b04/OpenJDK8u-x64_windows_8u212b04.zip +if not exist "%INSTALL_DIR%\%JAVA_BASE%" ( + echo Downloading and installing Java JDK + call :downloadfile %JAVA_URL% %INSTALL_DIR%\java.zip + %ZIP_EXE% x "%INSTALL_DIR%\java.zip" -o"%INSTALL_DIR%" > NUL +) +set JAVA_HOME=%INSTALL_DIR%\%JAVA_BASE% + ::: Needed for CPack ::: set NSIS_DIR=%INSTALL_DIR%\nsis set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS 3/3.04/nsis-3.04-setup.exe/download @@ -157,7 +176,6 @@ if not exist "%NSIS_DIR%" ( call :downloadfile "%NSIS_URL%" %INSTALL_DIR%\nsis.exe "%INSTALL_DIR%\nsis.exe" /S /D=%INSTALL_DIR%\nsis ) -setlocal set PATH=%PATH%;%INSTALL_DIR%\nsis :::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -176,7 +194,7 @@ if not exist "%BUILD_DIR%" (md "%BUILD_DIR%") if not exist "%BUILD_DIR%\quandenser" (md "%BUILD_DIR%\quandenser") cd /D "%BUILD_DIR%\quandenser....." echo cmake quandenser..... -%CMAKE_EXE% -G "Visual Studio %MSVC_VER%" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_56_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" "%SRC_DIR%\quandenser" +%CMAKE_EXE% -G "Visual Studio %MSVC_VER%" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_67_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" "%SRC_DIR%\quandenser" echo build quandenser (this will take a few minutes)..... msbuild PACKAGE.vcxproj /p:VCTargetsPath="%VCTARGET%" /p:Configuration=%BUILD_TYPE% /m @@ -188,7 +206,7 @@ msbuild PACKAGE.vcxproj /p:VCTargetsPath="%VCTARGET%" /p:Configuration=%BUILD_TY if not exist "%BUILD_DIR%\quandenser-vendor-support" (md "%BUILD_DIR%\quandenser-vendor-support") cd /D "%BUILD_DIR%\quandenser-vendor-support" echo cmake quandenser with vendor support..... -%CMAKE_EXE% -G "Visual Studio %MSVC_VER%" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_56_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" -DVENDOR_SUPPORT=ON "%SRC_DIR%\quandenser" +%CMAKE_EXE% -G "Visual Studio %MSVC_VER%" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_67_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" -DVENDOR_SUPPORT=ON "%SRC_DIR%\quandenser" echo build quandenser with vendor support (this will take a few minutes)..... msbuild PACKAGE.vcxproj /p:VCTargetsPath="%VCTARGET%" /p:Configuration=%BUILD_TYPE% /m diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index 733ee5b..1ca4b23 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -156,6 +156,25 @@ if not exist "%PWIZ_DIR%\lib" ( for /r pwiz %%x in (*.hpp, *.h) do copy "%%x" include\ /Y > NUL ) +set MVN_BASE=apache-maven-3.6.1 +set MVN_URL=http://ftp.unicamp.br/pub/apache/maven/maven-3/3.6.1/binaries/%MVN_BASE%-bin.zip +if not exist "%INSTALL_DIR%\%MVN_BASE%" ( + echo Downloading and installing CMake + call :downloadfile %MVN_URL% %INSTALL_DIR%\mvn.zip + %ZIP_EXE% x "%INSTALL_DIR%\mvn.zip" -o"%INSTALL_DIR%" > NUL +) +setlocal +set PATH=%PATH%;%INSTALL_DIR%\%MVN_BASE%\bin + +set JAVA_BASE=openjdk-8u212-b04 +set JAVA_URL=https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u212-b04/OpenJDK8u-x64_windows_8u212b04.zip +if not exist "%INSTALL_DIR%\%JAVA_BASE%" ( + echo Downloading and installing Java JDK + call :downloadfile %JAVA_URL% %INSTALL_DIR%\java.zip + %ZIP_EXE% x "%INSTALL_DIR%\java.zip" -o"%INSTALL_DIR%" > NUL +) +set JAVA_HOME=%INSTALL_DIR%\%JAVA_BASE% + ::: Needed for CPack ::: set NSIS_DIR=%INSTALL_DIR%\nsis set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS 3/3.04/nsis-3.04-setup.exe/download @@ -164,7 +183,6 @@ if not exist "%NSIS_DIR%" ( call :downloadfile "%NSIS_URL%" %INSTALL_DIR%\nsis.exe "%INSTALL_DIR%\nsis.exe" /S /D=%INSTALL_DIR%\nsis ) -setlocal set PATH=%PATH%;%INSTALL_DIR%\nsis :::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -183,7 +201,7 @@ if not exist "%BUILD_DIR%" (md "%BUILD_DIR%") if not exist "%BUILD_DIR%\quandenser" (md "%BUILD_DIR%\quandenser") cd /D "%BUILD_DIR%\quandenser" echo cmake quandenser..... -%CMAKE_EXE% -G "Visual Studio %MSVC_VER% Win64" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_56_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" "%SRC_DIR%\quandenser" +%CMAKE_EXE% -G "Visual Studio %MSVC_VER% Win64" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_67_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" "%SRC_DIR%\quandenser" echo build quandenser (this will take a few minutes)..... msbuild PACKAGE.vcxproj /p:VCTargetsPath="%VCTARGET%" /p:Configuration=%BUILD_TYPE% /m @@ -195,7 +213,7 @@ msbuild PACKAGE.vcxproj /p:VCTargetsPath="%VCTARGET%" /p:Configuration=%BUILD_TY if not exist "%BUILD_DIR%\quandenser-vendor-support" (md "%BUILD_DIR%\quandenser-vendor-support") cd /D "%BUILD_DIR%\quandenser-vendor-support" echo cmake quandenser with vendor support..... -%CMAKE_EXE% -G "Visual Studio %MSVC_VER% Win64" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_56_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" -DVENDOR_SUPPORT=ON "%SRC_DIR%\quandenser" +%CMAKE_EXE% -G "Visual Studio %MSVC_VER% Win64" -DBOOST_ROOT="%PWIZ_DIR%\libraries\boost_1_67_0" -DZLIB_INCLUDE_DIR="%PWIZ_DIR%\libraries\zlib-1.2.3" -DCMAKE_PREFIX_PATH="%PWIZ_DIR%" -DVENDOR_SUPPORT=ON "%SRC_DIR%\quandenser" echo build quandenser with vendor support (this will take a few minutes)..... msbuild PACKAGE.vcxproj /p:VCTargetsPath="%VCTARGET%" /p:Configuration=%BUILD_TYPE% /m diff --git a/cmake/FindProteoWizard.cmake b/cmake/FindProteoWizard.cmake index 71b1d89..67fcbcc 100644 --- a/cmake/FindProteoWizard.cmake +++ b/cmake/FindProteoWizard.cmake @@ -6,10 +6,16 @@ # PROTEOWIZARD_LIBRARIES, the libraries to link against to use xercesc. # PROTEOWIZARD_FOUND, If false, don't try to use xercesc. -function(_pwiz_find_library _name) - find_library(${_name} NAMES ${ARGN}) - mark_as_advanced(${_name}) -endfunction() +set(PWIZ_LIBRARIES "") + +macro(_pwiz_find_library _name) + find_library(${_name} NAMES ${ARGN}) + mark_as_advanced(${_name}) + if(NOT ${_name}) + message(FATAL_ERROR "${_name} library not found") + endif() + list(APPEND PWIZ_LIBRARIES ${${_name}}) +endmacro() FIND_PATH(PWIZ_INCLUDE_DIR pwiz ) @@ -22,9 +28,6 @@ _pwiz_find_library(PWIZ_UTILITY_MINIXML_LIBRARY pwiz_utility_minimxml) _pwiz_find_library(PWIZ_DATA_MSDATA_VERSION_LIBRARY pwiz_data_msdata_version) _pwiz_find_library(PWIZ_SHA1_LIBRARY SHA1) -set(PWIZ_LIBRARIES "") -list(APPEND PWIZ_LIBRARIES ${PWIZ_DATA_MSDATA_LIBRARY} ${PWIZ_DATA_COMMON_LIBRARY} ${PWIZ_UTILITY_MISC_LIBRARY} ${PWIZ_UTILITY_MINIXML_LIBRARY} ${PWIZ_DATA_MSDATA_VERSION_LIBRARY} ${PWIZ_SHA1_LIBRARY}) - #/home/matthew/build-32bit/tools/proteowizard/lib/baf2sql_c.dll #/home/matthew/build-32bit/tools/proteowizard/lib/cdt.dll #/home/matthew/build-32bit/tools/proteowizard/lib/MassLynxRaw.dll @@ -34,7 +37,6 @@ if(MSVC) _pwiz_find_library(HDF5_LIBRARY hdf5) _pwiz_find_library(SQLITE3PP_LIBRARY sqlite3pp) _pwiz_find_library(SQLITE3_LIBRARY sqlite3) - list(APPEND PWIZ_LIBRARIES ${PWIZ_DATA_MSDATA_MZ5_LIBRARY} ${HDF5PP_LIBRARY} ${HDF5_LIBRARY} ${SQLITE3PP_LIBRARY} ${SQLITE3_LIBRARY}) if (VENDOR_SUPPORT) _pwiz_find_library(PWIZ_DATA_VENDOR_LIBRARY pwiz_data_vendor_readers) _pwiz_find_library(PWIZ_DATA_VENDOR_THERMO_LIBRARY pwiz_reader_thermo) @@ -43,6 +45,8 @@ if(MSVC) _pwiz_find_library(PWIZ_DATA_VENDOR_SHIMADZU_API_LIBRARY pwiz_vendor_api_shimadzu) _pwiz_find_library(PWIZ_DATA_VENDOR_UIMF_LIBRARY pwiz_reader_uimf) _pwiz_find_library(PWIZ_DATA_VENDOR_UIMF_API_LIBRARY pwiz_vendor_api_uimf) + _pwiz_find_library(PWIZ_DATA_VENDOR_UNIFI_LIBRARY pwiz_reader_unifi) + _pwiz_find_library(PWIZ_DATA_VENDOR_UNIFI_API_LIBRARY pwiz_vendor_api_unifi) _pwiz_find_library(PWIZ_DATA_VENDOR_AGILENT_LIBRARY pwiz_reader_agilent) _pwiz_find_library(PWIZ_DATA_VENDOR_AGILENT_API_LIBRARY pwiz_vendor_api_agilent) _pwiz_find_library(PWIZ_DATA_VENDOR_WATERS_LIBRARY pwiz_reader_waters) @@ -50,14 +54,13 @@ if(MSVC) _pwiz_find_library(PWIZ_DATA_VENDOR_WATERS_IMS_API_LIBRARY cdt) _pwiz_find_library(PWIZ_DATA_VENDOR_BRUKER_LIBRARY pwiz_reader_bruker) _pwiz_find_library(PWIZ_DATA_VENDOR_BRUKER_BAF2SQL_API_LIBRARY baf2sql_c) + _pwiz_find_library(PWIZ_DATA_VENDOR_BRUKER_TIMSDATA_API_LIBRARY timsdata) _pwiz_find_library(PWIZ_DATA_VENDOR_BRUKER_API_LIBRARY pwiz_vendor_api_bruker) _pwiz_find_library(PWIZ_DATA_VENDOR_ABI_T2D_LIBRARY pwiz_reader_abi_t2d) _pwiz_find_library(PWIZ_DATA_VENDOR_ABI_LIBRARY pwiz_reader_abi) _pwiz_find_library(PWIZ_DATA_VENDOR_ABI_API_LIBRARY pwiz_vendor_api_abi) - list(APPEND PWIZ_LIBRARIES ${PWIZ_DATA_VENDOR_LIBRARY} ${PWIZ_DATA_VENDOR_THERMO_LIBRARY} ${PWIZ_DATA_VENDOR_THERMO_API_LIBRARY} ${PWIZ_DATA_VENDOR_SHIMADZU_LIBRARY} ${PWIZ_DATA_VENDOR_SHIMADZU_API_LIBRARY} ${PWIZ_DATA_VENDOR_UIMF_LIBRARY} ${PWIZ_DATA_VENDOR_UIMF_API_LIBRARY} ${PWIZ_DATA_VENDOR_AGILENT_LIBRARY} ${PWIZ_DATA_VENDOR_AGILENT_API_LIBRARY} ${PWIZ_DATA_VENDOR_WATERS_LIBRARY} ${PWIZ_DATA_VENDOR_WATERS_API_LIBRARY} ${PWIZ_DATA_VENDOR_WATERS_IMS_API_LIBRARY} ${PWIZ_DATA_VENDOR_BRUKER_LIBRARY} ${PWIZ_DATA_VENDOR_BRUKER_API_LIBRARY} ${PWIZ_DATA_VENDOR_BRUKER_BAF2SQL_API_LIBRARY} ${PWIZ_DATA_VENDOR_ABI_T2D_LIBRARY} ${PWIZ_DATA_VENDOR_ABI_T2D_API_LIBRARY} ${PWIZ_DATA_VENDOR_ABI_LIBRARY} ${PWIZ_DATA_VENDOR_ABI_API_LIBRARY}) if (NOT CMAKE_GENERATOR MATCHES ".*Win64.*") _pwiz_find_library(PWIZ_DATA_VENDOR_ABI_T2D_API_LIBRARY pwiz_vendor_api_abi_t2d) - list(APPEND PWIZ_LIBRARIES ${PWIZ_DATA_VENDOR_ABI_T2D_API_LIBRARY}) endif() endif (VENDOR_SUPPORT) endif(MSVC) diff --git a/src/DinosaurFeatureList.h b/src/DinosaurFeatureList.h index 2438916..830b28b 100644 --- a/src/DinosaurFeatureList.h +++ b/src/DinosaurFeatureList.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include "percolator/src/DataSet.h"