]> granicus.if.org Git - python/commitdiff
Build the bzip2.lib as a custom pre-link step in MSVC.
authorThomas Heller <theller@ctypes.org>
Wed, 20 Aug 2003 18:27:36 +0000 (18:27 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 20 Aug 2003 18:27:36 +0000 (18:27 +0000)
PCbuild/bz2.dsp
PCbuild/readme.txt

index 42790a96d8d3bcbbfa1cb1155ba1632a700c179c..556eb622a393ded0e32b9bee51941845faa032c8 100644 (file)
@@ -56,6 +56,10 @@ LINK32=link.exe
 # ADD BASE LINK32 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 /dll /machine:I386\r
 # ADD LINK32 ..\..\bzip2-1.0.2\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./bz2.pyd"\r
 # SUBTRACT LINK32 /pdb:none /nodefaultlib\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PreLink_Cmds=cd ..\..\bzip2-1.0.2      nmake /nologo /f makefile.msc\r
+# End Special Build Tool\r
 \r
 !ELSEIF  "$(CFG)" == "bz2 - Win32 Debug"\r
 \r
@@ -84,6 +88,10 @@ LINK32=link.exe
 # ADD BASE LINK32 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 /dll /debug /machine:I386 /pdbtype:sept\r
 # ADD LINK32 ..\..\bzip2-1.0.2\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /nodefaultlib:"libc" /out:"./bz2_d.pyd" /pdbtype:sept\r
 # SUBTRACT LINK32 /pdb:none\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PreLink_Cmds=cd ..\..\bzip2-1.0.2      nmake /nologo /f makefile.msc\r
+# End Special Build Tool\r
 \r
 !ENDIF \r
 \r
index b7e1f32a7c3753c01106823e4eb2cfd451bc66ac..4cacc9a6409efc8d94377ea3fc93ed519813335c 100644 (file)
@@ -148,19 +148,14 @@ bz2
     must disable its "TAR file smart CR/LF conversion" feature (under
     Options -> Configuration -> Miscellaneous -> Other) for the duration.
 
-    Don't bother trying to use libbz2.dsp with MSVC.  After 10 minutes
-    of fiddling, I couldn't get it to work.  Perhaps it works with
-    MSVC 5 (I used MSVC 6).  It's better to run the by-hand makefile
-    anyway, because it runs a helpful test step at the end.
-
-    cd into dist\bzip2-1.0.2, and run
-        nmake -f makefile.msc
-    [Note that if you're running Win9X, you'll need to run vcvars32.bat
-     before running nmake (this batch file is in your MSVC installation).
-     TODO:  make this work like zlib (in particular, MSVC runs the prelink
-     step in an enviroment that already has the correct envars set up).
-    ]
-    The make step shouldn't yield any warnings or errors, and should end
+    A custom pre-link step in the bz2 project settings should manage to
+    build bzip2-1.0.2\libbz2.lib by magic before bz2.pyd (or bz2_d.pyd) is
+    linked in PCbuild\.
+    However, the bz2 project is not smart enough to remove anything under
+    bzip2-1.0.2\ when you do a clean, so if you want to rebuild bzip2.lib
+    you need to clean up bzip2-1.0.2\ by hand.
+
+    The build step shouldn't yield any warnings or errors, and should end
     by displaying 6 blocks each terminated with
         FC: no differences encountered
     If FC finds differences, see the warning abou WinZip above (when I