mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.0.9beta1.tar
This commit is contained in:
@@ -7,12 +7,25 @@ $!
|
||||
$!
|
||||
$! Set locations where zlib and libpng sources live.
|
||||
$!
|
||||
$ zpath = "[-.zlib]"
|
||||
$ pngpath = "[-.libpng]"
|
||||
$ zpath = ""
|
||||
$ pngpath = ""
|
||||
$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]"
|
||||
$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]"
|
||||
$!
|
||||
$! USE THESE INSTEAD if building from libpng's [.contrib.gregbook] directory:
|
||||
$! zpath = "[---.zlib]"
|
||||
$! pngpath = "[--]"
|
||||
$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]"
|
||||
$ if f$search("[--]png.h").nes."" then pngpath = "[--]"
|
||||
$!
|
||||
$ if zpath .eqs. ""
|
||||
$ then
|
||||
$ write sys$output "Zlib include not found. Exiting..."
|
||||
$ exit 2
|
||||
$ endif
|
||||
$!
|
||||
$ if pngpath .eqs. ""
|
||||
$ then
|
||||
$ write sys$output "Libpng include not found. Exiting..."
|
||||
$ exit 2
|
||||
$ endif
|
||||
$!
|
||||
$! Look for the compiler used.
|
||||
$!
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Microsoft Developer Studio Build File, Format Version 6.00 for
|
||||
msvctest
|
||||
|
||||
Assumes that libpng DLLs and LIBs are in ..\..\msvc\win32\libpng
|
||||
Assumes that zlib DLLs and LIBs are in ..\..\msvc\win32\zlib
|
||||
Assumes that libpng DLLs and LIBs are in ..\..\dll\msvc\win32\libpng
|
||||
Assumes that zlib DLLs and LIBs are in ..\..\dll\msvc\win32\zlib
|
||||
|
||||
To build:
|
||||
|
||||
|
||||
@@ -54,12 +54,12 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\msvc\win32\libpng\dll\libpng1.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\dll\msvc\win32\libpng\dll\libpng1.lib /nologo /subsystem:console /machine:I386
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=[Run Test]
|
||||
PostBuild_Cmds=set path=..\..\msvc\win32\libpng\dll;..\..\msvc\win32\zlib\dll; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
PostBuild_Cmds=set path=..\..\dll\msvc\win32\libpng\dll;..\..\dll\msvc\win32\zlib\dll; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "msvctest - Win32 Debug DLL"
|
||||
@@ -84,12 +84,12 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\msvc\win32\libpng\dll_dbg\libpng1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\dll\msvc\win32\libpng\dll_dbg\libpng1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbg
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=[Run Test]
|
||||
PostBuild_Cmds=set path=..\..\msvc\win32\libpng\dll_dbg;..\..\msvc\win32\zlib\dll_dbg; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
PostBuild_Cmds=set path=..\..\dll\msvc\win32\libpng\dll_dbg;..\..\dll\msvc\win32\zlib\dll_dbg; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "msvctest - Win32 ASM DLL"
|
||||
@@ -114,12 +114,12 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\msvc\win32\libpng\dll_asm\libpng1a.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\dll\msvc\win32\libpng\dll_asm\libpng1a.lib /nologo /subsystem:console /machine:I386
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_asm
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=[Run Test]
|
||||
PostBuild_Cmds=set path=..\..\msvc\win32\libpng\dll_asm;..\..\msvc\win32\zlib\dll_asm; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
PostBuild_Cmds=set path=..\..\dll\msvc\win32\libpng\dll_asm;..\..\dll\msvc\win32\zlib\dll_asm; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "msvctest - Win32 Debug ASM DLL"
|
||||
@@ -144,12 +144,12 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\msvc\win32\libpng\dll_dbga\libpng1b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\dll\msvc\win32\libpng\dll_dbga\libpng1b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbga
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=[Run Test]
|
||||
PostBuild_Cmds=set path=..\..\msvc\win32\libpng\dll_dbga;..\..\msvc\win32\zlib\dll_dbga; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
PostBuild_Cmds=set path=..\..\dll\msvc\win32\libpng\dll_dbga;..\..\dll\msvc\win32\zlib\dll_dbga; $(outdir)\msvctest.exe ..\..\pngtest.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "msvctest - Win32 LIB"
|
||||
@@ -174,7 +174,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\msvc\win32\libpng\lib\libpng.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\dll\msvc\win32\libpng\lib\libpng.lib /nologo /subsystem:console /machine:I386
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib
|
||||
SOURCE="$(InputPath)"
|
||||
@@ -204,7 +204,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\msvc\win32\libpng\lib_dbg\libpng.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\dll\msvc\win32\libpng\lib_dbg\libpng.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib_dbg
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
@@ -45,9 +45,9 @@ $ call make pnm2png.exe -
|
||||
$ write sys$output "Building png2pnm..."
|
||||
$ CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" -
|
||||
png2pnm.c
|
||||
$ call make pnm2png.exe -
|
||||
"LINK pnm2png,lib.opt/opt" -
|
||||
pnm2png.obj
|
||||
$ call make png2pnm.exe -
|
||||
"LINK png2pnm,lib.opt/opt" -
|
||||
png2pnm.obj
|
||||
$ exit
|
||||
$!
|
||||
$!
|
||||
|
||||
@@ -204,6 +204,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
|
||||
int row, col;
|
||||
int ret;
|
||||
int i;
|
||||
long dep_16;
|
||||
|
||||
/* read and check signature in PNG file */
|
||||
ret = fread (buf, 1, 8, png_file);
|
||||
@@ -379,8 +380,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
|
||||
if (raw)
|
||||
fputc ((int) *pix_ptr++ , pnm_file);
|
||||
else
|
||||
if (bit_depth == 16)
|
||||
fprintf (pnm_file, "%ld ", ((long) *pix_ptr++ << 8) + (long) *pix_ptr++);
|
||||
if (bit_depth == 16){
|
||||
dep_16 = (long) *pix_ptr++;
|
||||
fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++));
|
||||
}
|
||||
else
|
||||
fprintf (pnm_file, "%ld ", (long) *pix_ptr++);
|
||||
}
|
||||
@@ -397,8 +400,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
|
||||
if (raw)
|
||||
fputc ((int) *pix_ptr++ , alpha_file);
|
||||
else
|
||||
if (bit_depth == 16)
|
||||
fprintf (alpha_file, "%ld ", ((long) *pix_ptr++ << 8) + (long) *pix_ptr++);
|
||||
if (bit_depth == 16){
|
||||
dep_16 = (long) *pix_ptr++;
|
||||
fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++);
|
||||
}
|
||||
else
|
||||
fprintf (alpha_file, "%ld ", (long) *pix_ptr++);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ binaries, go to "http://www.schaik.com/png/visualpng.html".
|
||||
|
||||
Assumes that
|
||||
|
||||
libpng DLLs and LIBs are in ..\..\msvc\win32\libpng
|
||||
zlib DLLs and LIBs are in ..\..\msvc\win32\zlib
|
||||
libpng DLLs and LIBs are in ..\..\dll\msvc\win32\libpng
|
||||
zlib DLLs and LIBs are in ..\..\dll\msvc\win32\zlib
|
||||
libpng header files are in ..\..\..\libpng
|
||||
zlib header files are in ..\..\..\zlib
|
||||
the pngsuite images are in ..\pngsuite
|
||||
|
||||
@@ -60,11 +60,11 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
|
||||
# ADD LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\msvc\win32\libpng\dll"
|
||||
# ADD LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\dll\msvc\win32\libpng\dll"
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=set path=..\..\msvc\win32\libpng\dll;..\..\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
PostBuild_Cmds=set path=..\..\dll\msvc\win32\libpng\dll;..\..\dll\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug DLL"
|
||||
@@ -94,12 +94,12 @@ BSC32=bscmake.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\msvc\win32\libpng\dll_dbg"
|
||||
# ADD LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\dll\msvc\win32\libpng\dll_dbg"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbg
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=set path=..\..\msvc\win32\libpng\dll_dbg;..\..\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
PostBuild_Cmds=set path=..\..\dll\msvc\win32\libpng\dll_dbg;..\..\dll\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisualPng - Win32 LIB"
|
||||
@@ -128,8 +128,8 @@ BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\msvc\win32\libpng\dll"
|
||||
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\msvc\win32\libpng\lib"
|
||||
# ADD BASE LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\dll\msvc\win32\libpng\dll"
|
||||
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\dll\msvc\win32\libpng\lib"
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib
|
||||
SOURCE="$(InputPath)"
|
||||
@@ -161,9 +161,9 @@ BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\msvc\win32\libpng\dll_dbg"
|
||||
# ADD BASE LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\dll\msvc\win32\libpng\dll_dbg"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\msvc\win32\libpng\lib_dbg"
|
||||
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\dll\msvc\win32\libpng\lib_dbg"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib_dbg
|
||||
|
||||
Reference in New Issue
Block a user