Browse Source

conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/2/head
gregory guy 2 years ago
parent
commit
ededcc28b4
No known key found for this signature in database GPG Key ID: 6EFE0EF249A874C0
40 changed files with 363 additions and 6 deletions
  1. +77
    -0
      CMakeLists.txt
  2. +45
    -0
      ConfigureChecks.cmake
  3. +8
    -0
      config.h.cmake
  4. +1
    -0
      doc/CMakeLists.txt
  5. +1
    -0
      doc/en/CMakeLists.txt
  6. +4
    -0
      doc/en/HTML/CMakeLists.txt
  7. +1
    -1
      doc/en/HTML/index.html
  8. +5
    -0
      doc/man/CMakeLists.txt
  9. +87
    -0
      doc/man/krename.1
  10. +92
    -0
      krename/CMakeLists.txt
  11. +2
    -0
      krename/ProgressDialog.cpp
  12. +1
    -0
      krename/commandplugin.cpp
  13. +1
    -0
      krename/confdialog.cpp
  14. +2
    -0
      krename/coorddialog.cpp
  15. +2
    -0
      krename/dateplugin.cpp
  16. +1
    -1
      krename/datetime.cpp
  17. +2
    -0
      krename/encodingplugin.cpp
  18. +1
    -0
      krename/fileoperation.cpp
  19. +2
    -0
      krename/fileplugin.cpp
  20. +1
    -0
      krename/firststartdlg.cpp
  21. +1
    -0
      krename/helpdialog.cpp
  22. +2
    -0
      krename/kmyhistorycombo.cpp
  23. +1
    -0
      krename/kmylistbox.cpp
  24. +1
    -0
      krename/kmylistview.cpp
  25. +2
    -0
      krename/krenameimpl.cpp
  26. +1
    -0
      krename/mydirplugin.cpp
  27. +1
    -0
      krename/myinputdialog.cpp
  28. +2
    -0
      krename/numberdialog.cpp
  29. +1
    -1
      krename/permission.cpp
  30. +1
    -1
      krename/pictureplugin.cpp
  31. +2
    -0
      krename/plugin.cpp
  32. +2
    -0
      krename/pluginloader.cpp
  33. +2
    -0
      krename/replacedialog.cpp
  34. +2
    -0
      krename/tabs.cpp
  35. +3
    -1
      krename/translitplugin.cpp
  36. +1
    -1
      krename/undodialog.cpp
  37. +1
    -0
      krename/wizard.cpp
  38. +1
    -0
      po/CMakeLists.txt
  39. +0
    -0
      po/zh_CN.po
  40. +0
    -0
      po/zh_TW.po

+ 77
- 0
CMakeLists.txt View File

@ -0,0 +1,77 @@
############################################
# #
# Improvements and feedbacks are welcome #
# #
# This file is released under GPL >= 3 #
# #
############################################
cmake_minimum_required( VERSION 2.8 )
#### general package setup
project( krename )
set( VERSION R14.1.0 )
#### include essential cmake modules
include( FindPkgConfig )
include( CheckFunctionExists )
include( CheckIncludeFile )
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} )
##### user requested modules
option( BUILD_ALL "Build all" ON )
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 "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### directories
add_subdirectory( ${PROJECT_NAME} )
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 )

+ 45
- 0
ConfigureChecks.cmake View File

@ -0,0 +1,45 @@
###########################################
# #
# 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)
##### check for gcc visibility support
if( WITH_GCC_VISIBILITY )
if( NOT UNIX )
tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
endif( NOT UNIX )
set( __KDE_HAVE_GCC_VISIBILITY 1 )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
endif( WITH_GCC_VISIBILITY )
##### gettext
if( BUILD_TRANSLATIONS )
include( FindGettext )
if( GETTEXT_FOUND )
set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE}
CACHE FILEPATH "path to msgfmt executable" )
endif( GETTEXT_FOUND )
if( NOT MSGFMT_EXECUTABLE )
tde_message_fatal( "msgfmt is required but was not found on your system." )
endif( NOT MSGFMT_EXECUTABLE )
endif( BUILD_TRANSLATIONS )

+ 8
- 0
config.h.cmake View File

@ -0,0 +1,8 @@
#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@

+ 1
- 0
doc/CMakeLists.txt View File

@ -0,0 +1 @@
tde_auto_add_subdirectories( )

+ 1
- 0
doc/en/CMakeLists.txt View File

@ -0,0 +1 @@
add_subdirectory( HTML )

+ 4
- 0
doc/en/HTML/CMakeLists.txt View File

@ -0,0 +1,4 @@
install(
FILES index.html
DESTINATION ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}
)

+ 1
- 1
doc/en/HTML/index.html View File

@ -43,7 +43,7 @@
<div>
<p><h3>Introduction</h3></p>
<p>
KRename is a batch renamer or a mass renamer, how it is called by a few people, for KDE. A batch renamer takes a list of files and renames them all at once using a given set of expressions. KRename has lot's of features which makes the renaming easier.
KRename is a batch renamer or a mass renamer, how it is called by a few people, for TDE. A batch renamer takes a list of files and renames them all at once using a given set of expressions. KRename has lot's of features which makes the renaming easier.
</p>
<p>
First of all there is the powerful GUI with two GUI modes: One mode (called wizard-mode) is for first time KRename users witch only want to do simple tasks and the other mode (called tabbedmode) shows the full power of KRename and allows you to do allmost everything with your filenames. But there is much more than only the GUI. KRename supports all of the great KDE technologies, like TDEIO-Slaves, which allow to rename files almost everywhere (on ftp:// servers, over fish:// or on smb:// shares), DCOP, giving you easy scripting access to KRename, and the powerful KDE file plugins. Thanks to the file plugins of KDE, KRename can access information, such as the interpret of a mp3 or ogg file or the creation date of a jpeg image.


+ 5
- 0
doc/man/CMakeLists.txt View File

@ -0,0 +1,5 @@
INSTALL(
FILES ${PROJECT_NAME}.1
DESTINATION ${MAN_INSTALL_DIR}/man1
COMPONENT doc
)

+ 87
- 0
doc/man/krename.1 View File

@ -0,0 +1,87 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
.TH QT: "1" "September 2005" "Qt: 3.3.5" "User Commands"
.SH NAME
Qt: \- manual page for Qt: 3.3.5
.SH SYNOPSIS
.B krename
[\fIQt-options\fR] [\fITDE-options\fR] [\fIfile\fR]
.SH DESCRIPTION
KRename is a batch file renamer which can rename a
list of files based on a set of expressions.
.PP
If you like KRename you may want to support it.
Testing, bug fixes and feature request are as welcome
as financial support (everybody needs money ;)
See help files for details.
.SS "Generic options:"
.TP
\fB\-\-help\fR
Show help about options
.TP
\fB\-\-help\-qt\fR
Show Qt specific options
.TP
\fB\-\-help\-tde\fR
Show TDE specific options
.TP
\fB\-\-help\-all\fR
Show all options
.TP
\fB\-\-author\fR
Show author information
.TP
\fB\-v\fR, \fB\-\-version\fR
Show version information
.TP
\fB\-\-license\fR
Show license information
.TP
\fB\-\-\fR
End of options
.SS "Arguments:"
.TP
file
file will be added to the list of files for renaming
.SH OPTIONS
.TP
\fB\-r\fR +[dir]
add directory recursively
.TP
\fB\-\-template\fR +
set a template
.TP
\fB\-\-extension\fR +
set a template for the file extension
.TP
\fB\-\-use\-plugin\fR +
enable a plugin for use
.TP
\fB\-\-copy\fR +[dir]
copy files to directory
.TP
\fB\-\-move\fR +[dir]
move files to directory
.TP
\fB\-\-profile\fR +[profile]
load the profile named [profile] on startup
.TP
\fB\-\-start\fR
start renaming immediately
.TP
\fB\-\-nopreview\fR
create no realtime preview
.PP
KDE: 3.4.2
KRename: 3.0.8
.SH "SEE ALSO"
The full documentation for
.B Qt:
is maintained as a Texinfo manual. If the
.B info
and
.B Qt:
programs are properly installed at your site, the command
.IP
.B info Qt:
.PP
should give you access to the complete manual.

+ 92
- 0
krename/CMakeLists.txt View File

@ -0,0 +1,92 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### krename (executable)
tde_add_executable( ${PROJECT_NAME} AUTOMOC
SOURCES
guimodeselector.cpp
firststartdlg.cpp
tabs.cpp
krenameimpl.cpp
numberdialog.cpp
coorddialog.cpp
commandplugin.cpp
helpdialog.cpp
pictureplugin.cpp
mydirplugin.cpp
datetime.cpp
permission.cpp
fileplugin.cpp
undodialog.cpp
myinputdialog.cpp
kmylistview.cpp
wizard.cpp
replacedialog.cpp
pluginloader.cpp
plugin.cpp
kmylistbox.cpp
kmyhistorycombo.cpp
fileoperation.cpp
confdialog.cpp
batchrenamer.cpp
ProgressDialog.cpp
main.cpp
krecursivelister.cpp
dsdirselectdialog.cpp
krenamedcop.skel
dateplugin.cpp
encodingplugin.cpp
profiledlg.cpp
threadedlister.cpp
translitplugin.cpp
LINK
tdecore-shared
tdeui-shared
tdeio-shared
DESTINATION ${BIN_INSTALL_DIR}
)
##### icons
tde_install_icons( ${PROJECT_NAME} )
##### other data
install(
FILES ${PROJECT_NAME}.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR}
)
install(
FILES
krenameservicemenu.desktop
krename_dir.desktop
DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
)
install(
FILES
logo.png
krename_system_default_tabbed.xml
krename_system_default_wizard.xml
DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
)

+ 2
- 0
krename/ProgressDialog.cpp View File

@ -350,3 +350,5 @@ void ProgressDialog::slotTimer()
{
kapp->processEvents( 0 );
}
#include "ProgressDialog.moc"

+ 1
- 0
krename/commandplugin.cpp View File

@ -189,3 +189,4 @@ const TQPixmap CommandPlugin::getIcon() const
return kapp->iconLoader()->loadIcon( "konsole", TDEIcon::Small );
}
#include "commandplugin.moc"

+ 1
- 0
krename/confdialog.cpp View File

@ -107,3 +107,4 @@ void ConfDialog::defaults()
spinSize->setValue( 80 );
}
#include "confdialog.moc"

+ 2
- 0
krename/coorddialog.cpp View File

@ -140,3 +140,5 @@ TQString CoordDialog::coords()
m_inversion = checkInvert->isChecked();
return m_command;
}
#include "coorddialog.moc"

+ 2
- 0
krename/dateplugin.cpp View File

@ -151,3 +151,5 @@ void DatePlugin::addHelp( HelpDialogData* data )
data->add( getName(), &list, getIcon() );
}
#include "dateplugin.moc"

+ 1
- 1
krename/datetime.cpp View File

@ -234,5 +234,5 @@ void MyDatePlugin::changeDT()
kDate->setDate( TQDate::currentDate() );
}
#include "datetime.moc"

+ 2
- 0
krename/encodingplugin.cpp View File

@ -142,3 +142,5 @@ void EncodingPlugin::setLocale( KComboBox* combo )
break;
}
}
#include "encodingplugin.moc"

+ 1
- 0
krename/fileoperation.cpp View File

@ -110,3 +110,4 @@ void FileOperation::slotResult( TDEIO::Job * job )
kapp->eventLoop()->exitLoop();
}
#include "fileoperation.moc"

+ 2
- 0
krename/fileplugin.cpp View File

@ -211,3 +211,5 @@ void FilePlugin::clearCache()
{
cache.clear();
}
#include "fileplugin.moc"

+ 1
- 0
krename/firststartdlg.cpp View File

@ -31,3 +31,4 @@ FirstStartDlg::~FirstStartDlg()
{
}
#include "firststartdlg.moc"

+ 1
- 0
krename/helpdialog.cpp View File

@ -149,3 +149,4 @@ void HelpDialog::updateHeadline()
comboHeadline->insertItem( ic[it.key()], it.key() );
}
#include "helpdialog.moc"

+ 2
- 0
krename/kmyhistorycombo.cpp View File

@ -165,3 +165,5 @@ void KMyHistoryCombo::slotInsertKRenameCommand( int id )
if( !t.isEmpty() )
this->lineEdit()->insert( t );
}
#include "kmyhistorycombo.moc"

+ 1
- 0
krename/kmylistbox.cpp View File

@ -837,3 +837,4 @@ TQString KMyListBoxItem::text() const
bool KMyListBoxItem::m_preview = false;
bool KMyListBoxItem::m_name = false;
#include "kmylistbox.moc"

+ 1
- 0
krename/kmylistview.cpp View File

@ -175,3 +175,4 @@ void KMyListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg,
_cg.setColor( TQColorGroup::Text, c );
}
#include "kmylistview.moc"

+ 2
- 0
krename/krenameimpl.cpp View File

@ -1834,3 +1834,5 @@ void KRenameImpl::slotEasy4()
{
getHelpDialogString( comboCustomExtension->lineEdit() );
}
#include "krenameimpl.moc"

+ 1
- 0
krename/mydirplugin.cpp View File

@ -167,3 +167,4 @@ void MyDirPlugin::chooseDir()
outputdir->setText( s );
}
#include "mydirplugin.moc"

+ 1
- 0
krename/myinputdialog.cpp View File

@ -107,3 +107,4 @@ void MyInputDialog::slotFilename()
text->setText( m_oldfilename );
}
#include "myinputdialog.moc"

+ 2
- 0
krename/numberdialog.cpp View File

@ -169,3 +169,5 @@ void NumberDialog::sort()
}
}
}
#include "numberdialog.moc"

+ 1
- 1
krename/permission.cpp View File

@ -326,4 +326,4 @@ const TQPixmap MyPermPlugin::getIcon() const
return kapp->iconLoader()->loadIcon( "clanbomber", TDEIcon::Small );
}
#include "permission.moc"

+ 1
- 1
krename/pictureplugin.cpp View File

@ -95,4 +95,4 @@ TQString PicturePlugin::processFile( BatchRenamer* b, int i, TQString token, int
return ret;
}
#include "pictureplugin.moc"

+ 2
- 0
krename/plugin.cpp View File

@ -60,3 +60,5 @@ void Plugin::clearCache()
{
// do nothing...
}
#include "plugin.moc"

+ 2
- 0
krename/pluginloader.cpp View File

@ -177,3 +177,5 @@ void PluginLoader::loadFilePlugins()
m_file = true;
}
#include "pluginloader.moc"

+ 2
- 0
krename/replacedialog.cpp View File

@ -255,3 +255,5 @@ void ReplaceDialog::slotEdit()
enableControls();
}
#include "replacedialog.moc"

+ 2
- 0
krename/tabs.cpp View File

@ -118,3 +118,5 @@ void tabs::keyPressEvent( TQKeyEvent *e )
else
e->ignore();
}
#include "tabs.moc"

+ 3
- 1
krename/translitplugin.cpp View File

@ -10,7 +10,7 @@
//
//
#include "translitplugin.h"
#include "translitplugin.moc"
const TQString TranslitPlugin::m_strUtf8[] = {"а","б","в","г","д","е","ё","ж","з","и",
"й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь",
@ -104,3 +104,5 @@ TranslitPlugin::TranslitPlugin() {
m_mapFromUTF8[src] = dst;
}
}
#include "translitplugin.moc"

+ 1
- 1
krename/undodialog.cpp View File

@ -131,6 +131,6 @@ void UndoDialog::setUndoScript( const TQString & filename )
scriptname->setURL( filename );
}
#include "undodialog.moc"

+ 1
- 0
krename/wizard.cpp View File

@ -104,3 +104,4 @@ void wizard::accept()
/** do nothing */
}
#include "wizard.moc"

+ 1
- 0
po/CMakeLists.txt View File

@ -0,0 +1 @@
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )

po/zh_CN.GB2312.po → po/zh_CN.po View File


po/zh_TW.Big5.po → po/zh_TW.po View File


Loading…
Cancel
Save