From 81b64bcfc0a32fdeb0e4f367adbf273d924e55f4 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Tue, 20 Oct 2020 14:40:51 +0200 Subject: Conversion to the cmake building system. Signed-off-by: gregory guy --- CMakeLists.txt | 94 ++++++++++++++++++++ ConfigureChecks.cmake | 148 ++++++++++++++++++++++++++++++++ config.h.cmake | 29 +++++++ doc/CMakeLists.txt | 34 ++++++++ po/CMakeLists.txt | 14 +++ src/CMakeLists.txt | 109 +++++++++++++++++++++++ src/GeoIP-1.4.0/CMakeLists.txt | 2 + src/GeoIP-1.4.0/data/CMakeLists.txt | 7 ++ src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt | 23 +++++ src/GeoIP-1.4.0/libGeoIP/GeoIP.c | 5 ++ src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c | 13 ++- src/GeoIP-1.4.0/libGeoIP/md5.c | 2 + src/GeoIP-1.4.0/libGeoIP/types.h | 4 + src/arkollon/CMakeLists.txt | 41 +++++++++ src/arkollon/data.h | 6 +- src/arkollon/headerlistitem.cpp | 10 +-- src/arkollon/headerlistitem.h | 2 +- src/arkollon/rcparser.cpp | 13 ++- src/arkollon/rcparser.h | 4 +- src/arkollon/torkarkollon.cpp | 5 +- src/arkollon/uninstallwizard.cpp | 23 +++-- src/arkollon/uninstallwizard.h | 8 +- src/arkollon/wizard.cpp | 36 ++++---- src/arkollon/wizard.h | 17 ++-- src/chart.cpp | 9 +- src/chart.h | 2 +- src/configdialog.cpp | 58 +++++++------ src/configdialog.h | 4 +- src/crashhandler.cpp | 25 +++--- src/crypto.cpp | 33 ++++--- src/crypto.h | 4 +- src/dndlistview.cpp | 16 ++-- src/dndlistview.h | 4 +- src/firewallsproxies.ui.h | 9 +- src/functions.cpp | 7 +- src/functions.h | 11 ++- src/hiddensrvs.ui.h | 15 ++-- src/hidsrvwizard.ui | 8 +- src/hidsrvwizard.ui.h | 10 ++- src/hitwidget.cpp | 15 ++-- src/hitwidget.h | 2 + src/icons/CMakeLists.txt | 3 + src/kerrylabel.cpp | 8 +- src/konqplugin/CMakeLists.txt | 41 +++++++++ src/konqueror.ui | 8 +- src/kwidgetlistbox.cpp | 4 +- src/kwidgetlistbox.h | 2 +- src/likeback.cpp | 27 +++--- src/likeback.h | 2 +- src/likeback_private.h | 3 +- src/main.cpp | 11 +-- src/maxmin.ui.h | 10 ++- src/menu/CMakeLists.txt | 10 +++ src/menu/tork.cmake | 4 + src/mixminion.ui.h | 11 ++- src/newfirstrunwizard.ui | 44 ++-------- src/newfirstrunwizard.ui.h | 22 ++--- src/newstreamosd.cpp | 22 ++--- src/newstreamosd.h | 8 +- src/overlayWidget.cpp | 4 +- src/overlayWidget.h | 2 +- src/paranoia.ui.h | 8 +- src/popupMessage.cpp | 19 ++-- src/popupMessage.h | 7 +- src/privoxytemplates/CMakeLists.txt | 18 ++++ src/questions.h | 4 +- src/quickconfig.ui.h | 7 +- src/running.ui | 8 +- src/running.ui.h | 11 ++- src/scripts/CMakeLists.txt | 4 + src/server.ui.h | 24 ++++-- src/serverwizard.ui.h | 5 +- src/statgraph.cpp | 8 +- src/statgraph.h | 8 +- src/testprivacyproxy.cpp | 20 ++--- src/testprivacyproxy.h | 8 +- src/tor_ioslave/CMakeLists.txt | 34 ++++++++ src/tor_ioslave/torioslave.cpp | 24 +++--- src/tor_ioslave/torioslave.h | 4 +- src/torclient.cpp | 40 +++++---- src/torclient.h | 8 +- src/tork.cpp | 42 ++++----- src/tork.h | 13 ++- src/torkactivelabel.cpp | 11 ++- src/torkapplet/CMakeLists.txt | 35 ++++++++ src/torkapplet/tork_mnu.cpp | 18 ++-- src/torkapplet/tork_mnu.h | 2 +- src/torkview.cpp | 74 ++++++++-------- src/torkview.h | 15 ++-- src/torkview_base.ui | 9 +- src/torkview_base.ui.h | 9 +- src/torservers.ui.h | 21 +++-- src/trayhoverpopup.cpp | 13 +-- src/trayhoverpopup.h | 3 +- src/trayicon.cpp | 8 +- src/trayicon.h | 2 +- src/update.cpp | 17 ++-- src/update.h | 2 +- src/upnp/CMakeLists.txt | 28 ++++++ src/upnp/exitoperation.cpp | 1 + src/upnp/exitoperation.h | 3 +- src/upnp/forwardportlist.cpp | 5 +- src/upnp/forwardportlist.h | 3 +- src/upnp/httprequest.cpp | 10 ++- src/upnp/httprequest.h | 4 +- src/upnp/portlist.cpp | 1 + src/upnp/portlist.h | 3 +- src/upnp/soap.cpp | 3 +- src/upnp/soap.h | 4 +- src/upnp/upnpdescriptionparser.cpp | 14 +-- src/upnp/upnpmcastsocket.cpp | 18 ++-- src/upnp/upnpmcastsocket.h | 1 + src/upnp/upnprouter.cpp | 16 ++-- src/upnp/upnprouter.h | 12 +-- src/upnpmanager.cpp | 1 + src/upnpmanager.h | 5 +- src/usability.ui.h | 8 +- src/warnings.h | 4 +- 118 files changed, 1307 insertions(+), 527 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake create mode 100644 config.h.cmake create mode 100644 doc/CMakeLists.txt create mode 100644 po/CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/GeoIP-1.4.0/CMakeLists.txt create mode 100644 src/GeoIP-1.4.0/data/CMakeLists.txt create mode 100644 src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt create mode 100644 src/arkollon/CMakeLists.txt create mode 100644 src/icons/CMakeLists.txt create mode 100644 src/konqplugin/CMakeLists.txt create mode 100644 src/menu/CMakeLists.txt create mode 100644 src/menu/tork.cmake create mode 100644 src/privoxytemplates/CMakeLists.txt create mode 100644 src/scripts/CMakeLists.txt create mode 100644 src/tor_ioslave/CMakeLists.txt create mode 100644 src/torkapplet/CMakeLists.txt create mode 100644 src/upnp/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e87a31a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,94 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8 ) + + +#### general package setup + +project( tork ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckIncludeFileCXX ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) +option( WITH_FAILSAFE "Enable failsafe support" ${WITH_ALL_OPTIONS} ) +option( WITH_GNUTLS "Enable GnuTLS support" OFF ) +option( WITH_EMBEDDED_GEOIP "Enable support with embedded GeoIP-1.4 library" OFF ) +option( WITH_LIVECD_SUPPORT "Disable features unsuitable for LiveCD use" OFF ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_KONQPLUGIN "Build konqplugin" ${BUILD_ALL} ) +option( BUILD_TORAPPLET "Build torkapplet" ${BUILD_ALL} ) +option( BUILD_TOR_IOSLAVE "Build tor_ioslave" ${BUILD_ALL} ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( src ) +tde_conditional_add_subdirectory( BUILD_DOC doc ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) + + +##### other data + +install( + FILES tips + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} +) + diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..acda08b --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,148 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### X11 headers path + +find_package( X11 ) + + +##### check for headers + +check_include_file( stdint.h HAVE_STDINT_H ) +check_include_file( inttypes.h HAVE_INTTYPES_H ) + + +##### check for GnuTLS or OpenSSL( default ) + +if( WITH_GNUTLS ) + + pkg_search_module( GNUTLS gnutls ) + find_program( LIBGCRYPT_CONFIG libgcrypt-config ) + + if( NOT GNUTLS_FOUND ) + tde_message_fatal( "GnuTLS has been requested but was not found on your system" ) + endif( NOT GNUTLS_FOUND ) + + if( LIBGCRYPT_CONFIG ) + message( STATUS "Found libgcrypt executable: ${LIBGCRYPT_CONFIG}" ) + else() + tde_message_fatal( "libgcrypt is required but was not found on your system" ) + endif() + + macro( _libgcrypt_config __type __var ) + execute_process( + COMMAND ${LIBGCRYPT_CONFIG} --${__type} + OUTPUT_VARIABLE ${__var} + RESULT_VARIABLE __result + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if( __result ) + tde_message_fatal( "Unable to run ${LIBGCRYPT_CONFIG}!" ) + endif() + endmacro() + + _libgcrypt_config( libs LIBGCRYPT_LIBRARIES ) + _libgcrypt_config( cflags LIBGCRYPT_INCLUDE_DIRS ) + + if( LIBGCRYPT_LIBRARIES ) + string( REGEX REPLACE "(^| +)-l" ";" LIBGCRYPT_LIBRARIES "${LIBGCRYPT_LIBRARIES}" ) + set( LIBGCRYPT_LIBRARIES "${LIBGCRYPT_LIBRARIES}" CACHE INTERNAL "" FORCE ) + message( STATUS "Libgcrypt libraries: ${LIBGCRYPT_LIBRARIES} ") + elseif( LIBGCRYPT_INCLUDE_DIRS ) + string( REGEX REPLACE "(^| +)-I" ";" LIBGCRYPT_INCLUDE_DIRS "${LIBGCRYPT_INCLUDE_DIRS}" ) + set( LIBGCRYPT_INCLUDE_DIRS "${LIBGCRYPT_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE ) + message( STATUS "Libgcrypt includes: ${LIBGCRYPT_INCLUDE_DIRS} ") + endif() + else() + +##### check for OpenSSL + + find_package( OpenSSL ) + + if( NOT OPENSSL_FOUND ) + check_include_file( openssl/err.h HAVE_OPENSSL_H ) + check_library_exists( ssl OPENSSL_init_ssl "" HAVE_LIBSSL_11 ) + check_library_exists( crypto EVP_EncryptInit_ex "" HAVE_LIBCRYPTO ) + + if( NOT HAVE_LIBSSL_11 ) + check_library_exists( ssl SSL_library_init "" HAVE_LIBSSL ) + endif() + + if( HAVE_OPENSSL_H AND HAVE_LIBCRYPTO AND (HAVE_LIBSSL_11 OR HAVE_LIBSSL) ) + set( SSL_FOUND 1 CACHE INTERNAL "" FORCE ) + find_file( OPENSSLV_H openssl/opensslv.h ) + file( STRINGS "${OPENSSLV_H}" SSL_VERSION REGEX "#[ \t]*define[ \t]*OPENSSL_VERSION_TEXT" ) + string( REGEX REPLACE "# *define[ \t]*OPENSSL_VERSION_TEXT[ \t]*\"[^0-9 ]* *([^ ]*).*" "\\1" SSL_VERSION "${SSL_VERSION}" ) + set( SSL_VERSION "${SSL_VERSION}" CACHE INTERNAL "" FORCE ) + message( STATUS "Found OpenSSL: version ${SSL_VERSION}" ) + set( OPENSSL_LIBRARIES "ssl;crypto" CACHE INTERNAL "ssl and crypto libs" FORCE ) + endif() + endif( NOT OPENSSL_FOUND ) + + if( NOT OPENSSL_FOUND ) + tde_message_fatal( "OpenSSL support is required but OpenSSL was not found on your system" ) + else() + set( USE_OPENSSL 1 ) + endif( NOT OPENSSL_FOUND ) +endif( WITH_GNUTLS ) + + +##### Embedded GeoIP + +if( WITH_EMBEDDED_GEOIP ) + find_package( ZLIB ) + + if( NOT ZLIB_FOUND ) + tde_message_fatal( "Zlib is required but was not found on your system" ) + endif() + + set( GEOIP_LIBRARIES geoip-static ) + set( GEOIPDATADIR ${SHARE_INSTALL_PREFIX}/${PROJECT_NAME}/geoip ) + message( STATUS "GEOIPDATADIR location: ${GEOIPDATADIR}" ) + else() + pkg_search_module( GEOIP geoip ) + + if( GEOIP_FOUND ) + set( EXTERNAL_GEOIP 1 ) + else() + tde_message_fatal( "GeoIP is required but was not found on your system" ) + endif( GEOIP_FOUND ) +endif( WITH_EMBEDDED_GEOIP ) + + +##### LIVECD use + +if( WITH_LIVECD_SUPPORT ) + set( LIVECD 1 ) +endif() + + +##### Failsafe support + +if( WITH_FAILSAFE ) + set( USE_FAILSAFE 1 ) +endif() diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..a8b653b --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,29 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ + +/* OpenSSL support */ +#cmakedefine USE_OPENSSL 1 + +/* system GeoIP support */ +#cmakedefine EXTERNAL_GEOIP 1 + +/* set GEOIPDATADIR location */ +#cmakedefine GEOIPDATADIR "@GEOIPDATADIR@" + +/* defined if you have header */ +#cmakedefine HAVE_STDINT_H 1 + +/* Defined if you have header */ +#cmakedefine HAVE_INTTYPES_H 1 + +/* Disable features for LIVECD use */ +#cmakedefine LIVECD 1 + +/* Enable failsafe support */ +#cmakedefine USE_FAILSAFE 1 diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..f6eec15 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,34 @@ +file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * ) +list( REMOVE_ITEM _dirs html man ) + +string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) + +foreach( _dir IN LISTS _dirs ) + if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} + AND ( "${_dir}" STREQUAL "en" OR + "${_linguas}" MATCHES "^;*$" OR + ";${_linguas};" MATCHES ";${_dir};" )) + file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} ${_dir}/*.docbook ) + if( _doc_files ) + list( FIND _doc_files "index.docbook" _find_index ) + if( -1 EQUAL _find_index ) + set( _noindex "NOINDEX" ) + else() + unset( _noindex ) + endif() + tde_create_handbook( + SOURCE_BASEDIR ${_dir} + ${_noindex} + LANG ${_dir} + DESTINATION ${PROJECT_NAME} + ) + endif() + endif() +endforeach() + +if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/CMakeLists.txt ) + add_subdirectory( html ) +endif() +if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt ) + add_subdirectory( man ) +endif() diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..75c89f8 --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,14 @@ +file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) +string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) + +foreach( _po ${po_files} ) + get_filename_component( _lang ${_po} NAME_WE ) + if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" ) + if( "${_po}" MATCHES "^([^/]*)/.*" ) + string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" ) + else( ) + set( _component "${PROJECT_NAME}" ) + endif( ) + tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} ) + endif( ) +endforeach( ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..cbab62d --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,109 @@ +add_subdirectory( menu ) +add_subdirectory( upnp ) +add_subdirectory( icons ) +add_subdirectory( scripts ) +add_subdirectory( arkollon ) +add_subdirectory( privoxytemplates ) + +tde_conditional_add_subdirectory( WITH_EMBEDDED_GEOIP GeoIP-1.4.0 ) +tde_conditional_add_subdirectory( BUILD_KONQPLUGIN konqplugin ) +tde_conditional_add_subdirectory( BUILD_TORAPPLET torkapplet ) +tde_conditional_add_subdirectory( BUILD_TOR_IOSLAVE tor_ioslave ) + + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${X11_INCLUDE_DIR} + ${GNUTLS_INCLUDE_DIRS} + ${LIBGCRYPT_INCLUDE_DIRS} + ${OPENSSL_INCLUDE_DIR} + ${GEOIP_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### tork (executable) + +tde_add_executable( ${PROJECT_NAME} AUTOMOC + + SOURCES + dcoptork.skel + firewallsproxies.ui hiddensrvs.ui hidsrvwizard.ui + hitwidget_layout.ui introwizard.ui serverwizard.ui + konqueror.ui maxmin.ui mixminion.ui torkview_base.ui + newfirstrunwizard.ui paranoia.ui torservers.ui + quickconfig.ui running.ui server.ui usability.ui + chart.cpp configdialog.cpp crashhandler.cpp + crypto.cpp dndlistview.cpp functions.cpp + hitwidget.cpp kerrylabel.cpp kwidgetlistbox.cpp + likeback.cpp main.cpp newstreamosd.cpp + overlayWidget.cpp popupMessage.cpp + statgraph.cpp testprivacyproxy.cpp torclient.cpp + tork.cpp torkactivelabel.cpp torkconfig.kcfgc + torkview.cpp trayhoverpopup.cpp + trayicon.cpp update.cpp upnpmanager.cpp + LINK + tdeio-shared + tdehtml-shared + tdeui-shared + tdecore-shared + ktupnp-static + ${OPENSSL_LIBRARIES} + ${GEOIP_LIBRARIES} + ${GNUTLS_LIBRARIES} + ${LIBGCRYPT_LIBRARIES} + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### icons + +install( + FILES ${PROJECT_NAME}.xpm + DESTINATION ${SHARE_INSTALL_PREFIX}/pixmaps +) + + +##### other data + +install( + FILES torkui.rc + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} +) + +tde_create_translated_desktop( ${PROJECT_NAME}.desktop ) + +tde_create_translated_desktop( + SOURCE tork_downloadwithfirefox.desktop + tork_downloadwithopera.desktop + tork_downloadwithkonqueror.desktop + DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus +) + +tde_create_translated_desktop( + SOURCE eventsrc + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} +) + +install( + FILES torkconfig.kcfg + DESTINATION ${KCFG_INSTALL_DIR} +) + + +##### man page + +INSTALL( + FILES ${PROJECT_NAME}.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 + COMPONENT doc +) diff --git a/src/GeoIP-1.4.0/CMakeLists.txt b/src/GeoIP-1.4.0/CMakeLists.txt new file mode 100644 index 0000000..6e42390 --- /dev/null +++ b/src/GeoIP-1.4.0/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory( data ) +add_subdirectory( libGeoIP ) diff --git a/src/GeoIP-1.4.0/data/CMakeLists.txt b/src/GeoIP-1.4.0/data/CMakeLists.txt new file mode 100644 index 0000000..627b9ba --- /dev/null +++ b/src/GeoIP-1.4.0/data/CMakeLists.txt @@ -0,0 +1,7 @@ + +###### GeoIP data + +install( + FILES GeoIP.dat GeoIP-LICENSE.txt + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/geoip +) diff --git a/src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt b/src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt new file mode 100644 index 0000000..a0b9be0 --- /dev/null +++ b/src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt @@ -0,0 +1,23 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/src + ${ZLIB_INCLUDE_DIRS} +) + + +##### geoip (static) + +tde_add_library( geoip STATIC_PIC + + SOURCES + GeoIP.c + GeoIPCity.c + regionName.c + timeZone.c + GeoIPUpdate.c + md5.c + LINK + ${ZLIB_LIBRARIES} +) diff --git a/src/GeoIP-1.4.0/libGeoIP/GeoIP.c b/src/GeoIP-1.4.0/libGeoIP/GeoIP.c index feb6a40..a055156 100644 --- a/src/GeoIP-1.4.0/libGeoIP/GeoIP.c +++ b/src/GeoIP-1.4.0/libGeoIP/GeoIP.c @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "GeoIP.h" #include "GeoIP_internal.h" @@ -29,6 +33,7 @@ #include #define snprintf _snprintf #endif + #include #include #include diff --git a/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c b/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c index 2a65759..b5c445a 100644 --- a/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c +++ b/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c @@ -17,9 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "GeoIP.h" +#include "GeoIP_internal.h" +#include "GeoIPCity.h" + #ifndef WIN32 #include #include /* For ntohl */ @@ -27,7 +32,9 @@ #include #include #endif + #include /* For uint32_t */ + #ifdef HAVE_STDINT_H #include /* For uint32_t */ #endif diff --git a/src/GeoIP-1.4.0/libGeoIP/md5.c b/src/GeoIP-1.4.0/libGeoIP/md5.c index 922f75a..0882a3a 100644 --- a/src/GeoIP-1.4.0/libGeoIP/md5.c +++ b/src/GeoIP-1.4.0/libGeoIP/md5.c @@ -23,7 +23,9 @@ /* Written by Ulrich Drepper , 1995. */ /* Heavily modified for GnuPG by */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include #include diff --git a/src/GeoIP-1.4.0/libGeoIP/types.h b/src/GeoIP-1.4.0/libGeoIP/types.h index 4a8b80a..0a8a953 100644 --- a/src/GeoIP-1.4.0/libGeoIP/types.h +++ b/src/GeoIP-1.4.0/libGeoIP/types.h @@ -21,6 +21,10 @@ #ifndef G10_TYPES_H #define G10_TYPES_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef HAVE_INTTYPES_H /* For uint64_t */ #include diff --git a/src/arkollon/CMakeLists.txt b/src/arkollon/CMakeLists.txt new file mode 100644 index 0000000..0e93613 --- /dev/null +++ b/src/arkollon/CMakeLists.txt @@ -0,0 +1,41 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### torkarkollon (executable) + +tde_add_executable( torkarkollon AUTOMOC + + SOURCES + logdialog.ui + wizardbase.ui + torkarkollon.cpp + wizard.cpp + rcparser.cpp + uninstallwizard.cpp + headerlistitem.cpp + data.cpp + LINK + tdecore-shared + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### other data + +INSTALL( + FILES torkarkollon.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 + COMPONENT doc +) diff --git a/src/arkollon/data.h b/src/arkollon/data.h index 1526c1b..abd4c3a 100644 --- a/src/arkollon/data.h +++ b/src/arkollon/data.h @@ -169,8 +169,8 @@ static const unsigned char uninstaller_sh_data[] = { 0x74,0x0a,0x64,0x6f,0x6e,0x65,0x0a,0x09,0x09,0x0a }; -#include -#include +#include +#include static const TQRgb misc_data[] = { 0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f, 0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffcfcfc,0xfffbfbfb,0xfff9f9f9, @@ -3058,7 +3058,7 @@ static const TQRgb packageIcon_data[] = { 0x44000000,0x44000000,0x44000000,0x44000000,0x44000000,0x44030303,0x1d000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0xffffff }; -#include +#include const TQImage& qembed_findImage( const TQString& name ); diff --git a/src/arkollon/headerlistitem.cpp b/src/arkollon/headerlistitem.cpp index 0c29e6f..ab066d0 100644 --- a/src/arkollon/headerlistitem.cpp +++ b/src/arkollon/headerlistitem.cpp @@ -17,12 +17,12 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "headerlistitem.h" - -#include -#include -#include + +#include +#include +#include +#include "headerlistitem.h" #include "uninstallwizard.h" #include "wizard.h" diff --git a/src/arkollon/headerlistitem.h b/src/arkollon/headerlistitem.h index 3be07e5..4097b22 100644 --- a/src/arkollon/headerlistitem.h +++ b/src/arkollon/headerlistitem.h @@ -20,7 +20,7 @@ #ifndef HEADERLISTITEM_H #define HEADERLISTITEM_H -#include +#include class HeaderListItem : public TQListViewItem { diff --git a/src/arkollon/rcparser.cpp b/src/arkollon/rcparser.cpp index 82123dc..6a7850b 100644 --- a/src/arkollon/rcparser.cpp +++ b/src/arkollon/rcparser.cpp @@ -17,11 +17,12 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "rcparser.h" -#include -#include -#include +#include +#include +#include + +#include "rcparser.h" RcParser::RcParser() { @@ -140,7 +141,3 @@ TQStringList RcParser::readList(TQString key) { return TQStringList::split(",", sections[currentSection][key]); } - - - - diff --git a/src/arkollon/rcparser.h b/src/arkollon/rcparser.h index 71842fa..47db4d6 100644 --- a/src/arkollon/rcparser.h +++ b/src/arkollon/rcparser.h @@ -20,8 +20,8 @@ #ifndef RCPARSER_H #define RCPARSER_H -#include -#include +#include +#include class RcParser { diff --git a/src/arkollon/torkarkollon.cpp b/src/arkollon/torkarkollon.cpp index c4e6c30..f57046d 100644 --- a/src/arkollon/torkarkollon.cpp +++ b/src/arkollon/torkarkollon.cpp @@ -19,15 +19,16 @@ ***************************************************************************/ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif +#include + #include #include #include #include -#include #include "wizard.h" #include "uninstallwizard.h" diff --git a/src/arkollon/uninstallwizard.cpp b/src/arkollon/uninstallwizard.cpp index 58bd6b4..346d038 100644 --- a/src/arkollon/uninstallwizard.cpp +++ b/src/arkollon/uninstallwizard.cpp @@ -18,23 +18,22 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "uninstallwizard.h" #include "headerlistitem.h" #include "data.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - AppListItem::AppListItem(TQString nN, TQString n, TQListView* parent) : TQCheckListItem(parent, "", TQCheckListItem::CheckBox) { diff --git a/src/arkollon/uninstallwizard.h b/src/arkollon/uninstallwizard.h index 712dc37..0d10cbd 100644 --- a/src/arkollon/uninstallwizard.h +++ b/src/arkollon/uninstallwizard.h @@ -21,14 +21,14 @@ #ifndef UNINSTALLWIZARD_H #define UNINSTALLWIZARD_H +#include +#include +#include + #include "wizardbase.h" #include "logdialog.h" #include "headerlistitem.h" -#include -#include -#include - class AppListItem : public TQCheckListItem { public: diff --git a/src/arkollon/wizard.cpp b/src/arkollon/wizard.cpp index fd2cfac..f9f5d9c 100644 --- a/src/arkollon/wizard.cpp +++ b/src/arkollon/wizard.cpp @@ -17,26 +17,26 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "wizard.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "wizard.h" #include "data.h" #include "rcparser.h" diff --git a/src/arkollon/wizard.h b/src/arkollon/wizard.h index 09e0ef9..d7e0866 100644 --- a/src/arkollon/wizard.h +++ b/src/arkollon/wizard.h @@ -20,17 +20,20 @@ #ifndef WIZARD_H #define WIZARD_H +#include +#include +#include +#include +#include +#include +#include + #include -#include -#include -#include -#include -#include -#include -#include + #include #include "logdialog.h" + class HeaderListItem; struct Component diff --git a/src/chart.cpp b/src/chart.cpp index 60bc741..6441b6a 100644 --- a/src/chart.cpp +++ b/src/chart.cpp @@ -22,11 +22,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include + +#include + #include "chart.h" #include "functions.h" -#include -#include -#include + using namespace tk; diff --git a/src/chart.h b/src/chart.h index bf41378..5b1f6e5 100644 --- a/src/chart.h +++ b/src/chart.h @@ -23,7 +23,7 @@ #ifndef CHART_H #define CHART_H -#include +#include class TQPaintEvent; diff --git a/src/configdialog.cpp b/src/configdialog.cpp index ad16af6..0169e81 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -34,6 +34,37 @@ email : markey@web.de * * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include //kapp +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "configdialog.h" #include "konqueror.h" #include "firewallsproxies.h" @@ -49,34 +80,7 @@ email : markey@web.de #include "portsandnames.h" #include "tork.h" #include "crypto.h" -#include "../config.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include //kapp -#include -#include -#include -#include -#include -#include -#include -#include -#include ////////////////////////////////////////////////////////////////////////////////////////// // PUBLIC diff --git a/src/configdialog.h b/src/configdialog.h index 5e310b9..20824b0 100644 --- a/src/configdialog.h +++ b/src/configdialog.h @@ -18,9 +18,9 @@ email : markey@web.de #ifndef TORKCONFIGDIALOG_H #define TORKCONFIGDIALOG_H +#include +#include -#include -#include #include class TQComboBox; diff --git a/src/crashhandler.cpp b/src/crashhandler.cpp index db161b1..3deb9a6 100644 --- a/src/crashhandler.cpp +++ b/src/crashhandler.cpp @@ -10,9 +10,10 @@ * * ***************************************************************************/ -#include "tork.h" -#include "torkconfig.h" -#include "crashhandler.h" +#include +#include +#include +#include //tqVersion() #include //invokeMailer() #include //kdBacktrace() @@ -20,19 +21,15 @@ #include #include -#include -#include -#include -#include //tqVersion() - #include //popen, fread #include #include //pid_t #include //waitpid #include //write, getpid - - +#include "tork.h" +#include "torkconfig.h" +#include "crashhandler.h" namespace torK @@ -245,14 +242,16 @@ namespace torK #if 0 -#include -#include -#include +#include +#include +#include + #include #include #include #include + torK::CrashHandlerWidget::CrashHandlerWidget() { TQBoxLayout *layout = new TQHBoxLayout( this, 18, 12 ); diff --git a/src/crypto.cpp b/src/crypto.cpp index 3fb4696..0e6836f 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -37,10 +37,25 @@ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. */ /* See Tor LICENSE for licensing information */ /* $Id: crypto.cpp,v 1.11 2008/07/31 19:56:26 hoganrobert Exp $ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + #include -#include -#include "crypto.h" -#include "../config.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef USE_OPENSSL #include @@ -59,18 +74,8 @@ #include #endif -#include -#include -#include -#include +#include "crypto.h" -#include -#include -#include -#include -#include -#include -#include /* random numbers */ diff --git a/src/crypto.h b/src/crypto.h index 6efa086..9d0f6a8 100644 --- a/src/crypto.h +++ b/src/crypto.h @@ -91,8 +91,8 @@ #define S2K_SPECIFIER_LEN 9 -#include -#include +#include +#include typedef struct crypto_digest_env_t crypto_digest_env_t; diff --git a/src/dndlistview.cpp b/src/dndlistview.cpp index 65fe852..a689fcf 100644 --- a/src/dndlistview.cpp +++ b/src/dndlistview.cpp @@ -18,17 +18,19 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "dndlistview.h" -#include "torkconfig.h" -#include "kdebug.h" -#include -#include +#include +#include +#include +#include + #include #include #include -#include -#include +#include "dndlistview.h" +#include "torkconfig.h" +#include "kdebug.h" + DndListView::DndListView( TQWidget * parent, const char * name, WFlags f ) : TQListView( parent, name, f ), oldCurrent( 0 ), diff --git a/src/dndlistview.h b/src/dndlistview.h index 06a92de..7305960 100644 --- a/src/dndlistview.h +++ b/src/dndlistview.h @@ -22,8 +22,8 @@ #ifndef _DNDLISTVIEW_H_ #define _DNDLISTVIEW_H_ -#include -#include +#include +#include class TQDragEnterEvent; class TQDragDropEvent; diff --git a/src/firewallsproxies.ui.h b/src/firewallsproxies.ui.h index 77f5ff8..b215b39 100644 --- a/src/firewallsproxies.ui.h +++ b/src/firewallsproxies.ui.h @@ -18,15 +18,18 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkconfig.h" +#include +#include + #include -#include -#include #include #include #include #include +#include "torkconfig.h" + + TDEHTMLPart *filelist; void FirewallsProxies::init() diff --git a/src/functions.cpp b/src/functions.cpp index cf0ec8d..f0d73aa 100644 --- a/src/functions.cpp +++ b/src/functions.cpp @@ -20,12 +20,15 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include + +#include +#include + #include #include #include + #include -#include #include #include "functions.h" diff --git a/src/functions.h b/src/functions.h index 84d0c87..8f0af72 100644 --- a/src/functions.h +++ b/src/functions.h @@ -22,12 +22,15 @@ #ifndef FUNCTIONS_H #define FUNCTIONS_H -#include -#include -#include -#include "constants.h" +#include +#include +#include + #include +#include "constants.h" + + TQString getFullLocation(const char *additionalPaths, const TQString &name); TQStringList findPrograms(const TQStringList &programList); diff --git a/src/hiddensrvs.ui.h b/src/hiddensrvs.ui.h index 9bc6647..b91078d 100644 --- a/src/hiddensrvs.ui.h +++ b/src/hiddensrvs.ui.h @@ -17,19 +17,24 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkconfig.h" -#include "tork.h" -#include "hidsrvwizard.h" + +#include +#include + #include #include -#include -#include #include #include #include #include + #include +#include "torkconfig.h" +#include "tork.h" +#include "hidsrvwizard.h" + + void MyHidden::init() { diff --git a/src/hidsrvwizard.ui b/src/hidsrvwizard.ui index 1644e1a..05bce3c 100644 --- a/src/hidsrvwizard.ui +++ b/src/hidsrvwizard.ui @@ -459,6 +459,9 @@ hidsrvwizard.ui.h + kurlrequester.h + kcombobox.h + kpushbutton.h createService(const TQString &,const TQString &) @@ -476,9 +479,4 @@ init() - - kurlrequester.h - kcombobox.h - kpushbutton.h - diff --git a/src/hidsrvwizard.ui.h b/src/hidsrvwizard.ui.h index 2cb1090..a9ab197 100644 --- a/src/hidsrvwizard.ui.h +++ b/src/hidsrvwizard.ui.h @@ -18,12 +18,16 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "tork.h" -#include "functions.h" -#include +#include + #include + #include +#include "tork.h" +#include "functions.h" + + bool local; TQString thttpd; diff --git a/src/hitwidget.cpp b/src/hitwidget.cpp index 9472cae..5ad364b 100644 --- a/src/hitwidget.cpp +++ b/src/hitwidget.cpp @@ -17,20 +17,23 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * ***************************************************************************/ -#include "hitwidget.h" -#include "kerrylabel.h" +#include +#include +#include +#include #include #include #include -#include #include #include #include -#include + /*#include */ -#include -#include + +#include "hitwidget.h" +#include "kerrylabel.h" + HitWidget::HitWidget(TQString uri, TQString mimetype, KWidgetListbox *parent, const char *name) : HitWidgetLayout(parent, name), m_uri(uri), m_mimetype(mimetype), m_collapsed(false), diff --git a/src/hitwidget.h b/src/hitwidget.h index 4c48072..b8a0e05 100644 --- a/src/hitwidget.h +++ b/src/hitwidget.h @@ -21,8 +21,10 @@ #define HITWIDGET_H #include + #include "kwidgetlistbox.h" + class TQScrollView; // class KonqFileTip; diff --git a/src/icons/CMakeLists.txt b/src/icons/CMakeLists.txt new file mode 100644 index 0000000..7d025a1 --- /dev/null +++ b/src/icons/CMakeLists.txt @@ -0,0 +1,3 @@ +##### icons hicolor + +tde_install_icons() diff --git a/src/kerrylabel.cpp b/src/kerrylabel.cpp index f758ffc..42d8b9c 100644 --- a/src/kerrylabel.cpp +++ b/src/kerrylabel.cpp @@ -18,10 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include "kerrylabel.h" -#include "hitwidget.h" +#include -#include #include #include #include @@ -31,6 +29,10 @@ #include */ +#include "kerrylabel.h" +#include "hitwidget.h" + + KerryLabel::KerryLabel (TQWidget* parent, const char* name) : KURLLabel (parent, name) { diff --git a/src/konqplugin/CMakeLists.txt b/src/konqplugin/CMakeLists.txt new file mode 100644 index 0000000..1da7c27 --- /dev/null +++ b/src/konqplugin/CMakeLists.txt @@ -0,0 +1,41 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### tdehtml_tork (kpart) + +tde_add_kpart( tdehtml_tork AUTOMOC + + SOURCES + tork_plug_in.cpp + LINK + tdehtml-shared + + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### icons + +tde_install_icons( ) + + +##### other data + +install( + FILES tork_plug_in.rc + DESTINATION ${DATA_INSTALL_DIR}/tdehtml/kpartplugins +) + + +tde_create_translated_desktop( tork_plug_in.desktop ) diff --git a/src/konqueror.ui b/src/konqueror.ui index 434a254..6c90dc8 100644 --- a/src/konqueror.ui +++ b/src/konqueror.ui @@ -424,6 +424,9 @@ konqueror.ui.h + kurlrequester.h + kcombobox.h + kpushbutton.h kcfg_TorkProxy_toggled( bool state ) @@ -432,9 +435,4 @@ init() - - kurlrequester.h - kcombobox.h - kpushbutton.h - diff --git a/src/kwidgetlistbox.cpp b/src/kwidgetlistbox.cpp index 23300de..16ef004 100644 --- a/src/kwidgetlistbox.cpp +++ b/src/kwidgetlistbox.cpp @@ -17,11 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * ***************************************************************************/ -#include "kwidgetlistbox.h" #include #include #include +#include "kwidgetlistbox.h" + + KWidgetListbox::KWidgetListbox(TQWidget *parent, const char *name) : TQTable(parent, name) { diff --git a/src/kwidgetlistbox.h b/src/kwidgetlistbox.h index 2568588..0603673 100644 --- a/src/kwidgetlistbox.h +++ b/src/kwidgetlistbox.h @@ -20,7 +20,7 @@ #ifndef KWIDGETLISTBOX_H #define KWIDGETLISTBOX_H -#include +#include typedef bool (*show_callback) (int index, TQWidget* widget, void* data); diff --git a/src/likeback.cpp b/src/likeback.cpp index 4517ec5..f0d11d0 100644 --- a/src/likeback.cpp +++ b/src/likeback.cpp @@ -18,6 +18,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -27,28 +40,14 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include #include -#include -#include -#include -#include #include -#include #include #include -#include -#include #include #include - #include #include diff --git a/src/likeback.h b/src/likeback.h index e319e8d..7961362 100644 --- a/src/likeback.h +++ b/src/likeback.h @@ -21,7 +21,7 @@ #ifndef LIKEBACK_H #define LIKEBACK_H -#include +#include class TDEConfig; class TDEAboutData; diff --git a/src/likeback_private.h b/src/likeback_private.h index 8f0e386..fc0aadc 100644 --- a/src/likeback_private.h +++ b/src/likeback_private.h @@ -21,8 +21,9 @@ #ifndef LIKEBACK_PRIVATE_H #define LIKEBACK_PRIVATE_H +#include + #include -#include #include "likeback.h" diff --git a/src/main.cpp b/src/main.cpp index 6889b4a..b207514 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,17 +19,18 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include +#include +#include +#include #include "tork.h" #include "crashhandler.h" #include "torkconfig.h" #include "functions.h" #include "newfirstrunwizard.h" -#include -#include -#include -#include -#include + static const char description[] = I18N_NOOP("TorK - An Anonymity Manager for the TDE Desktop.\n" diff --git a/src/maxmin.ui.h b/src/maxmin.ui.h index 1902c2e..35d0d00 100644 --- a/src/maxmin.ui.h +++ b/src/maxmin.ui.h @@ -18,11 +18,15 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkconfig.h" + +#include +#include + #include #include -#include -#include + +#include "torkconfig.h" + void MaxMin::init() { diff --git a/src/menu/CMakeLists.txt b/src/menu/CMakeLists.txt new file mode 100644 index 0000000..a0931ac --- /dev/null +++ b/src/menu/CMakeLists.txt @@ -0,0 +1,10 @@ +##### other data + +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} ) + +configure_file( ${PROJECT_NAME}.cmake ${PROJECT_NAME} @ONLY ) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} + DESTINATION ${SHARE_INSTALL_PREFIX}/menu +) diff --git a/src/menu/tork.cmake b/src/menu/tork.cmake new file mode 100644 index 0000000..cec26c8 --- /dev/null +++ b/src/menu/tork.cmake @@ -0,0 +1,4 @@ +?package(tork):needs="X11" section="Applications/Network/Web Browsing"\ + title="TorK"\ + description="An anonymity manager for TDE."\ + command="@BIN_INSTALL_DIR@/tork" icon="@SHARE_INSTALL_PREFIX@/pixmaps/tork.xpm" diff --git a/src/mixminion.ui.h b/src/mixminion.ui.h index e5e7b94..5b78339 100644 --- a/src/mixminion.ui.h +++ b/src/mixminion.ui.h @@ -18,15 +18,20 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + +#include +#include + #include #include #include #include -#include -#include -#include "torkconfig.h" + #include +#include "torkconfig.h" + + KProgressDialog* progressDialog; TQString output; diff --git a/src/newfirstrunwizard.ui b/src/newfirstrunwizard.ui index fdd61d7..1fbd2c9 100644 --- a/src/newfirstrunwizard.ui +++ b/src/newfirstrunwizard.ui @@ -2467,6 +2467,11 @@ I've configured your Privacy Proxy. Click next to continue. kprocio.h kprocio.h newfirstrunwizard.ui.h + kactivelabel.h + kurlrequester.h + klineedit.h + kpushbutton.h + kcombobox.h class KURL; @@ -2509,43 +2514,4 @@ I've configured your Privacy Proxy. Click next to continue. guessDataDir() - - kactivelabel.h - kactivelabel.h - kurlrequester.h - klineedit.h - kpushbutton.h - kactivelabel.h - kactivelabel.h - kurlrequester.h - klineedit.h - kpushbutton.h - kactivelabel.h - kactivelabel.h - kurlrequester.h - kcombobox.h - kpushbutton.h - kactivelabel.h - kactivelabel.h - kurlrequester.h - klineedit.h - kpushbutton.h - kactivelabel.h - kactivelabel.h - kurlrequester.h - klineedit.h - kpushbutton.h - kactivelabel.h - kactivelabel.h - kurlrequester.h - kcombobox.h - kpushbutton.h - kactivelabel.h - kactivelabel.h - kactivelabel.h - kactivelabel.h - kactivelabel.h - kactivelabel.h - kactivelabel.h - diff --git a/src/newfirstrunwizard.ui.h b/src/newfirstrunwizard.ui.h index a8fa9fc..db6b08e 100644 --- a/src/newfirstrunwizard.ui.h +++ b/src/newfirstrunwizard.ui.h @@ -18,29 +18,31 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkconfig.h" -#include "update.h" -#include "crypto.h" -#include "torclient.h" + +#include +#include +#include +#include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include #include #include -#include + +#include #include "functions.h" +#include "torkconfig.h" +#include "update.h" +#include "crypto.h" +#include "torclient.h" + TorClient* client; KProcIO *whichproc; diff --git a/src/newstreamosd.cpp b/src/newstreamosd.cpp index ebdb068..867d762 100644 --- a/src/newstreamosd.cpp +++ b/src/newstreamosd.cpp @@ -36,9 +36,19 @@ * robert@roberthogan.net * * * */ - + #include "newstreamosd.h" #include "torkview.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include //TQToolTip::palette() #include #include @@ -47,20 +57,10 @@ #include #include #include -#include -#include -#include - -#include -#include -#include -#include -#include #include #include #include -#include //TQToolTip::palette() StreamOSD::StreamOSD( torkView* parent, bool tortraffic, const char* name ) diff --git a/src/newstreamosd.h b/src/newstreamosd.h index e64bf0c..b2c6511 100644 --- a/src/newstreamosd.h +++ b/src/newstreamosd.h @@ -16,10 +16,10 @@ #ifndef _K3B_JOB_PROGRESS_OSD_H_ #define _K3B_JOB_PROGRESS_OSD_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "statgraph.h" #include "chart.h" diff --git a/src/overlayWidget.cpp b/src/overlayWidget.cpp index 40653b3..e88153c 100644 --- a/src/overlayWidget.cpp +++ b/src/overlayWidget.cpp @@ -18,11 +18,11 @@ * 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include + #include "overlayWidget.h" //#include "statusbar.h" -#include - namespace KDE { diff --git a/src/overlayWidget.h b/src/overlayWidget.h index 7640212..c9101eb 100644 --- a/src/overlayWidget.h +++ b/src/overlayWidget.h @@ -20,7 +20,7 @@ #ifndef KDEOVERLAYWIDGET_H #define KDEOVERLAYWIDGET_H -#include +#include namespace KDE { diff --git a/src/paranoia.ui.h b/src/paranoia.ui.h index 84f32d6..325f8de 100644 --- a/src/paranoia.ui.h +++ b/src/paranoia.ui.h @@ -19,13 +19,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkconfig.h" +#include +#include + #include -#include -#include #include #include +#include "torkconfig.h" + void FilterTable::init() { diff --git a/src/popupMessage.cpp b/src/popupMessage.cpp index adff918..37b9112 100644 --- a/src/popupMessage.cpp +++ b/src/popupMessage.cpp @@ -40,20 +40,21 @@ * 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "popupMessage.h" -#include "torkconfig.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include "popupMessage.h" +#include "torkconfig.h" + namespace KDE { diff --git a/src/popupMessage.h b/src/popupMessage.h index 3b2e8ee..12a6899 100644 --- a/src/popupMessage.h +++ b/src/popupMessage.h @@ -25,12 +25,13 @@ #ifndef KDE_POPUPMESSAGE_H #define KDE_POPUPMESSAGE_H +#include +#include +#include + #include "overlayWidget.h" //#include "functor.h" -#include -#include -#include namespace KDE { diff --git a/src/privoxytemplates/CMakeLists.txt b/src/privoxytemplates/CMakeLists.txt new file mode 100644 index 0000000..7c92982 --- /dev/null +++ b/src/privoxytemplates/CMakeLists.txt @@ -0,0 +1,18 @@ + +###### privoxy templates + +install( + FILES blocked cgi-error-404 cgi-error-bad-param cgi-error-disabled + cgi-error-file cgi-error-modified cgi-error-parse + cgi-style.css connect-failed default + edit-actions-add-url-form edit-actions-for-url + edit-actions-for-url-filter edit-actions-list + edit-actions-list-section edit-actions-list-url + edit-actions-remove-url-form edit-actions-url-form + mod-local-help mod-support-and-service mod-title + mod-unstable-warning no-such-domain show-request + show-status show-status-file show-url-info + show-version toggle toggle-mini untrusted + + DESTINATION ${DATA_INSTALL_DIR}/tork/privoxy/templates +) diff --git a/src/questions.h b/src/questions.h index 3b14b68..20d4e99 100644 --- a/src/questions.h +++ b/src/questions.h @@ -21,8 +21,10 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + +#include + #include "tork.h" -#include /** A variable allowed in the configuration file or on the command line. */ diff --git a/src/quickconfig.ui.h b/src/quickconfig.ui.h index acdcd22..dd8e942 100644 --- a/src/quickconfig.ui.h +++ b/src/quickconfig.ui.h @@ -19,17 +19,18 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include -#include "torkconfig.h" #include -#include -#include #include #include #include #include #include +#include "torkconfig.h" + void QuickConfig::init() { diff --git a/src/running.ui b/src/running.ui index 0e1aa69..5bfb93f 100644 --- a/src/running.ui +++ b/src/running.ui @@ -569,6 +569,9 @@ running.ui.h + kurlrequester.h + kcombobox.h + kpushbutton.h PushAdd_clicked() @@ -585,9 +588,4 @@ init() - - kurlrequester.h - kcombobox.h - kpushbutton.h - diff --git a/src/running.ui.h b/src/running.ui.h index ecf991c..98f20ee 100644 --- a/src/running.ui.h +++ b/src/running.ui.h @@ -19,13 +19,16 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -//dummy -#include "torkconfig.h" +#include +#include + #include -#include -#include #include +//dummy +#include "torkconfig.h" + + void Running::init() { diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt new file mode 100644 index 0000000..525a0fb --- /dev/null +++ b/src/scripts/CMakeLists.txt @@ -0,0 +1,4 @@ +install( + PROGRAMS usewithtor + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/src/server.ui.h b/src/server.ui.h index 4ef573e..9f83877 100644 --- a/src/server.ui.h +++ b/src/server.ui.h @@ -18,21 +18,29 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "tork.h" -#include "torkconfig.h" -#include "upnpmanager.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + #include #include -#include -#include #include -#ifndef EXTERNAL_GEOIP -# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" -#else +#ifdef EXTERNAL_GEOIP # include +#else +# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" #endif +#include "tork.h" +#include "torkconfig.h" +#include "upnpmanager.h" + + using namespace bt; using namespace kt; diff --git a/src/serverwizard.ui.h b/src/serverwizard.ui.h index a8fe5d9..ae45441 100644 --- a/src/serverwizard.ui.h +++ b/src/serverwizard.ui.h @@ -18,9 +18,12 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + +#include + #include #include -#include + #include "tork.h" #include "torkconfig.h" #include "upnpmanager.h" diff --git a/src/statgraph.cpp b/src/statgraph.cpp index 706f3a8..4a12b63 100644 --- a/src/statgraph.cpp +++ b/src/statgraph.cpp @@ -31,12 +31,14 @@ * * ***************************************************************************/ -#include "statgraph.h" +#include +#include -#include -#include #include +#include "statgraph.h" + + #define SOFT_STEP 3 const TQColor StatGraph::defaultBgColor = TQt::black; diff --git a/src/statgraph.h b/src/statgraph.h index 2c526f5..aeeb525 100644 --- a/src/statgraph.h +++ b/src/statgraph.h @@ -34,10 +34,10 @@ #ifndef STATGRAPH_H #define STATGRAPH_H -#include -#include -#include -#include +#include +#include +#include +#include /** * @author Diego 'Flameeyes' Pettenò diff --git a/src/testprivacyproxy.cpp b/src/testprivacyproxy.cpp index ef19b06..2fff495 100644 --- a/src/testprivacyproxy.cpp +++ b/src/testprivacyproxy.cpp @@ -19,25 +19,25 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include +#include +#include +#include -#include -#include -#include "testprivacyproxy.h" -#include "tork.h" -#include "torkconfig.h" - -#include +#include #include + #include -#include #include #include #include #include #include -#include -#include +#include "testprivacyproxy.h" +#include "tork.h" +#include "torkconfig.h" TestPrivoxy::TestPrivoxy( ) { diff --git a/src/testprivacyproxy.h b/src/testprivacyproxy.h index 1f512f2..9d88c94 100644 --- a/src/testprivacyproxy.h +++ b/src/testprivacyproxy.h @@ -29,11 +29,13 @@ #ifndef _TESTPRIVACYPROXY_H_ #define _TESTPRIVACYPROXY_H_ -#include -#include +#include +#include +#include + #include #include -#include + #include "torkconfig.h" diff --git a/src/tor_ioslave/CMakeLists.txt b/src/tor_ioslave/CMakeLists.txt new file mode 100644 index 0000000..922f0a1 --- /dev/null +++ b/src/tor_ioslave/CMakeLists.txt @@ -0,0 +1,34 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### tdeio_torioslave (kpart) + +tde_add_kpart( tdeio_torioslave AUTOMOC + + SOURCES + torioslave.cpp + LINK + tdecore-shared + tdeio-shared + + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### other data + +tde_create_translated_desktop( + SOURCE torioslave.protocol + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/src/tor_ioslave/torioslave.cpp b/src/tor_ioslave/torioslave.cpp index 1c1e875..c3fc8b0 100644 --- a/src/tor_ioslave/torioslave.cpp +++ b/src/tor_ioslave/torioslave.cpp @@ -19,18 +19,10 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -48,6 +40,14 @@ #include #include +#include +#include +#include +#include +#include +#include +#include + #include "torioslave.h" using namespace TDEIO; diff --git a/src/tor_ioslave/torioslave.h b/src/tor_ioslave/torioslave.h index 5668e3f..ab0efb3 100644 --- a/src/tor_ioslave/torioslave.h +++ b/src/tor_ioslave/torioslave.h @@ -22,8 +22,8 @@ #ifndef _tor_H_ #define _tor_H_ -#include -#include +#include +#include #include #include diff --git a/src/torclient.cpp b/src/torclient.cpp index 1652ed2..27c9477 100644 --- a/src/torclient.cpp +++ b/src/torclient.cpp @@ -19,18 +19,17 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include -#include -#include -#include -#include "torclient.h" -#include "tork.h" -#include "torkconfig.h" -#include "dndlistview.h" -#include "functions.h" +#include +#include +#include +#include +#include +#include -#include #include #include #include @@ -40,15 +39,20 @@ #include #include #include -#include -#include "crypto.h" -#ifndef EXTERNAL_GEOIP -# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" -#else +#ifdef EXTERNAL_GEOIP # include +#else +# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" #endif +#include "torclient.h" +#include "tork.h" +#include "torkconfig.h" +#include "dndlistview.h" +#include "functions.h" +#include "crypto.h" + /* Linux-specific includes */ #include #include @@ -827,10 +831,10 @@ void TorClient::parseServer(const TQString &info) GeoIP * gi = 0; if (geoip_db) -#ifndef EXTERNAL_GEOIP - gi = GeoIP_open(locate("data", "tork/geoip/GeoIP.dat").ascii(),0); -#else +#ifdef EXTERNAL_GEOIP gi = GeoIP_new(GEOIP_STANDARD); +#else + gi = GeoIP_open(locate("data", "tork/geoip/GeoIP.dat").ascii(),0); #endif if (gi){ diff --git a/src/torclient.h b/src/torclient.h index 01bd5d2..657dfdc 100644 --- a/src/torclient.h +++ b/src/torclient.h @@ -29,11 +29,13 @@ #ifndef _TORCLIENT_H_ #define _TORCLIENT_H_ -#include -#include +#include +#include +#include + #include #include -#include + #include "torkconfig.h" diff --git a/src/tork.cpp b/src/tork.cpp index fb17b0a..d53df07 100644 --- a/src/tork.cpp +++ b/src/tork.cpp @@ -19,14 +19,23 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -60,21 +69,14 @@ #include #include #include - -#include -#include -#include -#include -#include -#include #include #include #include -#ifndef EXTERNAL_GEOIP -# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" -#else +#ifdef EXTERNAL_GEOIP # include +#else +# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" #endif #include "tork.h" @@ -94,8 +96,6 @@ #include "version.h" #include "hiddensrvs.h" -#include "../config.h" - tork *tdemain = 0L; using namespace tk; @@ -2991,15 +2991,15 @@ void tork::startController() updateServerButton(); -#ifndef EXTERNAL_GEOIP - geoip_db = !locate("data", "tork/geoip/GeoIP.dat").isNull(); -#else +#ifdef EXTERNAL_GEOIP GeoIP * gi = 0; gi = GeoIP_new(GEOIP_STANDARD); if (gi) geoip_db = true; else geoip_db = false; +#else + geoip_db = !locate("data", "tork/geoip/GeoIP.dat").isNull(); #endif client->setGeoIPAvailable(geoip_db); diff --git a/src/tork.h b/src/tork.h index 722c618..fd9cf31 100644 --- a/src/tork.h +++ b/src/tork.h @@ -24,12 +24,17 @@ #define _TORK_H_ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif +#include + #include #include #include +#include +#include +#include #include "torkview.h" #include "torclient.h" @@ -39,12 +44,6 @@ #include "version.h" #include "dcoptork.h" #include "testprivacyproxy.h" - -#include -#include -#include -#include - #include "update.h" #include "trayicon.h" #include "upnpmanager.h" diff --git a/src/torkactivelabel.cpp b/src/torkactivelabel.cpp index 4fad736..f03dbf4 100644 --- a/src/torkactivelabel.cpp +++ b/src/torkactivelabel.cpp @@ -19,14 +19,17 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkactivelabel.h" -#include "kdebug.h" -#include -#include +#include +#include + #include #include #include +#include "torkactivelabel.h" +#include "kdebug.h" + + TorkActiveLabel::TorkActiveLabel( const TQString &text,TQWidget * parent, const char * name) : KActiveLabel( text,parent, name ), mousePressed( FALSE ) { diff --git a/src/torkapplet/CMakeLists.txt b/src/torkapplet/CMakeLists.txt new file mode 100644 index 0000000..b29088b --- /dev/null +++ b/src/torkapplet/CMakeLists.txt @@ -0,0 +1,35 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### kickermenu_tork (kpart) + +tde_add_kpart( kickermenu_tork AUTOMOC + + SOURCES + tork_mnu.cpp + ../functions.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### other data + +tde_create_translated_desktop( torkmenu.desktop + DESTINATION ${DATA_INSTALL_DIR}/kicker/menuext +) diff --git a/src/torkapplet/tork_mnu.cpp b/src/torkapplet/tork_mnu.cpp index fc5a45d..1c72496 100644 --- a/src/torkapplet/tork_mnu.cpp +++ b/src/torkapplet/tork_mnu.cpp @@ -19,15 +19,9 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include -#include -#include -#include - -#include -#include -#include +#include +#include +#include #include #include @@ -44,6 +38,12 @@ #include #include +#include +#include +#include +#include +#include + #include "tork_mnu.h" #include "../functions.h" diff --git a/src/torkapplet/tork_mnu.h b/src/torkapplet/tork_mnu.h index f92c534..2474ea5 100644 --- a/src/torkapplet/tork_mnu.h +++ b/src/torkapplet/tork_mnu.h @@ -23,7 +23,7 @@ #ifndef _tork_mnu_h_ #define _tork_mnu_h_ -#include +#include #include #include diff --git a/src/torkview.cpp b/src/torkview.cpp index c7a0d50..e03fe92 100644 --- a/src/torkview.cpp +++ b/src/torkview.cpp @@ -19,14 +19,40 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include +/* Linux-specific includes */ +#include +#include + #include "torkview.h" #include "tork.h" #include "torclient.h" -#include -#include -#include #include "dndlistview.h" #include "portsandicons.h" #include "torkconfig.h" @@ -34,40 +60,16 @@ #include "functions.h" #include "mixminion.h" #include "crypto.h" - #include "hitwidget.h" #include "kwidgetlistbox.h" #include "kerrylabel.h" - -#ifndef EXTERNAL_GEOIP -# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" -#else +#ifdef EXTERNAL_GEOIP # include +#else +# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" #endif -#include "kdebug.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -/* Linux-specific includes */ -#include -#include -#include "../config.h" - using namespace tk; @@ -80,15 +82,15 @@ torkView::torkView(TQWidget *parent) : torkview_base(parent), m_pop(0L), m_tormon(TorkConfig::showTorMon()), torbtx(0), torbrx(0) { -#ifndef EXTERNAL_GEOIP - geoip_db = !locate("data", "tork/geoip/GeoIP.dat").isNull(); -#else +#ifdef EXTERNAL_GEOIP GeoIP * gi = 0; gi = GeoIP_new(GEOIP_STANDARD); if (gi) geoip_db = true; else geoip_db = false; +#else + geoip_db = !locate("data", "tork/geoip/GeoIP.dat").isNull(); #endif greenonion << "green" << "up" << "built" << "good" << "connected" << "succeeded"; @@ -1324,10 +1326,10 @@ void torkView::serverStatusUpdated(const TQString &ip,const TQString &fp, int country_id = 0; GeoIP * gi = 0; if (geoip_db) -#ifndef EXTERNAL_GEOIP - gi = GeoIP_open(locate("data", "tork/geoip/GeoIP.dat").ascii(),0); -#else +#ifdef EXTERNAL_GEOIP gi = GeoIP_new(GEOIP_STANDARD); +#else + gi = GeoIP_open(locate("data", "tork/geoip/GeoIP.dat").ascii(),0); #endif if (gi){ diff --git a/src/torkview.h b/src/torkview.h index 19ae410..3f015ce 100644 --- a/src/torkview.h +++ b/src/torkview.h @@ -23,20 +23,21 @@ #ifndef _TORKVIEW_H_ #define _TORKVIEW_H_ -#include +#include +#include +#include +#include +#include +#include + +#include "newstreamosd.h" #include "torkview_base.h" #include "hitwidget.h" #include "kwidgetlistbox.h" #include "kerrylabel.h" #include "dndlistview.h" -#include -#include -#include -#include -#include -#include "newstreamosd.h" class TQPainter; class KURL; diff --git a/src/torkview_base.ui b/src/torkview_base.ui index c2905f5..f21c8fa 100644 --- a/src/torkview_base.ui +++ b/src/torkview_base.ui @@ -927,6 +927,8 @@ torkview_base.ui.h + kwidgetlistbox.h + dndlistview.h closeStream(const TQString &) @@ -995,11 +997,4 @@ addExitNodes( bool perm, bool strict ) - - kwidgetlistbox.h - dndlistview.h - dndlistview.h - dndlistview.h - dndlistview.h - diff --git a/src/torkview_base.ui.h b/src/torkview_base.ui.h index 4cabe40..509bdce 100644 --- a/src/torkview_base.ui.h +++ b/src/torkview_base.ui.h @@ -19,14 +19,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include + #include "torkconfig.h" #include "tork.h" #include "crypto.h" diff --git a/src/torservers.ui.h b/src/torservers.ui.h index aca99b1..ff20704 100644 --- a/src/torservers.ui.h +++ b/src/torservers.ui.h @@ -18,18 +18,25 @@ * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "torkconfig.h" -#include "crypto.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + #include -#include -#include #include #include -#ifndef EXTERNAL_GEOIP -# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" -#else +#include "torkconfig.h" +#include "crypto.h" + +#ifdef EXTERNAL_GEOIP # include +#else +# include "GeoIP-1.4.0/libGeoIP/GeoIP.h" #endif typedef TQMap codemap; diff --git a/src/trayhoverpopup.cpp b/src/trayhoverpopup.cpp index 4e8e8bb..01fe070 100644 --- a/src/trayhoverpopup.cpp +++ b/src/trayhoverpopup.cpp @@ -37,12 +37,15 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + #include + #include "trayhoverpopup.h" diff --git a/src/trayhoverpopup.h b/src/trayhoverpopup.h index 913b778..4e4c22b 100644 --- a/src/trayhoverpopup.h +++ b/src/trayhoverpopup.h @@ -40,7 +40,8 @@ #ifndef TRAYHOVERPOPUP_H #define TRAYHOVERPOPUP_H -#include +#include + #include class TQLabel; diff --git a/src/trayicon.cpp b/src/trayicon.cpp index 20fd2a9..b791671 100644 --- a/src/trayicon.cpp +++ b/src/trayicon.cpp @@ -41,15 +41,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include + #include #include #include #include #include -#include "trayicon.h" -#include #include -#include + +#include "trayicon.h" #include "trayhoverpopup.h" #include "torkconfig.h" diff --git a/src/trayicon.h b/src/trayicon.h index 29d5204..41258fc 100644 --- a/src/trayicon.h +++ b/src/trayicon.h @@ -41,10 +41,10 @@ #ifndef TRAYICON_H #define TRAYICON_H +#include #include #include -#include #include #include diff --git a/src/update.cpp b/src/update.cpp index 87e5935..359b0c9 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -19,21 +19,18 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "update.h" +#include +#include +#include +#include #include - #include #include - - #include - -#include #include #include #include -#include #include #include #include @@ -47,11 +44,11 @@ #include #include -#include -#include +#include + #include "version.h" +#include "update.h" -#include const char *mirrors[] = { "heanet", diff --git a/src/update.h b/src/update.h index c23c978..dd027dc 100644 --- a/src/update.h +++ b/src/update.h @@ -24,7 +24,7 @@ #define _UPDATE_H_ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif #include diff --git a/src/upnp/CMakeLists.txt b/src/upnp/CMakeLists.txt new file mode 100644 index 0000000..538f013 --- /dev/null +++ b/src/upnp/CMakeLists.txt @@ -0,0 +1,28 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### ktupnp (static) + +tde_add_library( ktupnp STATIC_PIC AUTOMOC + + SOURCES + soap.cpp + upnpdescriptionparser.cpp + upnpmcastsocket.cpp + upnprouter.cpp + portlist.cpp + httprequest.cpp + exitoperation.cpp + forwardportlist.cpp +) diff --git a/src/upnp/exitoperation.cpp b/src/upnp/exitoperation.cpp index 6df1224..9a996c0 100644 --- a/src/upnp/exitoperation.cpp +++ b/src/upnp/exitoperation.cpp @@ -17,6 +17,7 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + #include "exitoperation.h" namespace kt diff --git a/src/upnp/exitoperation.h b/src/upnp/exitoperation.h index d969c6c..3afda7a 100644 --- a/src/upnp/exitoperation.h +++ b/src/upnp/exitoperation.h @@ -20,7 +20,8 @@ #ifndef KTEXITOPERATION_H #define KTEXITOPERATION_H -#include +#include + #include namespace kt diff --git a/src/upnp/forwardportlist.cpp b/src/upnp/forwardportlist.cpp index 906bde3..9714725 100644 --- a/src/upnp/forwardportlist.cpp +++ b/src/upnp/forwardportlist.cpp @@ -17,8 +17,11 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "forwardportlist.h" + #include + +#include "forwardportlist.h" + namespace net { ForwardPort::ForwardPort() : extnumber(0),intnumber(0),proto(TCP),forward(false) diff --git a/src/upnp/forwardportlist.h b/src/upnp/forwardportlist.h index 5f8f9f7..d2d3c0c 100644 --- a/src/upnp/forwardportlist.h +++ b/src/upnp/forwardportlist.h @@ -20,7 +20,8 @@ #ifndef FORWARDPORTLIST_H #define FORWARDPORTLIST_H -#include +#include + #include "../constants.h" #include "portlist.h" diff --git a/src/upnp/httprequest.cpp b/src/upnp/httprequest.cpp index bb411ca..a6c3e71 100644 --- a/src/upnp/httprequest.cpp +++ b/src/upnp/httprequest.cpp @@ -15,14 +15,16 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include "httprequest.h" -#include "../functions.h" + +#include + #include #include +#include "httprequest.h" +#include "../functions.h" namespace bt { diff --git a/src/upnp/httprequest.h b/src/upnp/httprequest.h index 8c4496b..47428cd 100644 --- a/src/upnp/httprequest.h +++ b/src/upnp/httprequest.h @@ -20,9 +20,11 @@ #ifndef BTHTTPREQUEST_H #define BTHTTPREQUEST_H -#include +#include + #include #include + #include "exitoperation.h" #include "../constants.h" diff --git a/src/upnp/portlist.cpp b/src/upnp/portlist.cpp index 56076ed..3ce5ac1 100644 --- a/src/upnp/portlist.cpp +++ b/src/upnp/portlist.cpp @@ -17,6 +17,7 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + #include "portlist.h" namespace net diff --git a/src/upnp/portlist.h b/src/upnp/portlist.h index 378127e..b8036e7 100644 --- a/src/upnp/portlist.h +++ b/src/upnp/portlist.h @@ -20,7 +20,8 @@ #ifndef NETPORTLIST_H #define NETPORTLIST_H -#include +#include + #include "../constants.h" namespace net diff --git a/src/upnp/soap.cpp b/src/upnp/soap.cpp index c44ab1e..e6d2528 100644 --- a/src/upnp/soap.cpp +++ b/src/upnp/soap.cpp @@ -15,8 +15,9 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + #include "soap.h" namespace kt diff --git a/src/upnp/soap.h b/src/upnp/soap.h index cb766f0..6632342 100644 --- a/src/upnp/soap.h +++ b/src/upnp/soap.h @@ -20,8 +20,8 @@ #ifndef KTSOAP_H #define KTSOAP_H -#include -#include +#include +#include namespace kt { diff --git a/src/upnp/upnpdescriptionparser.cpp b/src/upnp/upnpdescriptionparser.cpp index 7b40db7..286e614 100644 --- a/src/upnp/upnpdescriptionparser.cpp +++ b/src/upnp/upnpdescriptionparser.cpp @@ -15,16 +15,20 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include -// #include + +#include +#include + #include -// #include + #include "upnprouter.h" #include "upnpdescriptionparser.h" +// #include +// #include + using namespace bt; namespace kt diff --git a/src/upnp/upnpmcastsocket.cpp b/src/upnp/upnpmcastsocket.cpp index ff87432..56df8fa 100644 --- a/src/upnp/upnpmcastsocket.cpp +++ b/src/upnp/upnpmcastsocket.cpp @@ -18,8 +18,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include +#include + +#include +#include #include #include + #include #include #include @@ -27,16 +34,11 @@ #include #include #include -#include -#include -#include -/*#include -#include */ -#include -#include -#include "upnpmcastsocket.h" +#include "upnpmcastsocket.h" +/*#include +#include */ using namespace KNetwork; using namespace bt; diff --git a/src/upnp/upnpmcastsocket.h b/src/upnp/upnpmcastsocket.h index 23007fe..c7b7a3c 100644 --- a/src/upnp/upnpmcastsocket.h +++ b/src/upnp/upnpmcastsocket.h @@ -21,6 +21,7 @@ #define KTUPNPMCASTSOCKET_H #include + #include "../constants.h" #include "../functions.h" #include "upnprouter.h" diff --git a/src/upnp/upnprouter.cpp b/src/upnp/upnprouter.cpp index e5764b5..242dbe6 100644 --- a/src/upnp/upnprouter.cpp +++ b/src/upnp/upnprouter.cpp @@ -15,24 +15,28 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include + +#include +#include +#include + #include #include #include #include -#include #include #include + +#include +#include + #include "httprequest.h" #include "upnprouter.h" #include "upnpdescriptionparser.h" #include "soap.h" #include "../functions.h" -#include -#include -#include using namespace bt; using namespace net; diff --git a/src/upnp/upnprouter.h b/src/upnp/upnprouter.h index d0590b9..73463c9 100644 --- a/src/upnp/upnprouter.h +++ b/src/upnp/upnprouter.h @@ -20,13 +20,15 @@ #ifndef KTUPNPROUTER_H #define KTUPNPROUTER_H -#include -#include -#include -#include "exitoperation.h" +#include +#include +#include + #include -#include #include +#include + +#include "exitoperation.h" #include "portlist.h" #include "forwardportlist.h" diff --git a/src/upnpmanager.cpp b/src/upnpmanager.cpp index 77a7a46..8c95f15 100644 --- a/src/upnpmanager.cpp +++ b/src/upnpmanager.cpp @@ -23,6 +23,7 @@ ***************************************************************************/ #include + #include "upnpmanager.h" #include "kdebug.h" diff --git a/src/upnpmanager.h b/src/upnpmanager.h index 29dc319..9cd245d 100644 --- a/src/upnpmanager.h +++ b/src/upnpmanager.h @@ -25,8 +25,9 @@ #ifndef UPNPMANAGER_H #define UPNPMANAGER_H -#include -#include +#include +#include + #include "upnp/upnprouter.h" #include "upnp/upnpdescriptionparser.h" #include "upnp/upnpmcastsocket.h" diff --git a/src/usability.ui.h b/src/usability.ui.h index dbf59e1..97d8d75 100644 --- a/src/usability.ui.h +++ b/src/usability.ui.h @@ -19,14 +19,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include +#include -#include "torkconfig.h" -#include "portsandnames.h" #include -#include -#include #include +#include "torkconfig.h" +#include "portsandnames.h" void Usability::init() { diff --git a/src/warnings.h b/src/warnings.h index e80d5d7..0eb2e3a 100644 --- a/src/warnings.h +++ b/src/warnings.h @@ -19,8 +19,10 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include + #include "tork.h" -#include + typedef struct message_t { const char *logmessage; /**< The full keyword (case insensitive). */ -- cgit v1.2.1