If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit 5581affd authored by Tobias WEBER's avatar Tobias WEBER

mingw compatibility

parent c664e88b
......@@ -73,7 +73,14 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
set(Boost_FIND_QUIETLY FALSE)
set(BOOST_COMPS program_options iostreams filesystem system)
if(BUILD_FOR_MINGW)
set(BOOST_SUFFIX -x64)
else()
set(BOOST_SUFFIX)
endif()
set(BOOST_COMPS program_options${BOOST_SUFFIX} iostreams${BOOST_SUFFIX} filesystem${BOOST_SUFFIX} system${BOOST_SUFFIX})
set(BOOST_OPT_COMPS)
if(USE_TR1_FUNCS)
......@@ -125,7 +132,7 @@ else()
set(Mp_LIBRARIES "")
endif()
if(USE_PLUGINS)
if(USE_PLUGINS AND NOT BUILD_FOR_MINGW)
find_package(Dl REQUIRED)
else()
set(Dl_LIBRARIES "")
......@@ -314,7 +321,7 @@ if(USE_GENTAB)
target_link_libraries(gentab
${Clipper_LIBRARIES}
Qt5::Core Qt5::Gui Qt5::Widgets
Boost::iostreams Boost::system Boost::filesystem Boost::program_options
Boost::iostreams${BOOST_SUFFIX} Boost::system${BOOST_SUFFIX} Boost::filesystem${BOOST_SUFFIX} Boost::program_options${BOOST_SUFFIX}
${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES}
)
......@@ -391,7 +398,7 @@ target_link_libraries(takin
${LIBS_3D}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES}
Boost::iostreams Boost::system Boost::filesystem Boost::program_options
Boost::iostreams${BOOST_SUFFIX} Boost::system${BOOST_SUFFIX} Boost::filesystem${BOOST_SUFFIX} Boost::program_options${BOOST_SUFFIX}
Threads::Threads ${Mp_LIBRARIES} ${Rt_LIBRARIES} ${Dl_LIBRARIES}
)
......@@ -464,7 +471,7 @@ add_executable(takinmod_jl
)
target_link_libraries(takinmod_jl
Boost::iostreams Boost::system Boost::filesystem
Boost::iostreams${BOOST_SUFFIX} Boost::system${BOOST_SUFFIX} Boost::filesystem${BOOST_SUFFIX}
${Julia_LIBRARIES}
Threads::Threads ${Rt_LIBRARIES}
)
......@@ -512,7 +519,7 @@ set_target_properties(convofit PROPERTIES COMPILE_FLAGS "-DNO_QT")
target_link_libraries(convofit
${LIBS_FIT} ${SOCK2}
Threads::Threads ${Mp_LIBRARIES} ${Rt_LIBRARIES} ${Dl_LIBRARIES}
Boost::iostreams Boost::system Boost::filesystem Boost::program_options
Boost::iostreams${BOOST_SUFFIX} Boost::system${BOOST_SUFFIX} Boost::filesystem${BOOST_SUFFIX} Boost::program_options${BOOST_SUFFIX}
${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES}
)
......@@ -535,7 +542,7 @@ add_executable(convoseries
set_target_properties(convoseries PROPERTIES COMPILE_FLAGS "-DNO_QT")
target_link_libraries(convoseries
Boost::iostreams Boost::system Boost::filesystem Boost::program_options
Boost::iostreams${BOOST_SUFFIX} Boost::system${BOOST_SUFFIX} Boost::filesystem${BOOST_SUFFIX} Boost::program_options${BOOST_SUFFIX}
${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES}
)
......
......@@ -5,14 +5,14 @@ Preparations before compilation
Install (developer versions of) all required libraries either from your
system's package manager or directly from the given URLs:
* Boost: http://www.boost.org
* Qt 4: http://www.qt.io
* Qt 5: http://www.qt.io
* Qwt 6: http://qwt.sourceforge.net
* Clipper: http://www.ysbl.york.ac.uk/~cowtan/clipper/
* Minuit 2: http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/release/download.html
For example, on *buntu systems, use the following commands:
* sudo su
* apt-get install cmake clang build-essential libboost-all-dev libclipper-dev libqt4-dev qt4-dev-tools libqwt-dev python-dev libfreetype6-dev wget
* apt-get install cmake clang build-essential libboost-all-dev libclipper-dev qt5-default libqt5svg5-dev qt5-assistant libqwt-qt5-dev libpython3-dev libfreetype6-dev libbz2-dev wget
* wget http://www.cern.ch/mathlibs/sw/5_34_14/Minuit2/Minuit2-5.34.14.tar.gz
* tar -xzvf Minuit2-5.34.14.tar.gz
* cd Minuit2-5.34.14
......
......@@ -44,35 +44,54 @@ cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_seh-1.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libbz2-1.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/zlib1.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/iconv.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libpcre2-16-0.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libharfbuzz-0.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libglib-2.0-0.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libintl-8.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libpcre-1.dll ${INSTDIR}/
#cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libMinuit2.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_regex-mt.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_system-mt.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_iostreams-mt.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_filesystem-mt.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_program_options-mt.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/QtCore4.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/QtGui4.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/QtOpenGL4.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/QtSvg4.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/QtXml4.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/qwt.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_regex-x64.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_system-x64.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_iostreams-x64.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_filesystem-x64.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_program_options-x64.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5Core.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5Gui.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5Widgets.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5OpenGL.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5Svg.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5Xml.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/Qt5PrintSupport.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/qwt-qt5.dll ${INSTDIR}/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libfreetype-6.dll ${INSTDIR}/
#cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/liblapack.dll ${INSTDIR}/
#cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/liblapacke.dll ${INSTDIR}/
#cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libblas.dll ${INSTDIR}/
#cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libquadmath-0.dll ${INSTDIR}/
#cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgfortran-5.dll ${INSTDIR}/
# qt plugins
mkdir -p ${INSTDIR}/lib/plugins/platforms/
mkdir -p ${INSTDIR}/lib/plugins/iconengines/
mkdir -p ${INSTDIR}/lib/plugins/imageformats
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt4/plugins/iconengines/qsvgicon4.dll ${INSTDIR}/lib/plugins/iconengines/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt4/plugins/imageformats/qsvg4.dll ${INSTDIR}/lib/plugins/imageformats/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/plugins/platforms/*.dll ${INSTDIR}/lib/plugins/platforms/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/plugins/iconengines/qsvgicon.dll ${INSTDIR}/lib/plugins/iconengines/
cp -v /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/plugins/imageformats/qsvg.dll ${INSTDIR}/lib/plugins/imageformats/
# stripping
strip -v ${INSTDIR}/*.exe
strip -v ${INSTDIR}/*.dll
strip -v ${INSTDIR}/lib/plugins/platforms/*.dll
strip -v ${INSTDIR}/lib/plugins/iconengines/*.dll
strip -v ${INSTDIR}/lib/plugins/imageformats/*.dll
echo -e "[Paths]\nPlugins = lib/plugins\n" > ${INSTDIR}/qt.conf
......@@ -18,6 +18,7 @@
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <unistd.h>
#define MSG_QUEUE_SIZE 512
#define PARAM_MEM 1024*1024
......@@ -365,7 +366,21 @@ SqwProc<t_sqw>::SqwProc(const char* pcCfg, SqwProcStartMode mode,
m_pmsgOut = std::make_shared<ipr::message_queue>(ipr::create_only,
("takin_sqw_proc_out_" + m_strProcName).c_str(), MSG_QUEUE_SIZE, sizeof(ProcMsg));
if(mode == SqwProcStartMode::START_PARENT_FORK_CHILD)
if(mode == SqwProcStartMode::START_PARENT_CREATE_CHILD)
{
if(!tl::file_exists(pcProcExecName))
{
tl::log_err("Child process file \"", pcProcExecName, "\" does not exist.");
return;
}
// start child process
std::system((std::string(pcProcExecName)
+ std::string(" \"") + pcCfg + std::string("\" ")
+ m_strProcName + " &").c_str());
}
#ifndef __MINGW32__
else if(mode == SqwProcStartMode::START_PARENT_FORK_CHILD)
{
m_pidChild = fork();
if(m_pidChild < 0)
......@@ -380,19 +395,7 @@ SqwProc<t_sqw>::SqwProc(const char* pcCfg, SqwProcStartMode mode,
return;
}
}
else if(mode == SqwProcStartMode::START_PARENT_CREATE_CHILD)
{
if(!tl::file_exists(pcProcExecName))
{
tl::log_err("Child process file \"", pcProcExecName, "\" does not exist.");
return;
}
// start child process
std::system((std::string(pcProcExecName)
+ std::string(" \"") + pcCfg + std::string("\" ")
+ m_strProcName + " &").c_str());
}
#endif
tl::log_debug("Waiting for client to become ready...");
......
......@@ -345,7 +345,10 @@ void load_sqw_plugins()
// import info function
if(!pmod->has("takin_sqw_info"))
{
//tl::log_err(strPlugin, " has no takin_sqw_info function.");
continue;
}
std::function<t_fkt_info> fktInfo =
pmod->get<t_pfkt_info>("takin_sqw_info");
if(!fktInfo)
......
......@@ -5,6 +5,11 @@
* @license GPLv2
*/
// hack because of include file ordering
#ifdef __MINGW32__
#include <boost/asio.hpp>
#endif
#include "bz3d.h"
#include <QGridLayout>
......
......@@ -5,6 +5,11 @@
* @license GPLv2
*/
// hack because of include file ordering
#ifdef __MINGW32__
#include <boost/asio.hpp>
#endif
#include "real3d.h"
#include <QGridLayout>
......
......@@ -5,6 +5,11 @@
* @license GPLv2
*/
// hack because of include file ordering
#ifdef __MINGW32__
#include <boost/asio.hpp>
#endif
#include "tlibs/helper/flags.h"
#include "tlibs/phys/neutrons.h"
#include "tlibs/string/spec_char.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment