Ubuntu – How to make a project of Krusader

12.04kdekrusaderqtsource

An example for my general question https://askubuntu.com/questions/485242/an-introduction-to-translating-and-debugging-source-code : I had installed the 'Qt 4 Designer' and I have downloaded the krusader-2.4.0-beta3.tar.bz2 file. Among the packed files I see the CMakeLists.txt that contains

project(krusader)
INCLUDE(CPack)
set(VERSION "2.4.0-beta3" )
set(RELEASE_NAME "Single Step")
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include_directories( ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
set(CMAKE_VERBOSE_MAKEFILE OFF)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions( "-DKRARC_ENABLED" )
find_package(ACL)
if(ACL_FOUND)
    add_definitions(-DHAVE_POSIX_ACL)
endif(ACL_FOUND)
\#include(ConfigureChecks.cmake)
add_subdirectory(krusader)
add_subdirectory(pics)
add_subdirectory(doc-extras)
add_subdirectory(krArc)
add_subdirectory(iso)
add_subdirectory(doc)
\#add_subdirectory(krfiledialog) - not used
\#add_subdirectory(virt) - not used
\#add_subdirectory(tar) - not used
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(TARDIR)")
include(MacroOptionalAddSubdirectory)
macro_optional_add_subdirectory( po )

I guess that I am to find or choose my directories and define them using

KDE4_INCLUDES=the directory

etc. I need an introduction about rules for it; maybe the directories are among the following

/home/me_user/.kde/share/kde4/
/home/me_user/Ot/5.l.0/android_x86/src/android/java/src/org/kde/
/home/me_user/Ot/5.1.0/android_armv7/src/android/java/src/org/kde/
/home/me_user/G/Ot/krusader-2.4.0-beta3/pics/kde3/
/home/me_user/G/libreoffice-3.5.7.2/core/fpicker/source/unx/kde_unx/
/home/me_user/G/libreoffice-3.5.7.2/core/fpicker/source/unx/kde4/
/home/me_user/G/libreoffice-3.5.7.2/core/fpicker/source/unx/kde/
/home/me_user/G/libreoffice-3.5.7.2/core/scp2/source/kde/
/home/me_user/G/libreoffice-3.5.7.2/core/extras/unx/source/kde/
/home/me_user/G/libreoffice-3.5.7.2/core/shell/source/backends/kde4be/
/home/me_user/G/libreoffice-3.5.7.2/core/shell/source/backends/kdebe/
/home/me_user/G/libreoffice-3.5.7.2/core/vcl/unx/kde4/
/home/me_user/G/libreoffice-3.5.7.2/core/vcl/unx/kde/
/home/me_user/G/libreoffice-3.5.7.2/core/vcl/inc/unx/kde/
/tmp/kde-me_userMYlhh5/
/var/tmp/kdecache-root/
/var/tmp/kdecache-me_user/
/var/tmp/kdecache-she_user/
/var/tmp/kdecache-me_user/kio_help/usr/share/doc/kde/
/usr/share/kde4/
/usr/share/applications/kde4/
/usr/share/emoticons/kde4/
/usr/share/pyshared/softwareproperties/kde/
/usr/share/locale/ru/LC_SCRIPTS/kdelibs4/
/usr/share/locale/de/LC_SCRIPTS/kdelibs4/
/usr/share/doc/kde-l10n-cs/
/usr/share/doc/kdepim-runtime/
/usr/share/doc/kde-l10n-sk/
/usr/share/doc/kdepimlibs-kio-plugins/
/usr/share/doc/kde-l10n-de/
/usr/share/doc/kdelibs5-plugins/
/usr/share/doc/kde-l10n-engb/
/usr/share/doc/kde-runtime/
/usr/share/doc/kde/
/usr/share/doc/kde-runtime-data/
/usr/share/doc/kdelibs-bin/
/usr/share/doc/kdelibs5-data/
/usr/share/doc/kde-l10n-ru/
/usr/share/doc/kde/HTML/en/kdesu/
/usr/share/doc/kde/HTML/en/kdebugdialog/
/usr/share/doc/kde/HTML/en/kcontrol/kded/
/usr/share/doc/kde/HTML/ru/kdesu/
/usr/share/doc/kde/HTML/ru/kdebugdialog/
/usr/share/doc/kde/HTML/de/kdesu/
/usr/share/doc/kde/HTML/de/kdepasswd/
/usr/share/doc/kde/HTML/de/kdebugdialog/
/usr/share/doc/kde/HTML/de/kcontrol/kded/
/usr/share/kde4/apps/kdeui/
/usr/share/kde4/apps/kdewidgets/
/usr/share/kde4/apps/kde/
/usr/share/kde4/services/kded/
/usr/share/gettext/projects/KDE/
/usr/share/perl5/Debconf/FrontEnd/Kde/
/usr/share/perl5/Debconf/Element/Kde/
/usr/share/ontology/kde/
/usr/lib/kde4/
/usr/lib/kde4/libexec/kdesu~distrib/
/usr/lib/kde4/platformimports/touch/org/kde/
/usr/lib/kde4/imports/org/kde/
/usr/lib/python2.7/dist-packages/softwareproperties/kde/

Or should I install yet another package from KDE?

I have tried opening

krusaderversion.h.cmake

(the only *.cmake file from the download) in the 'Qt Creator' and building it, but it demands many parameters. I'd like to know how to find the parameters, as far as possible directly from the downloaded files. This is what I meant by a "general introduction 'how to make such projects'", maybe for KDE projects particularly; is something like it available?

Best Answer

  • The matter of the command find_package(KDE4 REQUIRED) is solved in my answer to How to get KDE4 for building a project in Ubuntu 12.04?.

    Similarly, installing zlib1g-dev enabled me to open the CMakeLists.txt as a 'Qt 4 Designer' project via cmake (without parameters) and to build it; Qt accepted dependencies of the sources.

    I have attained my goal - now I can watch how Krusader works by using the debugger. (Similar steps for the stable Krusader version led to error messages during translation, evidently I have made a mistake, maybe at a version of some dependency; I am satisfied by watching the Krusader version I use.)