diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2eca310..ebfa7dc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,13 +93,13 @@ IF(WIN32)
SET(CPACK_GENERATOR "NSIS;ZIP")
SET(CPACK_SOURCE_GENERATOR "ZIP")
SET(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}")
- #SET(ICON_PATH "${PROJECT_SOURCE_DIR}/app/src/${PROJECT_NAME}.ico")
- #SET(CPACK_NSIS_MUI_ICON ${ICON_PATH})
- #SET(CPACK_NSIS_MUI_UNIICON ${ICON_PATH})
+ SET(ICON_PATH "${PROJECT_SOURCE_DIR}/app/${PROJECT_NAME}.ico")
+ SET(CPACK_NSIS_MUI_ICON ${ICON_PATH})
+ SET(CPACK_NSIS_MUI_UNIICON ${ICON_PATH})
SET(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}")
SET(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
# Set the icon used for the Windows "Add or Remove Programs" tool.
- #SET(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\${PROJECT_NAME}.exe)
+ SET(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\${PROJECT_NAME}.exe)
SET(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}" ${CPACK_PACKAGE_EXECUTABLES})
SET(CPACK_CREATE_DESKTOP_LINKS "${PROJECT_NAME}" ${CPACK_CREATE_DESKTOP_LINKS})
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
@@ -115,7 +115,7 @@ ELSEIF(APPLE)
SET(CPACK_SOURCE_GENERATOR "TBZ2")
- #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/app/src/${PROJECT_NAME}.icns")
+ SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/app/${PROJECT_NAME}.icns")
ENDIF()
INCLUDE(CPack)
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 4e2f3e1e..85de481f 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -16,12 +16,12 @@ SET(uis
../src/ui/aboutDialog.ui
)
-#SET(qrc
-# ./GuiLib.qrc
-#)
+SET(qrc
+ ../src/resources.qrc
+)
# generate rules for building source files from the resources
-#QT4_ADD_RESOURCES(srcs_qrc ${qrc})
+QT4_ADD_RESOURCES(srcs_qrc ${qrc})
#Generate .h files from the .ui files
QT4_WRAP_UI(moc_uis ${uis})
@@ -44,7 +44,7 @@ SET(SRC_FILES
../src/AboutDialog.cpp
${moc_srcs}
${moc_uis}
- #${srcs_qrc}
+ ${srcs_qrc}
)
SET(INCLUDE_DIRS
@@ -64,6 +64,29 @@ SET(LIBRARIES
#include files
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
+# For Apple set the icns file containing icons
+IF(APPLE AND BUILD_AS_BUNDLE)
+ # set how it shows up in the Info.plist file
+ SET(MACOSX_BUNDLE_ICON_FILE ${PROJECT_NAME}.icns)
+ # set where in the bundle to put the icns file
+ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ # include the icns file in the target
+ SET(SRC_FILES ${SRC_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.icns)
+ENDIF(APPLE AND BUILD_AS_BUNDLE)
+
+# Add exe icon resource
+IF(WIN32)
+ IF( MINGW )
+ # resource compilation for MinGW
+ ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/AppIco.o
+ COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.rc
+ -o ${CMAKE_CURRENT_BINARY_DIR}/AppIco.o )
+ SET(SRC_FILES ${SRC_FILES} ${CMAKE_CURRENT_BINARY_DIR}/AppIco.o)
+ ELSE( MINGW )
+ SET(SRC_FILES ${SRC_FILES} ${PROJECT_NAME}.rc)
+ ENDIF( MINGW )
+ENDIF(WIN32)
+
# create an executable file
IF(APPLE AND BUILD_AS_BUNDLE)
ADD_EXECUTABLE(find_object MACOSX_BUNDLE ${SRC_FILES})
diff --git a/app/Find-Object.icns b/app/Find-Object.icns
new file mode 100644
index 00000000..1cb331f6
Binary files /dev/null and b/app/Find-Object.icns differ
diff --git a/app/Find-Object.ico b/app/Find-Object.ico
new file mode 100644
index 00000000..dac2b8d1
Binary files /dev/null and b/app/Find-Object.ico differ
diff --git a/app/Find-Object.rc b/app/Find-Object.rc
new file mode 100644
index 00000000..1809e18d
--- /dev/null
+++ b/app/Find-Object.rc
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "Find-Object.ico"
diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in
new file mode 100644
index 00000000..14e60101
--- /dev/null
+++ b/cmake_uninstall.cmake.in
@@ -0,0 +1,27 @@
+# -----------------------------------------------
+# File that provides "make uninstall" target
+# We use the file 'install_manifest.txt'
+# -----------------------------------------------
+IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
+ IF(EXISTS "$ENV{DESTDIR}${file}")
+ EXEC_PROGRAM(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF(NOT "${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
+ ENDIF(NOT "${rm_retval}" STREQUAL 0)
+ ELSE(EXISTS "$ENV{DESTDIR}${file}")
+ MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+ ENDIF(EXISTS "$ENV{DESTDIR}${file}")
+ENDFOREACH(file)
+
+
diff --git a/src/AddObjectDialog.cpp b/src/AddObjectDialog.cpp
index 1d68d4c3..995fefe6 100644
--- a/src/AddObjectDialog.cpp
+++ b/src/AddObjectDialog.cpp
@@ -175,7 +175,7 @@ void AddObjectDialog::setState(int state)
delete extractor;
if(selectedKeypoints.size() != (unsigned int)descriptors.rows)
{
- printf("ERROR : keypoints=%lu != descriptors=%d\n", selectedKeypoints.size(), descriptors.rows);
+ printf("ERROR : keypoints=%d != descriptors=%d\n", (int)selectedKeypoints.size(), descriptors.rows);
}
CvRect roi = computeROI(selectedKeypoints);
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 0063330c..10a6df1a 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -351,7 +351,7 @@ void MainWindow::update(const cv::Mat & image)
delete extractor;
if((int)keypoints.size() != descriptors.rows)
{
- printf("ERROR : kpt=%lu != descriptors=%d\n", keypoints.size(), descriptors.rows);
+ printf("ERROR : kpt=%d != descriptors=%d\n", (int)keypoints.size(), descriptors.rows);
}
if(imageGrayScale)
{
diff --git a/src/resources.qrc b/src/resources.qrc
new file mode 100644
index 00000000..225f507a
--- /dev/null
+++ b/src/resources.qrc
@@ -0,0 +1,5 @@
+
+
+ resources/Find-Object.png
+
+
diff --git a/src/resources/Find-Object.png b/src/resources/Find-Object.png
new file mode 100644
index 00000000..01ed6730
Binary files /dev/null and b/src/resources/Find-Object.png differ
diff --git a/src/ui/aboutDialog.ui b/src/ui/aboutDialog.ui
index 3a706a7e..ab5713a7 100644
--- a/src/ui/aboutDialog.ui
+++ b/src/ui/aboutDialog.ui
@@ -7,7 +7,7 @@
0
0
404
- 257
+ 223
@@ -21,141 +21,164 @@
-
-
-
- QFrame::Box
-
-
- QFrame::Raised
-
-
-
-
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:14pt; font-weight:600;">Find-Object</span></p></body></html>
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
- -
-
-
-
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- true
-
-
-
- -
-
-
-
-
-
- Author :
-
-
-
- -
-
-
- Link :
-
-
-
- -
-
-
- Version :
-
-
-
- -
-
+
+
-
+
+
+
+ 100
+ 100
+
+
+
+
+
+
+ :/images/resources/Find-Object.png
+
+
+ true
+
+
+
+ -
+
+
+ QFrame::Box
+
+
+ QFrame::Raised
+
+
+
-
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.code.google.com/p/find-object"><span style=" text-decoration: underline; color:#0000ff;">Home page</span></a></p></body></html>
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- true
-
-
-
- -
-
-
- Mathieu Labbé, matlabbe@gmail.com
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:14pt; font-weight:600;">Find-Object</span></p></body></html>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
- -
-
+
-
+
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Author :
+
+
+
+ -
+
+
+ Link :
+
+
+
+ -
+
+
+ Version :
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.code.google.com/p/find-object"><span style=" text-decoration: underline; color:#0000ff;">Home page</span></a></p></body></html>
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ true
+
+
+
+ -
+
+
+ Mathieu Labbé, matlabbe@gmail.com
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 1
+
+
+
+
+ -
+
+
+
+
+
+ :/images/IntRoLabSmall.png
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Copyright (C) 2011 IntRoLab - Université de Sherbrooke
+
+
+ Qt::AlignCenter
+
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 1
-
-
-
-
- -
-
-
-
-
-
- :/images/IntRoLabSmall.png
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Copyright (C) 2011 IntRoLab - Université de Sherbrooke
-
-
- Qt::AlignCenter
-
-
-
-
-
+
+
+
-
@@ -170,7 +193,9 @@ p, li { white-space: pre-wrap; }
-
+
+
+