67 changed files with 992 additions and 1568 deletions
@ -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 ) |
@ -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 ) |
@ -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 |
@ -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 |
||||
} |
@ -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. |
||||
|
@ -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) |
@ -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 |
@ -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 |
||||
|
@ -0,0 +1 @@
|
||||
tde_create_handbook( DESTINATION ${PROJECT_NAME} ) |
@ -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: |
||||
--> |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,5 @@
|
||||
INSTALL( |
||||
FILES ${PROJECT_NAME}.1 |
||||
DESTINATION ${MAN_INSTALL_DIR}/man1 |
||||
COMPONENT doc |
||||
) |
@ -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>. |
@ -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 |
||||
) |
@ -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" |
||||
|
@ -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() |
@ -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) |
||||
|
@ -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 |
||||