Commit fbeb4f9c authored by Tim Peters's avatar Tim Peters

Pain, pain, and more pain.

The build-the-installer process now completes, and running
the installer creates something that may or may not be a
working Zope.  It starts fine as a Windows Service, and at
least "looks like a Zope" ;-)

Nothing in the build-the-Windows-installer process here
uses anything in the root of the inst/ directory anymore.
Instead the WinBuilders zope.mk builds Zope all by itself,
using the Python created by python.mk.  Everything these
used to use in the root of the inst/ directory was so out
of whack with current reality that there was no point even
trying to reverse-engineer what it thought it was doing.

Note that comments in the code highlight what look like
bugs in distutils, and in the Windows xcopy command (that
last one took hours to track down -- sheesh).
parent d10eb307
......@@ -31,13 +31,13 @@ Name: service; Description: "Run your Zope instance as a Windows service (start
Source: "<<MAKEFILEDIR>>\etc\README.html"; DestDir: "{app}"; Flags: ignoreversion
Source:"bin\*.*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs
Source:"doc\*.*"; DestDir: "{app}\doc"; Flags: ignoreversion recursesubdirs
Source:"import\*.*"; DestDir: "{app}\import"; Flags: ignoreversion recursesubdirs
Source:"lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs
Source:"skel\*.*"; DestDir: "{app}\skel"; Flags: ignoreversion recursesubdirs
Source:"zopeskel\*.*"; DestDir: "{app}\zopeskel"; Flags: ignoreversion recursesubdirs
; these are required to be put into the bin directory for proper function of NT services
Source:"bin\Lib\site-packages\win32\PythonService.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
Source:"bin\Lib\site-packages\pywin32_system32\PyWinTypes23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source:"bin\Lib\site-packages\pywin32_system32\PythonCOM23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source:"bin\Lib\site-packages\pywin32_system32\PyWinTypes24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source:"bin\Lib\site-packages\pywin32_system32\PythonCOM24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
; This is a helper module for manging registry entries at uninstall time
Source: "<<MAKEFILEDIR>>\bin\fixreg.py"; DestDir: "{app}\bin"; Flags: ignoreversion
......
......@@ -17,7 +17,17 @@ RM=rm -f
RMRF=rm -rf
CD=cd
XCOPY=xcopy /i /s /e /y
# xcopy args:
# /i = if dest doesn't exist and source has more than one file, assume
# dest shoud be a directory
# /y = don't prompt about overwriting dest if it exists -- just do it
# /s = recurse, copying non-empty subdirectories too
# CAUTION: don't use /e unless you have to! /e copies empty subdirectories
# too, but has another truly bizarre behavior: if you use xcopy to copy
# a single file, and use /e, it creates empty subdirectories in the target's
# directory with the same names as the subdirectories in the source's
# directory. This is worse than useless.
XCOPY=xcopy /i /s /y
CPR=cp -r
CP=cp
......
......@@ -112,8 +112,7 @@ $(BUILD_DIR)/bin/python.exe:
$(XCOPY) "$(WIN_PYINSTALLEDDIR)\$(PYMAJORMINOR).dll" \
"$(WIN_BUILD_DIR)\bin"
$(XCOPY) "$(WIN_MAKEFILEDIR)\bin\msvcr71.dll" "$(WIN_BUILD_DIR)\bin"
$(XCOPY) "$(WIN_PYINSTALLEDDIR)\libs\$(PYMAJORMINOR).lib" \
"$(WIN_BUILD_DIR)\bin\libs"
$(XCOPY) "$(WIN_PYINSTALLEDDIR)\libs" "$(WIN_BUILD_DIR)\bin\libs"
$(XCOPY) "$(WIN_PYINSTALLEDDIR)\DLLs\*.pyd" \
"$(WIN_BUILD_DIR)\bin\DLLs"
......
......@@ -6,8 +6,8 @@ ZOPE_REQUIRED_FILES=tmp/$(ZOPEDIRNAME).tgz
REQUIRED_FILES=$(PYTHON_REQUIRED_FILES)\
$(ZOPE_REQUIRED_FILES)
MAKEZOPE="$(MAKEFILEDIR)/bin/makezope.bat" "$(WIN_BUILD_DIR)"
# run the Zope tests
# XXX This is out of date and can't work.
test_zope:
$(CD) "$(BASE_DIR)/src/Zope"
"$(PYPCBUILDDIR)/python.exe" utilities/testrunner.py -a
......@@ -16,15 +16,15 @@ test_zope:
clean_zope:
$(RMRF) src/$(ZOPEDIRNAME)
install_zope: src/$(ZOPEDIRNAME)/inst/configure.py \
$(BUILD_DIR)/lib/python/version.txt \
install_zope: src/$(ZOPEDIRNAME)/install.py \
install_python \
$(BUILD_DIR)/lib/python/Zope2/version.txt \
$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe
ESCAPED=$(shell sh $(MAKEFILEDIR)/bin/escape.sh '$(WIN_MAKEFILEDIR)')
SEDSCRIPT="s@<<VERSION>>@$(ZOPEVERSION)@g;s@<<MAKEFILEDIR>>@$(ESCAPED)@g"
$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/Zope2/version.txt
$(SED) $(SEDSCRIPT) < "$(MAKEFILEDIR)/etc/zope.iss.in" | unix2dos > "$(BUILD_DIR)/zope.iss"
# Remove CVS directories and compiled Python files from the build tree.
......@@ -44,19 +44,31 @@ $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
# Build the Inno installer.
$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zope.iss"
$(BUILD_DIR)/lib/python/Zope2/Startup/run.py:
$(CD) "$(BUILD_DIR)"; \
bin/python.exe \
"$(WIN_SRC_DIR)\$(ZOPEDIRNAME)\inst\configure.py" \
--prefix="$(WIN_BUILD_DIR)" --no-compile
$(MAKEZOPE)
$(TOUCH) "$(BUILD_DIR)/lib/python/Zope2/Startup/run.py"
# This builds Zope, then installs it into the build directory, then
# creates lib/python/Zope2/version.txt in the build directory.
#
# Yuck: for whatever reason, distutils refuses to allow an absolute
# path for the --home option, so this hardcodes "build" as the name of
# the build directory, and assumes "build" is a sibling of SRC_DIR.
#
# Yuck: the --no-compile option here has no effect: the install step
# creates oodles of unwanted .pyc files. They're removed by the
# $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe target, though, before
# building the installer.
#
# Yuck: no matter what I pass to --install-headers, it throws away the
# last path component. We actually want to copy the Zope/ZODB headers
# into bin/Include. The "nonsense" at the end gets throws away, and that
# smells like a bug. When it gets fixed, I suppose this will copy the
# headers to bin/Include/nonsense/.
$(BUILD_DIR)/lib/python/Zope2/version.txt: $(BUILD_DIR)/bin/python.exe
cd "$(SRC_DIR)/$(ZOPEDIRNAME)" && \
"$<" install.py install --no-compile --home=../../build \
--install-headers=../../build/bin/Include/nonsense
@echo Zope $(ZOPEVERSION) > $@
$(TOUCH) $@
$(BUILD_DIR)/lib/python/version.txt: $(BUILD_DIR)/lib/python/Zope2/Startup/run.py
@echo Zope $(ZOPEVERSION) > "$(BUILD_DIR)/lib/python/version.txt"
$(TOUCH) "$(BUILD_DIR)/lib/python/version.txt"
src/$(ZOPEDIRNAME)/inst/configure.py:
# This merely unpacks the Zope tarball.
src/$(ZOPEDIRNAME)/install.py:
$(MKDIR) "$(SRC_DIR)"
$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZOPEDIRNAME).tgz \
&& $(TOUCH) $(ZOPEDIRNAME)/inst/configure.py
$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZOPEDIRNAME).tgz
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