Skip to content

Commit

Permalink
Fixes for windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewThe committed May 24, 2019
1 parent c190c5b commit edb9d0b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 19 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
24 changes: 21 additions & 3 deletions admin/builders/nativew32_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -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
Expand All @@ -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
Expand Down
24 changes: 21 additions & 3 deletions admin/builders/nativew64_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -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
Expand All @@ -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
Expand Down
23 changes: 13 additions & 10 deletions cmake/FindProteoWizard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand All @@ -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
Expand All @@ -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)
Expand All @@ -43,21 +45,22 @@ 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)
_pwiz_find_library(PWIZ_DATA_VENDOR_WATERS_API_LIBRARY MassLynxRaw)
_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)
Expand Down
2 changes: 1 addition & 1 deletion src/DinosaurFeatureList.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <vector>
#include <sstream>

#include <boost/unordered_map.hpp>
#include <boost/unordered/unordered_map.hpp>

#include "percolator/src/DataSet.h"

Expand Down

0 comments on commit edb9d0b

Please sign in to comment.