Skip to content

Commit

Permalink
Merge pull request #659 from Nicogene/removeGTK
Browse files Browse the repository at this point in the history
Remove legacy gtk modules
  • Loading branch information
Nicogene authored May 15, 2020
2 parents 4191f4f + cbc7b89 commit 0351f2b
Show file tree
Hide file tree
Showing 151 changed files with 175 additions and 11,469 deletions.
1 change: 0 additions & 1 deletion admin/scripts/get-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ apt-get install libqwt-dev # QWT for UZH
apt-get install libgsl0-dev # math library
apt-get install libncurses5-dev # on windows, conio.h -- see simio
apt-get install libcv-dev # OpenCV, image processing
apt-get install libgtk2.0-dev libgtkmm-2.4-dev libglademm-2.4-dev # GTK/MM GUIs
apt-get install libsdl1.2-dev # SDL used by simulator
apt-get install libv4l-dev # V4L
apt-get install libv4lconvert0 # V4L
Expand Down
13 changes: 0 additions & 13 deletions admin/scripts/test2-compilable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,6 @@ echo "</TABLE>" >> $main
else
echo "GSL_DIR=$GSL_DIR"
fi

if [ "k$GTK_BASEPATH" = "k" ]; then
echo "GTK_BASEPATH undefined"
else
echo "GTK_BASEPATH=$GTK_BASEPATH"
fi

if [ "k$GTKMM_BASEPATH" = "k" ]; then
echo "GTKMM_BASEPATH undefined"
else
echo "GTKMM_BASEPATH=$GTKMM_BASEPATH"
fi

if [ "k$IPOPT_DIR" = "k" ]; then
echo "IPOPT_DIR undefined"
Expand All @@ -192,7 +180,6 @@ echo "</TABLE>" >> $main
echo "# OPENCV_DIR = where OPENCV was compiled (if not using precompiled debian package)"
echo "# ODE_DIR = where ode was compiled (if not using precompiled debian package)"
echo "# SDLDIR = where sdl was compiled (if not using precompiled debian package)"
echo "# GTKMM_BASEPATH/GTK_BASEPATH = where gtk/gtkmm was compiled or installed (if not using precompiled debian package)"
echo "# IPOPT_DIR = where ipopt was installed"

echo "</pre>"
Expand Down
40 changes: 0 additions & 40 deletions conf/iCubFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ find_package(OpenCV)
find_package(OpenGL)
find_package(ODE)
find_package(SDL)

set(GTK2_USE_IMPORTED_TARGETS ON)
find_package(GTK2 COMPONENTS gtk gtkmm)
if(WIN32 AND GTK2_FOUND)
list(REMOVE_ITEM GTK2_LIBRARIES ${FREETYPE_LIBRARY} ${GTK2_PANGOXFT_LIBRARY})
endif()
find_package(ACE)
find_package(IPOPT)
find_package(IPP)
Expand All @@ -73,39 +67,6 @@ if (OpenCV_FOUND)

set(ICUB_LINK_DIRECTORIES ${ICUB_LINK_DIRECTORIES} ${OpenCV_LIB_DIR})
endif()

if (GTK2_FOUND)

message(STATUS "GTK2 version is ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}")

if (NOT GTK2_MAJOR_VERSION)
message (STATUS "GTK2 version unknown, assuming 2.8")
set(GTK2_MAJOR_VERSION 2)
set(GTK2_MINOR_VERSION 8)
endif()

if (GTK2_MAJOR_VERSION GREATER 2 OR GTK2_MAJOR_VERSION EQUAL 2)
if (GTK2_MINOR_VERSION GREATER 8 OR GTK2_MINOR_VERSION EQUAL 8)

if (GTK2_MINOR_VERSION LESS 12)
set(ICUB_GTK2_LEGACY true CACHE BOOL "Legacy version of GTK2 detected" FORCE)
else()
set(ICUB_GTK2_LEGACY false CACHE BOOL "Legacy version of GTK2 detected" FORCE)
mark_as_advanced(ICUB_GTK2_LEGACY)
endif()
endif()
endif()

# check version of GtkMM
if (NOT ICUB_GTK2_LEGACY)
message(STATUS "GTK2 is at least 2.12")
else()
message(STATUS "GTK2 is prior to 2.12 (some modules will be skipped)")
message(STATUS "Setting ICUB_GTK2_LEGACY true")
endif()

endif()

message(STATUS "I have found the following libraries:")

checkandset_dependency(icub_firmware_shared)
Expand All @@ -114,7 +75,6 @@ checkandset_dependency(GLUT)
checkandset_dependency(OpenGL)
checkandset_dependency(ODE)
checkandset_dependency(SDL)
checkandset_dependency(GTK2)
checkandset_dependency(ACE)
checkandset_dependency(IPOPT)
checkandset_dependency(IPP)
Expand Down
10 changes: 0 additions & 10 deletions conf/iCubPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ INSTALL(FILES ${TMP} DESTINATION bin COMPONENT Runtime)
file(TO_CMAKE_PATH ${GLUT_DIR}/glut32.dll TMP)
INSTALL(FILES ${TMP} DESTINATION bin COMPONENT Runtime)

#### Ugly: need to strip dlls from this GLOB
file(GLOB GTKMM_DLLS ${GTKMM_DIR}/bin/*.dll)
set(GTKMM_DLLS_CMAKE_PATH)
foreach (dll ${GTKMM_DLLS})
file(TO_CMAKE_PATH ${dll} TMP)
set(GTKMM_DLLS_CMAKE_PATH ${GTKMM_DLLS_CMAKE_PATH} ${TMP})
endforeach()

INSTALL(FILES ${GTKMM_DLLS_CMAKE_PATH} DESTINATION bin COMPONENT Runtime)

INSTALL(DIRECTORY ${ICUB_APPLICATIONS_PREFIX}/ DESTINATION . COMPONENT Applications)

#INSTALL_TARGET(${PROJECTNAME} /bin)
Expand Down
2 changes: 1 addition & 1 deletion src/simulators/iCubSimulation/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TABLE OF CONTENTS:
BEFORE COMPILING
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

iCub Simulator prerequisites: Cmake, ACE, YARP, GTK, iCUB repository, ODE, SDL Please make sure you have everything installed correctly by following this link http://wiki.icub.org/wiki/ODE
iCub Simulator prerequisites: Cmake, ACE, YARP, iCUB repository, ODE, SDL Please make sure you have everything installed correctly by following this link http://wiki.icub.org/wiki/ODE

Once the libraries are installed, set your environment variables to:

Expand Down
38 changes: 9 additions & 29 deletions src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,26 @@ add_subdirectory(imageCropper)
add_subdirectory(embObjProtoTools/boardTransceiver)
add_subdirectory(wholeBodyPlayer)

#canLoader needs GtkPlus, but it contains a library needed by other modules
add_subdirectory(canLoader)
add_subdirectory(ethLoader)
add_subdirectory(strainCalibrationDataAcquisition)
add_subdirectory(strainCalib)

# Tools available both for Qt5 and GTK2
# Tools available both for Qt5
if(ICUB_USE_Qt5)
if(ICUB_USE_GSL)
add_subdirectory(iCubSkinGui-qt)
add_subdirectory(iCubSkinGui)
else()
message(STATUS "GSL not found, skipping iCubSkinGui-qt")
message(STATUS "GSL not found, skipping iCubSkinGui")
endif()

add_subdirectory(frameGrabberGui2-qt)
add_subdirectory(skinManagerGui-qt)
add_subdirectory(frameGrabberGui2)
add_subdirectory(skinManagerGui)
add_subdirectory(FirmwareUpdater)
endif()
if(ICUB_USE_GTK2)
if(ICUB_USE_GSL)
add_subdirectory(iCubSkinGui-gtk)
else()
message(STATUS "GSL not found, skipping iCubSkinGui-gtk")
endif()
if(ICUB_GTK2_LEGACY)
message(STATUS "GTK2 legacy detected, skipping skinManagerGui-gtk")
else()
add_subdirectory(skinManagerGui-gtk)
endif()
endif()
if(NOT ICUB_USE_Qt5 AND NOT ICUB_USE_GTK2)
message(STATUS "Qt5 and GTK2 not found/selected, skipping iCubSkinGui")
message(STATUS "Qt5 and GTK2 not found/selected, skipping frameGrabberGui2")
message(STATUS "Qt5 and GTK2 not found/selected, skipping skinManagerGui")
if(NOT ICUB_USE_Qt5)
message(STATUS "Qt5 not found/selected, skipping iCubSkinGui")
message(STATUS "Qt5 not found/selected, skipping frameGrabberGui2")
message(STATUS "Qt5 not found/selected, skipping skinManagerGui")
endif()

if(ICUB_USE_SDL)
Expand All @@ -56,12 +42,6 @@ else(ICUB_USE_SDL)
message(STATUS "SDL not found/selected, skipping joystickCtrl")
endif(ICUB_USE_SDL)

if(ICUB_USE_GTK2)
add_subdirectory(focusTool)
else(ICUB_USE_GTK2)
message(STATUS "GTK2 not found/selected, skipping focusTool")
endif(ICUB_USE_GTK2)

if(ICUB_USE_Qt5 AND ICUB_USE_OpenGL AND ICUB_USE_GLUT)
add_subdirectory(iCubGui)
else()
Expand Down
45 changes: 20 additions & 25 deletions src/tools/FirmwareUpdater/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})


set(FirmwareUpdater_qt_SRCS changeaddressdialog.cpp
set(FirmwareUpdater_SRCS changeaddressdialog.cpp
changeinfodialog.cpp
firmwareupdatercore.cpp
main.cpp
Expand All @@ -26,7 +26,7 @@ set(FirmwareUpdater_qt_SRCS changeaddressdialog.cpp
customcombobox.cpp
selectioncheckbox.cpp
straincalibgui.cpp)
set(FirmwareUpdater_qt_HDRS changeaddressdialog.h
set(FirmwareUpdater_HDRS changeaddressdialog.h
changeinfodialog.h
firmwareupdatercore.h
mainwindow.h
Expand All @@ -36,45 +36,40 @@ set(FirmwareUpdater_qt_HDRS changeaddressdialog.h
customcombobox.h
selectioncheckbox.h
straincalibgui.h)
set(FirmwareUpdater_qt_QRC_FILES res.qrc)
set(FirmwareUpdater_qt_UI_FILES changeaddressdialog.ui
set(FirmwareUpdater_QRC_FILES res.qrc)
set(FirmwareUpdater_UI_FILES changeaddressdialog.ui
changeinfodialog.ui
calibrationwindow.ui
mainwindow.ui
straincalibgui.ui)

qt5_add_resources(FirmwareUpdater_qt_QRC_GEN_SRCS ${FirmwareUpdater_qt_QRC_FILES})
qt5_wrap_ui(FirmwareUpdater_qt_UI_GEN_SRCS ${FirmwareUpdater_qt_UI_FILES})
qt5_add_resources(FirmwareUpdater_QRC_GEN_SRCS ${FirmwareUpdater_QRC_FILES})
qt5_wrap_ui(FirmwareUpdater_UI_GEN_SRCS ${FirmwareUpdater_UI_FILES})

source_group("Source Files" FILES ${FirmwareUpdater_qt_SRCS})
source_group("Header Files" FILES ${FirmwareUpdater_qt_HDRS})
source_group("Resources Files" FILES ${FirmwareUpdater_qt_QRC_FILES})
source_group("UI Files" FILES ${FirmwareUpdater_qt_UI_FILES})
source_group("Generated Files" FILES ${FirmwareUpdater_qt_QRC_GEN_SRCS}
${FirmwareUpdater_qt_UI_GEN_SRCS})
source_group("Source Files" FILES ${FirmwareUpdater_SRCS})
source_group("Header Files" FILES ${FirmwareUpdater_HDRS})
source_group("Resources Files" FILES ${FirmwareUpdater_QRC_FILES})
source_group("UI Files" FILES ${FirmwareUpdater_UI_FILES})
source_group("Generated Files" FILES ${FirmwareUpdater_QRC_GEN_SRCS}
${FirmwareUpdater_UI_GEN_SRCS})

add_executable(FirmwareUpdater-qt WIN32 ${FirmwareUpdater_qt_SRCS}
${FirmwareUpdater_qt_HDRS}
${FirmwareUpdater_qt_QRC_GEN_SRCS}
${FirmwareUpdater_qt_UI_GEN_SRCS})
target_link_libraries(FirmwareUpdater-qt YARP::YARP_init
add_executable(FirmwareUpdater WIN32 ${FirmwareUpdater_SRCS}
${FirmwareUpdater_HDRS}
${FirmwareUpdater_QRC_GEN_SRCS}
${FirmwareUpdater_UI_GEN_SRCS})
target_link_libraries(FirmwareUpdater YARP::YARP_init
YARP::YARP_math
YARP::YARP_sig
YARP::YARP_dev
ethLoaderLib
canLoaderLib
strainCalibLib
)
qticub_use_modules(FirmwareUpdater-qt Core
qticub_use_modules(FirmwareUpdater Core
Gui
Widgets)
if(WIN32 AND CMAKE_VERSION VERSION_LESS 2.8.11)
target_link_libraries(FirmwareUpdater-qt Qt5::WinMain)
endif()

install(TARGETS FirmwareUpdater-qt COMPONENT utilities DESTINATION ${CMAKE_INSTALL_BINDIR})

if(NOT YARP_DEFAULT_GTK)
set_target_properties(FirmwareUpdater-qt PROPERTIES OUTPUT_NAME FirmwareUpdater)
target_link_libraries(FirmwareUpdater Qt5::WinMain)
endif()

install(TARGETS FirmwareUpdater COMPONENT utilities DESTINATION ${CMAKE_INSTALL_BINDIR})
12 changes: 0 additions & 12 deletions src/tools/FirmwareUpdater/calibrationwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,18 +1573,6 @@ void CalibrationWindow::onTimeout()



// if (eeprom_saved_status==false) {
// /*gtk_widget_modify_bg (save_button, GTK_STATE_NORMAL, &r_color);
// gtk_widget_modify_bg (save_button, GTK_STATE_ACTIVE, &r_color);
// gtk_widget_modify_bg (save_button, GTK_STATE_PRELIGHT, &r_color);
// gtk_widget_modify_bg (save_button, GTK_STATE_SELECTED, &r_color);
// gtk_widget_modify_bg (save_button, GTK_STATE_INSENSITIVE, &r_color);
// gtk_button_set_label (GTK_BUTTON(save_button), "Not saved.\nSave to eeprom?"); */
// } else {
// //gtk_button_set_label (GTK_BUTTON(save_button), "Save to eeprom");
// }


setSerialChanged(serial_number_changed);

// marco.accame: maybe it is better to retrieve only one matrix: the selected one, not all three of them
Expand Down
8 changes: 0 additions & 8 deletions src/tools/FirmwareUpdater/firmwareupdatercore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1021,14 +1021,6 @@ bool FirmwareUpdaterCore::uploadCanApplication(QString filename,QString *resultS
finished = 1;
}

// // Update the progress bar
// if (prompt_version==false && downloader.progress % 50 == 0)
// {
// gtk_progress_bar_set_fraction ((GtkProgressBar*) progress_bar, 0);
// gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), refresh_board_list_model());
// gtk_widget_draw(treeview, NULL);
// gtk_main_iteration_do (false);
// }
}
while (finished!=1);
timer_end= yarp::os::Time::now();
Expand Down
9 changes: 0 additions & 9 deletions src/tools/canLoader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,3 @@ add_subdirectory(canLoaderLib)

message(STATUS " +++ tool compiling canLoader-console")
add_subdirectory(canLoader-console)


if(NOT ICUB_USE_GTK2)
message(STATUS "GTK2 not selected, skipping canLoader")
return()
endif()

message(STATUS " +++ tool compiling canLoader")
add_subdirectory(canLoader)
19 changes: 2 additions & 17 deletions src/tools/canLoader/canLoader-console/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Use this application to download your firmware in DSP boards.
\section intro_sec Description
CanLoder20 is a YARP/GTK based application that allows the firmware update of the DSP boards of iCub.
CanLoder20 is a YARP based application that allows the firmware update of the DSP boards of iCub.
The board types currently supported by the CanLoader application are:
- MC4 (Motorola 56807 DSP for control of bushed CC motors)
- BLL (Motorola 56807 DSP for control of brushless motors)
Expand All @@ -37,7 +37,6 @@ The application returns a value that specifies the result of the download.
\section lib_sec Libraries
YARP libraries.
GTK libraries.
\section parameters_sec Parameters
You can use the canLoader application in two ways: using a GUI or by command line.
Expand Down Expand Up @@ -199,7 +198,6 @@ bool prompt_version=false;
static bool compile_ip_addresses(const char* addr)
{
ACE_UINT32 ip1,ip2,ip3,ip4;
//sscanf(gtk_entry_get_text(GTK_ENTRY(box_ipAddr)),"%d.%d.%d.%d",&ip1,&ip2,&ip3,&ip4);
sscanf(addr,"%d.%d.%d.%d",&ip1,&ip2,&ip3,&ip4);
remoteAddr=(ip1<<24)|(ip2<<16)|(ip3<<8)|ip4;

Expand All @@ -209,7 +207,6 @@ static bool compile_ip_addresses(const char* addr)

if (ret || count<=0)
{
//dialog_message(GTK_MESSAGE_ERROR,"Init driver failed","Could not find network interface");
return false;
}

Expand Down Expand Up @@ -240,18 +237,6 @@ static void start_end_click ()
if (networkType=="ETH")
{
yError() << "ETH not supported yet" ;
/*if (!prompt_version)
{
if (!compile_ip_addresses(gtk_entry_get_text(GTK_ENTRY(box_ipAddr))))
{
yError() << "Init driver failed" << "Could not find network interface";
return;
}
}
params.put("local", int( localAddr));
params.put("remote",int(remoteAddr));
params.put("canid",canID);*/
}
else
{
Expand Down Expand Up @@ -550,7 +535,7 @@ void fatal_error(int err)
}

//*********************************************************************************
// Entry point for the GTK application
// Entry point for the application
int myMain( int argc, char *argv[] )
{
networkType="empty";
Expand Down
23 changes: 0 additions & 23 deletions src/tools/canLoader/canLoader/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 0351f2b

Please sign in to comment.