Browse Source

Initial code import from debian snapshot

https://snapshot.debian.org/package/codeine/1.0.1-3.dfsg-3.1/

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 2 years ago
commit
5f44f7b187
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF
  1. 340
      COPYING
  2. 52
      ChangeLog
  3. 17
      PKGBUILD
  4. 48
      README
  5. 168
      SConstruct
  6. 1
      VERSION
  7. 87
      configure
  8. 9
      misc/codeine.desktop
  9. 10
      misc/codeine_part.desktop
  10. 39
      misc/codeine_play_dvd.desktop
  11. 10
      misc/codeinerc
  12. 33
      misc/codeineui.rc
  13. BIN
      misc/cr128-app-codeine.png
  14. BIN
      misc/cr16-app-codeine.png
  15. BIN
      misc/cr22-app-codeine.png
  16. BIN
      misc/cr32-app-codeine.png
  17. BIN
      misc/cr48-app-codeine.png
  18. BIN
      misc/cr64-app-codeine.png
  19. 484
      po/codeine.pot
  20. 60
      po/messages.sh
  21. 101
      scons/codeine.py
  22. 95
      scons/generic.py
  23. 771
      scons/kde.py
  24. BIN
      scons/scons-mini.tar.bz2
  25. 13
      src/FAQ
  26. 21
      src/SConscript
  27. 38
      src/TODO
  28. 59
      src/app/SConscript
  29. 27
      src/app/actions.cpp
  30. 26
      src/app/actions.h
  31. 125
      src/app/adjustSizeButton.cpp
  32. 37
      src/app/adjustSizeButton.h
  33. 131
      src/app/analyzer.cpp
  34. 75
      src/app/analyzer.h
  35. 296
      src/app/captureFrame.cpp
  36. 20
      src/app/config.h
  37. 28
      src/app/extern.h
  38. 262
      src/app/fht.cpp
  39. 126
      src/app/fht.h
  40. 96
      src/app/fullScreenAction.cpp
  41. 27
      src/app/fullScreenAction.h
  42. 24
      src/app/insertAspectRatioMenuItems.cpp
  43. 39
      src/app/listView.cpp
  44. 52
      src/app/main.cpp
  45. 714
      src/app/mainWindow.cpp
  46. 75
      src/app/mainWindow.h
  47. 114
      src/app/playDialog.cpp
  48. 36
      src/app/playDialog.h
  49. 123
      src/app/playlistFile.cpp
  50. 36
      src/app/playlistFile.h
  51. 145
      src/app/slider.cpp
  52. 52
      src/app/slider.h
  53. 195
      src/app/stateChange.cpp
  54. 144
      src/app/theStream.cpp
  55. 50
      src/app/theStream.h
  56. 135
      src/app/videoSettings.cpp
  57. 26
      src/app/videoSettings.h
  58. 380
      src/app/videoWindow.cpp
  59. 114
      src/app/volumeAction.cpp
  60. 29
      src/app/volumeAction.h
  61. 321
      src/app/xineConfig.cpp
  62. 69
      src/app/xineConfig.h
  63. 876
      src/app/xineEngine.cpp
  64. 159
      src/app/xineEngine.h
  65. 148
      src/app/xineScope.c
  66. 38
      src/app/xineScope.h
  67. 43
      src/codeine.h
  68. 263
      src/debug.h
  69. 19
      src/mxcl.library.cpp
  70. 28
      src/mxcl.library.h
  71. 12
      src/part/SConscript
  72. 83
      src/part/part.cpp
  73. 38
      src/part/part.h
  74. 44
      src/part/toolbar.cpp
  75. 18
      src/part/toolbar.h
  76. 192
      src/part/videoWindow.cpp
  77. 94
      src/part/videoWindow.h
  78. 345
      src/part/xineEngine.cpp

340
COPYING

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

52
ChangeLog

@ -0,0 +1,52 @@
1.0.1
Mute button for KPart
Play DVD entry for KDE 3.5 + media:/ when DVD inserted
DVD-Menu-Toggle is no longer a KToggleAction because I can't detect when DVD menus change, but it still acts as a toggle button
Made record work for systems other than mine! (hard-coded path)
Made record shortcut CTRL-R so it doesn't conflict with the DVD-Root-Menu toggle
videoWindow doesn't judder when toolbar appears in fullscreen anymore
dvd-toolbar is gone, instead root menu button appears when dvd is playing
toolbar in fullscreen mode shows on mouse move
toolbar in fullscreen mode respects user-positioning
media kioslave support
double-clicking the video toggles fullscreen
don't show part in K-Menu
a volume toolbar button, - available from the configure-toolbar dialog, it's not very good yet
1.0-rc2
Seek fixes
Improved error messages
KPart crash on exit fix
1.0-beta6
Frame capture function
Aspect Ratio setting
Snap for videoSettings dialog sliders
Polish to all dialogs, menus
Hide cursor in fullscreen mode bug fixed
Many other fixes and lots of polish
1.0-beta3
Made Codeine single-window
Removed Pause KAction, instead toggling play pauses
Made it remember all details about how you like to view videos (eg.
contrast, brightness, size)
Shows toolbar when mouse is a screen-top in fullscreen mode
Bug fixes
1.0-beta2
Fixed fullscreen not covering Kicker
Added stop KAction
Added "You must install!" message after make does linking
Set busy cursor during unresponsive init period
Made the GUI detect lack of a ui file and show a useful message
If you quit during playback, the track volume fades out
Various feel/feedback fixes
Recent-files list in initial definately doesn't have duplicates anymore, sort order is also corrected
Routed out some nasty freeze bugs
Automatic frame format change handling
Stream recording
Many little bug-fixes and improvements
1.0-beta1
Initial release

17
PKGBUILD

@ -0,0 +1,17 @@
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
}

48
README

@ -0,0 +1,48 @@
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 :-)

168
SConstruct

@ -0,0 +1,168 @@
#!/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 \"*.kdevelop.*\" | 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)

1
VERSION

@ -0,0 +1 @@
1.0.1

87
configure vendored

@ -0,0 +1,87 @@
#! /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

9
misc/codeine.desktop

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Codeine
Exec=codeine %u
Icon=codeine
Type=Application
Encoding=UTF-8
MimeType=video/x-theora;video/x-ogm;video/x-ms-wmv;video/x-msvideo;video/x-ms-asf;video/x-matroska;video/mpeg;video/avi;video/quicktime;video/vnd.rn-realvideo;video/x-flic;
Categories=Qt;KDE;AudioVideo;Player
GenericName=Video Player

10
misc/codeine_part.desktop

@ -0,0 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Icon=codeine
MimeType=video/x-theora;video/x-ogm;video/x-ms-wmv;video/x-msvideo;video/x-ms-asf;video/x-matroska;video/mpeg;video/avi;video/quicktime;video/vnd.rn-realvideo;video/x-flic;
Name=Codeine
Comment=Embeddable Video Player
ServiceTypes=KParts/ReadOnlyPart
Type=Service
X-KDE-Library=libcodeine
InitialPreference=9

39
misc/codeine_play_dvd.desktop

@ -0,0 +1,39 @@
[Desktop Entry]
ServiceTypes=media/dvdvideo
Actions=Play;
Encoding=UTF-8
X-KDE-Priority=TopLevel
[Desktop Action Play]
Name=Play DVD with Codeine
Name[bg]=Възпроизвеждане на DVD с Codeine
Name[bn]=ক্যাফিন দিয়ে ডিভিডি চালাও
Name[br]=Seniñ an DVD gant Codeine
Name[ca]=Reprodueix DVD amb Codeine
Name[cs]=Přehrát DVD v Codeine
Name[da]=Spil dvd med Codeine
Name[de]=DVD mit Codeine abspielen
Name[el]=Αναπαραγωγή DVD με το Codeine
Name[es]=Reproducir DVD con Codeine
Name[et]=Esita DVD Codeine'is
Name[fi]=Toista dvd-levy Codeinessa
Name[fr]=Lire le DVD avec Codeine
Name[ga]=Seinn DVD le Codeine
Name[he]=נגן תקליטור DVD עם Codeine
Name[it]=Riproduci DVD con Codeine
Name[ja]=CodeineでDVDを再生
Name[nb]=Spill DVD med Codeine
Name[nl]=DVD met Codeine afspelen
Name[nn]=Spel DVD med Codeine
Name[pa]=ਕੈਫੀਨ ਨਾਲ DVD ਚਲਾਓ
Name[pl]=Odtwarzaj DVD w Codeine
Name[pt]=Ver o DVD com o Codeine
Name[pt_BR]=Reproduzir o DVD com o Codeine
Name[sr]=Пусти DVD Codeine-ом
Name[sr@Latn]=Pusti DVD Codeine-om
Name[sv]=Spela dvd med Codeine
Name[tr]=DVD'yi Codeine ile oynat
Name[xx]=xxPlay DVD with Codeinexx
Name[zh_CN]=用 Codeine 播放 DVD
Icon=codeine
Exec=codeine --play-dvd %u

10
misc/codeinerc

@ -0,0 +1,10 @@
[KFileDialog Settings]
ShowPreviews=false
[MainWindow Toolbar dvdToolBar]
Hidden=true
IconText=IconTextRight
Index=0
[MainWindow Toolbar mainToolBar]
Index=1

33
misc/codeineui.rc

@ -0,0 +1,33 @@
<!DOCTYPE kpartgui>
<kpartgui name="codeine" version="4">
<MenuBar>
<Menu name="file" noMerge="1"><text>&amp;Play</text>
<Action name="play_media"/>
<Separator/>
<Action name="play"/>
<Action name="stop"/>
<Separator/>
<Action name="file_quit"/>
</Menu>
<Menu name="settings" noMerge="1"><text>&amp;Settings</text>
<Separator/><!-- this seperator doesn't show :( -->
<Action name="fullscreen"/>
<Separator/><!-- this seperator doesn't show :( -->
<Action name="options_configure_keybinding"/>
<Action name="options_configure_toolbars"/>
<Separator/>
<Action name="video_settings"/>
<Action name="xine_settings"/>
</Menu>
</MenuBar>
<ToolBar name="mainToolBar"><text>Main Toolbar</text>
<Action name="play"/>
<Separator lineSeparator="false"/>
<Action name="position_slider"/>
<Separator lineSeparator="false"/>
<Action name="toggle_dvd_menu"/>
<Action name="fullscreen"/>
</ToolBar>
</kpartgui>

BIN
misc/cr128-app-codeine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
misc/cr16-app-codeine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

BIN
misc/cr22-app-codeine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
misc/cr32-app-codeine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
misc/cr48-app-codeine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
misc/cr64-app-codeine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

484
po/codeine.pot

@ -0,0 +1,484 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-08-01 17:30+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/app/videoSettings.cpp:91
msgid "Video Settings"
msgstr ""
#: ../src/app/playDialog.cpp:27
msgid "Play Media"
msgstr ""
#: ../src/app/playDialog.cpp:33
msgid "What media would you like to play?"
msgstr ""
#: ../src/app/playDialog.cpp:38
msgid "Play File..."
msgstr ""
#: ../src/app/playDialog.cpp:42
msgid "Play VCD"
msgstr ""
#: ../src/app/playDialog.cpp:46
msgid "Play DVD"
msgstr ""
#: ../src/app/playDialog.cpp:73
msgid "Recently Played Media"
msgstr ""
#: ../src/app/xineConfig.cpp:60
msgid "Configure xine"
msgstr ""
#: ../src/app/xineConfig.cpp:84
msgid ""
"xine's defaults are usually sensible and should not require modification. "
"However, full configurability is provided for your pleasure ;-)."
msgstr ""
#: ../src/app/adjustSizeButton.cpp:31
msgid "Preferred Scale"
msgstr ""
#: ../src/app/adjustSizeButton.cpp:35
msgid "Scale 100%"
msgstr ""
#: ../src/app/adjustSizeButton.cpp:41
msgid "<b>Adjust video scale?"
msgstr ""
#: ../src/app/insertAspectRatioMenuItems.cpp:15
msgid "Determine &Automatically"
msgstr ""
#: ../src/app/insertAspectRatioMenuItems.cpp:17
msgid "&Square (1:1)"
msgstr ""
#: ../src/app/insertAspectRatioMenuItems.cpp:18
msgid "&4:3"
msgstr ""
#: ../src/app/insertAspectRatioMenuItems.cpp:19
msgid "Ana&morphic (16:9)"
msgstr ""
#: ../src/app/insertAspectRatioMenuItems.cpp:20
msgid "&DVB (2.11:1)"
msgstr ""
#: ../src/app/main.cpp:14
msgid "A video player that has a usability focus"
msgstr ""
#: ../src/app/main.cpp:15
msgid "Copyright 2005, Max Howell"
msgstr ""
#: ../src/app/main.cpp:19
msgid "Play 'URL'"
msgstr ""
#: ../src/app/main.cpp:28
msgid "Handbook"
msgstr ""
#: ../src/app/main.cpp:29
msgid "Great reference code"
msgstr ""
#: ../src/app/main.cpp:30
msgid "The current Codeine icon"
msgstr ""
#: ../src/app/main.cpp:31
msgid "The video for \"Call on Me\" encouraged plenty of debugging! ;)"
msgstr ""
#: ../src/app/playlistFile.cpp:32
msgid "The file is not a playlist"
msgstr ""
#: ../src/app/playlistFile.cpp:39
msgid "Codeine could not download the remote playlist: %1"
msgstr ""
#: ../src/app/playlistFile.cpp:54
msgid ""
"<qt>The playlist, <i>'%1'</i>, could not be interpreted. Perhaps it is empty?"
msgstr ""
#: ../src/app/playlistFile.cpp:58
msgid "Codeine could not open the file: %1"
msgstr ""
#: ../src/app/stateChange.cpp:83
msgid "&Pause"
msgstr ""
#: ../src/app/stateChange.cpp:83
msgid "&Play"
msgstr ""
#: ../src/app/stateChange.cpp:147
msgid "No media loaded"
msgstr ""
#: ../src/app/stateChange.cpp:150
msgid "Paused"
msgstr ""
#: ../src/app/actions.cpp:13 ../src/part/part.cpp:38
msgid "Play"
msgstr ""
#: ../src/app/xineEngine.cpp:127 ../src/part/xineEngine.cpp:50
msgid "xine was unable to initialize any video-drivers."
msgstr ""
#: ../src/app/xineEngine.cpp:129 ../src/part/xineEngine.cpp:48
msgid "xine was unable to initialize any audio-drivers."
msgstr ""
#: ../src/app/xineEngine.cpp:231
msgid "Loading media: %1"
msgstr ""
#: ../src/app/xineEngine.cpp:333
msgid "Recording to: %1"
msgstr ""
#: ../src/app/xineEngine.cpp:364
msgid "Playback paused"
msgstr ""
#: ../src/app/xineEngine.cpp:369
msgid "Playback resumed"
msgstr ""
#: ../src/app/xineEngine.cpp:382
msgid "There is no input plugin that can read: %1."
msgstr ""
#: ../src/app/xineEngine.cpp:385
msgid "There is no demux plugin available for %1."
msgstr ""
#: ../src/app/xineEngine.cpp:388
msgid "Demuxing failed for %1."
msgstr ""
#: ../src/app/xineEngine.cpp:393
msgid "Internal error while attempting to play %1."
msgstr ""
#: ../src/app/xineEngine.cpp:433
msgid "xine cannot currently seek in flac media"
msgstr ""
#: ../src/app/xineEngine.cpp:585 ../src/app/xineEngine.cpp:593
msgid "Channel %1"
msgstr ""
#: ../src/app/xineEngine.cpp:692 ../src/part/xineEngine.cpp:282
msgid "The source is encrypted and can not be decrypted."
msgstr ""
#: ../src/app/xineEngine.cpp:694 ../src/part/xineEngine.cpp:284
msgid "The host is unknown for the URL: <i>%1</i>"
msgstr ""
#: ../src/app/xineEngine.cpp:696 ../src/part/xineEngine.cpp:286
msgid "The device name you specified seems invalid."
msgstr ""
#: ../src/app/xineEngine.cpp:698 ../src/part/xineEngine.cpp:288
msgid "The network appears unreachable."
msgstr ""
#: ../src/app/xineEngine.cpp:700 ../src/part/xineEngine.cpp:290
msgid "Audio output unavailable; the device is busy."
msgstr ""
#: ../src/app/xineEngine.cpp:702 ../src/part/xineEngine.cpp:292
msgid "The connection was refused for the URL: <i>%1</i>"
msgstr ""
#: ../src/app/xineEngine.cpp:704 ../src/part/xineEngine.cpp:294
msgid "xine could not find the URL: <i>%1</i>"
msgstr ""
#: ../src/app/xineEngine.cpp:706 ../src/part/xineEngine.cpp:296
msgid "Access was denied for the URL: <i>%1</i>"
msgstr ""
#: ../src/app/xineEngine.cpp:708 ../src/part/xineEngine.cpp:298
msgid "The source cannot be read for the URL: <i>%1</i>"
msgstr ""
#: ../src/app/xineEngine.cpp:710 ../src/part/xineEngine.cpp:300
msgid "A problem occurred while loading a library or decoder."
msgstr ""
#: ../src/app/xineEngine.cpp:737 ../src/part/xineEngine.cpp:327
msgid "Sorry, no additional information is available."
msgstr ""
#: ../src/app/captureFrame.cpp:82
msgid "Capture - %1"
msgstr ""
#: ../src/app/captureFrame.cpp:98
msgid ""
"*.png|PNG Format\n"
"*.jpeg|JPEG Format"
msgstr ""
#: ../src/app/captureFrame.cpp:100
msgid "Save Frame"
msgstr ""
#: ../src/app/captureFrame.cpp:111
msgid "%1 saved successfully"
msgstr ""
#: ../src/app/captureFrame.cpp:113
msgid "Sorry, could not save %1"
msgstr ""
#: ../src/app/fullScreenAction.cpp:31
msgid "Exit F&ull Screen Mode"
msgstr ""
#: ../src/app/fullScreenAction.cpp:37
msgid "F&ull Screen Mode"
msgstr ""
#: ../src/app/mainWindow.cpp:94
msgid "&Subtitles"
msgstr ""
#: ../src/app/mainWindow.cpp:95
msgid "A&udio Channels"
msgstr ""
#: ../src/app/mainWindow.cpp:96
msgid "Aspect &Ratio"
msgstr ""
#: ../src/app/mainWindow.cpp:106
msgid "<qt>"
msgstr ""
#: ../src/app/mainWindow.cpp:106
msgid " could not load its interface, this probably means that "
msgstr ""
#: ../src/app/mainWindow.cpp:106
msgid ""
" is not installed to the correct prefix. If you installed from packages "
"please contact the packager, if you installed from source please try running "
"the <b>configure</b> script again like this: <pre> % ./configure --"
"prefix=`kde-config --prefix`</pre>"
msgstr ""
#: ../src/app/mainWindow.cpp:139
msgid "<qt>xine could not be successfully initialised. "
msgstr ""
#: ../src/app/mainWindow.cpp:139
msgid ""
" will now exit. You can try to identify what is wrong with your xine "
"installation using the <b>xine-check</b> command at a command-prompt."
msgstr ""
#: ../src/app/mainWindow.cpp:208
msgid "Play &Media..."
msgstr ""
#: ../src/app/mainWindow.cpp:214
msgid "Record"
msgstr ""
#: ../src/app/mainWindow.cpp:216
msgid "Reset Video Scale"
msgstr ""
#: ../src/app/mainWindow.cpp:217 ../src/app/mainWindow.cpp:423
msgid "Media Information"
msgstr ""
#: ../src/app/mainWindow.cpp:218
msgid "Menu Toggle"
msgstr ""
#: ../src/app/mainWindow.cpp:219
msgid "&Capture Frame"
msgstr ""
#: ../src/app/mainWindow.cpp:221
msgid "Video Settings..."
msgstr ""
#: ../src/app/mainWindow.cpp:222
msgid "Configure xine..."
msgstr ""
#: ../src/app/mainWindow.cpp:224
msgid "Position Slider"
msgstr ""
#: ../src/app/mainWindow.cpp:317
msgid "Codeine was asked to open an empty URL; it cannot."
msgstr ""
#: ../src/app/mainWindow.cpp:366
msgid "Supported Media Formats"
msgstr ""
#: ../src/app/mainWindow.cpp:366
msgid "All Files"
msgstr ""
#: ../src/app/mainWindow.cpp:367
msgid "Select A File To Play"
msgstr ""
#: ../src/app/mainWindow.cpp:438
msgid "&Determine Automatically"
msgstr ""
#: ../src/app/mainWindow.cpp:450
msgid "&Off"
msgstr ""
#: ../src/app/mainWindow.cpp:492
msgid "Sorry, no media was found in the drop"
msgstr ""
#: ../src/app/theStream.cpp:107
msgid "Metadata"
msgstr ""
#: ../src/app/theStream.cpp:109
msgid "Title"
msgstr ""
#: ../src/app/theStream.cpp:110
msgid "Comment"
msgstr ""
#: ../src/app/theStream.cpp:111
msgid "Artist"
msgstr ""
#: ../src/app/theStream.cpp:112
msgid "Genre"
msgstr ""
#: ../src/app/theStream.cpp:113
msgid "Album"
msgstr ""
#: ../src/app/theStream.cpp:114
msgid "Year"
msgstr ""
#: ../src/app/theStream.cpp:116
msgid "Audio Properties"
msgstr ""
#: ../src/app/theStream.cpp:118
msgid "Bitrate"
msgstr ""
#: ../src/app/theStream.cpp:118
msgid "%1 bps"
msgstr ""
#: ../src/app/theStream.cpp:119
msgid "Sample-rate"
msgstr ""
#: ../src/app/theStream.cpp:119
msgid "%1 Hz"
msgstr ""
#: ../src/app/theStream.cpp:121
msgid "Technical Information"
msgstr ""
#: ../src/app/theStream.cpp:123
msgid "Video Codec"
msgstr ""
#: ../src/app/theStream.cpp:124
msgid "Audio Codec"
msgstr ""
#: ../src/app/theStream.cpp:125
msgid "System Layer"
msgstr ""
#: ../src/app/theStream.cpp:126
msgid "Input Plugin"
msgstr ""
#: ../src/app/theStream.cpp:127
msgid "CDINDEX_DISCID"
msgstr ""
#: ../src/app/videoWindow.cpp:140
msgid "Pause"
msgstr ""
#: ../src/part/xineEngine.cpp:159
msgid "The Codeine video player could not find an input plugin for '%1'."
msgstr ""
#: ../src/part/xineEngine.cpp:162
msgid "The Codeine video player could not find a demux plugin for '%1'."
msgstr ""
#: ../src/part/xineEngine.cpp:165
msgid ""
"The Codeine video player failed to demux '%1'; please check your xine "
"installation."
msgstr ""
#: ../src/part/xineEngine.cpp:170
msgid ""
"The Codeine video player reports an internal error; please check your xine "
"installation."
msgstr ""
#: ../src/_translatorinfo.cpp:1
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr ""
#: ../src/_translatorinfo.cpp:3
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
msgstr ""

60
po/messages.sh

@ -0,0 +1,60 @@
#!/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
KDEDIR=`kde-config --prefix`
EXTRACTRC=extractrc
KDEPOT=`kde-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"

101
scons/codeine.py

@ -0,0 +1,101 @@
## 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 <qstring.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("kde-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 = 'qt-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()

95
scons/generic.py

@ -0,0 +1,95 @@
## 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):