conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
(cherry picked from commit ededcc28b4)
r14.0.x
gregory guy 5 years ago committed by Slávek Banko
parent 062b196111
commit 4c277df8cb
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -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 -UQT_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 )

@ -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 )

@ -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@

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

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

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

@ -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.

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

@ -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.

@ -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}
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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"

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

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

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