SVN commit 594192 by cgilles:
kipi-plugins from trunk : RAW Converter : bye bye external dcraw depency :
Raw onverter plugin use a dedicaced dcraw binary program to run. This is mandatory since dcraw author have broken the command line options
compatibility with the 8.x serie.
Also, dcraw is not available like a library!
The dcraw.c source code embeded in plugin is just a copy of official implementation, but this one have been completly tested with plugin.
CCMAIL: kde-imaging@kde.org
M +24 -0 Makefile.am
A dcraw.c [POSSIBLY UNSAFE: scanf] [License: GENERATED FILE]
M +1 -1 dcrawbinary.cpp
M +6 -3 dcrawiface.cpp
M +15 -14 plugin_rawconverter.cpp
--- trunk/extragear/libs/kipi-plugins/rawconverter/Makefile.am #594191:594192
@@ -1,3 +1,6 @@
+# Requires by dcraw.c implementation.
+KDE_OPTIONS = nofinal
+
METASOURCES = AUTO
SUBDIRS = profiles
@@ -31,3 +34,24 @@
messages: rc.cpp
$(XGETTEXT) *.cpp *.h -o $(podir)/kipiplugin_rawconverter.pot
+#-- dcraw binary -------------------------------------------------
+
+# RawConverter plugin use a dedicaced dcraw binary program to run. This is mandatory
+# since dcraw author have broken the command line options
+# compatibility with the 8.x serie.
+# Also, dcraw is not available like a library.
+# The dcraw.c source code is just a copy of official implementation, but
+# this one have been completly tested with this plugin.
+# Note: dcraw project page is http://cybercom.net/~dcoffin
+
+bin_PROGRAMS = kipidcraw
+
+# This line is require to disable color management support (using LCMS library) witch
+# is not yet supported by plugin.
+kipidcraw_CFLAGS = -DNO_LCMS -w
+
+kipidcraw_SOURCES = dcraw.c
+
+kipidcraw_LDFLAGS = $(all_libraries) $(LIBJPEG) -lm
+
+
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawbinary.cpp #594191:594192
@@ -93,7 +93,7 @@
const char *DcrawBinary::path()
{
- return "dcraw";
+ return "kipidcraw";
}
bool DcrawBinary::isAvailable() const
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawiface.cpp #594191:594192
@@ -149,7 +149,8 @@
// -e : Extract the camera-generated thumbnail, not the raw image (JPEG or a PPM file).
// Note : this code require at least dcraw version 8.x
- command = "dcraw -c -e ";
+ command = DcrawBinary::path();
+ command += " -c -e ";
command += QFile::encodeName( KProcess::quote( path ) );
kdDebug( 51000 ) << "Running dcraw command " << command << endl;
@@ -194,7 +195,8 @@
// -w : Use camera white balance, if possible
f=NULL;
- command = "dcraw -c -h -w -a ";
+ command = DcrawBinary::path();
+ command += " -c -h -w -a ";
command += QFile::encodeName( KProcess::quote( path ) );
kdDebug( 51000 ) << "Running dcraw command " << command << endl;
@@ -264,7 +266,8 @@
// -c : write to stdout
// -i : identify files without decoding them.
- command = "dcraw -c -i ";
+ command = DcrawBinary::path();
+ command += " -c -i ";
command += QFile::encodeName( KProcess::quote( path ) );
kdDebug( 51000 ) << "Running dcraw command " << command << endl;
--- trunk/extragear/libs/kipi-plugins/rawconverter/plugin_rawconverter.cpp #594191:594192
@@ -131,13 +131,12 @@
{
KMessageBox::information(
kapp->activeWindow(),
- i18n("Unable to find the dcraw executable:
"
- "This program is required by this plugin to support raw file decoding. "
- "Please install dcraw as a package from your distributor "
- "or download the source.
"
- "Note: at least, dcraw version %2 is required by this plugin.
")
- .arg("http://www.cybercom.net/~dcoffin/dcraw")
- .arg(dcrawBinary.minimalVersion()),
+ i18n("Unable to find the %1 executable:
"
+ "This program is required by this plugin to support "
+ "Raw files decoding. "
+ "Please check %2 installation on your computer.
")
+ .arg(dcrawBinary.path())
+ .arg(dcrawBinary.path()),
QString::null,
QString::null,
KMessageBox::Notify | KMessageBox::AllowLink);
@@ -148,15 +147,17 @@
{
KMessageBox::information(
kapp->activeWindow(),
- i18n("dcraw executable isn't up to date:
"
- "The version %1 of dcraw have been found on your computer. "
+ i18n("%1 executable isn't up to date:
"
+ "The version %2 of %3 have been found on your computer. "
"This version is too old to run properly with this plugin. "
- "Please update dcraw as a package from your distributor "
- "or download the source.
"
- "Note: at least, dcraw version %3 is required by this "
- "plugin
")
+ "Please check %4 installation on your computer.
"
+ "Note: at least, %5 version %6 is required by this "
+ "plugin.
")
+ .arg(dcrawBinary.path())
.arg(dcrawVersion)
- .arg("http://www.cybercom.net/~dcoffin/dcraw")
+ .arg(dcrawBinary.path())
+ .arg(dcrawBinary.path())
+ .arg(dcrawBinary.path())
.arg(dcrawBinary.minimalVersion()),
QString::null,
QString::null,
_______________________________________________
Kde-imaging mailing list
Kde-imaging@kde.org
https://mail.kde.org/mailman/listinfo/kde-imaging