summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-06-13 16:55:00 +0200
committergregory guy <gregory-tde@laposte.net>2020-06-21 15:36:20 +0200
commit0b2288da16894d45e95caf5c0f1f5cba3f17c2dd (patch)
tree7dc6943b6af7edd7500456aaa813d79c8f09c88b
parent88aa431c9d79bad942de04f4b28954b428079fd1 (diff)
downloadcodeine-0b2288da16894d45e95caf5c0f1f5cba3f17c2dd.tar.gz
codeine-0b2288da16894d45e95caf5c0f1f5cba3f17c2dd.zip
Conversion to the cmake building system.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
-rw-r--r--CMakeLists.txt79
-rw-r--r--ConfigureChecks.cmake49
-rw-r--r--FAQ (renamed from src/FAQ)0
-rw-r--r--INSTALL29
-rw-r--r--PKGBUILD17
-rw-r--r--README48
-rw-r--r--SConstruct168
-rw-r--r--TODO (renamed from src/TODO)0
-rw-r--r--config.h.cmake12
-rwxr-xr-xconfigure87
-rw-r--r--doc/CMakeLists.txt1
-rw-r--r--doc/en/CMakeLists.txt1
-rw-r--r--doc/en/index.docbook437
-rw-r--r--doc/en/main.pngbin0 -> 12016 bytes
-rw-r--r--doc/man/CMakeLists.txt5
-rw-r--r--doc/man/codeine.194
-rw-r--r--misc/CMakeLists.txt31
-rwxr-xr-xpo/messages.sh60
-rw-r--r--scons/codeine.py101
-rw-r--r--scons/generic.py95
-rw-r--r--scons/kde.py771
-rw-r--r--scons/scons-mini.tar.bz2bin58214 -> 0 bytes
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/SConscript21
-rw-r--r--src/app/CMakeLists.txt54
-rw-r--r--src/app/SConscript59
-rw-r--r--src/app/actions.cpp6
-rw-r--r--src/app/adjustSizeButton.cpp10
-rw-r--r--src/app/adjustSizeButton.h2
-rw-r--r--src/app/analyzer.cpp12
-rw-r--r--src/app/analyzer.h6
-rw-r--r--src/app/captureFrame.cpp18
-rw-r--r--src/app/codeineConfig.h (renamed from src/app/config.h)0
-rw-r--r--src/app/fullScreenAction.cpp2
-rw-r--r--src/app/insertAspectRatioMenuItems.cpp2
-rw-r--r--src/app/main.cpp6
-rw-r--r--src/app/mainWindow.cpp25
-rw-r--r--src/app/mainWindow.h2
-rw-r--r--src/app/playDialog.cpp14
-rw-r--r--src/app/playDialog.h2
-rw-r--r--src/app/playlistFile.cpp10
-rw-r--r--src/app/slider.cpp14
-rw-r--r--src/app/slider.h2
-rw-r--r--src/app/stateChange.cpp14
-rw-r--r--src/app/theStream.cpp2
-rw-r--r--src/app/theStream.h6
-rw-r--r--src/app/videoSettings.cpp8
-rw-r--r--src/app/videoSettings.h2
-rw-r--r--src/app/videoWindow.cpp8
-rw-r--r--src/app/volumeAction.cpp14
-rw-r--r--src/app/xineConfig.cpp20
-rw-r--r--src/app/xineConfig.h2
-rw-r--r--src/app/xineEngine.cpp15
-rw-r--r--src/app/xineEngine.h6
-rw-r--r--src/debug.h4
-rw-r--r--src/mxcl.library.cpp2
-rw-r--r--src/mxcl.library.h2
-rw-r--r--src/part/CMakeLists.txt36
-rw-r--r--src/part/SConscript12
-rw-r--r--src/part/part.cpp8
-rw-r--r--src/part/toolbar.cpp6
-rw-r--r--src/part/videoWindow.cpp8
-rw-r--r--src/part/videoWindow.h4
-rw-r--r--src/part/xineEngine.cpp12
-rw-r--r--translations/CMakeLists.txt1
-rw-r--r--translations/messages/CMakeLists.txt14
-rw-r--r--translations/messages/codeine.pot (renamed from po/codeine.pot)0
67 files changed, 992 insertions, 1568 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..4ddfb4f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,79 @@
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+############################################
+
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+#### general package setup
+
+project( codeine )
+set( VERSION R14.1.0 )
+
+
+#### include essential cmake modules
+
+include( FindPkgConfig )
+include( CheckFunctionExists )
+include( CheckSymbolExists )
+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 "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
+
+
+##### directories
+
+add_subdirectory( src )
+add_subdirectory( misc )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations )
+
+
+##### write configure files
+
+configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..3a6fd3e
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,49 @@
+###########################################
+# #
+# 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 )
+
+
+##### look for X11
+
+find_package( X11 )
+
+
+##### look for XTest and xcb-util-keysyms
+
+pkg_search_module( X11_XTEST xtst )
+pkg_search_module( X11_KEYSIM xcb-keysyms )
+
+if( (NOT X11_XTest_FOUND) OR (NOT X11_KEYSIM_FOUND) )
+ set( NO_XTEST_EXTENSION 1 )
+endif()
+
+
+#### xine-engine
+
+pkg_search_module( XINE libxine )
+
+if( NOT XINE_FOUND )
+ tde_message_fatal( "Xine-lib is required but was not found on your system" )
+endif( NOT XINE_FOUND )
diff --git a/src/FAQ b/FAQ
index 5cefe5c..5cefe5c 100644
--- a/src/FAQ
+++ b/FAQ
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..0a51280
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,29 @@
+Basic Installation
+==================
+
+codeine relies on cmake to build.
+
+Here are suggested default options:
+
+ -DCMAKE_INSTALL_PREFIX="/opt/trinity" \
+ -DCONFIG_INSTALL_DIR="/etc/trinity" \
+ -DSYSCONF_INSTALL_DIR="/etc/trinity" \
+ -DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_VERBOSE_MAKEFILE="ON" \
+ -DCMAKE_SKIP_RPATH="OFF" \
+ -DBUILD_ALL="ON" \
+ -DWITH_ALL_OPTIONS="ON"
+
+
+Requirements:
+=============
+
+- xine-lib
+
+
+Optional:
+=========
+
+- XTest
+- xcb-util-keysyms
diff --git a/PKGBUILD b/PKGBUILD
deleted file mode 100644
index 34bc514..0000000
--- a/PKGBUILD
+++ /dev/null
@@ -1,17 +0,0 @@
-pkgname=codeine
-pkgver=1.0.1
-pkgrel=1
-pkgdesc="A simple xine-based video player"
-url="http://www.methylblue.com/codeine/"
-
-build() {
- echo -e "\033[0;34m==>\033[0;0;1m Configure \033[0;0m"
- cd "$startdir"
- ./configure prefix=/opt/kde
-
- echo -e "\033[0;34m==>\033[0;0;1m Make \033[0;0m"
- make || return 1
-
- echo -e "\033[0;34m==>\033[0;0;1m Install \033[0;0m"
- DESTDIR="$startdir/pkg" make install
-}
diff --git a/README b/README
index 6f5ad6c..4d03b2c 100644
--- a/README
+++ b/README
@@ -1,48 +1,2 @@
-INTRODUCTION
- Codeine is a very simple xine-based media player.
- I make the following promises:
-
- * I will not add any substantial features after version 1.0.0
- * After then, improvements will only be in the realm of usability and bug
- fixes
-
- You can rely on Codeine for now and until xine is obsolete to be a simple
- no-frills video(/media) player.
-
- Visit #codeine on freenode.net!
-
- Max Howell
-
-
-REQUIREMENTS
- You will need at least:
-
- * Qt 3.3.0 (Qt 3.2.x may work, it is just not tested)
- * KDElibs 3.3.0
- * xine-lib 1.0.0-rc4
-
- You also need python installed in order to build Codeine.
-
-
-INSTALLATION
- I use scons + bksys as the build system. But you can still do the following:
-
- % ./configure && make && su -c "make install"
-
- Or if you have scons installed, simply:
-
- % scons && su -c "scons install"
-
- Note that scons is a little silly and this kind of thing doesn't work:
-
- % ./configure --prefix=/foo/bar --debug=full
-
- Instead do:
-
- % ./configure prefix=/foo/bar debug=full
-
-
-TRANSLATIONS
- I will make the po file available for translation at the 1.0-rc1 stage, if
- you want to make a translation I thank you in advance :-)
+ Codeine - a very simple xine-based media player.
diff --git a/SConstruct b/SConstruct
deleted file mode 100644
index ef31f1b..0000000
--- a/SConstruct
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/usr/bin/python
-
-###########################################
-## Common section, for loading the tools
-
-## Load the builders in config
-env = Environment(TARGS=COMMAND_LINE_TARGETS, ARGS=ARGUMENTS, tools=['default', 'generic', 'kde', 'codeine'], toolpath=['./scons/'])
-
-
-## the configuration should be done by now, quit
-if 'configure' in COMMAND_LINE_TARGETS:
- env.Exit(0)
-
-
-
-"""
-Overview of the module system :
-
-Each module (kde.py, generic.py, sound.py..) tries to load a stored
-configuration when run. If the stored configuration does not exist
-or if 'configure' is given on the command line (scons configure),
-the module launches the verifications and detectioins and stores
-the results. Modules also call exit when the detection fail.
-
-For example, kde.py stores its config into kde.cache.py
-
-This has several advantages for both developers and users :
- - Users do not have to run ./configure to compile
- - The build is insensitive to environment changes
- - The cache maintains the objects so the config can be changed often
- - Each module adds its own help via env.Help("message")
-"""
-
-## Use the variables available in the environment - unsafe, but moc, meinproc need it :-/
-import os
-env.AppendUnique( ENV = os.environ )
-## If you do not want to copy the whole environment, you can use this instead (HOME is necessary for uic):
-#env.AppendUnique( ENV = {'PATH' : os.environ['PATH'], 'HOME' : os.environ['HOME']} )
-
-## The target make dist requires the python module shutil which is in 2.3
-env.EnsurePythonVersion(2, 3)
-
-## Bksys requires scons 0.96
-env.EnsureSConsVersion(0, 96)
-
-"""
-Explanation of the 'env = Environment...' line :
-* the command line arguments and targets are stored in env['TARGS'] and env['ARGS'] for use by the tools
-* the part 'tools=['default', 'generic ..' detect and load the necessary functions for doing the things
-* the part "toolpath=['./']" tells that the tools can be found in the current directory (generic.py, kde.py ..)
-"""
-
-"""
-To load more configuration modules one should only have to add the appropriate tool
-ie: to detect alsa and add the proper cflags, ldflags ..
- a file alsa.py file will be needed, and one should then use :
- env = Environment(TARGS=COMMAND_LINE_TARGETS, ARGS=ARGUMENTS, tools=['default', 'generic', 'kde', 'alsa'], toolpath=['./'])
-
-You can also load environments that are targetted to different platforms
-ie: if os.sys.platform = "darwin":
- env = Environment(...
- elsif os.sys.platform = "linux":
- env = Environment(...
-
-"""
-
-## Setup the cache directory - this avoids recompiling the same files over and over again
-## this is very handy when working with cvs
-env.CacheDir('cache')
-env.SConsignFile('scons/signatures')
-
-## If you need more libs and they rely on pkg-config
-## ie: add support for GTK (source: the scons wiki on www.scons.org)
-# env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
-
-"""
-This tell scons that there are no rcs or sccs files - this trick
-can speed up things a bit when having lots of #include
-in the source code and for network file systems
-"""
-env.SourceCode(".", None)
-dirs = [ '.', 'src', 'src/part', 'src/app' ]
-for dir in dirs:
- env.SourceCode(dir, None)
-
-## If we had only one program (named kvigor) to build,
-## we could add before exporting the env (some kde
-## helpers in kde.py need it) :
-# env['APPNAME'] = 'kvigor'
-
-## Use this define if you are using the kde translation scheme (.po files)
-env.Append( CPPFLAGS = ['-DQT_NO_TRANSLATION'] )
-
-## Uncomment the following if you need threading support threading
-#env.Append( CPPFLAGS = ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] )
-#if os.uname()[0] == "FreeBSD":
-# env.Append(LINKFLAGS=["-pthread"])
-
-## Important : export the environment so that SConscript files can the
-## configuration and builders in it
-Export("env")
-
-
-def string_it(target, source, env):
- print "Visit #codeine on irc.freenode.net!"
- return 0
-
-env.AddPostAction( "install", string_it )
-
-env.SConscript( "src/SConscript", build_dir='build', duplicate=0 )
-
-
-if 'dist' in COMMAND_LINE_TARGETS:
-
- APPNAME = 'codeine'
- VERSION = os.popen("cat VERSION").read().rstrip()
- FOLDER = APPNAME+'-'+VERSION
- ARCHIVE = FOLDER+'.tar.bz2'
-
- GREEN ="\033[92m"
- NORMAL ="\033[0m"
-
- import shutil
- import glob
-
- ## check if the temporary directory already exists
- if os.path.isdir(FOLDER):
- shutil.rmtree(FOLDER)
-
- ## create a temporary directory
- startdir = os.getcwd()
- # TODO copying the cache takes forever! delete it first
- shutil.copytree(startdir, FOLDER)
-
- ## remove the unnecessary files
- os.popen("find "+FOLDER+" -name \"{arch}\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \".arch-ids\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \".arch-inventory\" | xargs rm -f")
- os.popen("find "+FOLDER+" -name \".scon*\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \"kdiss*-data\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \"*.pyc\" | xargs rm -f")
- os.popen("find "+FOLDER+" -name \"*.cache.py\" | xargs rm -f")
- os.popen("find "+FOLDER+" -name \"*.log\" | xargs rm -f")
- os.popen("find "+FOLDER+" -name \"*.tdevelop.*\" | xargs rm -f")
- os.popen("find "+FOLDER+" -name \"*~\" | xargs rm -f")
-
- os.popen("rm -rf "+FOLDER+"/autopackage")
- os.popen("rm -rf "+FOLDER+"/build")
- os.popen("rm -rf "+FOLDER+"/cache")
- os.popen("rm -f " +FOLDER+"/codeine-*.tar.bz2")
- os.popen("rm -f " +FOLDER+"/config.py*")
- os.popen("rm -f " +FOLDER+"/src/configure.h")
- os.popen("rm -f " +FOLDER+"/Doxyfile")
- os.popen("rm -f " +FOLDER+"/Makefile")
- os.popen("rm -rf "+FOLDER+"/packages")
- os.popen("rm -rf "+FOLDER+"/screenshots")
- os.popen("rm -f " +FOLDER+"/scons/signatures.dblite")
-
- ## make the tarball
- print GREEN+"Writing archive "+ARCHIVE+NORMAL
- os.popen("tar cjf "+ARCHIVE+" "+FOLDER)
-
- ## remove the temporary directory
- if os.path.isdir(FOLDER):
- shutil.rmtree(FOLDER)
-
- env.Default(None)
- env.Exit(0)
diff --git a/src/TODO b/TODO
index a8d427d..a8d427d 100644
--- a/src/TODO
+++ b/TODO
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..67860c5
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,12 @@
+#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@
+
+/* Defined if you don't have either the XTest headers or
+ the xcb-util-keysyms headers */
+#cmakedefine NO_XTEST_EXTENSION 1
diff --git a/configure b/configure
deleted file mode 100755
index 83b4ab9..0000000
--- a/configure
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /bin/sh
-# TODO parse each passed argument and remove any "--" prefix
-
-BOLD="\033[1m"
-RED="\033[91m"
-GREEN="\033[92m"
-YELLOW="\033[93m"
-CYAN="\033[96m"
-NORMAL="\033[0m"
-
-if command -v scons >/dev/null 2>&1;
-then
- SCONS=scons
-else
- if [ ! -e "scons/scons" ]; then
- echo ""
- echo -ne "Unpacking mini-scons..."$RED
-
- pushd scons >/dev/null 2>&1
- tar xjvf scons-mini.tar.bz2 > /dev/null 2>&1
-
- if [[ "$?" == "0" ]]; then
- echo -e $GREEN"done"$NORMAL
- else
- echo -e $RED"failed!"$NORMAL
- exit 2
- fi
-
- popd > /dev/null
- fi
-
- SCONS=scons/scons
-fi
-
-if [[ "$1" == "--help" ]]; then
- $SCONS -Q configure --help
- exit
-fi
-
-echo ""
-echo "Configuring Codeine "`cat VERSION`"..."
-echo ""
-
-#TODO remove all prefixed "--"
-
-$SCONS -Q configure $@ || exit 1
-
-echo ""
-echo -e "Your configure completed "$GREEN"successfully"$NORMAL", now type "$BOLD"make"$NORMAL
-echo ""
-
-cat > Makefile << EOF
-## Makefile automatically generated by unpack_local_scons.sh
-
-SCONS=$SCONS
-
-# scons : compile
-# scons -c : clean
-# scons install : install
-# scons -c install : uninstall and clean
-
-# default target : use scons to build the programs
-all:
- \$(SCONS) -Q
-
-### There are several possibilities to help debugging :
-# scons --debug=explain, scons --debug=tree ..
-#
-### To optimize the runtime, use
-# scons --max-drift=1 --implicit-deps-unchanged
-debug:
- \$(SCONS) -Q --debug=tree
-
-clean:
- \$(SCONS) -c
-
-install:
- \$(SCONS) install
-
-uninstall:
- \$(SCONS) -c install
-
-## this target creates a tarball of the project
-dist:
- \$(SCONS) dist
-EOF
-
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..6d0aa9f
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt
new file mode 100644
index 0000000..ba3ef3e
--- /dev/null
+++ b/doc/en/CMakeLists.txt
@@ -0,0 +1 @@
+tde_create_handbook( DESTINATION ${PROJECT_NAME} )
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
new file mode 100644
index 0000000..c056003
--- /dev/null
+++ b/doc/en/index.docbook
@@ -0,0 +1,437 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN" "dtd/kdex.dtd" [
+ <!ENTITY kappname "&codeine;">
+ <!ENTITY codeine "<application>Codeine</application>">
+
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE"><!-- change language only here -->
+]>
+
+
+<!-- The language must NOT be changed here. -->
+
+<book lang="&language;">
+
+<!-- This header contains all of the meta-information for the document such
+as Authors, publish date, the abstract, and Keywords -->
+
+<bookinfo>
+<title>The &codeine; Handbook</title>
+
+<authorgroup>
+<author>
+<firstname>Mike</firstname>
+<surname>Diehl</surname>
+<affiliation>
+<address><email>madpenguin8@yahoo.com</email></address>
+</affiliation>
+</author>
+</authorgroup>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+<copyright>
+<year>2004</year>
+<holder>Mike Diehl</holder>
+</copyright>
+<!-- Translators: put here the copyright notice of the translation -->
+<!-- Put here the FDL notice. Read the explanation in fdl-notice.docbook
+ and in the FDL itself on how to use it. -->
+<legalnotice>&FDLNotice;</legalnotice>
+
+<!-- Date and version information of the documentation
+Don't forget to include this last date and this last revision number, we
+need them for translation coordination !
+Please respect the format of the date (DD/MM/YYYY) and of the version
+(V.MM.LL), it could be used by automation scripts.
+Do NOT change these in the translation. -->
+
+<date>10/19/2004</date>
+<releaseinfo>1</releaseinfo>
+
+<!-- Abstract about this handbook -->
+
+<abstract>
+<para>
+&codeine; is a simple media player for the TRINITY Desktop Environment. &codeine; is a front end to the xine multi-media player.
+</para>
+</abstract>
+
+<!-- This is a set of Keywords for indexing by search engines.
+Please at least include KDE, the KDE package it is in, the name
+ of your application, and a few relevant keywords. -->
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>Codeine</keyword>
+<keyword>xine</keyword>
+<keyword>video</keyword>
+<keyword>multi-media</keyword>
+</keywordset>
+
+</bookinfo>
+
+<!-- The contents of the documentation begin here. Label
+each chapter so with the id attribute. This is necessary for two reasons: it
+allows you to easily reference the chapter from other chapters of your
+document, and if there is no ID, the name of the generated HTML files will vary
+from time to time making it hard to manage for maintainers and for the CVS
+system. Any chapter labelled (OPTIONAL) may be left out at the author's
+discretion. Other chapters should not be left out in order to maintain a
+consistent documentation style across all KDE apps. -->
+
+<chapter id="introduction">
+<title>Introduction</title>
+
+<screenshot>
+<screeninfo>&codeine; Screenshot</screeninfo>
+<mediaobject>
+<imageobject><imagedata fileref="main.png" format="PNG"/></imageobject>
+<textobject><phrase>Screenshot</phrase></textobject>
+</mediaobject>
+</screenshot>
+
+
+<para>
+&codeine; is a simple media player using the xine backend. &codeine; is a no frills media player that is especially usefull for short video clips where most other media players would just get in the way.
+</para>
+
+</chapter>
+
+
+<chapter id="configuring">
+<title>Configuring &codeine;</title>
+
+<para></para>
+
+</chapter>
+
+
+<chapter id="using">
+<title>Using &codeine;</title>
+
+<sect1 id="starting">
+<title>Starting &codeine;</title>
+<para>&codeine; can be started from the K-Menu, or from the command-line</para>
+
+<sect2 id="starting-from-the-menu">
+<title>From the K-Menu</title>
+
+<para>
+Open the &kde; program menu by clicking on the <guiicon>big K</guiicon> icon on your panel. This will raise the <guimenu>program menu</guimenu>. Move your cursor up the menu to the <guimenu>Multimedia</guimenu> menu item. Choose <guimenuitem>&codeine;</guimenuitem>.
+</para>
+
+</sect2>
+
+
+<sect2 id="starting-from-the-command-line">
+<title>From the Command Line</title>
+
+<para>
+You can start &codeine; by typing it's name on the command line. If you include a file name it will play the file.
+</para>
+
+<informalexample>
+<screen>
+<prompt>%</prompt><userinput><command>codeine</command> <option><replaceable>movie.avi</replaceable></option></userinput>
+</screen>
+</informalexample>
+
+</sect2>
+</sect1>
+
+
+</chapter>
+
+
+
+<chapter id="commands">
+<title>Menu and Command Reference</title>
+
+<sect1 id="play_menu">
+<title>The Play Menu</title>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo><keycap>Ctrl</keycap><keycap>o</keycap></keycombo>
+</shortcut>
+<guimenu>Play</guimenu>
+<guimenuitem>Play File..</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Opens a file dialog to choose a file to play.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Play</guimenu>
+<guimenuitem>Play Audio-CD</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Plays an Audio-CD that is in your CD-Rom drive.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Play</guimenu>
+<guimenuitem>Play DVD</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Plays a DVD that is in your DVD drive.</action></para></listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo><keycap>Ctrl</keycap><keycap>q</keycap></keycombo>
+</shortcut>
+<guimenu>Play</guimenu>
+<guimenuitem>Quit</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Quits &codeine;.</action></para></listitem>
+</varlistentry>
+
+</variablelist>
+</sect1>
+
+
+<sect1 id="settings_menu">
+<title>The Settings Menu</title>
+<variablelist>
+
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Show Main Toolbar</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Enables or disable the main application toolbar.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guisubmenu>Toolbars</guisubmenu>
+<guimenuitem>Show DVD Toolbar</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Enables or disable the DVD toolbar.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Shortcuts...</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Allows you to configure the &codeine; shortcuts.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Toolbars...</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Allows you to configure the &codeine; toolbar options.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Settings</guimenu>
+<guimenuitem>Configure Video...</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Opens a dialog for configuring the video output settings. The settings include: contrast, brightness, saturation, and hue.</action></para></listitem>
+</varlistentry>
+
+</variablelist>
+</sect1>
+
+<sect1 id="help_menu">
+<title>The Help Menu</title>
+<variablelist>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Help</guimenu>
+<guimenuitem>&codeine; Handbook</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Opens this help document.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo><keycap>Shift</keycap><keycap>F1</keycap></keycombo>
+</shortcut>
+<guimenu>Help</guimenu>
+<guimenuitem>What's This?</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Activates the "What's This?" mouse cursor allowing you to click an object to get a "What's this?" tooltip.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Help</guimenu>
+<guimenuitem>Report Bug...</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Starts the bug report tool dialog window.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Help</guimenu>
+<guimenuitem>About &codeine;</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Starts the About &codeine; dialog window.</action></para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><menuchoice>
+<guimenu>Help</guimenu>
+<guimenuitem>About KDE</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Starts the About &kde; dialog window.</action></para></listitem>
+</varlistentry>
+
+</variablelist>
+</sect1>
+
+
+</chapter>
+
+<!--
+<chapter id="faq">
+<title>Questions and Answers</title>
+
+(OPTIONAL but recommended) This chapter should include all of the silly
+(and not-so-silly) newbie questions that fill up your mailbox. This chapter
+should be reserved for BRIEF questions and answers! If one question uses more
+than a page or so then it should probably be part of the
+"Using this Application" chapter instead. You should use links to
+cross-reference questions to the parts of your documentation that answer them.
+This is also a great place to provide pointers to other FAQ's if your users
+must do some complicated configuration on other programs in order for your
+application work.
+
+&reporting.bugs;
+&updating.documentation;
+
+<qandaset id="faqlist">
+<qandaentry>
+<question>
+<para>My Mouse doesn't work. How do I quit &filelight;?</para>
+</question>
+<answer>
+<para>You silly goose! Check out the <link linkend="commands">Commands
+Section</link> for the answer.</para>
+</answer>
+</qandaentry>
+<qandaentry>
+<question>
+<para>Why can't I twiddle my documents?</para>
+</question>
+<answer>
+<para>You can only twiddle your documents if you have the foobar.lib
+installed.</para>
+</answer>
+</qandaentry>
+</qandaset>
+</chapter>
+-->
+
+
+
+<chapter id="credits">
+
+<!-- Include credits for the programmers, documentation writers, and
+contributors here. The license for your software should then be included below
+the credits with a reference to the appropriate license file included in the KDE
+distribution. -->
+
+<title>Credits and License</title>
+
+<sect1 id="kapp">
+<title>&codeine;</title>
+<para>Program copyright 2004 Max B. Howell <email>max.howell@methylblue.com</email></para>
+
+&underGPL;
+
+</sect1>
+<sect1 id="Documentation">
+
+<title>Documentation</title>
+
+<para>
+Documentation copyright 2004 Mike Diehl <email>madpenguin8@yahoo.com</email>
+</para>
+
+&underFDL;
+
+</sect1>
+
+</chapter>
+
+<chapter id="requirements">
+<title>Requirements</title>
+
+<para>&codeine; requires the installation of some software packages. The required packages are listed below.</para>
+
+
+<itemizedlist>
+<title>Required:</title>
+<listitem><para>tdelibs <ulink url="https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs"></ulink></para></listitem>
+<listitem><para>xine-lib <ulink url="https://sourceforge.net/projects/xine/"></ulink></para></listitem>
+</itemizedlist>
+<itemizedlist>
+<title>Optional:</title>
+<listitem><para>XTest Library</para></listitem>
+<listitem><para>xcb-util-keysyms</para></listitem>
+</itemizedlist>
+
+<note><para>If you obtain these dependencies via a packaging system, you must
+also install the devel versions of these packages!</para></note>
+
+</chapter>
+
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-codeine">
+<title>How to obtain &codeine;</title>
+
+<para>
+&codeine; is now part of the TDE project, it can be found at:
+<ulink url="http://trinitydesktop.org/">http://trinitydesktop.org/</ulink>.
+</para>
+</sect1>
+
+<sect1 id="compilation">
+<title>Compilation and Installation</title>
+
+<para>
+In order to compile and install &codeine; on your system, type the following in the base directory; distribution:
+<screen width="40">
+<prompt>%</prompt> <userinput>mkdir -p build</userinput>
+<prompt>%</prompt> <userinput>cd build</userinput>
+<prompt>%</prompt> <userinput>cmake ../</userinput>
+<prompt>%</prompt> <userinput>make</userinput>
+<prompt>%</prompt> <userinput>make install</userinput>
+</screen>
+</para>
+
+<para>Since &codeine; uses cmake you should have not trouble compiling it. Default options for cmake build are available in the INSTALL file.</para>
+
+</sect1>
+
+</appendix>
+
+&documentation.index;
+</book>
+<!--
+Local Variables:
+mode: sgml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+-->
diff --git a/doc/en/main.png b/doc/en/main.png
new file mode 100644
index 0000000..a13586e
--- /dev/null
+++ b/doc/en/main.png
Binary files differ
diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt
new file mode 100644
index 0000000..8512250
--- /dev/null
+++ b/doc/man/CMakeLists.txt
@@ -0,0 +1,5 @@
+INSTALL(
+ FILES ${PROJECT_NAME}.1
+ DESTINATION ${MAN_INSTALL_DIR}/man1
+ COMPONENT doc
+)
diff --git a/doc/man/codeine.1 b/doc/man/codeine.1
new file mode 100644
index 0000000..dac7494
--- /dev/null
+++ b/doc/man/codeine.1
@@ -0,0 +1,94 @@
+'\" -*- coding: us-ascii -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH codeine 1 2006-05-12 "" ""
+.SH NAME
+codeine \- video player for TDE, designed to be as simple as possible
+.SH SYNOPSIS
+'nh
+.fi
+.ad l
+\fBcodeine\fR \kx
+.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
+'in \n(.iu+\nxu
+[
+\fB\fIQt-options\fB\fR
+] [
+\fB\fTDE-options\fB\fR
+] [
+\fB\fIURL|file\fB\fR
+] [
+--play-dvd
+]
+'in \n(.iu-\nxu
+.ad b
+'hy
+.SH DESCRIPTION
+Video player with a different philosophy: Simple, uncluttered interface
+.PP
+Features:
+.TP 0.2i
+\(bu
+Plays DVDs, VCDs, all video formats supported by Xine
+.TP 0.2i
+\(bu
+Bundled with a simple web-page KPart
+.TP 0.2i
+\(bu
+Starts quickly
+.SH OPTIONS
+All TDE and TQt
+programs accept a some common command-line options. codeine has no
+application-specific options.
+.PP
+.TP
+\*(T<\fB\-\-help\fR\*(T>
+Show help about options
+.TP
+\*(T<\fB\-\-help\-qt\fR\*(T>
+Show TQt specific options
+.TP
+\*(T<\fB\-\-help\-tde\fR\*(T>
+Show TDE specific options
+.TP
+\*(T<\fB\-\-help\-all\fR\*(T>
+Show all options
+.TP
+\*(T<\fB\-\-author\fR\*(T>
+Show author information
+.TP
+\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T>
+Show version information
+.TP
+\*(T<\fB\-\-license\fR\*(T>
+Show license information
+.TP
+\*(T<\fB\-\-\fR\*(T>
+Indicates end of options
+.TP
+\*(T<\fBURL|file\fR\*(T>
+URL to or filename of a video
+.TP
+\*(T<\fB\-\-play\-dvd\fR\*(T>
+Play DVD Video
+.SH AUTHOR
+Codeine was written by Max Howell <\*(T<max.howell@methylblue.com\*(T>>
+Homepage:
+.URL "" https://mirror.git.trinitydesktop.org/gitea/TDE/codeine/
+.SH COPYRIGHT
+This manual page was written by Achim Bohnet <\*(T<ach@mpe.mpg.de\*(T>>,
+based on work of Anthony Mercatante
+<\*(T<anthony.mercatante@laposte.net\*(T>>, for the
+Debian system (but may be used by others).
+Tom Albers <\*(T<tomalbers@kde.nl\*(T>> documented the play-dvd part.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU General Public License,
+Version 2 or any later version published by the Free Software Foundation.
+.PP
+On Debian systems, the complete text of the GNU General Public Version 2
+License can be found in
+\*(T<\fI/usr/share/common\-licenses/GPL\-2\fR\*(T>.
diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt
new file mode 100644
index 0000000..30786a7
--- /dev/null
+++ b/misc/CMakeLists.txt
@@ -0,0 +1,31 @@
+##### icons
+
+tde_install_icons( ${PROJECT_NAME} )
+
+
+##### other data
+
+install(
+ FILES ${PROJECT_NAME}ui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
+
+install(
+ FILES ${PROJECT_NAME}rc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
+
+install(
+ FILES ${PROJECT_NAME}.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
+
+install(
+ FILES ${PROJECT_NAME}_part.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
+
+install(
+ FILES ${PROJECT_NAME}_play_dvd.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
+)
diff --git a/po/messages.sh b/po/messages.sh
deleted file mode 100755
index 9c2a2b1..0000000
--- a/po/messages.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# Inspired by Makefile.common from coolo
-# this script is used to update the .po files
-
-# To update the translations, you will need a specific gettext
-# patched for kde and a lot of patience, tenacity, luck, time ..
-
-
-# I guess one should only update the .po files when all .cpp files
-# are generated (after a make or scons)
-
-# If you have a better way to do this, do not keep that info
-# for yourself and help me to improve this script, thanks
-# (tnagyemail-mail tat yahoo d0tt fr)
-
-SRCDIR=../src # srcdir is the directory containing the source code
-TIPSDIR=$SRCDIR # tipsdir is the directory containing the tips
-
-TDEDIR=`tde-config --prefix`
-EXTRACTRC=extractrc
-KDEPOT=`tde-config --prefix`/include/kde.pot
-XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x $KDEPOT "
-
-## check that kde.pot is available
-if ! test -e $KDEPOT; then
- echo "$KDEPOT does not exist, there is something wrong with your installation!"
- XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale "
-fi
-
-> rc.cpp
-
-## extract the strings
-echo "extracting the strings"
-
-# process the .ui and .rc files
-$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp
-$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp
-echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp
-
-# process the tips - $SRCDIR is supposed to be where the tips are living
-pushd $TIPSDIR; preparetips >tips.cpp; popd
-
-$XGETTEXT `find $SRCDIR -name "*.cpp"` -o codeine.pot
-
-# remove the intermediate files
-rm -f $TIPSDIR/tips.cpp
-rm -f rc.cpp
-rm -f $SRCDIR/_translatorinfo.cpp
-
-## now merge the .po files ..
-echo "merging the .po files"
-
-for i in `ls *.po`; do
- msgmerge $i kdissert.pot -o $i || exit 1
-done
-
-## finished
-echo "Done"
-
diff --git a/scons/codeine.py b/scons/codeine.py
deleted file mode 100644
index b56f50d..0000000
--- a/scons/codeine.py
+++ /dev/null
@@ -1,101 +0,0 @@
-## Max Howell, 2005
-
-BOLD ="\033[1m"
-RED ="\033[91m"
-GREEN ="\033[92m"
-YELLOW ="\033[93m"
-CYAN ="\033[96m"
-NORMAL ="\033[0m"
-
-import os
-
-def exists( env ):
- return true
-
-def generate( env ):
-
- if 'configure' in env['TARGS']:
- xine_lib_test_source_file = """
- #include <ntqstring.h>
- #include <xine.h>
-
- int main( int argc, char **argv )
- {
- if( XINE_MAJOR_VERSION < 1 )
- return 1;
-
- const QString version( XINE_VERSION );
-
- // eg. VERSION 1.0
- if( version[1] == '.' )
- return 0;
-
- if( version == "1-cvs" )
- return 0;
-
- if( version.startsWith( "1-rc" ) && QString(version[4]).toInt() > 3 )
- return 0;
-
- return 2; //too old
- }"""
-
- def CheckKdeLibs( context ):
- # ideally should be able to tell bksys what version we need
- context.Message( 'Checking for KDElibs 3.3...' )
- kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1]
- result = int( kde_version[0] ) == 3 and int( kde_version[2] ) >= 3
- context.Result( result )
- return result
-
- def CheckXineLib( context ):
- context.Message('Checking for xine-lib 1.0...')
- result = context.TryLink(xine_lib_test_source_file, '.cpp')
- context.Result(result)
- return result
-
-
- # prolly best to use a fresh env
- # this seems to import the user's CXXFLAGS, etc., which may break
- confenv = env.Copy()
- configure = confenv.Configure(custom_tests = {'CheckXineLib' : CheckXineLib, 'CheckKdeLibs' : CheckKdeLibs}, log_file='configure.log')
- confenv.AppendUnique(LIBS = 'tqt-mt')
- confenv.AppendUnique(LINKFLAGS = '-L/usr/X11R6/lib')
-
- if not configure.CheckKdeLibs():
- print # 1 2 3 4 5 6 7 8'
- print 'Configure could not detect KDElibs 3.3, which is required for Codeine to '
- print 'compile.'
- print
- confenv.Exit( 1 )
-
- if not configure.CheckLibWithHeader( 'xine', 'xine.h', 'c++' ):
- print # 1 2 3 4 5 6 7 8'
- print 'Configure could not find either the xine library or header on your system. You '
- print 'should ammend the relevant paths. If you know which ones please email me so I '
- print 'can update this message!'
- print
- confenv.Exit( 2 )
-
- if not configure.CheckXineLib():
- print # 1 2 3 4 5 6 7 8'
- print 'Your xine-lib is either too old, or can not be linked against. Sorry for not '
- print 'being more specific..'
- print
- confenv.Exit( 3 )
-
- if not configure.CheckLibWithHeader( 'Xtst', 'X11/extensions/XTest.h', 'c' ):
- print # 1 2 3 4 5 6 7 8'
- print 'libxtst was not found, this means the screensaver cannot be disabled during '
- print 'playback. YOU CAN STILL BUILD CODEINE! :)'
- print
-
- file = open ( 'src/configure.h', 'w' )
- file.write( "#define NO_XTEST_EXTENSION\n" )
- file.close()
- else:
- # FIXME - thus only one thing can be in configure.h - lol
- file = open ( 'src/configure.h', 'w' )
- file.write( "" )
- file.close()
-
- env = configure.Finish()
diff --git a/scons/generic.py b/scons/generic.py
deleted file mode 100644
index 3249df7..0000000
--- a/scons/generic.py
+++ /dev/null
@@ -1,95 +0,0 @@
-## Thomas Nagy, 2005
-
-"""
-Detect and store the most common options
-* kdecxxflags : debug=1 (-g) or debug=full (-g3, slower)
- else use the user CXXFLAGS if any, - or -O2 by default
-* prefix : the installation path
-* extraincludes : a list of paths separated by ':'
-ie: scons configure debug=full prefix=/usr/local extraincludes=/tmp/include:/usr/local
-"""
-
-BOLD ="\033[1m"
-RED ="\033[91m"
-GREEN ="\033[92m"
-YELLOW ="\033[93m"
-CYAN ="\033[96m"
-NORMAL ="\033[0m"
-
-import os
-
-def exists(env):
- return true
-
-def generate(env):
- env.Help("""
-"""+BOLD+
-"""*** Generic options ***
------------------------"""+NORMAL+"""
-"""+BOLD+"""* debug """+NORMAL+""": debug=1 (-g) or debug=full (-g3, slower) else use environment CXXFLAGS, or -O2 by default
-"""+BOLD+"""* prefix """+NORMAL+""": the installation path
-"""+BOLD+"""* extraincludes """+NORMAL+""": a list of paths separated by ':'
-ie: """+BOLD+"""scons configure debug=full prefix=/usr/local extraincludes=/tmp/include:/usr/local
-"""+NORMAL)
-
- # load the options
- from SCons.Options import Options, PathOption
- opts = Options('generic.cache.py')
- opts.AddOptions(
- ( 'KDECXXFLAGS', 'debug level for the project : full or just anything' ),
- ( 'PREFIX', 'prefix for installation' ),
- ( 'EXTRAINCLUDES', 'extra include paths for the project' ),
- )
- opts.Update(env)
-
- # use this to avoid an error message 'how to make target configure ?'
- env.Alias('configure', None)
-
- # configure the environment if needed
- if 'configure' in env['TARGS'] or not env.has_key('KDECXXFLAGS'):
- # need debugging ?
- if env.has_key('KDECXXFLAGS'):
- env.__delitem__('KDECXXFLAGS')
- if env['ARGS'].get('debug', None):
- debuglevel = env['ARGS'].get('debug', None)
- print CYAN+'** Enabling debug for the project **' + NORMAL
- if (debuglevel == "full"):
- env['KDECXXFLAGS'] = ['-DDEBUG', '-ggdb', '-pipe', '-Wall']
- else:
- env['KDECXXFLAGS'] = ['-DDEBUG', '-g']
- else:
- if os.environ.has_key('CXXFLAGS'):
- # user-defined flags (gentooers will be delighted)
- import SCons.Util
- env['KDECXXFLAGS'] = SCons.Util.CLVar( os.environ['CXXFLAGS'] )
- env.Append( KDECXXFLAGS = ['-DNDEBUG', '-DNO_DEBUG'] )
- else:
- env.Append(KDECXXFLAGS = ['-O2', '-DNDEBUG', '-DNO_DEBUG'])
-
- # user-specified prefix
- if env['ARGS'].get('prefix', None):
- env['PREFIX'] = env['ARGS'].get('prefix', None)
- print CYAN+'** set the installation prefix for the project : ' + env['PREFIX'] +' **'+ NORMAL
- elif env.has_key('PREFIX'):
- env.__delitem__('PREFIX')
-
- # user-specified include paths
- env['EXTRAINCLUDES'] = env['ARGS'].get('extraincludes', None)
- if env['ARGS'].get('extraincludes', None):
- print CYAN+'** set extra include paths for the project : ' + env['EXTRAINCLUDES'] +' **'+ NORMAL
- elif env.has_key('EXTRAINCLUDES'):
- env.__delitem__('EXTRAINCLUDES')
-
- # and finally save the options in a cache
- opts.Save('generic.cache.py', env)
-
- if env.has_key('KDECXXFLAGS'):
- # load the flags
- env.AppendUnique( CPPFLAGS = env['KDECXXFLAGS'] )
-
- if env.has_key('EXTRAINCLUDES'):
- incpaths = []
- for dir in str(env['EXTRAINCLUDES']).split(':'):
- incpaths.append( dir )
- env.Append(CPPPATH = incpaths)
-
diff --git a/scons/kde.py b/scons/kde.py
deleted file mode 100644
index b54057e..0000000
--- a/scons/kde.py
+++ /dev/null
@@ -1,771 +0,0 @@
-# Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-# Shamelessly stolen from qt.py and (heavily) modified into kde.py :)
-# Thomas Nagy, 2004, 2005 <tnagy2^8@yahoo.fr>
-
-"""
-Here follow the basic rules for building kde programs
-The detection is done in detect_kde when needed
-We wan to use the cached variables as much as possible
-
-The variables used when configuring are :
-* prefix : base install path, eg: /usr/local
-* execprefix : install path for binaries, eg: /usr/bin
-* datadir : install path for the data, eg: /usr/local/share
-* libdir : install path for the libs, eg: /usr/lib
-
-* libsuffix : for those who need /usr/lib64 and the like ..
-
-* kdeincludes: path to the kde includes (/usr/include/tde on debian, ...)
-* qtincludes : same punishment, for qt includes (/usr/include/qt on debian, ...)
-
-* tdelibs : path to the kde libs, for linking the programs
-* qtlibs : same punishment, for qt libraries
-
-eg: scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
-"""
-
-BOLD ="\033[1m"
-RED ="\033[91m"
-GREEN ="\033[92m"
-YELLOW ="\033[93m"
-CYAN ="\033[96m"
-NORMAL ="\033[0m"
-
-def exists(env):
- return True
-
-def detect_kde(env):
- """ Detect the qt and kde environment using tde-config mostly """
- import os, sys, re
-
- prefix = env['ARGS'].get('prefix', None)
- execprefix = env['ARGS'].get('execprefix', None)
- datadir = env['ARGS'].get('datadir', None)
- libdir = env['ARGS'].get('libdir', None)
- libsuffix = env['ARGS'].get('libsuffix', '')
- kdeincludes = env['ARGS'].get('kdeincludes', None)
- tdelibs = env['ARGS'].get('tdelibs', None)
- qtincludes = env['ARGS'].get('qtincludes', None)
- qtlibs = env['ARGS'].get('qtlibs', None)
-
- if libdir:
- libdir = libdir+libsuffix
-
- ## Detect the kde libraries
- print "Checking for tde-config : ",
- kde_config = os.popen("which tde-config 2>/dev/null").read().strip()
- if len(kde_config):
- print GREEN + "tde-config was found" + NORMAL
- else:
- print RED + "tde-config was NOT found in your PATH"+ NORMAL
- print "Make sure kde is installed properly"
- print "(missing package tdebase-devel?)"
- # TODO : prompt the user for the path of tde-config ?
- sys.exit(1)
- env['TDEDIR'] = os.popen('tde-config -prefix').read().strip()
-
- print "Checking for kde version : ",
- kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1]
- if int(kde_version[0]) != 3 or int(kde_version[2]) < 2:
- print RED + kde_version
- print RED + "Your kde version can be too old" + NORMAL
- print RED + "Please make sure kde is at least 3.2" + NORMAL
- else:
- print GREEN + kde_version + NORMAL
-
- ## Detect the qt library
- print "Checking for the qt library : ",
- qtdir = os.getenv("QTDIR")
- if qtdir:
- print GREEN + "qt is in " + qtdir + NORMAL
- else:
- m = re.search('(.*)/lib/libqt.*', os.popen('ldd `tde-config --expandvars --install lib`' + '/libtdeui.so.4 | grep libqt').read().strip().split()[2])
- if m:
- qtdir = m.group(1)
- print YELLOW + "qt was found as " + m.group(1) + NORMAL
- else:
- print RED + "qt was not found" + NORMAL
- print RED + "Please set QTDIR first (/usr/lib/qt3?)" + NORMAL
- sys.exit(1)
- env['QTDIR'] = qtdir.strip()
-
- ## Find the necessary programs uic and moc
- print "Checking for uic : ",
- uic = qtdir + "/bin/uic"
- if os.path.isfile(uic):
- print GREEN + "uic was found as " + uic + NORMAL
- else:
- uic = os.popen("which uic 2>/dev/null").read().strip()
- if len(uic):
- print YELLOW + "uic was found as " + uic + NORMAL
- else:
- uic = os.popen("which uic 2>/dev/null").read().strip()
- if len(uic):
- print YELLOW + "uic was found as " + uic + NORMAL
- else:
- print RED + "uic was not found - set QTDIR put it in your PATH ?" + NORMAL
- sys.exit(1)
- env['QT_UIC'] = uic
-
- print "Checking for moc : ",
- moc = qtdir + "/bin/moc"
- if os.path.isfile(moc):
- print GREEN + "moc was found as " + moc + NORMAL
- else:
- moc = os.popen("which moc 2>/dev/null").read().strip()
- if len(moc):
- print YELLOW + "moc was found as " + moc + NORMAL
- elif os.path.isfile("/usr/share/qt3/bin/moc"):
- moc = "/usr/share/qt3/bin/moc"
- print YELLOW + "moc was found as " + moc + NORMAL
- else:
- print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL
- sys.exit(1)
- env['QT_MOC'] = moc
-
- ## check for the qt and kde includes
- print "Checking for the qt includes : ",
- if qtincludes and os.path.isfile(qtincludes + "/ntqlayout.h"):
- # The user told where to look for and it looks valid
- print GREEN + "ok " + qtincludes + NORMAL
- else:
- if os.path.isfile(qtdir + "/include/ntqlayout.h"):
- # Automatic detection
- print GREEN + "ok " + qtdir + "/include/ " + NORMAL
- qtincludes = qtdir + "/include/"
- elif os.path.isfile("/usr/include/qt3/ntqlayout.h"):
- # Debian probably
- print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL
- qtincludes = "/usr/include/qt3"
- else:
- print RED + "the qt headers were not found" + NORMAL
- sys.exit(1)
-
- print "Checking for the kde includes : ",
- kdeprefix = os.popen("tde-config --prefix").read().strip()
- if not kdeincludes:
- kdeincludes = kdeprefix+"/include/"
- if os.path.isfile(kdeincludes + "/klineedit.h"):
- print GREEN + "ok " + kdeincludes + NORMAL
- else:
- if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"):
- # Debian, Fedora probably
- print YELLOW + "the kde headers were found in " + kdeprefix + "/include/tde/" + NORMAL
- kdeincludes = kdeprefix + "/include/tde/"
- else:
- print RED + "The kde includes were NOT found" + NORMAL
- sys.exit(1)
-
- if prefix:
- ## use the user-specified prefix
- if not execprefix:
- execprefix = prefix
- if not datadir:
- datadir = prefix + "/share"
- if not libdir:
- libdir = execprefix + "/lib"+libsuffix
-
- subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',
- datadir).replace('${libdir}', libdir)
- debian_fix = lambda x: x.replace('/usr/share', '${datadir}')
- env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip())
- env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip())
- env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip())
- env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip())
- env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip())
- env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) )
- env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip())
- env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip())
- env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip())
- env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip())
- env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip())
- env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip())
- else:
- # the user has given no prefix, install as a normal kde app
- env['PREFIX'] = os.popen('tde-config --prefix').read().strip()
-
- env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip()
- env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip()
- env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip()
- env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip()
- env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip()
- env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip()
- env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip()
- env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip()
- env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip()
- env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip()
- env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip()
- env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip()
-
- env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip()
-
- ## kde libs and includes
- env['KDEINCLUDEPATH']= kdeincludes
- if not tdelibs:
- tdelibs = os.popen('tde-config --expandvars --install lib').read().strip()
- env['KDELIBPATH']= tdelibs
-
- ## qt libs and includes
- env['QTINCLUDEPATH']= qtincludes
- if not qtlibs:
- qtlibs = qtdir+ "/lib"
- env['QTLIBPATH']= qtlibs
-
-
-def generate(env):
- """"Set up the qt and kde environment and builders - the moc part is difficult to understand """
-
- env.Help("""
-"""+BOLD+
-"""*** KDE options ***
--------------------"""
-+NORMAL+"""
-"""+BOLD+"""* prefix """+NORMAL+""": base install path, ie: /usr/local
-"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin
-"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share
-"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib
-"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32
-"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...)
-"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...)
-"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs
-"""+BOLD+"""* qtlibs """+NORMAL+""": same punishment, for qt libraries
-ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
-"""+NORMAL)
-
- import os.path
- import re
-
- import SCons.Defaults
- import SCons.Tool
- import SCons.Util
-
- ui_extensions = [".ui", ".Ui", ".UI"]
- header_extensions = [".h", ".hxx", ".hpp", ".hh", ".H", ".HH"]
- source_extensions = [".cpp", ".cxx", ".cc", ".CPP", ".CXX", ".CC"]
-
- def find_file(filename, paths, node_factory):
- retval = None
- for dir in paths:
- node = node_factory(filename, dir)
- if node.rexists():
- return node
- return None
-
- class _Metasources:
- """ Callable class, which works as an emitter for Programs, SharedLibraries
- and StaticLibraries."""
-
- def __init__(self, objBuilderName):
- self.objBuilderName = objBuilderName
-
- def __call__(self, target, source, env):
- """ Smart autoscan function. Gets the list of objects for the Program
- or Lib. Adds objects and builders for the special qt files. """
- try:
- if int(env.subst('$QT_AUTOSCAN')) == 0:
- return target, source
- except ValueError:
- pass
-
- try:
- qtdebug = int(env.subst('$QT_DEBUG'))
- except ValueError:
- qtdebug = 0
-
- # some shortcuts used in the scanner
- FS = SCons.Node.FS.default_fs
- splitext = SCons.Util.splitext
- objBuilder = getattr(env, self.objBuilderName)
-
- # some regular expressions:
- # Q_OBJECT detection
- q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]')
-
- # cxx and c comment 'eater'
- #comment = re.compile(r'(//.*)|(/\*(([^*])|(\*[^/]))*\*/)')
- # CW: something must be wrong with the regexp. See also bug #998222
- # CURRENTLY THERE IS NO TEST CASE FOR THAT
-
- # The following is kind of hacky to get builders working properly (FIXME)
- objBuilderEnv = objBuilder.env
- objBuilder.env = env
- mocBuilderEnv = env.Moc.env
- env.Moc.env = env
-
- # make a deep copy for the result; MocH objects will be appended
- out_sources = source[:]
-
- for obj in source:
- if not obj.has_builder():
- # binary obj file provided
- if qtdebug:
- print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj)
- continue
- cpp = obj.sources[0]
- if not splitext(str(cpp))[1] in source_extensions:
- if qtdebug:
- print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp)
- # c or fortran source
- continue
- #cpp_contents = comment.sub('', cpp.get_contents())
- cpp_contents = cpp.get_contents()
-
- h = None
- ui = None
-
- for ui_ext in ui_extensions:
- # try to find the ui file in the corresponding source directory
- uiname = splitext(cpp.name)[0] + ui_ext
- ui = find_file(uiname, (cpp.get_dir(),), FS.File)
- if ui:
- if qtdebug:
- print "scons: qt: found .ui file of header" #% (str(h), str(cpp))
- #h_contents = comment.sub('', h.get_contents())
- break
-
- # if we have a .ui file, do not continue, it is automatically handled by Uic
- if ui:
- continue
-
- for h_ext in header_extensions:
- # try to find the header file in the corresponding source
- # directory
- hname = splitext(cpp.name)[0] + h_ext
- h = find_file(hname, (cpp.get_dir(),), FS.File)
- if h:
- if qtdebug:
- print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
- #h_contents = comment.sub('', h.get_contents())
- h_contents = h.get_contents()
- break
-
- if not h and qtdebug:
- print "scons: qt: no header for '%s'." % (str(cpp))
- if h and q_object_search.search(h_contents):
- # h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file
- moc_cpp = None
-
- if env.has_key('NOMOCSCAN'):
- moc_cpp = env.Moc(h)
- else:
- reg = '\n\s*#include\s+"'+splitext(cpp.name)[0]+'.moc"'
- meta_object_search = re.compile(reg)
- if meta_object_search.search(cpp_contents):
- moc_cpp = env.Moc(h)
- else:
- moc_cpp = env.Moccpp(h)
- moc_o = objBuilder(moc_cpp)
- out_sources.append(moc_o)
- if qtdebug:
- print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp[0]))
-
- if cpp and q_object_search.search(cpp_contents):
- print "error, bksys cannot handle cpp files with Q_OBJECT classes"
- print "if you are sure this is a feature worth the effort, "
- print "report this to the authors tnagyemail-mail yahoo.fr"
-
- # restore the original env attributes (FIXME)
- objBuilder.env = objBuilderEnv
- env.Moc.env = mocBuilderEnv
-
- return (target, out_sources)
-
- MetasourcesShared = _Metasources('SharedObject')
- MetasourcesStatic = _Metasources('StaticObject')
-
- CLVar = SCons.Util.CLVar
- splitext = SCons.Util.splitext
- Builder = SCons.Builder.Builder
-
- # Detect the environment - replaces ./configure implicitely
- # and store the options into a cache
- from SCons.Options import Options
- opts = Options('kde.cache.py')
- opts.AddOptions(
- ( 'QTDIR', 'root of qt directory' ),
- ( 'QTLIBPATH', 'path to the qt libraries' ),
- ( 'QTINCLUDEPATH', 'path to the qt includes' ),
- ( 'QT_UIC', 'moc directory'),
- ( 'QT_MOC', 'moc executable command'),
- ( 'QTPLUGINS', 'uic executable command'),
- ( 'TDEDIR', 'root of kde directory' ),
- ( 'KDELIBPATH', 'path to the kde libs' ),
- ( 'KDEINCLUDEPATH', 'path to the kde includes' ),
-
- ( 'PREFIX', 'root of the program installation'),
-
- ( 'KDEBIN', 'installation path of the kde binaries'),
- ( 'KDEMODULE', 'installation path of the parts and libs'),
- ( 'KDEAPPS', ''),
- ( 'KDEDATA', 'installation path of the application data'),
- ( 'KDELOCALE', ''),
- ( 'KDEDOC', 'installation path of the application documentation'),
- ( 'KDEKCFG', 'installation path of the .kcfg files'),
- ( 'KDEXDG', 'installation path of the service types'),
- ( 'KDEMENU', ''),
- ( 'KDEMIME', 'installation path of to the mimetypes'),
- ( 'KDEICONS', ''),
- ( 'KDESERV', ''),
- )
- opts.Update(env)
-
- # reconfigure when things are missing
- if 'configure' in env['TARGS'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR'):
- detect_kde(env)
-
- # finally save the configuration
- opts.Save('kde.cache.py', env)
-
- ## set default variables, one can override them in sconscript files
- env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ])
- env.Append(LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ])
-
- env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
-
- env['QT_AUTOSCAN'] = 1
- env['QT_DEBUG'] = 0
-
- env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload'
- env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n'
- env['QT_LIBS'] = 'tqt-mt'
-
- env['LIBTOOL_FLAGS'] = '--silent --mode=compile --tag=CXX'
-
- env['QT_UICIMPLPREFIX'] = ''
- env['QT_UICIMPLSUFFIX'] = '.cpp'
- env['QT_MOCHPREFIX'] = ''
- env['QT_MOCHSUFFIX'] = '.moc'
- env['KDE_KCFG_IMPLPREFIX'] = ''
- env['KDE_KCFG_IMPL_HSUFFIX'] = '.h'
- env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp'
- env['KDE_SKEL_IMPL_SUFFIX'] = '.skel'
- env['MEINPROC'] = 'meinproc'
- env['MSGFMT'] = 'msgfmt'
-
-
- ###### ui file processing
- def uicGenerator(target, source, env, for_signature):
- act=[]
- act.append('$QT_UIC $QT_UIC_HFLAGS -o '+target[0].path+' '+source[0].path)
- act.append('rm -f ' +target[1].path)
- act.append('echo \'#include <tdelocale.h>\' >> '+target[1].path)
- act.append('echo \'#include <kdialog.h>\' >> '+target[1].path)
- act.append('$QT_UIC $QT_UIC_CFLAGS -impl '+target[0].path+' -o '+target[1].path+'.tmp '+source[0].path)
- act.append('cat '+target[1].path+'.tmp >> '+target[1].path)
- act.append('rm -f '+target[1].path+'.tmp')
- act.append('echo \'#include "' + target[2].name + '"\' >> '+target[1].path)
- act.append('$QT_MOC -o '+target[2].path+' '+target[0].path)
- return act
-
- def uicEmitter(target, source, env):
- adjustixes = SCons.Util.adjustixes
- bs = SCons.Util.splitext(str(source[0].name))[0]
- bs = os.path.join(str(target[0].get_dir()),bs)
- # first target is automatically added by builder (.h file)
- if len(target) < 2:
- # second target is .cpp file
- target.append(adjustixes(bs,
- env.subst('$QT_UICIMPLPREFIX'),
- env.subst('$QT_UICIMPLSUFFIX')))
- if len(target) < 3:
- # third target is .moc file
- target.append(adjustixes(bs,
- env.subst('$QT_MOCHPREFIX'),
- env.subst('$QT_MOCHSUFFIX')))
- return target, source
-
- UIC_BUILDER = Builder(
- generator = uicGenerator,
- emitter = uicEmitter,
- suffix = '.h',
- src_suffix = '.ui' )
-
- ###### moc file processing
- env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE')
-
- MOC_BUILDER = Builder(
- action = '$QT_MOCCOM',
- suffix = '.moc',
- src_suffix = '.h' )
-
- MOCCPP_BUILDER = Builder(
- action = '$QT_MOCCOM',
- suffix = '_moc.cpp',
- src_suffix = '.h' )
-
- ###### kcfg file processing
- def kcfgGenerator(target, source, env, for_signature):
- act=[]
- act.append('tdeconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path)
- return act
-
- def kcfgEmitter(target, source, env):
- adjustixes = SCons.Util.adjustixes
- bs = SCons.Util.splitext(str(source[0].name))[0]
- bs = os.path.join(str(target[0].get_dir()),bs)
- # first target is automatically added by builder (.h file)
- if len(target) < 2:
- # second target is .cpp file
- target.append(adjustixes(bs, env.subst('$KDE_KCFG_IMPLPREFIX'), env.subst('$KDE_KCFG_IMPL_CSUFFIX')))
-
- # find_file(kcfgfile, (source[0].get_dir(),) ,SCons.Node.FS.default_fs)
- if len(source) <2:
- if not os.path.isfile(str(source[0])):
- print RED+'kcfg file given'+str(source[0])+' does not exist !'+NORMAL
- return target, source
- kfcgfilename = ""
- kcfgFileDeclRx = re.compile("^[fF]ile\s*=\s*(.+)\s*$")
- for line in file(str(source[0]), "r").readlines():
- match = kcfgFileDeclRx.match(line.strip())
- if match:
- kcfgfilename = match.group(1)
- break
- source.append( str(source[0].get_dir())+'/'+kcfgfilename )
- return target, source
-
- KCFG_BUILDER = Builder(
- generator = kcfgGenerator,
- emitter = kcfgEmitter,
- suffix = '.h',
- src_suffix = '.kcfgc' )
-
- ###### dcop processing
- def dcopGenerator(target, source, env, for_signature):
- act=[]
- act.append('dcopidl '+source[0].path+' > '+target[1].path+'|| ( rm -f '+target[1].path+' ; false )')
- act.append('dcopidl2cpp --c++-suffix cpp --no-signals --no-stub '+target[1].path)
- return act
-
- def dcopEmitter(target, source, env):
- bs = SCons.Util.splitext(str(source[0].name))[0]
- bs = os.path.join(str(target[0].get_dir()),bs)
- target.append(bs+'.kidl')
- #target.append(bs+'_skel.cpp')
- return target, source
-
- DCOP_BUILDER = Builder(
- generator = dcopGenerator,
- emitter = dcopEmitter,
- suffix = '_skel.cpp',
- src_suffix = '.h' )
-
- ###### documentation (meinproc) processing
- MEINPROC_BUILDER = Builder(
- action = '$MEINPROC --check --cache $TARGET $SOURCE',
- suffix = '.cache.bz2',
- src_suffix = '.docbook' )
-
- ###### translation files builder
- TRANSFILES_BUILDER = Builder(
- action = '$MSGFMT $SOURCE -o $TARGET',
- suffix = '.gmo',
- src_suffix = '.po' )
-
- ###### libtool file builder
- def laGenerator(target, source, env, for_signature):
- act=[]
- act.append('echo "dlname=\''+source[0].name+'\'" > '+target[0].path)
- act.append('echo "library_names=\''+source[0].name+' '+source[0].name+' '+source[0].name+'\'" >> '+target[0].path)
- act.append('echo "old_library=\'\'">> '+target[0].path)
- act.append('echo "dependency_libs=\'\'">> '+target[0].path)
- act.append('echo "current=0">> '+target[0].path)
- act.append('echo "age=0">> '+target[0].path)
- act.append('echo "revision=0">> '+target[0].path)
- act.append('echo "installed=yes">> '+target[0].path)
- act.append('echo "shouldnotlink=no">> '+target[0].path)
- act.append('echo "dlopen=\'\'">> '+target[0].path)
- act.append('echo "dlpreopen=\'\'">> '+target[0].path)
- act.append('echo "libdir=\''+env['KDEMODULE']+'\'" >> '+target[0].path)
- return act
-
- LA_BUILDER = Builder(
- generator = laGenerator,
- suffix = '.la',
- src_suffix = '.so' )
-
-####### TODO : real libtool builder (but i hate libtool - ita)
-# def libtoolGenerator(target, source, env, for_signature):
-# act=[]
-# act.append('libtool $LIBTOOL_FLAGS $CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o '+target[0].path+' '+source[0].path)
-# return act
-# LIBTOOL_BUILDER = Builder(
-# generator = libtoolGenerator,
-# suffix = '.lo',
-# src_suffix = '.cpp' )
-
- ##### register the builders
- env['BUILDERS']['Uic'] = UIC_BUILDER
- env['BUILDERS']['Moc'] = MOC_BUILDER
- env['BUILDERS']['Moccpp'] = MOCCPP_BUILDER
- env['BUILDERS']['Dcop'] = DCOP_BUILDER
- env['BUILDERS']['Kcfg'] = KCFG_BUILDER
- env['BUILDERS']['LaFile'] = LA_BUILDER
- #env['BUILDERS']['Libtool'] = LIBTOOL_BUILDER
- env['BUILDERS']['Meinproc'] = MEINPROC_BUILDER
- env['BUILDERS']['Transfiles'] = TRANSFILES_BUILDER
-
- static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
- static_obj.src_builder.append('Uic')
- shared_obj.src_builder.append('Uic')
- static_obj.src_builder.append('Kcfg')
- shared_obj.src_builder.append('Kcfg')
- static_obj.src_builder.append('LaFile')
- shared_obj.src_builder.append('LaFile')
- static_obj.src_builder.append('Meinproc')
- shared_obj.src_builder.append('Meinproc')
- static_obj.src_builder.append('Transfiles')
- shared_obj.src_builder.append('Transfiles')
-
- ## find the files to moc, dcop, and link against kde and qt
- env.AppendUnique(PROGEMITTER = [MetasourcesStatic], SHLIBEMITTER=[MetasourcesShared], LIBEMITTER =[MetasourcesStatic])
-
- ###########################################
- ## Handy helpers for building kde programs
- ## You should not have to modify them ..
-
- import SCons.Util
- skel_ext = [".skel", ".SKEL"]
- def KDEfiles(target, source, env):
- """
- Returns a list of files for scons (handles kde tricks like .skel)
- It also makes custom checks against double includes like : ['file.ui', 'file.cpp']
- (file.cpp is already included because of file.ui)
- """
- src=[]
- ui_files=[]
- kcfg_files=[]
- skel_files=[]
- other_files=[]
-
- # For each file, check wether it is a dcop file or not, and create the complete list of sources
- for file in source:
- bs = SCons.Util.splitext(file)[0]
- ext = SCons.Util.splitext(file)[1]
- if ext in skel_ext:
- env.Dcop(bs+'.h')
- src.append(bs+'_skel.cpp')
- else:
- src.append(file)
-
- if ext == '.ui':
- ui_files.append(bs)
- elif ext == '.kcfgc':
- kcfg_files.append(bs)
- elif ext == '.skel':
- skel_files.append(bs)
- else:
- other_files.append(bs)
-
- # Now check against newbie errors
- for file in ui_files:
- for ofile in other_files:
- if ofile == file:
- print RED+"WARNING: You have included "+file+".ui and another file of the same prefix"+NORMAL
- print "Files generated by uic (file.h, file.cpp must not be included"
- for file in kcfg_files:
- for ofile in other_files:
- if ofile == file:
- print RED+"WARNING: You have included "+file+".kcfg and another file of the same prefix"+NORMAL
- print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included"
- #for file in skel_files:
- # for ofile in other_files:
- # if ofile == file:
- # print RED+"WARNING: source contain "+file+".skel and another file of the same prefix"+NORMAL
- # print "Files generated automatically from .skel file must not be included (file.h, file.idl)"
-
- return src
-
- # Special trick for installing rpms ...
- env['DESTDIR']=''
- if 'install' in env['TARGS'] and os.environ.has_key('DESTDIR'):
- env['DESTDIR']=os.environ['DESTDIR']+'/'
- print CYAN+'** Enabling DESTDIR for the project **' + NORMAL + env['DESTDIR']
-
- def KDEinstall(path, file, lenv):
- """ Quick wrapper """
- if 'install' in lenv['TARGS']:
- lenv.Alias('install', lenv.Install( lenv['DESTDIR']+path, file ) )
-
- def KDEinstallas(destfile, file, lenv):
- """ Quick wrapper """
- if 'install' in lenv['TARGS']:
- lenv.Alias('install', lenv.InstallAs( lenv['DESTDIR']+destfile, file ) )
-
- def KDEprogram(target, source, lenv):
- """ Makes a kde program
- The program is installed except if one sets env['NOAUTOINSTALL'] """
- src = KDEfiles(target, source, lenv)
- lenv.Program(target, src)
- if not lenv.has_key('NOAUTOINSTALL'):
- KDEinstall(env['KDEBIN'], target, lenv)
-
- def KDEshlib(target, source, lenv):
- """ Makes a shared library for kde (.la file for klibloader)
- The library is installed except if one sets env['NOAUTOINSTALL'] """
- src = KDEfiles(target, source, lenv)
- lenv.SharedLibrary( target, src )
- lenv.LaFile( target, target+'.so' )
- if not lenv.has_key('NOAUTOINSTALL'):
- KDEinstall(env['KDEMODULE'], target+'.so', lenv)
- KDEinstall(env['KDEMODULE'], target+'.la', lenv)
-
- def KDEstaticlib(target, source, lenv):
- """ Makes a static library for kde - in practice you should not use static libraries
- 1. they take more memory than shared ones
- 2. makefile.am needed it because of stupid limitations
- (cannot handle sources in separate folders - takes extra processing) """
- src = KDEfiles(target, source, lenv)
- lenv.StaticLibrary( target, src )
-# # do not install static libraries
-# if not lenv.has_key('NOAUTOINSTALL'):
-# KDEinstall(env['KDEMODULE'], target+'.a', lenv)
-
- def KDEaddlibs(libs, lenv):
- """ Helper function """
- lenv.AppendUnique(LIBS = libs)
-
- def KDEaddpaths(paths, lenv):
- """ Helper function """
- lenv.AppendUnique(CPPPATH = paths)
-
- def KDElang(transfiles, lenv):
- """ Process translations (.po files) in a po/ dir """
- if not lenv['APPNAME']:
- print "define lenv['APPNAME'] before using KDElang !!"
- return
- for lang in transfiles:
- lenv.Transfiles( lang+'.po' )
- KDEinstallas( lenv['KDELOCALE']+'/'+lang+'/LC_MESSAGES/'+lenv['APPNAME']+'.mo',
- lang+'.gmo', lenv )
-
- def KDEdoc(lang, file, lenv):
- """ Install the documentation """
- if not lenv['APPNAME']:
- print "define lenv['APPNAME'] before using KDEdoc !!"
- env.Exit(1)
- KDEinstall( lenv['KDEDOC']+'/'+lang+'/'+lenv['APPNAME'], file, lenv )
-
- # Export variables so that sconscripts in subdirectories can use them
- env.Export("KDEprogram KDEshlib KDEaddpaths KDEaddlibs KDEinstall KDEinstallas KDElang KDEdoc")
-
diff --git a/scons/scons-mini.tar.bz2 b/scons/scons-mini.tar.bz2
deleted file mode 100644
index 0c1ce52..0000000
--- a/scons/scons-mini.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..a4228f6
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory( app )
+add_subdirectory( part )
diff --git a/src/SConscript b/src/SConscript
deleted file mode 100644
index 31c1933..0000000
--- a/src/SConscript
+++ /dev/null
@@ -1,21 +0,0 @@
-
-############################
-## load the config
-
-## Use the environment and the tools set in the top-level
-## SConstruct file (set with 'Export') - this is very important
-
-Import( '*' )
-myenv=env.Copy()
-
-myenv.SConscript( dirs = Split( "app part") )
-
-KDEinstall( env['KDEDATA']+'/codeine', '../misc/codeineui.rc', myenv )
-KDEinstall( env['KDEDATA']+'/konqueror/servicemenus', '../misc/codeine_play_dvd.desktop', myenv )
-KDEinstall( env['KDESERV'], '../misc/codeine_part.desktop', myenv )
-KDEinstall( env['KDEXDG'], '../misc/codeine.desktop', myenv )
-
-for size in ['16', '22', '32', '48', '64', '128']:
- KDEinstallas( env['KDEICONS']+'/crystalsvg/'+size+'x'+size+'/apps/codeine.png', '../misc/cr'+size+'-app-codeine.png', myenv )
-
-#print env['KDECXXFLAGS'] \ No newline at end of file
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
new file mode 100644
index 0000000..60a21e4
--- /dev/null
+++ b/src/app/CMakeLists.txt
@@ -0,0 +1,54 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${XINE_INCLUDE_DIRS}
+ ${X11_INCLUDE_DIR}
+ ${X11_XTEST_INCLUDE_DIRS}
+ ${X11_KEYSIM_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### codeine (executable)
+
+tde_add_executable( ${PROJECT_NAME} AUTOMOC
+
+ SOURCES
+ xineEngine.cpp
+ xineConfig.cpp
+ xineScope.c
+ theStream.cpp
+ videoWindow.cpp
+ videoSettings.cpp
+ captureFrame.cpp
+ actions.cpp
+ stateChange.cpp
+ slider.cpp
+ analyzer.cpp
+ playDialog.cpp
+ listView.cpp
+ adjustSizeButton.cpp
+ fullScreenAction.cpp
+ insertAspectRatioMenuItems.cpp
+ playlistFile.cpp
+ volumeAction.cpp
+ ../mxcl.library.cpp
+ main.cpp
+ mainWindow.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+ ${XINE_LIBRARIES}
+ ${X11_LIBRARIES}
+ ${X11_XTEST_LIBRARIES}
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/src/app/SConscript b/src/app/SConscript
deleted file mode 100644
index bb402f3..0000000
--- a/src/app/SConscript
+++ /dev/null
@@ -1,59 +0,0 @@
-
-############################
-## load the config
-
-## Use the environment and the tools set in the top-level
-## SConstruct file (set with 'Export') - this is very important
-
-Import( '*' )
-myenv=env.Copy()
-
-#############################
-## the programs to build
-
-# we put the stuff that could fail due to bad xine.h locations, etc. at the beginning
-# so if the build fails the user knows quickly
-app_sources = Split("""
- xineEngine.cpp
- xineConfig.cpp
- xineScope.c
- theStream.cpp
- videoWindow.cpp
- videoSettings.cpp
- captureFrame.cpp
-
- actions.cpp
- stateChange.cpp
- slider.cpp
- analyzer.cpp
- playDialog.cpp
- listView.cpp
- adjustSizeButton.cpp
- fullScreenAction.cpp
- insertAspectRatioMenuItems.cpp
- playlistFile.cpp
- volumeAction.cpp
-
- ../mxcl.library.cpp
-
- main.cpp
- mainWindow.cpp""")
-
-KDEprogram( "codeine", app_sources, myenv )
-
-
-############################
-## Customization
-
-## Additional include paths for compiling the source files
-## Always add '../' (top-level directory) because moc makes code that needs it
-KDEaddpaths( ['./', '../', '../../'], myenv )
-
-## Necessary libraries to link against
-KDEaddlibs( ['tqt-mt', 'tdeio', 'tdecore', 'tdeui', 'xine', 'Xtst'], myenv )
-
-## This shows how to add other link flags to the program
-myenv['LINKFLAGS'].append('-L/usr/X11R6/lib')
-
-## If you are using QThread, add this line
-# myenv.AppendUnique( CPPFLAGS = ['-DQT_THREAD_SUPPORT'] )
diff --git a/src/app/actions.cpp b/src/app/actions.cpp
index 1612a57..7447320 100644
--- a/src/app/actions.cpp
+++ b/src/app/actions.cpp
@@ -2,9 +2,9 @@
// See COPYING file for licensing information
#include "actions.h"
-#include "debug.h"
-#include "mxcl.library.h"
-#include <ntqtoolbutton.h>
+#include "../debug.h"
+#include "../mxcl.library.h"
+#include <tqtoolbutton.h>
#include "xineEngine.h"
namespace Codeine
diff --git a/src/app/adjustSizeButton.cpp b/src/app/adjustSizeButton.cpp
index 3a5c1dd..e1bf5b1 100644
--- a/src/app/adjustSizeButton.cpp
+++ b/src/app/adjustSizeButton.cpp
@@ -4,11 +4,11 @@
#include "adjustSizeButton.h"
#include "extern.h"
#include <kpushbutton.h>
-#include <ntqapplication.h>
-#include <ntqevent.h>
-#include <ntqlabel.h>
-#include <ntqlayout.h>
-#include <ntqpainter.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
#include "theStream.h"
#include "xineEngine.h" //videoWindow()
diff --git a/src/app/adjustSizeButton.h b/src/app/adjustSizeButton.h
index 9becd95..0dbe432 100644
--- a/src/app/adjustSizeButton.h
+++ b/src/app/adjustSizeButton.h
@@ -4,7 +4,7 @@
#ifndef CODEINE_ADJUST_SIZE_BUTTON_H
#define CODEINE_ADJUST_SIZE_BUTTON_H
-#include <ntqframe.h>
+#include <tqframe.h>
namespace Codeine
{
diff --git a/src/app/analyzer.cpp b/src/app/analyzer.cpp
index 593bd16..9d3da06 100644
--- a/src/app/analyzer.cpp
+++ b/src/app/analyzer.cpp
@@ -2,10 +2,10 @@
// See COPYING file for licensing information
#include "analyzer.h"
-#include "codeine.h"
-#include "debug.h"
+#include "../codeine.h"
+#include "../debug.h"
#include <math.h> //interpolate()
-#include <ntqevent.h> //event()
+#include <tqevent.h> //event()
#include "xineEngine.h"
#include "fht.cpp"
@@ -83,7 +83,7 @@ Analyzer::Base2D::resizeEvent( TQResizeEvent* )
// Author: Max Howell <max.howell@methylblue.com>, (C) 2003
// Copyright: See COPYING file that comes with this distribution
-#include <ntqpainter.h>
+#include <tqpainter.h>
Analyzer::Block::Block( TQWidget *parent )
: Analyzer::Base2D( parent, 20 )
@@ -108,7 +108,7 @@ Analyzer::Block::transform( Analyzer::Scope &scope ) //pure virtual
fht.scale( front, 1.0 / 40 );
}
-#include <math.h>
+
void
Analyzer::Block::analyze( const Analyzer::Scope &s )
{
@@ -129,3 +129,5 @@ Analyzer::Block::heightForWidth( int w ) const
{
return w / 2;
}
+
+#include "analyzer.moc"
diff --git a/src/app/analyzer.h b/src/app/analyzer.h
index edd526e..9a5af00 100644
--- a/src/app/analyzer.h
+++ b/src/app/analyzer.h
@@ -8,9 +8,9 @@
#include <sys/types.h>
#endif
-#include <ntqpixmap.h> //stack allocated and convenience
-#include <ntqtimer.h> //stack allocated
-#include <ntqwidget.h> //baseclass
+#include <tqpixmap.h> //stack allocated and convenience
+#include <tqtimer.h> //stack allocated
+#include <tqwidget.h> //baseclass
#include <vector> //included for convenience
namespace Analyzer
diff --git a/src/app/captureFrame.cpp b/src/app/captureFrame.cpp
index 6043b76..3be0e9f 100644
--- a/src/app/captureFrame.cpp
+++ b/src/app/captureFrame.cpp
@@ -1,21 +1,21 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include "debug.h"
+#include "../debug.h"
#include <tdefiledialog.h>
#include <kpreviewwidgetbase.h>
#include <kpushbutton.h>
#include <kstatusbar.h>
#include <kstdguiitem.h>
#include "mainWindow.h"
-#include "mxcl.library.h"
-#include <ntqdialog.h>
-#include <ntqhbox.h>
-#include <ntqlabel.h>
-#include <ntqimage.h>
-#include <ntqlayout.h>
-#include <ntqpainter.h>
-#include <ntqstringlist.h>
+#include "../mxcl.library.h"
+#include <tqdialog.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqstringlist.h>
#include "theStream.h"
#include "xineEngine.h"
#include <xine.h>
diff --git a/src/app/config.h b/src/app/codeineConfig.h
index 4ac877c..4ac877c 100644
--- a/src/app/config.h
+++ b/src/app/codeineConfig.h
diff --git a/src/app/fullScreenAction.cpp b/src/app/fullScreenAction.cpp
index 3787a33..006164d 100644
--- a/src/app/fullScreenAction.cpp
+++ b/src/app/fullScreenAction.cpp
@@ -5,7 +5,7 @@
#include "fullScreenAction.h"
#include <tdelocale.h>
#include <twin.h>
-#include <ntqwidget.h>
+#include <tqwidget.h>
#include "xineEngine.h" //videoWindow()
diff --git a/src/app/insertAspectRatioMenuItems.cpp b/src/app/insertAspectRatioMenuItems.cpp
index 2e2824c..81ad0b3 100644
--- a/src/app/insertAspectRatioMenuItems.cpp
+++ b/src/app/insertAspectRatioMenuItems.cpp
@@ -1,7 +1,7 @@
// Copyright 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include <ntqpopupmenu.h>
+#include <tqpopupmenu.h>
#include <xine.h>
TQString i18n( const char *text );
diff --git a/src/app/main.cpp b/src/app/main.cpp
index a024d5d..299df88 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -1,7 +1,7 @@
// (c) 2004 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include "codeine.h"
+#include "../codeine.h"
#include <tdeaboutdata.h>
#include <tdeapplication.h>
#include <tdecmdlineargs.h>
@@ -13,8 +13,8 @@ static TDEAboutData aboutData( APP_NAME,
I18N_NOOP(PRETTY_NAME), APP_VERSION,
I18N_NOOP("A video player that has a usability focus"), TDEAboutData::License_GPL_V2,
I18N_NOOP("Copyright 2006, Max Howell"), 0,
- "http://www.methylblue.com/codeine/",
- "codeine@methylblue.com" );
+ "https://mirror.git.trinitydesktop.org/gitea/TDE/codeine",
+ 0 );
static const TDECmdLineOptions options[] = {
{ "+[URL]", I18N_NOOP( "Play 'URL'" ), 0 },
diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp
index ac054ac..b31806b 100644
--- a/src/app/mainWindow.cpp
+++ b/src/app/mainWindow.cpp
@@ -1,12 +1,15 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "actions.h"
#include "analyzer.h"
-#include "config.h"
-#include "configure.h"
+#include "codeineConfig.h"
#include <cstdlib>
-#include "debug.h"
+#include "../debug.h"
#include "extern.h" //dialog creation function definitions
#include "fullScreenAction.h"
#include <tdeapplication.h>
@@ -23,13 +26,13 @@
#include "mainWindow.h"
#include "playDialog.h" //::play()
#include "playlistFile.h"
-#include "mxcl.library.h"
-#include <ntqcstring.h>
-#include <ntqdesktopwidget.h>
-#include <ntqevent.h> //::stateChanged()
-#include <ntqlayout.h> //ctor
-#include <ntqpopupmenu.h> //because XMLGUI is poorly designed
-#include <ntqobjectlist.h>
+#include "../mxcl.library.h"
+#include <tqcstring.h>
+#include <tqdesktopwidget.h>
+#include <tqevent.h> //::stateChanged()
+#include <tqlayout.h> //ctor
+#include <tqpopupmenu.h> //because XMLGUI is poorly designed
+#include <tqobjectlist.h>
#include "slider.h"
#include "theStream.h"
#include "volumeAction.h"
@@ -712,3 +715,5 @@ action( const char *name )
}
} //namespace Codeine
+
+#include "mainWindow.moc"
diff --git a/src/app/mainWindow.h b/src/app/mainWindow.h
index a6c7d48..0b44d0c 100644
--- a/src/app/mainWindow.h
+++ b/src/app/mainWindow.h
@@ -4,7 +4,7 @@
#ifndef CODEINEMAINWINDOW_H
#define CODEINEMAINWINDOW_H
-#include "codeine.h"
+#include "../codeine.h"
#include <tdemainwindow.h>
class KURL;
diff --git a/src/app/playDialog.cpp b/src/app/playDialog.cpp
index b6cacaa..ab650b9 100644
--- a/src/app/playDialog.cpp
+++ b/src/app/playDialog.cpp
@@ -1,7 +1,7 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include "config.h"
+#include "codeineConfig.h"
#include "listView.cpp"
#include <tdeapplication.h>
#include <tdeconfig.h>
@@ -10,11 +10,11 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
#include "playDialog.h"
-#include "mxcl.library.h"
-#include <ntqfile.h>
-#include <ntqlabel.h>
-#include <ntqlayout.h>
-#include <ntqsignalmapper.h>
+#include "../mxcl.library.h"
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsignalmapper.h>
TQString i18n( const char *text );
@@ -112,3 +112,5 @@ PlayDialog::done( TQListViewItem *item )
}
}
+
+#include "playDialog.moc"
diff --git a/src/app/playDialog.h b/src/app/playDialog.h
index 2bbc37d..1c84e2d 100644
--- a/src/app/playDialog.h
+++ b/src/app/playDialog.h
@@ -5,7 +5,7 @@
#define CODEINEPLAYDIALOG_H
#include <kurl.h>
-#include <ntqdialog.h>
+#include <tqdialog.h>
class TDEListView;
class TQBoxLayout;
diff --git a/src/app/playlistFile.cpp b/src/app/playlistFile.cpp
index 83b1f5d..d520fa2 100644
--- a/src/app/playlistFile.cpp
+++ b/src/app/playlistFile.cpp
@@ -5,13 +5,13 @@
//TODO error messages that vary depending on if the file is remote or not
-#include "codeine.h"
-#include "debug.h"
+#include "../codeine.h"
+#include "../debug.h"
#include <tdeio/netaccess.h>
#include "playlistFile.h"
-#include <ntqfile.h>
-#include <ntqtextstream.h>
-#include <mxcl.library.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include "../mxcl.library.h"
PlaylistFile::PlaylistFile( const KURL &url )
diff --git a/src/app/slider.cpp b/src/app/slider.cpp
index 205a3b8..172c15d 100644
--- a/src/app/slider.cpp
+++ b/src/app/slider.cpp
@@ -1,14 +1,14 @@
// (c) 2004 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include "debug.h"
+#include "../debug.h"
#include "slider.h"
-#include <ntqapplication.h>
-#include <ntqlabel.h>
-#include <ntqsize.h>
-#include <ntqtooltip.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqsize.h>
+#include <tqtooltip.h>
-#include <ntqpainter.h>
+#include <tqpainter.h>
#include "xineEngine.h"
using Codeine::Slider;
@@ -143,3 +143,5 @@ Slider::setValue( int newValue )
else
m_prevValue = newValue;
}
+
+#include "slider.moc"
diff --git a/src/app/slider.h b/src/app/slider.h
index b7cbae0..e739d72 100644
--- a/src/app/slider.h
+++ b/src/app/slider.h
@@ -4,7 +4,7 @@
#ifndef CODEINESLIDER_H
#define CODEINESLIDER_H
-#include <ntqslider.h>
+#include <tqslider.h>
namespace Codeine
{
diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp
index d547ff1..15846f5 100644
--- a/src/app/stateChange.cpp
+++ b/src/app/stateChange.cpp
@@ -3,16 +3,16 @@
#include "actions.h"
#include "adjustSizeButton.h"
-#include "debug.h"
+#include "../debug.h"
#include "mainWindow.h"
#include <tdeconfig.h>
#include <tdeglobal.h>
-#include "mxcl.library.h"
-#include <ntqapplication.h>
-#include <ntqevent.h>
-#include <ntqlabel.h>
-#include <ntqpopupmenu.h>
-#include <ntqslider.h>
+#include "../mxcl.library.h"
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqslider.h>
#include "theStream.h"
#include "videoSettings.h" //FIXME unfortunate
#include "xineEngine.h"
diff --git a/src/app/theStream.cpp b/src/app/theStream.cpp
index 246e84d..fbb35ac 100644
--- a/src/app/theStream.cpp
+++ b/src/app/theStream.cpp
@@ -2,7 +2,7 @@
// See COPYING file for licensing information
#include <kurl.h>
-#include "mxcl.library.h"
+#include "../mxcl.library.h"
#include "theStream.h"
#include <xine.h>
#include "xineEngine.h"
diff --git a/src/app/theStream.h b/src/app/theStream.h
index c71b5e8..7679a10 100644
--- a/src/app/theStream.h
+++ b/src/app/theStream.h
@@ -4,10 +4,10 @@
#ifndef CODEINE_THESTREAM_H
#define CODEINE_THESTREAM_H
-#include "config.h" // needed for inline functions
+#include "codeineConfig.h" // needed for inline functions
#include <kurl.h> // larger :( but no macros at least
-#include <ntqsize.h> // small header
-#include <ntqstring.h> // small header
+#include <tqsize.h> // small header
+#include <tqstring.h> // small header
/// for purely static classes
#define CODEINE_NO_EXPORT( T ) \
diff --git a/src/app/videoSettings.cpp b/src/app/videoSettings.cpp
index 19323d8..cf759c2 100644
--- a/src/app/videoSettings.cpp
+++ b/src/app/videoSettings.cpp
@@ -2,10 +2,10 @@
// See COPYING file for licensing information
#include <twin.h>
-#include "mxcl.library.h"
-#include <ntqlabel.h>
-#include <ntqlayout.h>
-#include <ntqslider.h>
+#include "../mxcl.library.h"
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqslider.h>
#include "videoSettings.h"
#include <xine.h>
#include "xineEngine.h"
diff --git a/src/app/videoSettings.h b/src/app/videoSettings.h
index c781169..0568cde 100644
--- a/src/app/videoSettings.h
+++ b/src/app/videoSettings.h
@@ -4,7 +4,7 @@
#ifndef CODEINE_VIDEO_SETTINGS_H
#define CODEINE_VIDEO_SETTINGS_H
-#include "codeine.h"
+#include "../codeine.h"
#include <kdialog.h>
diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp
index 0e7d19f..2ecf65a 100644
--- a/src/app/videoWindow.cpp
+++ b/src/app/videoWindow.cpp
@@ -6,15 +6,15 @@
#include "actions.h"
#include <cmath> //std::log10
#include <cstdlib>
-#include "debug.h"
+#include "../debug.h"
#include <tdeapplication.h> //::makeStandardCaption
#include <tdeconfig.h>
#include <kiconloader.h>
#include <tdepopupmenu.h>
#include <twin.h>
-#include "mxcl.library.h"
-#include <ntqcursor.h>
-#include <ntqevent.h>
+#include "../mxcl.library.h"
+#include <tqcursor.h>
+#include <tqevent.h>
#include "slider.h"
#include "theStream.h"
#include <X11/Xlib.h>
diff --git a/src/app/volumeAction.cpp b/src/app/volumeAction.cpp
index f9a1951..0c0b81c 100644
--- a/src/app/volumeAction.cpp
+++ b/src/app/volumeAction.cpp
@@ -3,14 +3,14 @@
#include <tdelocale.h>
#include <tdetoolbar.h>
-#include <ntqevent.h>
-#include <ntqlabel.h>
-#include <ntqlayout.h>
-#include <ntqslider.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqslider.h>
-#include "debug.h"
+#include "../debug.h"
#include "volumeAction.h"
-#include "volumeAction.moc"
+
#include "xineEngine.h"
@@ -112,3 +112,5 @@ VolumeAction::eventFilter( TQObject *o, TQEvent *e )
return false;
}
}
+
+#include "volumeAction.moc"
diff --git a/src/app/xineConfig.cpp b/src/app/xineConfig.cpp
index 07d402f..7be1c76 100644
--- a/src/app/xineConfig.cpp
+++ b/src/app/xineConfig.cpp
@@ -1,21 +1,21 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include "debug.h"
+#include "../debug.h"
#include <tdeapplication.h> // XineConfigDialog::ctor -> to get the iconloader
#include <kcombobox.h>
#include <kiconloader.h> // XineConfigDialog::ctor
#include <klineedit.h>
#include <kseparator.h>
#include <kstdguiitem.h>
-#include <ntqcheckbox.h>
-#include <ntqlabel.h>
-#include <ntqlayout.h>
-#include <ntqscrollview.h>
-#include <ntqspinbox.h>
-#include <ntqtabwidget.h>
-#include <ntqtooltip.h>
-#include <ntqvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <xine.h>
#include "xineConfig.h"
@@ -185,7 +185,7 @@ XineConfigDialog::isUnsavedSettings() const
return false;
}
-#include <ntqdir.h>
+#include <tqdir.h>
void
XineConfigDialog::saveSettings()
{
diff --git a/src/app/xineConfig.h b/src/app/xineConfig.h
index 7eb9ab8..5dc05f2 100644
--- a/src/app/xineConfig.h
+++ b/src/app/xineConfig.h
@@ -5,7 +5,7 @@
#define XINECONFIG_H
#include <kdialogbase.h>
-#include <ntqptrlist.h>
+#include <tqptrlist.h>
class KComboBox;
class KLineEdit;
diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp
index 9a7b709..295d155 100644
--- a/src/app/xineEngine.cpp
+++ b/src/app/xineEngine.cpp
@@ -5,14 +5,14 @@
#include "actions.h" //::seek() FIXME unfortunate
#include <cmath> //the fade out
-#include "config.h"
-#include "debug.h"
+#include "codeineConfig.h"
+#include "../debug.h"
#include <limits>
#include <tdelocale.h>
-#include "mxcl.library.h"
-#include <ntqapplication.h> //::sendEvent()
-#include <ntqdatetime.h> //record()
-#include <ntqdir.h> //::exists()
+#include "../mxcl.library.h"
+#include <tqapplication.h> //::sendEvent()
+#include <tqdatetime.h> //record()
+#include <tqdir.h> //::exists()
#include "slider.h"
#include "theStream.h"
#include <xine.h>
@@ -21,7 +21,6 @@
#include <unistd.h>
#include <cstdlib>
-
#define XINE_SAFE_MODE 1
extern "C" { void _debug( const char *string ) { debug() << string; } } //FIXME
@@ -876,3 +875,5 @@ VideoWindow::fileFilter() const
}
} //namespace Codeine
+
+#include "xineEngine.moc"
diff --git a/src/app/xineEngine.h b/src/app/xineEngine.h
index f1b49c3..57017ce 100644
--- a/src/app/xineEngine.h
+++ b/src/app/xineEngine.h
@@ -4,9 +4,9 @@
#ifndef CODEINE_VIDEOWINDOW_H
#define CODEINE_VIDEOWINDOW_H
-#include "codeine.h"
-#include <ntqtimer.h>
-#include <ntqwidget.h>
+#include "../codeine.h"
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <stdint.h>
#include <vector>
diff --git a/src/debug.h b/src/debug.h
index 436cceb..9214083 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -6,8 +6,8 @@
#define CODEINE_DEBUG_H
#include <kdebug.h>
-#include <ntqcstring.h>
-#include <ntqvariant.h>
+#include <tqcstring.h>
+#include <tqvariant.h>
#include <sys/time.h>
class TQApplication; ///@see Debug::Indent
diff --git a/src/mxcl.library.cpp b/src/mxcl.library.cpp
index 45c8ce4..786524a 100644
--- a/src/mxcl.library.cpp
+++ b/src/mxcl.library.cpp
@@ -2,7 +2,7 @@
// See COPYING file for licensing information
#include "mxcl.library.h"
-#include <ntqapplication.h>
+#include <tqapplication.h>
#include <kcursor.h>
namespace mxcl
diff --git a/src/mxcl.library.h b/src/mxcl.library.h
index 57eca2c..78dc9c6 100644
--- a/src/mxcl.library.h
+++ b/src/mxcl.library.h
@@ -17,7 +17,7 @@ namespace mxcl
/// almost always negates the need to #include <tdelocale.h> in implementations
-#include <ntqstring.h>
+#include <tqstring.h>
TQString i18n( const char *text );
diff --git a/src/part/CMakeLists.txt b/src/part/CMakeLists.txt
new file mode 100644
index 0000000..d544001
--- /dev/null
+++ b/src/part/CMakeLists.txt
@@ -0,0 +1,36 @@
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${XINE_INCLUDE_DIRS}
+ ${X11_INCLUDE_DIR}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+
+##### codeine (shared)
+
+tde_add_library( ${PROJECT_NAME} SHARED AUTOMOC
+
+ SOURCES
+ part.cpp
+ xineEngine.cpp
+ videoWindow.cpp
+ toolbar.cpp
+ ../mxcl.library.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeparts-shared
+ ${XINE_LIBRARIES}
+ ${X11_LIBRARIES}
+
+ DESTINATION ${LIB_INSTALL_DIR}
+)
diff --git a/src/part/SConscript b/src/part/SConscript
deleted file mode 100644
index ff2d085..0000000
--- a/src/part/SConscript
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright 2005 Max Howell <max.howell@methylblue.com>
-
-Import( "*" )
-myenv=env.Copy()
-
-## Additional paths for compiling the source files
-## Always add '../' (top-level directory) because moc makes code that needs it
-KDEaddpaths( ['./', '../', '../../'], myenv )
-
-KDEaddlibs( ['tqt-mt', 'tdecore', 'tdeui', 'tdeparts', 'xine'], myenv )
-
-KDEshlib( "libcodeine", Split( "part.cpp xineEngine.cpp videoWindow.cpp toolbar.cpp ../mxcl.library.cpp" ), myenv )
diff --git a/src/part/part.cpp b/src/part/part.cpp
index f251731..6490e67 100644
--- a/src/part/part.cpp
+++ b/src/part/part.cpp
@@ -1,17 +1,17 @@
// Author: Max Howell <max.howell@methylblue.com>, (C) 2005
// Copyright: See COPYING file that comes with this distribution
-#include "codeine.h"
-#include "debug.h"
+#include "../codeine.h"
+#include "../debug.h"
#include <tdeaboutdata.h>
#include <tdeparts/genericfactory.h>
#include "part.h"
-#include <ntqtimer.h>
+#include <tqtimer.h>
#include "toolbar.h"
#include "videoWindow.h"
#include <tdeaction.h>
-#include <ntqslider.h>
+#include <tqslider.h>
namespace Codeine
{
diff --git a/src/part/toolbar.cpp b/src/part/toolbar.cpp
index 87caa62..cdf85c3 100644
--- a/src/part/toolbar.cpp
+++ b/src/part/toolbar.cpp
@@ -2,8 +2,8 @@
// See COPYING file for licensing information
#include <kpushbutton.h>
-#include <ntqapplication.h>
-#include <ntqevent.h>
+#include <tqapplication.h>
+#include <tqevent.h>
#include "toolbar.h"
@@ -41,4 +41,4 @@ MouseOverToolBar::eventFilter( TQObject *o, TQEvent *e )
}
return false;
-} \ No newline at end of file
+}
diff --git a/src/part/videoWindow.cpp b/src/part/videoWindow.cpp
index 53cd0dd..79d09ae 100644
--- a/src/part/videoWindow.cpp
+++ b/src/part/videoWindow.cpp
@@ -4,10 +4,10 @@
#define CODEINE_DEBUG_PREFIX "videoWindow"
#include <cstdlib>
-#include "debug.h"
-#include <ntqapplication.h> //sendEvent()
-#include <ntqcursor.h>
-#include <ntqevent.h>
+#include "../debug.h"
+#include <tqapplication.h> //sendEvent()
+#include <tqcursor.h>
+#include <tqevent.h>
#include "videoWindow.h"
#include <X11/Xlib.h> //TODO this breaks compile for lots of people due to excessive macro content
#include <xine.h> //x11_visual_t
diff --git a/src/part/videoWindow.h b/src/part/videoWindow.h
index 0d0e4d5..76d2b6c 100644
--- a/src/part/videoWindow.h
+++ b/src/part/videoWindow.h
@@ -5,8 +5,8 @@
#define CODEINE_VIDEO_WINDOW_H
#include "../codeine.h"
-#include <ntqtimer.h>
-#include <ntqwidget.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kurl.h>
typedef struct xine_s xine_t;
diff --git a/src/part/xineEngine.cpp b/src/part/xineEngine.cpp
index 8424f37..5069e40 100644
--- a/src/part/xineEngine.cpp
+++ b/src/part/xineEngine.cpp
@@ -3,13 +3,13 @@
#define CODEINE_DEBUG_PREFIX "engine"
-#include "debug.h"
+#include "../debug.h"
#include <tdeglobalsettings.h>
#include <tdelocale.h>
-#include "mxcl.library.h"
-#include <ntqapplication.h> //::sendEvent()
-#include <ntqdatetime.h> //::play()
-#include <ntqdir.h> //TQDir::homeDir()
+#include "../mxcl.library.h"
+#include <tqapplication.h> //::sendEvent()
+#include <tqdatetime.h> //::play()
+#include <tqdir.h> //TQDir::homeDir()
#include <xine.h>
#include "videoWindow.h"
@@ -343,3 +343,5 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
}
} //namespace Codeine
+
+#include "videoWindow.moc"
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
new file mode 100644
index 0000000..42b186a
--- /dev/null
+++ b/translations/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories()
diff --git a/translations/messages/CMakeLists.txt b/translations/messages/CMakeLists.txt
new file mode 100644
index 0000000..75c89f8
--- /dev/null
+++ b/translations/messages/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/po/codeine.pot b/translations/messages/codeine.pot
index c98a10d..c98a10d 100644
--- a/po/codeine.pot
+++ b/translations/messages/codeine.pot