fonts = n021003l.pfb n021023l.pfb n021004l.pfb n021024l.pfb n019003l.pfb n019023l.pfb n019004l.pfb n019024l.pfb n022003l.pfb n022023l.pfb n022004l.pfb n022024l.pfb s050000l.pfb d050000l.pfb n021003l.afm n021023l.afm n021004l.afm n021024l.afm n019003l.afm n019023l.afm n019004l.afm n019024l.afm n022003l.afm n022023l.afm n022004l.afm n022024l.afm s050000l.afm d050000l.afm
SWFOutputDev.o: swfoutput.h SWFOutputDev.cc
- $(CC) -DDATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf SWFOutputDev.cc -o $@
+ $(CC) -DSWFTOOLS_DATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf SWFOutputDev.cc -o $@
spline.o: spline.cc spline.h
- $(CC) -DDATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf spline.cc -o $@
+ $(CC) -DSWFTOOLS_DATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf spline.cc -o $@
encodings.o: encodings.cc
- $(CC) -DDATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf encodings.cc -o $@
+ $(CC) -DSWFTOOLS_DATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf encodings.cc -o $@
swfoutput.o: swfoutput.cc swfoutput.h spline.h
- $(CC) -DDATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf swfoutput.cc -o $@
+ $(CC) -DSWFTOOLS_DATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf swfoutput.cc -o $@
pdf2swf.o: pdf2swf.cc SWFOutputDev.h
- $(CC) -DDATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf pdf2swf.cc -o $@
+ $(CC) -DSWFTOOLS_DATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf pdf2swf.cc -o $@
font2swf.o: font2swf.cc swfoutput.h spline.h
- $(CC) -DDATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf font2swf.cc -o $@
+ $(CC) -DSWFTOOLS_DATADIR=\"$(pkgdatadir)\" -I../lib -Ittf2pt1 -Ixpdf font2swf.cc -o $@
pdf2swf: pdf2swf.o SWFOutputDev.o swfoutput.o encodings.o spline.o xpdf/pdflib.a ttf2pt1/ttf2pt1.a ../lib/librfxswf.a
$(LL) pdf2swf.o SWFOutputDev.o swfoutput.o encodings.o spline.o -o pdf2swf ../lib/librfxswf.a ttf2pt1/ttf2pt1.a xpdf/libpdf.a $(LIBS)
//T1LIB_CONFIG.
putenv( "T1LIB_CONFIG=/tmp/t1lib.config.tmp");
FILE*fi = fopen("/tmp/t1lib.config.tmp", "wb");
- fprintf(fi, "FONTDATABASE=/tmp/FontDataBase\n", DATADIR);
- fprintf(fi, "ENCODING=%s/fonts:.\n", DATADIR);
- fprintf(fi, "AFM=%s/fonts:.\n", DATADIR);
- fprintf(fi, "TYPE1=%s/fonts:.\n", DATADIR);
+ fprintf(fi, "FONTDATABASE=/tmp/FontDataBase\n", SWFTOOLS_DATADIR);
+ fprintf(fi, "ENCODING=%s/fonts:.\n", SWFTOOLS_DATADIR);
+ fprintf(fi, "AFM=%s/fonts:.\n", SWFTOOLS_DATADIR);
+ fprintf(fi, "TYPE1=%s/fonts:.\n", SWFTOOLS_DATADIR);
fclose(fi);
fi = fopen("/tmp/FontDataBase", "wb");
if(all) {
else if (!strcmp(name, "l"))
{
char buf[256];
- sprintf(buf, "%s/swfs/default_loader.swf", DATADIR);
+ sprintf(buf, "%s/swfs/default_loader.swf", SWFTOOLS_DATADIR);
preloader = strdup(buf);
return 0;
}
else if (!strcmp(name, "b"))
{
char buf[256];
- sprintf(buf, "%s/swfs/default_viewer.swf", DATADIR);
+ sprintf(buf, "%s/swfs/default_viewer.swf", SWFTOOLS_DATADIR);
viewer = strdup(buf);
return 0;
}
}
else
{
- systemf("ls %s/swfs/*_loader.swf", DATADIR);
+ systemf("ls %s/swfs/*_loader.swf", SWFTOOLS_DATADIR);
if(!system_quiet)
printf("\n");
exit(1);
}
else
{
- systemf("ls %s/swfs/*_viewer.swf", DATADIR);
+ systemf("ls %s/swfs/*_viewer.swf", SWFTOOLS_DATADIR);
if(!system_quiet)
printf("\n");
exit(1);
#ifndef SYSTEM_BACKTICKS
printf("The following might not work because your system call doesn't support command substitution:\n");
#endif
- printf("-b --defaultviewer Link default viewer to the pdf (%s/swfs/default_viewer.swf)\n", DATADIR);
- printf("-l --defaultpreloader Link default preloader the pdf (%s/swfs/default_loader.swf)\n", DATADIR);
+ printf("-b --defaultviewer Link default viewer to the pdf (%s/swfs/default_viewer.swf)\n", SWFTOOLS_DATADIR);
+ printf("-l --defaultpreloader Link default preloader the pdf (%s/swfs/default_loader.swf)\n", SWFTOOLS_DATADIR);
printf("-B --viewer=filename Link viewer \"name\" to the pdf (\"%s -B\" for list)\n", name);
printf("-L --preloader=filename Link preloader \"name\" to the pdf (\"%s -L\" for list)\n",name);
}
exit(0);
}
- logf("<verbose> reading font files from %s/fonts\n", DATADIR);
+ logf("<verbose> reading font files from %s/fonts\n", SWFTOOLS_DATADIR);
//TODO: use tempnam here. Check if environment already contains a
//T1LIB_CONFIG.
putenv( "T1LIB_CONFIG=/tmp/t1lib.config.tmp");
}
t1searchpath[0] = 0;
#ifdef HAVE_DIRENT_H
- sprintf(buf, "%s/fonts",DATADIR);
+ sprintf(buf, "%s/fonts",SWFTOOLS_DATADIR);
// pass 1
addfontdir(0, buf, &numfonts, 0);
for(t=0;t<fontpathpos;t++) {
/* This is a workaround. The correct way would be to
get directory listings working on all systems.
*/
- strcpy(t1searchpath, DATADIR);
+ strcpy(t1searchpath, SWFTOOLS_DATADIR);
strcat(t1searchpath, "/fonts");
fprintf(db, "14\n");
fprintf(db, "n021003l.afm\n");
if(preloader && !viewer) {
logf("<warning> --preloader option without --viewer option doesn't make very much sense.");
ret = systemf("swfcombine `swfdump -r %s` %s/swfs/PreLoaderTemplate.swf loader=%s movie=%s -o %s",
- preloader, DATADIR, preloader, outputname, outputname);
+ preloader, SWFTOOLS_DATADIR, preloader, outputname, outputname);
if(!system_quiet)
printf("\n");
}
systemf("swfcombine %s viewport=%s -o __tmp__.swf",
viewer, outputname, outputname);
systemf("swfcombine `swfdump -XY %s` `swfdump -r %s` %s/swfs/PreLoaderTemplate.swf loader=%s movie=__tmp__.swf -o %s",
- outputname, preloader, DATADIR, preloader, outputname);
+ outputname, preloader, SWFTOOLS_DATADIR, preloader, outputname);
systemf("rm __tmp__.swf");
}