Commit 6a5fb545 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - resource directories are now lowercase, OW shell-scripts are now...

[CHANGE] - resource directories are now lowercase, OW shell-scripts are now named openwalnut instead of walnut since the program is called openwalnut.
parent fea6571d
......@@ -5,8 +5,8 @@ BINDIR=`dirname "$0"`
cd "$BINDIR/.."
# We want to avoid that multiple system installations of OpenWalnut cause some weird loading of libs. We want ours to be loaded:
export LD_PRELOAD="lib/libOWcore.so:lib/libOWext_biosig.so:lib/libOWext_eep.so:lib/libOWext_niftiio.so:lib/libOWext_znz.so"
export LD_PRELOAD="lib/libopenwalnut.so:lib/libopenwalnut_biosig.so:lib/libopenwalnut_eep.so:lib/libopenwalnut_niftiio.so:lib/libopenwalnut_niftiznz.so"
# Run OpenWalnut
bin/walnut $@
bin/openwalnut-qt4 $@
......@@ -12,6 +12,6 @@ echo run $@ > $PARAM_FILENAME
cd "$BINDIR"
# run walnut
gdb ./walnut -command=$PARAM_FILENAME
gdb ./openwalnut-qt4 -command=$PARAM_FILENAME
rm $PARAM_FILENAME
......@@ -12,5 +12,5 @@ PARAMS="$*"
echo "Parameters: $PARAMS"
# run walnut
kdbg -a "$PARAMS" walnut
kdbg -a "$PARAMS" openwalnut-qt4
......@@ -19,5 +19,5 @@ else
fi
# run walnut
pyclewn -c "-c \"cd $SRCDIR\"" -a $BINDIR/walnut "$*"
pyclewn -c "-c \"cd $SRCDIR\"" -a $BINDIR/openwalnut-qt4 "$*"
[Desktop Entry]
Categories=Sciene;
Exec=/usr/bin/OpenWalnut
Categories=Science;
Exec=/usr/bin/openwalnut
Name=OpenWalnut
Icon=OpenWalnut.png
Icon=openwalnut.png
X-KDE-StartupNotify=true
Terminal=true
Type=Application
......
Due to a bug in OpenSceneGraph, we had to add some fonts here.
Especially arial.ttf. It is needed by the OSG Stat Display, where
the font filename cannot be changed. The file arial.ttf is a copy
of liberationSans-Bold.ttf. Sorry for that. Maybe this is fixed
some day.
......@@ -82,11 +82,11 @@ ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# mimic layout of install dir for build:
SET( OW_CONFIG_DIR_RELATIVE "etc/OpenWalnut" )
SET( OW_CONFIG_DIR_RELATIVE "share/openwalnut" )
SET( OW_CONFIG_DIR ${PROJECT_BINARY_DIR}/${OW_CONFIG_DIR_RELATIVE} )
SET( OW_SHARE_DIR_RELATIVE "share/OpenWalnut" )
SET( OW_SHARE_DIR_RELATIVE "share/openwalnut" )
SET( OW_SHARE_DIR ${PROJECT_BINARY_DIR}/${OW_SHARE_DIR_RELATIVE} )
SET( OW_DOC_DIR_RELATIVE "share/doc/OpenWalnut" )
SET( OW_DOC_DIR_RELATIVE "share/doc/openwalnut" )
SET( OW_DOC_DIR ${PROJECT_BINARY_DIR}/${OW_DOC_DIR_RELATIVE} )
SET( OW_RUNTIME_DIR_RELATIVE "bin" )
SET( OW_RUNTIME_DIR ${PROJECT_BINARY_DIR}/${OW_RUNTIME_DIR_RELATIVE} )
......@@ -94,7 +94,7 @@ SET( OW_LIBRARY_DIR_RELATIVE "lib" )
SET( OW_LIBRARY_DIR ${PROJECT_BINARY_DIR}/${OW_LIBRARY_DIR_RELATIVE} )
SET( OW_ARCHIVE_DIR_RELATIVE "lib" )
SET( OW_ARCHIVE_DIR ${PROJECT_BINARY_DIR}/${OW_ARCHIVE_DIR_RELATIVE} )
SET( OW_MODULE_DIR_RELATIVE "lib/OpenWalnut" )
SET( OW_MODULE_DIR_RELATIVE "lib/openwalnut" )
SET( OW_MODULE_DIR ${PROJECT_BINARY_DIR}/${OW_MODULE_DIR_RELATIVE} )
# set our paths for install targets
......@@ -165,7 +165,11 @@ ENDIF()
# Generate needed headers
# NOTE: add a line ADD_DEPENDENCIES( XYZ OW_generate_version_header ) to your target XYZ if you need the header!
SET( OW_VERSION_HEADER ${PROJECT_SOURCE_DIR}/WVersion.h )
SET( OW_VERSION_HEADER_DIRECTORY ${PROJECT_BINARY_DIR}/versionHeader )
SET( OW_VERSION_HEADER ${OW_VERSION_HEADER_DIRECTORY}/WVersion.h )
# to allow all those targets to find the header:
INCLUDE_DIRECTORIES( ${OW_VERSION_HEADER_DIRECTORY} )
# Setup the target
SETUP_VERSION_HEADER( ${OW_VERSION_HEADER} )
# Set the OW version string. This can be used by others for setting target versions during compilation.
......@@ -385,19 +389,20 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR} )
# -----------------------------------------------------------------------------------------------------------------------------------------------
# OWext
# external libs
SET( OWExtNiftiName "OWext_niftiio" )
SET( OWExtEEPName "OWext_eep" )
SET( OWExtBioSigName "OWext_biosig" )
SET( OWExtNiftiIOName "openwalnut_niftiio" )
SET( OWExtNiftiZNZName "openwalnut_niftiznz" )
SET( OWExtEEPName "openwalnut_eep" )
SET( OWExtBioSigName "openwalnut_biosig" )
# build external libs in ext/
ADD_SUBDIRECTORY( ext ) # The needed external libraries
# -----------------------------------------------------------------------------------------------------------------------------------------------
# OWcore
# openwalnut core library
SET( OWCoreName "OWcore" )
SET( OWCoreName "openwalnut" )
# build core
ADD_SUBDIRECTORY( core )
......@@ -406,7 +411,7 @@ ADD_SUBDIRECTORY( core )
# QT4 Walnut binary
SET( OWQt4GuiName "qt4gui" )
SET( OWBinaryName "walnut" )
SET( OWBinaryName "openwalnut-qt4" )
# build core
ADD_SUBDIRECTORY( qt4gui )
......
......@@ -48,7 +48,7 @@ COLLECT_COMPILE_FILES( "${CMAKE_CURRENT_SOURCE_DIR}" TARGET_CPP_FILES TARGET_H_F
# Setup the target
ADD_LIBRARY( ${LibName} SHARED ${TARGET_CPP_FILES} ${TARGET_H_FILES} ${OW_VERSION_HEADER} )
TARGET_LINK_LIBRARIES( ${LibName} ${OWExtBioSigName} ${OWExtEEPName} ${OWExtNiftiName}
TARGET_LINK_LIBRARIES( ${LibName} ${OWExtBioSigName} ${OWExtEEPName} ${OWExtNiftiIOName}
${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENSCENEGRAPH_LIBRARIES}
)
......@@ -71,6 +71,7 @@ INSTALL( TARGETS ${LibName}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT "RUNTIME"
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
......
......@@ -56,11 +56,11 @@ boost::shared_ptr< WPathHelper > WPathHelper::getPathHelper()
void WPathHelper::setAppPath( boost::filesystem::path appPath )
{
m_appPath = appPath;
m_sharePath = m_appPath / "../share/OpenWalnut";
m_docPath = m_appPath / "../share/doc/OpenWalnut";
m_configPath = m_appPath / "../share/OpenWalnut";
m_sharePath = m_appPath / "../share/openwalnut";
m_docPath = m_appPath / "../share/doc/openwalnut";
m_configPath = m_appPath / "../share/openwalnut";
m_libPath = m_appPath / "../lib";
m_modulePath = m_libPath / "OpenWalnut";
m_modulePath = m_libPath / "openwalnut";
}
boost::filesystem::path WPathHelper::getAppPath()
......
......@@ -12,17 +12,17 @@ ENDIF()
FILE( GLOB BIOSIG_SRC "*.c" "*.cpp" "*.h" "XMLParser/*.cpp" "XMLParser/*.h" )
ADD_LIBRARY( OWext_biosig ${BIOSIG_SRC} )
ADD_LIBRARY( ${OWExtBioSigName} ${BIOSIG_SRC} )
IF( CMAKE_HOST_SYSTEM MATCHES Windows )
TARGET_LINK_LIBRARIES( OWext_biosig ws2_32 )
TARGET_LINK_LIBRARIES( ${OWExtBioSigName} ws2_32 )
ENDIF()
# Set the version of the library.
SET_TARGET_PROPERTIES( OWext_biosig PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${OWExtBioSigName} PROPERTIES VERSION ${OW_VERSION} )
# install target
INSTALL( TARGETS OWext_biosig
INSTALL( TARGETS ${OWExtBioSigName}
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
......
......@@ -12,17 +12,17 @@ ENDIF()
FILE( GLOB BIOSIG_SRC "*.c" "*.cpp" "*.h" "XMLParser/*.cpp" "XMLParser/*.h" )
ADD_LIBRARY( OWext_biosig ${BIOSIG_SRC} )
ADD_LIBRARY( ${OWExtBioSigName} ${BIOSIG_SRC} )
IF( CMAKE_HOST_SYSTEM MATCHES Windows )
TARGET_LINK_LIBRARIES( OWext_biosig ws2_32 )
TARGET_LINK_LIBRARIES( ${OWExtBioSigName} ws2_32 )
ENDIF()
# Set the version of the library.
SET_TARGET_PROPERTIES( OWext_biosig PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${OWExtBioSigName} PROPERTIES VERSION ${OW_VERSION} )
# install target
INSTALL( TARGETS OWext_biosig
INSTALL( TARGETS ${OWExtBioSigName}
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
......
......@@ -10,22 +10,22 @@ ENDIF()
FILE( GLOB LIBEEP_SRC "libavr/*.c" "libcnt/*.c" "libeep/*.c" )
ADD_LIBRARY( OWext_eep ${LIBEEP_SRC} )
ADD_LIBRARY( ${OWExtEEPName} ${LIBEEP_SRC} )
IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
TARGET_LINK_LIBRARIES( OWext_eep )
TARGET_LINK_LIBRARIES( ${OWExtEEPName} )
ELSE()
TARGET_LINK_LIBRARIES( OWext_eep m )
TARGET_LINK_LIBRARIES( ${OWExtEEPName} m )
ENDIF()
IF(MSVC_IDE)
SET_TARGET_PROPERTIES( OWext_eep PROPERTIES PREFIX "../")
SET_TARGET_PROPERTIES( ${OWExtEEPName} PROPERTIES PREFIX "../")
ENDIF(MSVC_IDE)
# Set the version of the library.
SET_TARGET_PROPERTIES( OWext_eep PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${OWExtEEPName} PROPERTIES VERSION ${OW_VERSION} )
# install target
INSTALL( TARGETS OWext_eep
INSTALL( TARGETS ${OWExtEEPName}
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
......
......@@ -13,9 +13,8 @@ IF( ZLIB_FOUND )
INCLUDE_DIRECTORIES( ${OPENSCENEGRAPH_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} )
ENDIF( ZLIB_FOUND )
SET( PACKAGE_PREFIX "OWext_" )
SET(ZNZLIB_SRC znzlib.c znzlib.h)
SET(NIFTI_ZNZLIB_NAME ${PACKAGE_PREFIX}znz)
SET(NIFTI_ZNZLIB_NAME ${OWExtNiftiZNZName})
ADD_LIBRARY(${NIFTI_ZNZLIB_NAME} ${ZNZLIB_SRC} )
TARGET_LINK_LIBRARIES( ${NIFTI_ZNZLIB_NAME} ${NIFTI_ZLIB_LIBRARIES} )
......@@ -38,9 +37,9 @@ ENDIF( NIFTI_BUILD_SHARED_LIBS)
SET(NIFTILIB_SRC nifti1_io.c nifti1_io.h nifti1.h)
SET(NIFTI_NIFTILIB_NAME ${PACKAGE_PREFIX}niftiio)
SET(NIFTI_NIFTILIB_NAME ${OWExtNiftiIOName})
ADD_LIBRARY(${NIFTI_NIFTILIB_NAME} ${NIFTILIB_SRC} )
TARGET_LINK_LIBRARIES( ${NIFTI_NIFTILIB_NAME} ${PACKAGE_PREFIX}znz)
TARGET_LINK_LIBRARIES( ${NIFTI_NIFTILIB_NAME} ${NIFTI_ZNZLIB_NAME})
IF(MSVC_IDE)
SET_TARGET_PROPERTIES( ${NIFTI_NIFTILIB_NAME} PROPERTIES PREFIX "../")
......
......@@ -73,6 +73,7 @@ INSTALL( TARGETS ${BinName}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT "RUNTIME"
)
# TODO(all): comment this stuff. I do not know what the purpose is
......@@ -100,8 +101,14 @@ ADD_CUSTOM_TARGET( help
COMMENT "Copy the GUI Documentation"
)
# Also create an install target for this
INSTALL( DIRECTORY ${PROJECT_SOURCE_DIR}/../doc/user/help/ DESTINATION ${OW_DOC_DIR_RELATIVE}/${LibName} )
INSTALL( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${OW_DOC_DIR_RELATIVE}/${LibName} )
INSTALL( DIRECTORY ${PROJECT_SOURCE_DIR}/../doc/user/help/
DESTINATION ${OW_DOC_DIR_RELATIVE}/${LibName}
COMPONENT "RUNTIME"
)
INSTALL( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons
DESTINATION ${OW_DOC_DIR_RELATIVE}/${LibName}
COMPONENT "RUNTIME"
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Style Checker
......
......@@ -99,6 +99,7 @@ FUNCTION( SETUP_MODULE _MODULE_NAME _MODULE_SOURCE_DIR _MODULE_DEPENDENCIES _MOD
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT "RUNTIME"
)
# TODO(all): someone needs to explain this
......
......@@ -172,7 +172,9 @@ FUNCTION( SETUP_SHADERS _Shaders _TargetDir )
# now add install targets for each shader. All paths are relative to the current source dir.
FOREACH( fname ${_Shaders} )
INSTALL( FILES ${fname} DESTINATION ${_TargetDir} )
INSTALL( FILES ${fname} DESTINATION ${_TargetDir}
COMPONENT "RUNTIME"
)
ENDFOREACH( fname )
ENDIF( OW_HANDLE_SHADERS )
ENDFUNCTION( SETUP_SHADERS )
......@@ -242,6 +244,7 @@ FUNCTION( SETUP_RESOURCES )
# Also specify install target
INSTALL( DIRECTORY ${ResourcesPath}
DESTINATION "."
COMPONENT "RUNTIME"
PATTERN "bin/*" # binaries need to be executable
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
......
......@@ -37,11 +37,11 @@ SET( CPACK_GENERATOR TGZ STGZ )
# Disallow CPack to create an top-level directory?
# SET( CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0 )
SET( CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/../resources/share/doc/OpenWalnut/ABOUT )
SET( CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/../resources/share/doc/openwalnut/ABOUT )
SET( CPACK_PACKAGE_VENDOR "OpenWalnut Community" )
SET( CPACK_PACKAGE_CONTACT "Sebastian Eichelbaum <eichelbaum@informatik.uni-leipzig.de>" )
SET( CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/../resources/share/doc/OpenWalnut/COPYING )
SET( CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/../resources/share/doc/OpenWalnut/README )
SET( CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/../resources/share/doc/openwalnut/COPYING )
SET( CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/../resources/share/doc/openwalnut/README )
# Version
# TODO(all): we should somehot automate this (using hg or our VERSION file for example)
......
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