Commit b8b7b74c authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 19

parent 254ff7cc
......@@ -2,6 +2,7 @@ TOPICS
------
* INSTALLATION
* UBUNTU NOTES
* SIXTY FOUR BIT
* DEBIAN NOTES
* UNINSTALLING
* BUG REPORTS
......@@ -129,7 +130,7 @@ Create printers:
Then it should be possible for you to print.
64 BIT
SIXTY FOUR BIT
------
There are two ways that I know to install in 64 bit.
1. This way is potentially the easiest, I have not tested it: jolting, made a repository with version c2esp08 (pretty much the same as the latest c2esp11, except no duplex option) Install it like this in terminal: sudo add-apt-repository ppa:jolting/cupsdriverkodak sudo apt-get update sudo apt-get install c2esp
......
......@@ -120,7 +120,7 @@ Create printers:
Then it should be possible for you to print.
64 BIT
SIXTY FOUR BIT
------
There are two ways that I know to install in 64 bit.
1. This way is potentially the easiest, I have not tested it: jolting, made a repository with version c2esp08 (pretty much the same as the latest c2esp11, except no duplex option) Install it like this in terminal: sudo add-apt-repository ppa:jolting/cupsdriverkodak sudo apt-get update sudo apt-get install c2esp
......
# Makefile for c2esp09 has -lcupsimage instead of /usr/lib/libcupsimage.so.2 (intention: to make sucessfully in non ubuntu distros)
# Makefile for c2esp13 has -lcups (intention: to make sucessfully in Fedora)
# Makefile for c2esp18a has myopldecode compiled but no longer installed
LANG=C
UNAME := $(shell uname)
MACH := $(shell uname -m | sed 's/i.86/x86_32/')
......@@ -15,9 +16,6 @@ endif
SYSNAME := $(shell uname -n)
# No version number yet...
#VERSION=0.0 #not used
# Installation prefix...
PREFIX=/usr/local
PREFIX=/usr
......@@ -57,68 +55,35 @@ ifneq ($(EUID),0)
LPgid=
endif
# I think modtime is not used 15/8/11
# Definition of modtime()
MODTIME= date -d "1/1/1970 utc + `stat -t $$1 | cut -f14 -d' '` seconds" "+%a %b %d %T %Y"
ifeq ($(UNAME),FreeBSD)
MODTIME= stat -f "%Sm" -t "%a %b %d %T %Y" $$1
endif
ifeq ($(UNAME),OpenBSD)
MODTIME= stat -f "%Sm" -t "%a %b %d %T %Y" $$1
endif
ifeq ($(UNAME),Darwin)
MODTIME= stat -f "%Sm" -t "%a %b %d %T %Y" $$1
endif
ifeq ($(UNAME),SunOS)
MODTIME= `ls -e $$1 | cut -c42-61`
endif
#MODTIME= date -d "1/1/1970 utc + `stat -t $$1 | cut -f14 -d' '` seconds" "+%a %b %d %T %Y"
#ifeq ($(UNAME),FreeBSD)
# MODTIME= stat -f "%Sm" -t "%a %b %d %T %Y" $$1
#endif
#ifeq ($(UNAME),OpenBSD)
# MODTIME= stat -f "%Sm" -t "%a %b %d %T %Y" $$1
#endif
#ifeq ($(UNAME),Darwin)
# MODTIME= stat -f "%Sm" -t "%a %b %d %T %Y" $$1
#endif
#ifeq ($(UNAME),SunOS)
# MODTIME= `ls -e $$1 | cut -c42-61`
#endif
#FILES is not used anymore
#FILES = \
# README \
# README.in \
# INSTALL \
# INSTALL.in \
# COPYING \
# ChangeLog \
# Makefile \
# jbig.c \
# jbig.h \
# jbig_ar.c \
# jbig_ar.h \
# c2esptst.c \
# cups.h \
# myopldecode.c \
# gamma.ps \
# gamma-lookup.ps \
# PPD/*.ppd \
# $(NULL)
# INSTALL.osx \
# INSTALL.usb \
# align.ps \
# testpage.ps \
# foomatic-db/*/*.xml \
# foomatic-test \
# getweb.in \
# usb_printerid.c \
# usb_printerid.1in \
# msexpand \
# includer-man \
# macros.man \
# regress.txt \
# printer-profile \
# printer-profile.1in \
# Programs and libraries
PROGS= myopldecode
#PROGS+= printer-profile
PROGS=
# put PROGS= myopldecode if you want to install this debug tool
#PROGS= myopldecode
# DEVPROGS are compiled but not installed
DEVPROGS= myopldecode
FILTERS= c2esp command2esp
#SHELLS=
MANPAGES=
#MANPAGES+= usb_printerid.1
#MANPAGES+= printer-profile.1
LIBJBG = jbig85.o jbig.o jbig_ar.o
#LIBJBG = jbig85.o jbig_ar.o
LIBJBG = jbig.o jbig_ar.o
LIBJBG85= jbig85.o jbig_ar.o
BINPROGS=
ifeq ($(UNAME),Linux)
......@@ -134,7 +99,7 @@ CFLAGS += -O2 -Wall
# The usual build rules
#
all: all-test $(FILTERS) $(PROGS) $(BINPROGS) $(SHELLS) all-done
all: all-test $(FILTERS) $(PROGS) $(DEVPROGS) $(BINPROGS) $(SHELLS) all-done
all-test:
#
......@@ -206,6 +171,8 @@ all-done:
@echo "countries where a patent licence is required for certain applications"
@echo "of this software module, you will have to obtain such a licence"
@echo "yourself."
@echo
@echo "The debug tool myopldecode is compiled, but not installed, put PROGS=myopldecode into the makefile if you want to install it."
#linkable stuff from ddk
#CUPSDRVLIBS = -lcupsimage -lcups -lgssapi_krb5 -lgnutls -lz -lpthread -lm -lcrypt
......@@ -213,26 +180,17 @@ all-done:
#CUPSLIBS = -lcups -lgssapi_krb5 -lgnutls -lz -lpthread -lm -lcrypt
#CUPSLIBS_ST = /usr/lib/libcups.a -lgssapi_krb5 -lgnutls -lz -lpthread -lm -lcrypt
c2esptst: c2esptst.o $(LIBJBG)
$(CC) $(CFLAGS) -o $@ c2esptst.o -lcupsimage -lcups -lcupsdriver $(LIBJBG)
#last $(CC) $(CFLAGS) -o $@ c2esptst.o -lcupsimage -lcups -lgssapi_krb5 -lgnutls -lz -lpthread -lm -lcrypt $(LIBJBG) libcupsdriver.a
#was $(CC) $(CFLAGS) -o $@ c2esptst.o -lcupsimage $(LIBJBG) libcupsdriver.a
#c2esptst: c2esptst.o $(LIBJBG)
# $(CC) $(CFLAGS) -o $@ c2esptst.o -lcupsimage -lcups -lcupsdriver $(LIBJBG)
c2esp: c2esp.o $(LIBJBG)
# /usr/lib/libcupsimage.so.2 replaced by -lcupsimage
# libcupsdriver.a removed
$(CC) $(CFLAGS) -o $@ c2esp.o -lcupsimage -lcups -lcupsdriver $(LIBJBG)
# previous version below, simplified version above
# $(CC) $(CFLAGS) -o $@ c2esp.o -lcups -lgssapi_krb5 -lgnutls -lz -lpthread -lm -lcrypt /usr/lib/libcupsimage.so.2 $(LIBJBG)
c2esp: c2esp.o $(LIBJBG85)
$(CC) $(CFLAGS) -o $@ c2esp.o -lcupsimage -lcups -lcupsdriver $(LIBJBG85)
command2esp: command2esp.o
# $(CC) $(CFLAGS) -o $@ command2esp.o -lcups -lcupsdriver
$(CC) $(CFLAGS) -o $@ command2esp.o -lcups -lcupsdriver
myopldecode: myopldecode.o $(LIBJBG)
$(CC) $(CFLAGS) -g myopldecode.o $(LIBJBG) -o $@
$(CC) $(CFLAGS) -o $@ $@.o $(LIBJBG)
#
# Installation rules
......@@ -241,7 +199,7 @@ myopldecode: myopldecode.o $(LIBJBG)
install: all install-test install-prog install-ppd install-doc
# Now use your printer configuration GUI to create a new printer.
# The debug tool myopldecode is compiled, but not installed, put PROGS=myopldecode into the makefile if you want to install it.
install-test:
#
# Installation Dependencies...
......@@ -258,8 +216,10 @@ install-prog:
# Install driver, and development tools
#
$(INSTALL) -d $(BIN)
$(INSTALL) -c $(PROGS) $(BIN)/
if [ "$(PROGS)" != "" ]; then \
$(INSTALL) -d $(BIN); \
$(INSTALL) -c $(PROGS) $(BIN); \
fi
$(INSTALL) -d $(FILTERBIN)
$(INSTALL) -c $(FILTERS) $(SHELLS) $(FILTERBIN)/
......@@ -317,22 +277,27 @@ install-doc: doc
# make README file from README.in
README: README.in
rm -f $@
sed < $@.in > $@ \
-e "s@\$${URLOAK}@$(URLOAK)@" \
-e "s@\$${URLZJS}@$(URLZJS)@"
cp $@.in $@
# changed 15/8/11 these URLs no longer used?
# sed < $@.in > $@ \
# -e "s@\$${URLOAK}@$(URLOAK)@" \
# -e "s@\$${URLZJS}@$(URLZJS)@"
chmod -w $@
# make INSTALL file from INSTALL.in
# adds a contents section to the start, using the capitalised subject headings.
INSTALL: INSTALL.in Makefile
#INSTALL: INSTALL.in Makefile
INSTALL: INSTALL.in
rm -f $@
echo "TOPICS" > $@.tmp
echo "------" >> $@.tmp
grep ^[A-Z][A-Z] $@.in | sed "s/^/ * /" >> $@.tmp
echo >> $@.tmp
cat $@.tmp $@.in | sed > $@ \
-e "s@\$${URLOAK}@$(URLOAK)@" \
-e "s@\$${URLZJS}@$(URLZJS)@"
cat $@.tmp $@.in > $@
# changed 15/8/11 these URLs no longer used?
# cat $@.tmp $@.in | sed > $@ \
# -e "s@\$${URLOAK}@$(URLOAK)@" \
# -e "s@\$${URLZJS}@$(URLZJS)@"
rm -f $@.tmp
chmod -w $@
......@@ -344,8 +309,8 @@ uninstall:
# -rm -rf /usr/share/ppd/c2esp/
-rm -rf $(PPDDIR)
-rm -f $(BIN)/myopldecode
-rm -f $(BIN)/c2esptst
-rm -f $(FILTERBIN)/c2esptst
# -rm -f $(BIN)/c2esptst
# -rm -f $(FILTERBIN)/c2esptst
-rm -f $(BIN)/c2esp
-rm -f $(FILTERBIN)/c2esp
# done
......@@ -358,7 +323,7 @@ uninstall:
# Clean
#
clean:
-rm -f $(PROGS) $(BINPROGS) $(SHELLS) $(FILTERS)
-rm -f $(PROGS) $(BINPROGS) $(SHELLS) $(FILTERS) $(DEVPROGS)
-rm -f *.o
-rm -f *~
-rm -f ppd/*~
......@@ -369,7 +334,7 @@ clean:
# -rm -f $(MANPAGES) manual.pdf
# -rm -f *.zjs *.zm *.zc *.zc? *.zc?? *.oak *.pbm *.pksm *.cmyk
# -rm -f pksm2bitcmyk
-rm -f *.icm.*.ps
# -rm -f *.icm.*.ps
# cd icc2ps; $(MAKE) $@
#
......@@ -377,7 +342,7 @@ clean:
#
jbig.o: jbig.h
jbig85.o: jbig85.h
c2esptst.o: jbig85.h
#c2esptst.o: jbig85.h
c2esp.o: jbig85.h
myopldecode.o: jbig.h
......
......@@ -4,6 +4,10 @@ Readme file for Kodak ESP 5xxx cups driver.
Please read the "INSTALL" file to see how to install this software.
VERSION NOTES
Version 1.9
- This is functionally the same as 1.8, but various mods were made to reduce security risks (debug files are no longer created in /tmp unless you modify the makefile to require them). The debug tool myopldecode is no longer installed unless you modify the makefile to require it.
Version 1.8
- There is now a command filter. It is possible to refresh the ink level display before printing. Also possible to print the printers own self test page, and do a head clean from printer manager. Printing an alinment page should also be possible but there seems to be no button for that in printer manager.
- The ppd files have been reorganised. Now there is one for each model. If you have too many old files do a "sudo make uninstall" before doing "sudo make install" to remove the old files. There is no longer a special dither version of each ppd file, instead there are two colour options: "colour dither" and "colour nondither". dither is recommended, use nondither if you need something faster. Models 3200 and 5200 do not have the duplex option, 6100 and higher have the duplex option.
......
......@@ -4,6 +4,10 @@ Readme file for Kodak ESP 5xxx cups driver.
Please read the "INSTALL" file to see how to install this software.
VERSION NOTES
Version 1.9
- This is functionally the same as 1.8, but various mods were made to reduce security risks (debug files are no longer created in /tmp unless you modify the makefile to require them). The debug tool myopldecode is no longer installed unless you modify the makefile to require it.
Version 1.8
- There is now a command filter. It is possible to refresh the ink level display before printing. Also possible to print the printers own self test page, and do a head clean from printer manager. Printing an alinment page should also be possible but there seems to be no button for that in printer manager.
- The ppd files have been reorganised. Now there is one for each model. If you have too many old files do a "sudo make uninstall" before doing "sudo make install" to remove the old files. There is no longer a special dither version of each ppd file, instead there are two colour options: "colour dither" and "colour nondither". dither is recommended, use nondither if you need something faster. Models 3200 and 5200 do not have the duplex option, 6100 and higher have the duplex option.
......
This diff is collapsed.
......@@ -23,6 +23,9 @@ Maintenance=003?
0096, OK, Maintenance Started;
*/
#define DEBUGFILES 0 /* DEBUGFILES 1 creates files in /tmp to help debug */
#define TESTING 0 /* TESTING 1 suppresses output to the printer to help debug */
/*
* Include necessary headers...
*/
......@@ -65,14 +68,19 @@ HandleReply()
void DoLog(char *PrintFormat, int I1, int I2)
{
//prints a line with 2 integers to the log file
if (LogFile == NULL)
return;
char LogFormat[100];
strcpy(LogFormat, "%d : ");
strcat(LogFormat,PrintFormat);
fprintf(LogFile, LogFormat, time(NULL)-StartTime, I1, I2);
}
void DoLogString(char *PrintFormat, char *String)
{
//prints a line with a string to the log file
if (LogFile == NULL)
return;
char LogFormat[100];
strcpy(LogFormat, "%d : ");
strcat(LogFormat,PrintFormat);
......@@ -176,20 +184,21 @@ main(int argc, /* I - Number of command-line arguments */
FILE *fp; /* Command file */
char line[1024], /* Line from file */
*lineptr; /* Pointer into line */
/* int feedpage; */ /* Feed the page */
ppd_file_t *ppd; /* PPD file */
int BlackPercent, ColourPercent;
int StatusLength;
/* char *ColourLevelString;
char *BlackLevelString;
*/
fputs("INFO: command2esp running\n", stderr);
fputs("INFO: command2esp running\n", stderr);
StartTime = time(NULL);
#if DEBUGFILES == 1
//fix this log file
chmod("/tmp/KodakCommandLog", S_IRUSR | S_IWUSR | S_IROTH ); //let anyone read it
remove("/tmp/KodakCommandLog"); //to be sure I only see the latest
LogFile = fopen("/tmp/KodakCommandLog", "w"); //open the log file
setbuf(LogFile, NULL);
fprintf(LogFile, "KodakCommandLog c2esp\n");
#endif
/*
* Check for valid arguments...
......@@ -298,26 +307,6 @@ main(int argc, /* I - Number of command-line arguments */
/* aquire ink levels here? DeviceStatus.Printer.InkLevelPercent.Colour=nn%&DeviceStatus.Printer.InkLevelPercent.Black=nn% */
if(StatusLength>0)
{
/* search for the ink data in the buffer using char *strstr(char *string2, char string*1);
MAKE THIS INTO A GENERAL FUNCTION FOR EITHER CARTRIDGE LATER */
/* ColourLevelString = strstr(BackBuf, "DeviceStatus.Printer.InkLevelPercent.Color=");
BlackLevelString = strstr(BackBuf, "DeviceStatus.Printer.InkLevelPercent.Black=");
//DoLogString("ColourLevelString=%s\n",ColourLevelString);
//DoLogString("BlackLevelString=%s\n",BlackLevelString);
ColourLevelString = strstr(ColourLevelString, "=")+1;
BlackLevelString = strstr(BlackLevelString, "=")+1;
if(strncmp(ColourLevelString,"F",1)==0) ColourPercent = 100;
else
{
ColourPercent = atoi(ColourLevelString);
}
if(strncmp(BlackLevelString,"F",1)==0) BlackPercent = 100;
else
{
BlackPercent = atoi(BlackLevelString);
}
*/
ColourPercent = MarkerPercent(BackBuf,1);
BlackPercent = MarkerPercent(BackBuf,0);
......@@ -345,10 +334,13 @@ MAKE THIS INTO A GENERAL FUNCTION FOR EITHER CARTRIDGE LATER */
*/
ppdClose(ppd);
if(LogFile != NULL) fclose(LogFile);
if (fp != stdin) fclose(fp);
chmod("/tmp/KodakCommandLog", S_IRUSR | S_IWUSR | S_IROTH ); //let anyone read it
if(LogFile != NULL)
{
fclose(LogFile);
chmod("/tmp/KodakCommandLog", S_IRUSR | S_IWUSR | S_IROTH ); //let anyone read it
}
return (0);
}
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment