Skip to content

Commit

Permalink
Fixed vagrant builds for all platforms, ready for v0.2 release. Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewThe committed May 27, 2019
1 parent edb9d0b commit 59e0c95
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 205 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@
*.exe
*.out
*.app

admin/vagrant/*_output.txt
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ else (MSVC)
set(MVN_CMD mvn)
endif (MSVC)

MESSAGE( STATUS "Building Dinosaur with Maven" )

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")
Expand Down
6 changes: 4 additions & 2 deletions CommonCMake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ set(CMAKE_MODULE_PATH ${QUANDENSER_SOURCE_DIR}/cmake)

# VERSION AND NAMESPACES
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "01")
set(CPACK_PACKAGE_VERSION_MINOR "02")
set(CPACK_PACKAGE_VERSION_PATCH "0")

# UPDATE PATCH VERSION FOR INTERMEDIATE BUILDS
Expand Down Expand Up @@ -128,7 +128,9 @@ set(Boost_USE_STATIC_RUNTIME ON)
set(BOOST_MIN_VERSION "1.43.0")
set(Boost_ADDITIONAL_VERSIONS "1.43.0")

add_definitions(-DBOOST_NO_CXX11_VARIADIC_TEMPLATES)
if(NOT APPLE)
add_definitions(-DBOOST_NO_CXX11_VARIADIC_TEMPLATES)
endif(NOT APPLE)

###############################################################################
# SET SHARED DYNAMIC LINKING LIBRARIES
Expand Down
52 changes: 3 additions & 49 deletions admin/builders/centos64_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,60 +26,14 @@ if [[ -z ${release_dir} ]]; then
release_dir=${HOME}/release
fi

sudo yum install -y gcc gcc-c++ rpm-build cmake
sudo yum install -y gcc gcc-c++ rpm-build cmake rsync
sudo yum install -y java-1.8.0-openjdk-devel maven

mkdir -p ${build_dir}/tools
cd ${build_dir}/tools

if [ ! -d ${build_dir}/tools/proteowizard ]; then
echo "Download source code for ProteoWizard from their SVN repository"
sudo yum install -y subversion
rev=9393
svn co -r ${rev} --depth immediates https://svn.code.sf.net/p/proteowizard/code/trunk/pwiz ./proteowizard
svn update -r ${rev} --set-depth infinity ./proteowizard/pwiz
svn update -r ${rev} --set-depth infinity ./proteowizard/libraries

# install and keep libraries in the libs folder of this project for linking
cd proteowizard

./clean.sh

echo "Building ProteoWizard and Boost, this may take some time.."

./quickbuild.sh --without-binary-msdata \
pwiz/data/common//pwiz_data_common \
pwiz/data/identdata//pwiz_data_identdata \
pwiz/data/identdata//pwiz_data_identdata_version \
pwiz/data/msdata//pwiz_data_msdata \
pwiz/data/msdata//pwiz_data_msdata_version \
pwiz/data/proteome//pwiz_data_proteome \
pwiz/utility/chemistry//pwiz_utility_chemistry \
pwiz/utility/minimxml//pwiz_utility_minimxml \
pwiz/utility/misc//SHA1 \
pwiz/utility/misc//pwiz_utility_misc \
/ext/zlib//z \
/ext/boost//system \
/ext/boost//thread \
/ext/boost//chrono \
/ext/boost//regex \
/ext/boost//filesystem \
/ext/boost//iostreams \
/ext/boost//program_options \
/ext/boost//serialization \
> ../pwiz_installation.log 2>&1

# for revision 7692 the "libraries" target does not work, so we have to copy everything manually
mkdir -p ../lib
find build-linux-x86_64/ -type f | grep -i .a$ | xargs -i cp {} ../lib

mkdir -p ../include
find pwiz/ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../include/

cd libraries/boost_1_56_0/
find boost/ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../../../include/

cd ../zlib-1.2.3
find ./ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../../../include/
${src_dir}/quandenser/ext/maracluster/admin/builders/install_proteowizard.sh ${build_dir}/tools
fi

mkdir -p $build_dir/quandenser
Expand Down
50 changes: 2 additions & 48 deletions admin/builders/fedora64_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,59 +27,13 @@ if [[ -z ${release_dir} ]]; then
fi

sudo dnf install -y gcc gcc-c++ rpm-build cmake
sudo dnf install -y java-1.8.0-openjdk.x86_64 maven

mkdir -p ${build_dir}/tools
cd ${build_dir}/tools

if [ ! -d ${build_dir}/tools/proteowizard ]; then
echo "Download source code for ProteoWizard from their SVN repository"
sudo dnf install -y subversion
rev=9393
svn co -r ${rev} --depth immediates https://svn.code.sf.net/p/proteowizard/code/trunk/pwiz ./proteowizard
svn update -r ${rev} --set-depth infinity ./proteowizard/pwiz
svn update -r ${rev} --set-depth infinity ./proteowizard/libraries

# install and keep libraries in the libs folder of this project for linking
cd proteowizard

./clean.sh

echo "Building ProteoWizard and Boost, this may take some time.."

./quickbuild.sh --without-binary-msdata \
pwiz/data/common//pwiz_data_common \
pwiz/data/identdata//pwiz_data_identdata \
pwiz/data/identdata//pwiz_data_identdata_version \
pwiz/data/msdata//pwiz_data_msdata \
pwiz/data/msdata//pwiz_data_msdata_version \
pwiz/data/proteome//pwiz_data_proteome \
pwiz/utility/chemistry//pwiz_utility_chemistry \
pwiz/utility/minimxml//pwiz_utility_minimxml \
pwiz/utility/misc//SHA1 \
pwiz/utility/misc//pwiz_utility_misc \
/ext/zlib//z \
/ext/boost//system \
/ext/boost//thread \
/ext/boost//chrono \
/ext/boost//regex \
/ext/boost//filesystem \
/ext/boost//iostreams \
/ext/boost//program_options \
/ext/boost//serialization \
> ../pwiz_installation.log 2>&1

# for revision 7692 the "libraries" target does not work, so we have to copy everything manually
mkdir -p ../lib
find build-linux-x86_64/ -type f | grep -i .a$ | xargs -i cp {} ../lib

mkdir -p ../include
find pwiz/ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../include/

cd libraries/boost_1_56_0/
find boost/ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../../../include/

cd ../zlib-1.2.3
find ./ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../../../include/
${src_dir}/quandenser/ext/maracluster/admin/builders/install_proteowizard.sh ${build_dir}/tools
fi

mkdir -p $build_dir/quandenser
Expand Down
2 changes: 1 addition & 1 deletion admin/builders/nativew32_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ if not exist "%PWIZ_DIR%\lib" (
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
echo Downloading and installing Maven
call :downloadfile %MVN_URL% %INSTALL_DIR%\mvn.zip
%ZIP_EXE% x "%INSTALL_DIR%\mvn.zip" -o"%INSTALL_DIR%" > NUL
)
Expand Down
2 changes: 1 addition & 1 deletion admin/builders/nativew64_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ if not exist "%PWIZ_DIR%\lib" (
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
echo Downloading and installing Maven
call :downloadfile %MVN_URL% %INSTALL_DIR%\mvn.zip
%ZIP_EXE% x "%INSTALL_DIR%\mvn.zip" -o"%INSTALL_DIR%" > NUL
)
Expand Down
61 changes: 13 additions & 48 deletions admin/builders/osx64_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@ if [[ -d /opt/local/var/macports ]]
then
echo "[ Package manager ] : MacPorts "
package_manager="sudo port"
other_packages="cmake gnutar"
elif [[ -f ${HOME}/bin/brew ]]
other_packages="cmake gnutar wget maven32 openjdk8"
elif [[ -f ${HOME}/bin/brew ]] || [[ -f /usr/local/bin/brew ]]
then
echo "[ Package manager ] : Homebrew "
package_manager=$HOME/bin/brew
other_packages="cmake gnutar"
if [[ -f ${HOME}/bin/brew ]]
then
package_manager=$HOME/bin/brew
else
package_manager=brew
fi
other_packages="cmake gnu-tar wget maven"
${package_manager} update || true # brew.rb raises an error on the vagrant box, just ignore it
${package_manager} tap AdoptOpenJDK/openjdk
${package_manager} cask install adoptopenjdk8
else
package_manager_installed=false
fi
Expand Down Expand Up @@ -93,50 +101,7 @@ mkdir -p ${build_dir}/tools
cd ${build_dir}/tools

if [ ! -d ${build_dir}/tools/proteowizard ]; then
echo "Download source code for ProteoWizard from their SVN repository"
$package_manager install subversion
rev=9393
svn co -r ${rev} --depth immediates https://svn.code.sf.net/p/proteowizard/code/trunk/pwiz ./proteowizard
svn update -r ${rev} --set-depth infinity ./proteowizard/pwiz
svn update -r ${rev} --set-depth infinity ./proteowizard/libraries

# install and keep libraries in the libs folder of this project for linking
cd proteowizard

./clean.sh

echo "Building ProteoWizard and Boost, this may take some time.."

# if you have more than 4GB of memory available, you could try to use more than 2 cores to speed things up
./quickbuild.sh -j4 --without-binary-msdata \
pwiz/data/common//pwiz_data_common \
pwiz/data/identdata//pwiz_data_identdata \
pwiz/data/identdata//pwiz_data_identdata_version \
pwiz/data/msdata//pwiz_data_msdata \
pwiz/data/msdata//pwiz_data_msdata_version \
pwiz/data/proteome//pwiz_data_proteome \
pwiz/utility/chemistry//pwiz_utility_chemistry \
pwiz/utility/minimxml//pwiz_utility_minimxml \
pwiz/utility/misc//SHA1 \
pwiz/utility/misc//pwiz_utility_misc \
/ext/zlib//z \
/ext/boost//system \
/ext/boost//thread \
/ext/boost//chrono \
/ext/boost//regex \
/ext/boost//filesystem \
/ext/boost//iostreams \
/ext/boost//program_options \
/ext/boost//serialization \
> ../pwiz_installation.log 2>&1

# for revision 7692 the "libraries" target does not work, so we have to copy everything manually
mkdir -p ../lib
find build-macosx-x86_64/ -type f | grep -i .a$ | xargs -I{} cp {} ../lib

mkdir -p ../include
rsync -ap --include "*/" --include "*.h" --include "*.hpp" --include "*.ipp" --exclude "*" pwiz libraries/boost_1_56_0/boost libraries/boost_aux/boost ../include/
rsync -ap --include "*/" --include "*.h" --include "*.hpp" --exclude "*" libraries/zlib-1.2.3/ ../include/zlib
${src_dir}/quandenser/ext/maracluster/admin/builders/install_proteowizard.sh ${build_dir}/tools
fi

#-------------------------------------------
Expand Down
52 changes: 2 additions & 50 deletions admin/builders/ubuntu64_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,61 +28,13 @@ fi

sudo apt-get update;
sudo apt-get upgrade;
sudo apt-get -y install g++ make cmake maven
sudo apt-get -y install g++ make cmake maven openjdk-8-jdk

mkdir -p ${build_dir}/tools
cd ${build_dir}/tools

if [ ! -d ${build_dir}/tools/proteowizard ]; then
echo "Download source code for ProteoWizard from their SVN repository"
sudo apt-get -y install subversion
rev=9393
svn co -r ${rev} --depth immediates https://svn.code.sf.net/p/proteowizard/code/trunk/pwiz ./proteowizard
svn update -r ${rev} --set-depth infinity ./proteowizard/pwiz
svn update -r ${rev} --set-depth infinity ./proteowizard/libraries

# install and keep libraries in the libs folder of this project for linking
cd proteowizard

./clean.sh

echo "Building ProteoWizard and Boost, this may take some time.."

# if you have more than 4GB of memory available, you could try to use more than 2 cores to speed things up
./quickbuild.sh -j2 --without-binary-msdata \
pwiz/data/common//pwiz_data_common \
pwiz/data/identdata//pwiz_data_identdata \
pwiz/data/identdata//pwiz_data_identdata_version \
pwiz/data/msdata//pwiz_data_msdata \
pwiz/data/msdata//pwiz_data_msdata_version \
pwiz/data/proteome//pwiz_data_proteome \
pwiz/utility/chemistry//pwiz_utility_chemistry \
pwiz/utility/minimxml//pwiz_utility_minimxml \
pwiz/utility/misc//SHA1 \
pwiz/utility/misc//pwiz_utility_misc \
/ext/zlib//z \
/ext/boost//system \
/ext/boost//thread \
/ext/boost//chrono \
/ext/boost//regex \
/ext/boost//filesystem \
/ext/boost//iostreams \
/ext/boost//program_options \
/ext/boost//serialization \
> ../pwiz_installation.log 2>&1

# for revision 7692 the "libraries" target does not work, so we have to copy everything manually
mkdir -p ../lib
find build-linux-x86_64/ -type f | grep -i .a$ | xargs -i cp {} ../lib

mkdir -p ../include
find pwiz/ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../include/

cd libraries/boost_1_56_0/
find boost/ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../../../include/

cd ../zlib-1.2.3
find ./ -type f | grep -i '.h$\|.hpp$' | xargs -i cp --parents {} ../../../include/
${src_dir}/quandenser/ext/maracluster/admin/builders/install_proteowizard.sh ${build_dir}/tools
fi

mkdir -p $build_dir/quandenser
Expand Down
6 changes: 3 additions & 3 deletions admin/vagrant/manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ while getopts “hab:s:r:p:” OPTION; do
p) case $OPTARG in
ubuntu)
post="ubuntu64"
vagbox_name="ubuntu/trusty64"
vagbox_name="ubuntu/xenial64"
vagbox_url=""
package_ext="deb"
;;
Expand Down Expand Up @@ -201,7 +201,7 @@ Vagrant.configure("2") do |config|
:export_options => ['async,insecure,no_subtree_check,no_acl,no_root_squash']
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096", "--cpus", "4"]
vb.customize ["modifyvm", :id, "--memory", "8192", "--cpus", "4"]
# vb.gui = true # turn on for trouble shooting, e.g. if boot times out repeatedly
# Fix "hfs mounted macintosh hd on device root_device" issue
vb.customize ["modifyvm", :id, "--cpuidset", "1","000206a7","02100800","1fbae3bf","bfebfbff"]
Expand Down Expand Up @@ -240,7 +240,7 @@ Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.boot_timeout = 600
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096", "--cpus", "4"]
vb.customize ["modifyvm", :id, "--memory", "8192", "--cpus", "4"]
# vb.gui = true # turn on for trouble shooting, e.g. if boot times out repeatedly
end
config.vm.provision :shell do |shell|
Expand Down
2 changes: 1 addition & 1 deletion ext/maracluster
4 changes: 2 additions & 2 deletions src/DinosaurIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

namespace quandenser {

const std::string DinosaurIO::kAdvancedParamFile = std::string(JAR_PATH) + std::string("advParams_dinosaur_targeted.txt");
const std::string DinosaurIO::kDinosaurJar = std::string(JAR_PATH) + std::string("Dinosaur-1.1.3.free.jar");
const std::string DinosaurIO::kAdvancedParamFile = "\"" + Globals::getJarPath() + std::string("advParams_dinosaur_targeted.txt") + "\"";
const std::string DinosaurIO::kDinosaurJar = "\"" + Globals::getJarPath() + std::string("Dinosaur-1.1.3.free.jar") + "\"";

std::string DinosaurIO::javaMemory_ = "24000M";
int DinosaurIO::javaNumThreads_ = 4;
Expand Down
Loading

0 comments on commit 59e0c95

Please sign in to comment.