From 24c63e020d3617dce07b0c4949d34be5b1005734 Mon Sep 17 00:00:00 2001 From: Ariel Vina-Rodriguez Date: Sun, 26 Jun 2016 13:55:33 +0200 Subject: [PATCH 01/17] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd9a692d..a8b4aec5 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Nana C++ Library -[Linux (gcc 5.2.1 and 4.9.2)![TravisCI build status](https://travis-ci.org/cnjinhao/nana.svg)](https://travis-ci.org/cnjinhao/nana) including [(nana-demos)](https://github.com/qPCR4vir/nana-demo) +[Linux (gcc 5.4.0 and 4.9.2)![TravisCI build status](https://travis-ci.org/cnjinhao/nana.svg)](https://travis-ci.org/cnjinhao/nana) including [(nana-demos)](https://github.com/qPCR4vir/nana-demo) -[Windows (Microsoft (R) Build Engine version 14.0.24720.0) ![AppVeyor uild status](https://ci.appveyor.com/api/projects/status/5j79p9fi887usv7h?svg=true)](https://ci.appveyor.com/project/qPCR4vir/nana) +[Windows (Microsoft (R) Build Engine version 14.0.24720.0) ![AppVeyor build status](https://ci.appveyor.com/api/projects/status/5j79p9fi887usv7h?svg=true)](https://ci.appveyor.com/project/qPCR4vir/nana) [![Licence](https://img.shields.io/badge/license-BSL-blue.svg?style=flat)](LICENSE_1_0.txt) -Nana is a C++ library designed to allow developers to easily create cross-platform GUI applications with modern C++11 style, currently it can work on Linux(X11) and Windows. The nana repository contains the entire source of library, you can browse the source code and submit your pull request for contributing. +Nana is a C++ library designed to allow developers to easily create cross-platform GUI applications with modern C++11 style. Currently it can work on Linux(X11) and Windows. The [nana repository](https://github.com/cnjinhao/nana) contains the entire source of the library. You can browse the source code and submit your pull request for contributing. ## License @@ -24,7 +24,7 @@ The best way to get help with Nana library is by visiting http://nanapro.org/hel ## Sending a Pull Request ? -This project is encourage you to contribute it through sending a pull request! There is a simple rule, please **don't** directly commit your contributions to the **master** branch. According to your commits, please choose the **hotfixes** branch or the **develop** branch. Thank you! +This project encourage you to contribute through sending a pull request! There is a simple rule: please **don't** directly commit your contributions to the **master** branch. According to your commits, please choose the **hotfixes** branch or the **develop** branch. Thank you! ## Introduction to the Repository From 11bd0bcf88b6b56cce319020218898700e42e9b7 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 01:24:19 +0200 Subject: [PATCH 02/17] remove filesystem_selector --- build/vc2015/nana.vcxproj | 3 --- build/vc2015/nana.vcxproj.filters | 5 ----- 2 files changed, 8 deletions(-) diff --git a/build/vc2015/nana.vcxproj b/build/vc2015/nana.vcxproj index ce428ef7..e9c0aa02 100644 --- a/build/vc2015/nana.vcxproj +++ b/build/vc2015/nana.vcxproj @@ -249,9 +249,6 @@ - - - diff --git a/build/vc2015/nana.vcxproj.filters b/build/vc2015/nana.vcxproj.filters index aaac3c60..4fcfbb6b 100644 --- a/build/vc2015/nana.vcxproj.filters +++ b/build/vc2015/nana.vcxproj.filters @@ -283,9 +283,4 @@ Source Files\gui\detail - - - Header Files\filesystem - - \ No newline at end of file From a68155c7d70c2e5d05acbd0ad30b96664d27d79f Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 01:25:48 +0200 Subject: [PATCH 03/17] Build build demos separately. --- .travis.yml | 22 +++++++----- CMakeLists.txt | 92 ++++---------------------------------------------- 2 files changed, 19 insertions(+), 95 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bd87dfd..262925d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ matrix: - alsa-oss - libx11-dev - libxft-dev - - libboost-filesystem-dev sources: - ubuntu-toolchain-r-test - env: CXX=g++-4.9 CC=gcc-4.9 @@ -35,6 +34,7 @@ matrix: - alsa-oss - libx11-dev - libxft-dev + - libboost-filesystem-dev sources: - ubuntu-toolchain-r-test @@ -56,7 +56,7 @@ matrix: - llvm-toolchain-precise before_install: - - git clone --depth=1 --branch=dev_nana_fs https://github.com/qPCR4vir/nana-demo.git nana-demo + - git clone --depth=1 --branch=dev_nana_fs https://github.com/qPCR4vir/nana-demo.git ../nana-demo - export PATH="$HOME/bin:$PATH" - mkdir ~/bin - wget --no-check-certificate --no-clobber -O /tmp/tools/cmake https://cmake.org/files/v3.4/cmake-3.4.0-rc3-Linux-x86_64.sh || true @@ -66,12 +66,12 @@ install: - /tmp/tools/cmake --prefix="$HOME" --exclude-subdir before_script : - # travis dont have a fisical monitor. We need to instal an emulator: https://docs.travis-ci.com/user/gui-and-headless-browsers/ + # travis don't have a physical monitor. We need to install an emulator: https://docs.travis-ci.com/user/gui-and-headless-browsers/ - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start - # we have: qPCR4vir/nana/nana-demo and now we are in: qPCR4vir/nana/ our executable tests will assces: ../Examples/*.bmp etc.(need to be in parallel with nana-demo/Examples) - #- cd nana-demo + # we have: qPCR4vir/nana/../nana-demo and now we are in: qPCR4vir/nana/ our executable tests will assces: ../Examples/*.bmp etc.(need to be in parallel with nana-demo/Examples) + #- cd ../nana-demo - mkdir bin - cd bin @@ -92,11 +92,15 @@ before_script : script: - - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make - - cd .. - - mv -v bin/ nana-demo/ - - cd nana-demo/bin + - cd lib + - ls + - cd ../.. + - ls + - mv -v bin/ ../nana-demo/ + - cd ../nana-demo/bin + - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - ls - ./a_group_impl - ./animate-bmp diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ebc78bc..99b27e2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,8 @@ option(NANA_CMAKE_LIBJPEG_FROM_OS "Use libjpeg from operating system." ON) option(NANA_CMAKE_ENABLE_AUDIO "Enable class audio::play for PCM playback." OFF) option(NANA_CMAKE_VERBOSE_PREPROCESSOR "Show annoying debug messages during compilation." ON) option(NANA_CMAKE_STOP_VERBOSE_PREPROCESSOR "Stop compilation after showing the annoying debug messages." ON) -option(NANA_CMAKE_BUILD_DEMOS "Build all the demos form the nana_demo repository." ON) -option(NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS "" ON) option(NANA_CMAKE_AUTOMATIC_GUI_TESTING "Activate automatic GUI testing?" OFF) -option(NANA_CMAKE_BUILD_FreeMe "Build FreeMe (currently broken)?" OFF) + # The ISO C++ File System Technical Specification (ISO-TS, or STD) is optional. @@ -84,7 +82,6 @@ add_definitions(-DNANA_IGNORE_CONF) if(WIN32) add_definitions(-DWIN32) - # set(BUILD_FreeMe ON) #"Build FreeMe only on Windows." #Global MSVC definitions. You may prefer the hand-tuned sln and projects from the nana repository. if(MSVC) option(WIN32_USE_MP "Set to ON to build nana with the /MP option (Visual Studio 2005 and above)." ON) @@ -106,8 +103,6 @@ if(APPLE) add_definitions(-DAPPLE) include_directories(/opt/X11/include/) set(NANA_LINKS "${NANA_LINKS} -L/opt/X11/lib/ -liconv") - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -liconv") - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/opt/X11/lib/ -liconv") set(ENABLE_AUDIO OFF) elseif(UNIX) add_definitions(-Dlinux) @@ -116,13 +111,9 @@ endif(APPLE) if(UNIX) set(NANA_LINKS "${NANA_LINKS} -lX11") - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lX11") - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lX11") find_package(Freetype) if (FREETYPE_FOUND) include_directories( ${FREETYPE_INCLUDE_DIRS}) - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lXft") - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lXft") set(NANA_LINKS "${NANA_LINKS} -lXft") endif(FREETYPE_FOUND) endif(UNIX) @@ -152,7 +143,6 @@ endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # enable static linkage if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT MINGW) # GNU || CLang not MinGW - #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -pthread") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.3) @@ -169,9 +159,6 @@ if (APPLE AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # A set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++") endif () -# set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") - - ############# Optional libraries @@ -179,10 +166,7 @@ endif () #Find PNG if(NANA_CMAKE_ENABLE_PNG) add_definitions(-DNANA_ENABLE_PNG) - #set(NANA_PNG_LIB "png") set(NANA_LINKS "${NANA_LINKS} -lpng") - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpng") - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpng") if(NANA_CMAKE_LIBPNG_FROM_OS) find_package(PNG) if (PNG_FOUND) @@ -195,10 +179,7 @@ endif(NANA_CMAKE_ENABLE_PNG) #Find JPEG if(NANA_CMAKE_ENABLE_JPEG) add_definitions(-DNANA_ENABLE_JPEG) - #set(NANA_JPEG_LIB "jpeg") set(NANA_LINKS "${NANA_LINKS} -ljpeg") - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ljpeg") - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ljpeg") if(NANA_CMAKE_LIBJPEG_FROM_OS) find_package(JPEG) if (JPEG_FOUND) @@ -215,8 +196,6 @@ if(NANA_CMAKE_ENABLE_AUDIO) if (ASOUND_FOUND) include_directories( ${ASOUND_INCLUDE_DIRS}) set(NANA_LINKS "${NANA_LINKS} -lasound") - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lasound") - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lasound") else(ASOUND_FOUND) message(FATAL_ERROR "libasound is not found") endif(ASOUND_FOUND) @@ -243,9 +222,7 @@ elseif (NANA_CMAKE_FIND_BOOST_FILESYSTEM OR NANA_CMAKE_BOOST_FILESYSTEM_FORCE) if (Boost_FOUND) add_definitions(-DNANA_BOOST_FILESYSTEM_AVAILABLE) include_directories(SYSTEM "${Boost_INCLUDE_DIR}") - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${Boost_LIBRARIES}") set(NANA_LINKS "${NANA_LINKS} ${Boost_LIBRARIES}") ###### FIRST !!!!!!!!!!!!!!!!! add is not first - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Boost_LIBRARIES}") endif (Boost_FOUND) set(Boost_USE_STATIC_LIBS ON) @@ -255,11 +232,15 @@ elseif (NANA_CMAKE_FIND_BOOST_FILESYSTEM OR NANA_CMAKE_BOOST_FILESYSTEM_FORCE) endif (NANA_CMAKE_NANA_FILESYSTEM_FORCE) - if(NANA_CMAKE_VERBOSE_PREPROCESSOR) add_definitions(-DVERBOSE_PREPROCESSOR) endif(NANA_CMAKE_VERBOSE_PREPROCESSOR) +if(NANA_CMAKE_AUTOMATIC_GUI_TESTING) + add_definitions(-DNANA_AUTOMATIC_GUI_TESTING) + enable_testing () +endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING) + set(NANA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source) set(NANA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) @@ -312,67 +293,6 @@ endif(NANA_CMAKE_INSTALL_INCLUDES) set_property( TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14 ) - -# TODO: move this nana-demo section to the nana demo repository, and here only include that cmake file - -if (NANA_CMAKE_BUILD_DEMOS) - - if(NANA_CMAKE_AUTOMATIC_GUI_TESTING) - add_definitions(-DNANA_AUTOMATIC_GUI_TESTING) - enable_testing () - endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING) - - - set (demos_dir ../nana-demo/) - set (demos calculator file_explorer helloworld_demo notepad widget_show widget_show2 ) - # Pending: - - set (examples_dir ../nana-demo/Examples/) - set (examples a_group_impl animate-bmp audio_player audio_player_simple - background-effects categ clicked windows-subclassing - dock drag-button draw example.button - example_combox example_listbox example_menu lambda_event.Cpp11 - filebox-txt folder_tree folder_tree_nana folder_tree_std - framework_design_1 framework_design_2 framework_design_3 label_listener - group HelloWord helloword_quit listbox_inline_widget - inputbox listbox_Resolver loader_1 loader_2 - main mbox menu_debug menu_popuper modal_form - MontiHall place_login png textbox_line_number - stretch_image threading thread-pool various_events - window-dragger screen decore - ) - # Pending: - - if (NANA_CMAKE_BUILD_FreeMe) - add_definitions(-DBUILD_FreeMe) - endif (NANA_CMAKE_BUILD_FreeMe) - if (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS) - list(APPEND demos ) # ?? FreeMe - endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS) - # Pending: FreeMe (added but really completely compiled if defined BUILD_FreeMe ) - - function(set_nana_test dir files) - foreach ( test ${${files}}) - add_executable(${test} "${${dir}}${test}.cpp") - set_property( TARGET ${test} PROPERTY CXX_STANDARD 14 ) - target_link_libraries(${test} ${PROJECT_NAME}) - #if(NANA_CMAKE_AUTOMATIC_GUI_TESTING) - #add_custom_command( TARGET ${test} POST_BUILD COMMAND ${test} ) - #add_custom_target(do_always_${test} ALL COMMAND ${test}) - #add_test(${test} COMMAND ${test}) - #endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING) - install(TARGETS ${test} RUNTIME DESTINATION "../nana-demo/") - message("... to build: ${${dir}}${test}.cpp" ) - endforeach( test ${${files}}) - endfunction(set_nana_test) - - set_nana_test(demos_dir demos) - set_nana_test(examples_dir examples) - -endif (NANA_CMAKE_BUILD_DEMOS) - - - message ( "CMAKE_CXX_COMPILER_ID = " ${CMAKE_CXX_COMPILER_ID}) message ( "COMPILER_IS_CLANG = " ${COMPILER_IS_CLANG}) message ( "CMAKE_COMPILER_IS_GNUCXX= " ${CMAKE_COMPILER_IS_GNUCXX}) From 37205f0aa998ea2d76c5f9435744faf501e292bc Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 01:37:09 +0200 Subject: [PATCH 04/17] relative dir --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 262925d2..099cc05b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ before_script : - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start - # we have: qPCR4vir/nana/../nana-demo and now we are in: qPCR4vir/nana/ our executable tests will assces: ../Examples/*.bmp etc.(need to be in parallel with nana-demo/Examples) + # we have: qPCR4vir/nana/../nana-demo and now we are in: qPCR4vir/nana/ our executable tests will access: ../nana-demo/Examples/*.bmp etc.(need to be in parallel with nana-demo/Examples) #- cd ../nana-demo - mkdir bin - cd bin @@ -94,7 +94,7 @@ before_script : script: - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make - - cd lib + - cd ../lib - ls - cd ../.. - ls From 11bfe65044e0846d49d8b5740d7a201292f7639b Mon Sep 17 00:00:00 2001 From: Ariel Vina-Rodriguez Date: Mon, 27 Jun 2016 01:46:05 +0200 Subject: [PATCH 05/17] no tabs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 099cc05b..d640bb31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ matrix: - alsa-oss - libx11-dev - libxft-dev - - libboost-filesystem-dev + - libboost-filesystem-dev sources: - ubuntu-toolchain-r-test From 6328ae0cfdbd1d73af397b4fc234ff284add6294 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 01:55:05 +0200 Subject: [PATCH 06/17] no cd ../lib --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 099cc05b..8b2fb124 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,9 +94,9 @@ before_script : script: - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make - - cd ../lib - - ls - - cd ../.. + #- cd ../lib + #- ls + - cd .. - ls - mv -v bin/ ../nana-demo/ - cd ../nana-demo/bin From 26a2b5ac632d85919fc5cf6d70058f8fd28d1018 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 13:00:44 +0200 Subject: [PATCH 07/17] put in ../nana_lib the lib and the includes --- .travis.yml | 22 +++++++++++++++------- CMakeLists.txt | 11 ++++++++--- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2b0781d4..24bf5051 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,7 +72,10 @@ before_script : - sleep 3 # give xvfb some time to start # we have: qPCR4vir/nana/../nana-demo and now we are in: qPCR4vir/nana/ our executable tests will access: ../nana-demo/Examples/*.bmp etc.(need to be in parallel with nana-demo/Examples) #- cd ../nana-demo - - mkdir bin + - mkdir ../nana_lib + - mkdir ../nana_demo_bin + - cd ../nana_lib + - mkdir bin - cd bin @@ -92,15 +95,20 @@ before_script : script: - - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + # Installing: the static "nana lib" will be in DESTDIR/CMAKE_INSTALL_PREFIX/lib/ + # and the includes files "nana" in DESTDIR/CMAKE_INSTALL_PREFIX/include/ + # we are in "... nana/../nana_lib/bin/" we need "../../nana" to get the CMakeList.txt of nana. + # Thus, make install will put the nana.lib in "... nana/../nana_lib/lib/" + # and the includes in "... nana/../nana_lib/include/" + - cmake -G"Unix Makefiles" ../../nana -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make - #- cd ../lib - #- ls + - ls + - make install + - ls - cd .. - ls - - mv -v bin/ ../nana-demo/ - - cd ../nana-demo/bin - - cmake -G"Unix Makefiles" .. -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cd ../nana_demo_bin + - cmake -G"Unix Makefiles" ../../nana_demo_bin -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - ls - ./a_group_impl - ./animate-bmp diff --git a/CMakeLists.txt b/CMakeLists.txt index 99b27e2c..782d06cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,15 +279,17 @@ target_link_libraries(${PROJECT_NAME} ${NANA_LINKS}) # Headers: use INCLUDE_DIRECTORIES # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES) - + + # Installing: the static "nana lib" will be in DESTDIR/CMAKE_INSTALL_PREFIX/lib/ +# and the includes files "include/nana/" in DESTDIR/CMAKE_INSTALL_PREFIX/include/nana/ install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) # Install include directories too. if(NANA_CMAKE_INSTALL_INCLUDES) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/nana - DESTINATION include) + install(DIRECTORY ${NANA_INCLUDE_DIR} + DESTINATION .) endif(NANA_CMAKE_INSTALL_INCLUDES) set_property( TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14 ) @@ -302,6 +304,9 @@ message ( "CMAKE_STATIC_LINKER_FLAGS= " ${CMAKE_STATIC_LINKER_FLAGS}) message ( "NANA_LINKS = " ${NANA_LINKS}) message ( "DESTDIR = " ${DESTDIR}) message ( "CMAKE_INSTALL_PREFIX = " ${CMAKE_INSTALL_PREFIX}) +message ( "NANA_INCLUDE_DIR = " ${NANA_INCLUDE_DIR}) +message ( "CMAKE_CURRENT_SOURCE_DIR= " ${CMAKE_CURRENT_SOURCE_DIR}) + message ( "NANA_CMAKE_ENABLE_AUDIO = " ${NANA_CMAKE_ENABLE_AUDIO}) message ( "NANA_CMAKE_FIND_BOOST_FILESYSTEM = " ${NANA_CMAKE_FIND_BOOST_FILESYSTEM}) message ( "NANA_CMAKE_BOOST_FILESYSTEM_FORCE = " ${NANA_CMAKE_BOOST_FILESYSTEM_FORCE}) From 4886dcd840f85b8f1d1fe956f37fd820e6da48b2 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 13:10:43 +0200 Subject: [PATCH 08/17] build ../nana_demo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 24bf5051..187c6147 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: - cd .. - ls - cd ../nana_demo_bin - - cmake -G"Unix Makefiles" ../../nana_demo_bin -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cmake -G"Unix Makefiles" ../nana_demo -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - ls - ./a_group_impl - ./animate-bmp From 1a1e86fc922c99930ab1153e18fd2de063cd2b41 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 13:16:07 +0200 Subject: [PATCH 09/17] build ../nana-demo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 187c6147..9489d0e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: - cd .. - ls - cd ../nana_demo_bin - - cmake -G"Unix Makefiles" ../nana_demo -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - ls - ./a_group_impl - ./animate-bmp From 72f950282a17233c5561097a77e746c56d2429ee Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 14:15:29 +0200 Subject: [PATCH 10/17] make ../nana-demo --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9489d0e7..278f1de9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -109,6 +109,7 @@ script: - ls - cd ../nana_demo_bin - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - make - ls - ./a_group_impl - ./animate-bmp From b5822df1ec05420d955625afdd7dc9e2106fbb02 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 15:24:28 +0200 Subject: [PATCH 11/17] set the same options !? --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 278f1de9..f9fd896d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: - cd .. - ls - cd ../nana_demo_bin - - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make - ls - ./a_group_impl From 5b74b38b1380624a9498c3c9448e3b58dfebf959 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 16:08:00 +0200 Subject: [PATCH 12/17] - mv -v nana-demo/Examples . --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f9fd896d..623ec161 100644 --- a/.travis.yml +++ b/.travis.yml @@ -107,9 +107,13 @@ script: - ls - cd .. - ls - - cd ../nana_demo_bin + - cd .. + - mv -v nana-demo/Examples . + - ls + - cd nana_demo_bin - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make + # todo: separate resources from sources (a directory for images) - ls - ./a_group_impl - ./animate-bmp From fffa89ea5c3554eb79834cfc1f4daed8d93f5be4 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 16:17:24 +0200 Subject: [PATCH 13/17] - cp -v nana-demo/Examples --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 623ec161..e93a748e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: - cd .. - ls - cd .. - - mv -v nana-demo/Examples . + - cp -v nana-demo/Examples . - ls - cd nana_demo_bin - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON From 98ed89c097d4c42d0ca984501457898e5f6e1d32 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 16:35:23 +0200 Subject: [PATCH 14/17] - cp -v ../nana-demo/Examples ../ --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e93a748e..aea4e760 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,7 @@ before_script : #- cd ../nana-demo - mkdir ../nana_lib - mkdir ../nana_demo_bin + - cp -v ../nana-demo/Examples ../ - cd ../nana_lib - mkdir bin - cd bin @@ -108,7 +109,6 @@ script: - cd .. - ls - cd .. - - cp -v nana-demo/Examples . - ls - cd nana_demo_bin - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON From a6e8d88ae8fd83e6a0037d46612f77f1a1e2812f Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 16:59:26 +0200 Subject: [PATCH 15/17] install -DCMAKE_INSTALL_PREFIX=.. --- .travis.yml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index aea4e760..c0501a89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,27 +74,10 @@ before_script : #- cd ../nana-demo - mkdir ../nana_lib - mkdir ../nana_demo_bin - - cp -v ../nana-demo/Examples ../ - cd ../nana_lib - mkdir bin - cd bin - - - - - - - - - - - - - - - - script: # Installing: the static "nana lib" will be in DESTDIR/CMAKE_INSTALL_PREFIX/lib/ # and the includes files "nana" in DESTDIR/CMAKE_INSTALL_PREFIX/include/ @@ -103,7 +86,6 @@ script: # and the includes in "... nana/../nana_lib/include/" - cmake -G"Unix Makefiles" ../../nana -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make - - ls - make install - ls - cd .. @@ -111,7 +93,7 @@ script: - cd .. - ls - cd nana_demo_bin - - cmake -G"Unix Makefiles" ../nana-demo -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cmake -G"Unix Makefiles" ../nana-demo -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make # todo: separate resources from sources (a directory for images) - ls From 1a0761c59b94fc26c42c47f7fd4b1e3ca6d45ffd Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 27 Jun 2016 17:00:36 +0200 Subject: [PATCH 16/17] - cd ../bin --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index c0501a89..3c7d5312 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,8 +95,11 @@ script: - cd nana_demo_bin - cmake -G"Unix Makefiles" ../nana-demo -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON - make + - make install # todo: separate resources from sources (a directory for images) - ls + - cd ../bin + - ls - ./a_group_impl - ./animate-bmp - ./audio_player From 8b19d0d12e87239b963a014b59a8eceddfe57d88 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Tue, 28 Jun 2016 14:00:16 +0200 Subject: [PATCH 17/17] FIX compiler error SPI_GETWHEELSCROLLCHARS not found --- source/gui/basis.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/gui/basis.cpp b/source/gui/basis.cpp index 3fe44813..fc8c92eb 100644 --- a/source/gui/basis.cpp +++ b/source/gui/basis.cpp @@ -39,6 +39,9 @@ mouse_wheel::mouse_wheel() : lines(3), characters(3) { #if defined(NANA_WINDOWS) + // https://msdn.microsoft.com/en-us/library/ms997498.aspx + #define SPI_SETWHEELSCROLLCHARS 0x006D + #define SPI_GETWHEELSCROLLCHARS 0x006C ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &lines, 0); ::SystemParametersInfo(SPI_GETWHEELSCROLLCHARS, 0, &characters, 0); #endif