diff --git a/CMakeLists.txt b/CMakeLists.txt index da710eb..efaa283 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,13 @@ cmake_minimum_required (VERSION 2.8.4) set(project_name juci) -set(module juci_to_python_api) +#set(module juci_to_python_api) #### TODO WINDOWS SUPPORT #### set(bin_install_path "/usr/local/bin") -set(lib_install_path "/usr/local/lib/python2.7/dist-packages/") +#set(lib_install_path "/usr/local/lib/python2.7/dist-packages/") ##### project (${project_name}) -add_subdirectory("src") \ No newline at end of file +add_subdirectory("src") diff --git a/docs/install.md b/docs/install.md index 345a815..042ab50 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,22 +1,55 @@ # juCi++ ## Installation guide ## -Before installation, please install libclangmm see [installation guide](http://github.com/cppit/libclangmm/blob/master/docs/install.md) for installation. +Before installation, please install libclangmm, see [installation guide](http://github.com/cppit/libclangmm/blob/master/docs/install.md). + ## Debian -First dependencies: ```sh -$ sudo apt-get install libboost-python-dev libboost-filesystem-dev libboost-log-dev libboost-test-dev -libboost-thread-dev libboost-system-dev libgtkmm-3.0-dev libgtksourceview2.0-dev libgtksourceviewmm-3.0-dev -libpython-dev libclang-dev make cmake gcc g++ +sudo apt-get install pkg-config libboost-system-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev ``` -Install the project: ```sh -$ git clone http://github.com/cppit/jucipp.git juci -$ cd juci -$ cmake . -$ make -$ sudo make install +git clone http://github.com/cppit/jucipp.git +cd jucipp +cmake . +make +sudo make install ``` + +## OS X with Homebrew (http://brew.sh/) +```sh +brew install pkg-config boost gtkmm3 gtksourceviewmm3 +``` + +```sh +git clone https://github.com/cppit/jucipp.git +cd jucipp +cmake . +make +make install +``` + +## Windows with Cygwin (https://www.cygwin.com/) +**Make sure the PATH environment variable does not include paths to non-Cygwin cmake, make and g++.** +Select and install the following packages from the Cygwin-installer: +``` +pkg-config libboost-devel libgtkmm3.0-devel libgtksourceviewmm3.0-devel xinit +``` +Then run the following in the Cygwin Terminal: +```sh +git clone https://github.com/cppit/jucipp.git +cd jucipp +cmake . +make +make install +``` + +Note that we are currently working on a Windows-version without the need of an X-server. + ## Run ```sh -$ juci +juci +``` + +#Windows +```sh +startxwin /usr/local/bin/juci ``` diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5f892eb..c2bda6f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,6 +7,11 @@ if(APPLE) set(CMAKE_MACOSX_RPATH 1) set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig") endif() + +if(CYGWIN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows") #TODO: make juci work with -mwin32 to run without X-server +endif() + INCLUDE(FindPkgConfig) set(validation true) @@ -21,7 +26,7 @@ function(install_help APPLE UNIX WINDOWS) endif(APPLE) endif(UNIX) if(WINDOWS) - message("choco install ${WINDOWS}") + #message("choco install ${WINDOWS}") #Removed this for the time being endif(WINDOWS) endfunction(install_help) @@ -38,10 +43,11 @@ validate(${LCL_FOUND} "clangmm" "clangmm" "clangmm") find_package(LibClang) validate(${LIBCLANG_FOUND} "clang" "libclang-dev" "llvm") -find_package(PythonLibs 2.7) -validate(${PYTHONLIBS_FOUND} "python" "libpython-dev" "python") +#find_package(PythonLibs 2.7) +#validate(${PYTHONLIBS_FOUND} "python" "libpython-dev" "python") -find_package(Boost 1.55 COMPONENTS python thread log system filesystem REQUIRED) +#find_package(Boost 1.55 COMPONENTS python thread log system filesystem REQUIRED) +find_package(Boost 1.55 COMPONENTS thread log system filesystem REQUIRED) validate(${Boost_FOUND} "boost" "libboost-all-dev" "boost") pkg_check_modules(GTKMM gtkmm-3.0) # The name GTKMM is set here for the variables abouve @@ -66,8 +72,8 @@ if(${validation}) sourcefile.cc window.cc window.h - api.h - api.cc +# api.h +# api.cc notebook.cc notebook.h entrybox.h @@ -83,13 +89,13 @@ if(${validation}) cmake.h cmake.cc) - add_library(${module} SHARED - api - api_ext) +# add_library(${module} SHARED +# api +# api_ext) include_directories( ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} +# ${PYTHON_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GTKSVMM_INCLUDE_DIRS} ${LCL_INCLUDE_DIRS} @@ -99,15 +105,16 @@ if(${validation}) ${GTKMM_LIBRARY_DIRS} ${GTKSVMM_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS} - ${PYTHON_INCLUDE_DIRS} +# ${PYTHON_INCLUDE_DIRS} ${LCL_LIBRARY_DIRS} ${LIBCLANG_LIBRARY_DIRS}) - set_target_properties(${module} - PROPERTIES PREFIX "" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib/") +# set_target_properties(${module} +# PROPERTIES PREFIX "" +# LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib/") - target_link_libraries(${module} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES}) +# target_link_libraries(${module} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES}) +# target_link_libraries(${module} ${Boost_LIBRARIES}) target_link_libraries(${project_name} ${LIBCLANG_LIBRARIES} @@ -115,11 +122,13 @@ if(${validation}) ${GTKMM_LIBRARIES} ${GTKSVMM_LIBRARIES} ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES}) +# ${PYTHON_LIBRARIES} + ) - install(TARGETS ${project_name} ${module} +# install(TARGETS ${project_name} ${module} + install(TARGETS ${project_name} RUNTIME DESTINATION ${bin_install_path} - LIBRARY DESTINATION ${lib_install_path} +# LIBRARY DESTINATION ${lib_install_path} ) endif(${validation}) diff --git a/src/cmake/Modules/FindLibClangmm.cmake b/src/cmake/Modules/FindLibClangmm.cmake index 49f950b..c8e7f65 100644 --- a/src/cmake/Modules/FindLibClangmm.cmake +++ b/src/cmake/Modules/FindLibClangmm.cmake @@ -5,12 +5,18 @@ find_package(PkgConfig) find_path(LCL_INCLUDE_DIR clangmm.h - HINTS "/usr/local/include/libclangmm/" - ) + HINTS /usr/local/include/libclangmm +) + + +if(CYGWIN) + set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "cyg") + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} ".dll") +endif() find_library(LCL_LIBRARY NAMES clangmm - HINTS "/usr/local/lib/" - ) + PATHS /usr/local/lib /usr/local/bin +) set(LCL_LIBRARIES ${LCL_LIBRARY} ) set(LCL_INCLUDE_DIRS ${LCL_INCLUDE_DIR} ) diff --git a/src/window.cc b/src/window.cc index 2aa0100..ebd1cff 100644 --- a/src/window.cc +++ b/src/window.cc @@ -3,7 +3,7 @@ #include "singletons.h" #include "sourcefile.h" #include "config.h" -#include "api.h" +//#include "api.h" #include #include //TODO: remove @@ -30,7 +30,7 @@ Window::Window() : box(Gtk::ORIENTATION_VERTICAL), notebook(directories), compil add(box); generate_keybindings(); - PluginApi(&this->notebook, &this->menu); + //PluginApi(&this->notebook, &this->menu); create_menu(); box.pack_start(menu.get_widget(), Gtk::PACK_SHRINK);