[Erp5-report] r16817 - in /spec/windows: Doc/ Doc/img/ Installer/ patches/
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 4 11:45:48 CEST 2007
Author: yusei
Date: Thu Oct 4 11:45:47 2007
New Revision: 16817
URL: http://svn.erp5.org?rev=16817&view=rev
Log:
initial commit(this is made by Klaus)
Added:
spec/windows/Doc/
spec/windows/Doc/img/
spec/windows/Doc/img/box-install.ico (with props)
spec/windows/Doc/img/bullet-blue.png (with props)
spec/windows/Doc/img/bullet-grey.png (with props)
spec/windows/Doc/img/erp5.png (with props)
spec/windows/Doc/img/erp5_banner.png (with props)
spec/windows/Doc/img/erp5_logo.ico (with props)
spec/windows/Doc/img/erp5_logo.png (with props)
spec/windows/Doc/img/install.ico (with props)
spec/windows/Doc/img/uninstall.ico (with props)
spec/windows/Doc/index.htm
spec/windows/Installer/
spec/windows/Installer/ERP5Setup.nsi
spec/windows/Installer/OpenOffice.nsi
spec/windows/Installer/ooodSetup.nsi
spec/windows/patches/
spec/windows/patches/Zope-2.8.1-ERP5_win.patch
spec/windows/patches/Zope-2.8.1-aq_dynamic.patch
spec/windows/patches/Zope-2.8.9.1-aq_dynamic.patch
spec/windows/patches/tarfile.patch
Added: spec/windows/Doc/img/box-install.ico
URL: http://svn.erp5.org/spec/windows/Doc/img/box-install.ico?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/box-install.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/bullet-blue.png
URL: http://svn.erp5.org/spec/windows/Doc/img/bullet-blue.png?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/bullet-blue.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/bullet-grey.png
URL: http://svn.erp5.org/spec/windows/Doc/img/bullet-grey.png?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/bullet-grey.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/erp5.png
URL: http://svn.erp5.org/spec/windows/Doc/img/erp5.png?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/erp5.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/erp5_banner.png
URL: http://svn.erp5.org/spec/windows/Doc/img/erp5_banner.png?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/erp5_banner.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/erp5_logo.ico
URL: http://svn.erp5.org/spec/windows/Doc/img/erp5_logo.ico?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/erp5_logo.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/erp5_logo.png
URL: http://svn.erp5.org/spec/windows/Doc/img/erp5_logo.png?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/erp5_logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/install.ico
URL: http://svn.erp5.org/spec/windows/Doc/img/install.ico?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/install.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/img/uninstall.ico
URL: http://svn.erp5.org/spec/windows/Doc/img/uninstall.ico?rev=16817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/windows/Doc/img/uninstall.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/windows/Doc/index.htm
URL: http://svn.erp5.org/spec/windows/Doc/index.htm?rev=16817&view=auto
==============================================================================
--- spec/windows/Doc/index.htm (added)
+++ spec/windows/Doc/index.htm Thu Oct 4 11:45:47 2007
@@ -1,0 +1,64 @@
+<html>
+ <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Welcome to ERP5 for Windows!</title>
+ </head>
+
+
+ <body bgcolor="#FFFFFF">
+
+ <table width="700" height="500" align="center">
+ <tr>
+ <td width="10%"></td>
+ <td width="80%"></td>
+ <td width="10%"></td>
+ </tr>
+
+ <tr>
+ <td width="10%"> </td>
+ <td width="80%">
+ <img src="img/erp5_banner.png">
+
+ <br>
+ <br>
+
+ <p><img src="img/bullet-blue.png"> <b>Welcome to ERP5 for Windows!</b></p>
+ <p align="justify"><small>We take pride in providing the most effective and full-featured ERP solution available. We hope it gives you a good opportunity for your business.</small></p>
+
+ <p align="justify"><small>The <a href="http://erp5.org">erp5.org</a> website lets you keep in touch with the community of ERP5. It's also a great location for discovering new products and services.</small></p>
+ <br>
+
+ <table>
+
+ <tr>
+ <td valign="top"><img src="img/erp5.png"></td>
+ <td> </td>
+ <td valign="top">
+ <p align="justify"><img src="img/bullet-grey.png"><small><a href="http://127.0.0.1:8080/erp5">Click here to start ERP5</a></small></p>
+ <p><small>When you get a login screen, please enter "<code>zope</code>" both for the user name and for the password.</small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+
+ </table>
+
+ </td>
+ <td width="10%"> </td>
+ </tr>
+
+ <tr>
+ <td width="10%"> </td>
+ <td width="80%"> </td>
+ <td width="10%"> </td>
+ </tr>
+
+ </table>
+
+
+</body>
+</html>
Added: spec/windows/Installer/ERP5Setup.nsi
URL: http://svn.erp5.org/spec/windows/Installer/ERP5Setup.nsi?rev=16817&view=auto
==============================================================================
--- spec/windows/Installer/ERP5Setup.nsi (added)
+++ spec/windows/Installer/ERP5Setup.nsi Thu Oct 4 11:45:47 2007
@@ -1,0 +1,287 @@
+; ERP5Setp.nsi
+; Setup Wizard for ERP5
+
+; The Webshortcut to access ERP5
+!define ERP5_URL_NAME "ERP5.url"
+!define ERP5_URL "http://127.0.0.1:8080/erp5"
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "ERP5"
+!define PRODUCT_VERSION ""
+!define PRODUCT_PUBLISHER "Nexedi"
+!define PRODUCT_WEB_SITE "http://www.erp5.org"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}"
+!define PRODUCT_DIR_ROOT_REGKEY "HKLM"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
+
+SetCompress off
+;SetCompressor /SOLID lzma
+;SetCompressorDictSize 32
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "..\Doc\img\install.ico"
+!define MUI_UNICON "..\Doc\img\uninstall.ico"
+
+; Language Selection Dialog Settings
+!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
+!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "..\License.txt"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+;!define MUI_FINISHPAGE_RUN "$INSTDIR\${ERP5_URL_NAME}"
+;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Doc\index.htm"
+;!define MUI_FINISHPAGE_NOAUTOCLOSE
+;!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_LANGUAGE "German"
+!insertmacro MUI_LANGUAGE "Japanese"
+
+; Reserve files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+; MUI end ------
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "ERP5Setup.exe"
+InstallDir "$PROGRAMFILES\ERP5"
+InstallDirRegKey ${PRODUCT_DIR_ROOT_REGKEY} "${PRODUCT_DIR_REGKEY}" ""
+ShowInstDetails hide
+ShowUnInstDetails hide
+
+Function .onInit
+ !insertmacro MUI_LANGDLL_DISPLAY
+FunctionEnd
+
+Section "MainSection" SEC01
+ SetOverwrite ifnewer
+
+; Add all Files but *.pyc and .svn in specified subdirectories recursivley
+ SetOutPath "$INSTDIR\Doc"
+ File /r ..\Doc\*.*
+ SetOutPath "$INSTDIR\external"
+ File /r ..\external\*.*
+ SetOutPath "$INSTDIR\Install"
+ File /r ..\Install\*.*
+ SetOutPath "$INSTDIR\mysql"
+ File /r /x data ..\mysql\*.*
+ SetOutPath "$INSTDIR\mysql\data\mysql"
+ File /r ..\mysql\data\mysql\*.*
+ SetOutPath "$INSTDIR\oood"
+ File /r /x tmp /x var /x .svn /x *.pyc ..\oood\*.*
+ CreateDirectory "$INSTDIR\oood\tmp"
+ CreateDirectory "$INSTDIR\oood\var"
+ SetOutPath "$INSTDIR\python"
+ File /r /x *.pyc ..\python\*.*
+ SetOutPath "$INSTDIR\Zope"
+ File /r /x *.pyc ..\Zope\*.*
+ SetOutPath "$INSTDIR\Firefox"
+ File /r ..\Firefox\*.*
+ # Make the directory "$INSTDIR\Firefox" read write accessible by all users
+ AccessControl::GrantOnFile \
+ "$INSTDIR\Firefox" "(BU)" "GenericRead + GenericWrite"
+ SetOutPath "$INSTDIR"
+ File ..\LICENSE.txt
+
+; Shortcuts
+ CreateDirectory "$SMPROGRAMS\ERP5"
+ CreateShortCut "$SMPROGRAMS\ERP5\ERP5.lnk" "$INSTDIR\Firefox\firefox.exe" "${ERP5_URL}" "$INSTDIR\Doc\img\erp5_logo.ico"
+ CreateShortCut "$DESKTOP\ERP5.lnk" "$INSTDIR\Firefox\firefox.exe" "${ERP5_URL}" "$INSTDIR\Doc\img\erp5_logo.ico"
+SectionEnd
+
+Section -AdditionalIcons
+ WriteIniStr "$INSTDIR\ERP5Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
+ CreateShortCut "$SMPROGRAMS\ERP5\ERP5Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
+ CreateShortCut "$SMPROGRAMS\ERP5\Setup oood.lnk" "$INSTDIR\Install\ooodSetup.exe" "$INSTDIR\Doc\img\box-install.ico"
+ CreateShortCut "$SMPROGRAMS\ERP5\Uninstall.lnk" "$INSTDIR\uninst.exe" "$INSTDIR\Doc\img\uninstall.ico"
+SectionEnd
+
+Section -Zope
+; make ERP5Instance
+ DetailPrint "Building ERP5Instance..."
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\Zope\bin\mkzopeinstance.py" -d "$INSTDIR\ERP5Instance" -u zope:zope"'
+SectionEnd
+
+Section -ERP5Instance
+ SetOutPath $INSTDIR\ERP5Instance\bt5
+ File /r ..\ERP5Instance\bt5\*.*
+ SetOutPath $INSTDIR\ERP5Instance\Products
+ File /r /x .svn /x *.pyc ..\ERP5Instance\Products\*.*
+ SetOutPath $INSTDIR\ERP5Instance\Extensions
+ File /r /x *.pyc ..\ERP5Instance\Extensions\*.*
+ CreateDirectory "$INSTDIR\ERP5Instance\Constraint"
+ CreateDirectory "$INSTDIR\ERP5Instance\Dokument"
+ CreateDirectory "$INSTDIR\ERP5Instance\PropertySheet"
+ CreateDirectory "$INSTDIR\ERP5Instance\svn"
+ CreateDirectory "$INSTDIR\ERP5Instance\tests"
+ CreateDirectory "$INSTDIR\ERP5Instance\unit_test"
+SectionEnd
+
+Section -updateRegistry
+ WriteUninstaller "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_DIR_ROOT_REGKEY} "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Doc\img\erp5_logo.ico"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+SectionEnd
+
+Section -configure_oood
+ DetailPrint "Configuring oood"
+ WriteINIStr "$INSTDIR\oood\oood.conf" "System" "oood_home" "$INSTDIR\oood"
+ WriteINIStr "$INSTDIR\oood\oood.conf" "System" "run_dir" "$INSTDIR\oood\var"
+ WriteINIStr "$INSTDIR\oood\oood.conf" "System" "log_file" "$INSTDIR\oood\var\oood.log"
+ Exec "$INSTDIR\Install\ooodSetup.exe"
+SectionEnd
+
+Section -ERP5MySQL
+; copy my.ini to $INSTDIR\mysql\my.ini - try to overwrite it if it already exist
+ SetOutPath $INSTDIR\mysql
+ SetOverwrite off
+ File ..\Install\my.ini
+; adapt my.ini to the installation path
+ DetailPrint "Modifying $INSTDIR\mysql\my.ini"
+ WriteINIStr "$INSTDIR\mysql\my.ini" "mysqld" "basedir" "$INSTDIR\mysql"
+ WriteINIStr "$INSTDIR\mysql\my.ini" "mysqld" "datadir" "$INSTDIR\mysql\data"
+ WriteINIStr "$INSTDIR\mysql\my.ini" "WinMySQLadmin" "Server" "$INSTDIR\mysql\bin\mysqld-nt.exe"
+; Register and start ERP5MySQL Service
+ DetailPrint "Registering ERP5MySQL Service..."
+ nsExec::ExecToLog '"$INSTDIR\mysql\bin\mysqld-nt.exe" --install ERP5MySQL --defaults-file="$INSTDIR\mysql\my.ini"'
+ DetailPrint "Starting ERP5MySQL Service..."
+ nsExec::ExecToLog "net start ERP5MySQL"
+SectionEnd
+
+Section -ERP5Service
+; Register and start Zope (a.k. ERP5) Service
+ SetOutPath $INSTDIR
+ DetailPrint "Registering ERP5 Service..."
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\ERP5Instance\bin\zopeservice.py" --startup auto install'
+ DetailPrint "Starting ERP5 Service..."
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\ERP5Instance\bin\zopeservice.py" start'
+SectionEnd
+
+Section -CreateDatabasesAndERP5Site
+; create set privileges for mysql and create databases
+ DetailPrint "Creating databases..."
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\Install\createdb.py"'
+; create ERP5Site using Client.py
+ DetailPrint "Creating ERP5Site. This may take some minutes..."
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\Install\waitForZope.py"'
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\Zope\lib\python\ZPublisher\Client.py" -u zope:zope http://127.0.0.1:8080/manage_addProduct/ERP5/manage_addERP5Site id="erp5" title="ERP5" create_userfolder=1 erp5_catalog_storage="erp5_mysql_innodb_catalog" erp5_sql_connection_string="erp5 erp5 erp5" erp5_sql_deferred_connection_string="erp5 erp5 erp5" cmf_activity_sql_connection_string="cmf_activity erp5 erp5"'
+ Exec '"$INSTDIR\Firefox\firefox.exe" "$INSTDIR\Doc\index.htm"'
+SectionEnd
+
+Function un.onUninstSuccess
+ HideWindow
+ MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
+FunctionEnd
+
+Function un.onInit
+!insertmacro MUI_UNGETLANGUAGE
+ MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+ Abort
+FunctionEnd
+
+Section Uninstall
+
+; stop and remove the Zope Service (called ERP5)
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\ERP5Instance\bin\zopeservice.py" stop'
+ nsExec::ExecToLog '"$INSTDIR\python\python.exe" "$INSTDIR\ERP5Instance\bin\zopeservice.py" remove'
+
+; stop an remove the oood Service
+ ReadRegStr $0 HKLM "Software\OpenOffice.org\UNO\InstallPath" "OpenOffice.org 2.0"
+ nsExec::ExecToLog '"$0\python-core-2.3.4\bin\python.exe" "$INSTDIR\oood\winservice.py" stop'
+ nsExec::ExecToLog '"$0\python-core-2.3.4\bin\python.exe" "$INSTDIR\oood\winservice.py" remove'
+
+; stop and remove the ERP5MySQL Service
+ nsExec::ExecToLog "net stop ERP5MySQL"
+ nsExec::ExecToLog '"$INSTDIR\mysql\bin\mysqld-nt.exe" --remove ERP5MySQL'
+
+ Delete "$INSTDIR\ERP5Website.url"
+ Delete "$INSTDIR\${ERP5_URL_NAME}"
+ Delete "$INSTDIR\uninst.exe"
+ Delete "$INSTDIR\Example.file"
+
+ Delete "$SMPROGRAMS\ERP5\Uninstall.lnk"
+ Delete "$SMPROGRAMS\ERP5\Setup oood.lnk"
+ Delete "$SMPROGRAMS\ERP5\ERP5Website.lnk"
+ Delete "$DESKTOP\ERP5.lnk"
+ Delete "$SMPROGRAMS\ERP5\ERP5.lnk"
+
+ RMDir "$SMPROGRAMS\ERP5"
+
+ RMDir /r /REBOOTOK "$INSTDIR"
+
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+ DeleteRegKey ${PRODUCT_DIR_ROOT_REGKEY} "${PRODUCT_DIR_REGKEY}"
+ SetAutoClose true
+SectionEnd
+
+Function WriteToFileLine2
+Exch $0 ;file
+Exch
+Exch $1 ;line number
+Exch 2
+Exch $2 ;string to write
+Exch 2
+Push $3
+Push $4
+Push $5
+Push $6
+Push $7
+
+ GetTempFileName $7
+ FileOpen $4 $0 r
+ FileOpen $5 $7 w
+ StrCpy $3 0
+
+Loop:
+ClearErrors
+FileRead $4 $6
+IfErrors Exit
+ IntOp $3 $3 + 1
+ StrCmp $3 $1 0 +3
+FileWrite $5 "$2$\r$\n"
+Goto Loop
+FileWrite $5 $6
+Goto Loop
+Exit:
+
+ FileClose $5
+ FileClose $4
+
+SetDetailsPrint none
+Delete $0
+Rename $7 $0
+SetDetailsPrint both
+
+Pop $7
+Pop $6
+Pop $5
+Pop $4
+Pop $3
+Pop $2
+Pop $1
+Pop $0
+FunctionEnd
Added: spec/windows/Installer/OpenOffice.nsi
URL: http://svn.erp5.org/spec/windows/Installer/OpenOffice.nsi?rev=16817&view=auto
==============================================================================
--- spec/windows/Installer/OpenOffice.nsi (added)
+++ spec/windows/Installer/OpenOffice.nsi Thu Oct 4 11:45:47 2007
@@ -1,0 +1,18 @@
+; OpenOffice.nsi
+; Extract OpenOffice.org instalfiles and start OpenOffice installer without interaction
+Name "Extract OpenOffice.org 2.0 installfiles"
+SetCompress off
+OutFile "OpenOfficeInstall.exe"
+Page instfiles
+
+Section ""
+ SetOutPath $INSTDIR
+ File /r "..\Template\OpenOffice.org 2.0 Installation Files"
+ ExecWait 'msiexec /i "$INSTDIR\OpenOffice.org 2.0 Installation Files\openofficeorg20.msi" /qb INSTALLLOCATION="$INSTDIR"'
+ RMDir /r /REBOOTOK "$INSTDIR\OpenOffice.org 2.0 Installation Files"
+ Quit
+SectionEnd
+
+Function .onInit
+ SetSilent silent
+FunctionEnd
Added: spec/windows/Installer/ooodSetup.nsi
URL: http://svn.erp5.org/spec/windows/Installer/ooodSetup.nsi?rev=16817&view=auto
==============================================================================
--- spec/windows/Installer/ooodSetup.nsi (added)
+++ spec/windows/Installer/ooodSetup.nsi Thu Oct 4 11:45:47 2007
@@ -1,0 +1,183 @@
+; ooodSetup.nsi
+!include "Sections.nsh"
+
+;SetCompress off
+SetCompressor /SOLID lzma
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+; MUI Settings
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+
+; Directory page
+!define MUI_PAGE_HEADER_TEXT "OpenOffice Location"
+!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder of your OpenOffice installation"
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveDir
+!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!define MUI_PAGE_HEADER_SUBTEXT "Please wait while setting up oood"
+!insertmacro MUI_PAGE_INSTFILES
+; Uninstaller pages
+;!insertmacro MUI_UNPAGE_INSTFILES
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+; Reserve files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+; MUI end ------
+
+Name "oood"
+OutFile "..\Install\ooodSetup.exe"
+
+; The default installation directory
+InstallDir "$PROGRAMFILES\OpenOffice.org 2.0"
+
+; The text to prompt the user to enter a directory
+DirText "OpenOffice.org-2.0.3 is needed for oood. Oood will be configured to \
+ use the OpenOffice.org installation specified in the 'Destination folder' field. \
+ If OpenOffice.org is already installed on your system, \
+ the path is normally detected automatically. You can change the path to point to another \
+ OpenOffice.org Installation. If OpenOffice.org isn't installed on your system you can \
+ specify the folder where OpenOffice.org should be installed to. Then OpenOffice will be \
+ downloaded and installed automatically." "" "" \
+ "Choose the folder of your OpenOffice.org installation"
+
+InstallButtonText "OK"
+
+; automatically close the installer when done.
+AutoCloseWindow true
+ShowInstDetails hide
+
+Section openOffice
+ AddSize 485750
+ ReadRegStr $3 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\ERP5" ""
+ IfFileExists "$3\Install\OpenOfficeInstall.exe" haveFile
+ Call MakeSureIGotOpenOffice
+ haveFile:
+ ExecWait '"$3\Install\OpenOfficeInstall.exe" /D=$INSTDIR'
+SectionEnd
+
+Section site-packages
+ SetOutPath $INSTDIR\program
+ File /r /x *.pyc ..\program\*.*
+SectionEnd
+
+
+Section configure_oood
+ DetailPrint "Applying openoffice.org-2.0.3-skip-registration.patch..."
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\ERP5" ""
+ nsExec::ExecToLog '"$0\external\patch.exe" -tNi "$0\Install\openoffice.org-2.0.3-skip-registration.patch" "$INSTDIR\share\registry\data\org\openoffice\Setup.xcu"'
+ DetailPrint "Configuring oood"
+ WriteINIStr "$0\oood\oood.conf" "System" "uno_path" "$INSTDIR\program"
+ DetailPrint "Registering oood Service..."
+ nsExec::ExecToLog '"$INSTDIR\program\python-core-2.3.4\bin\python.exe" "$0\oood\winservice.py" --startup auto install'
+ DetailPrint "Starting oood Service..."
+ nsExec::ExecToLog '"$INSTDIR\program\python-core-2.3.4\bin\python.exe" "$0\oood\winservice.py" start'
+SectionEnd
+
+;--------------------------------
+
+Function .onInit
+ Call GetOpenOfficeInstPath
+ Pop $0
+ StrCmp $0 "" skip
+ StrCpy $INSTDIR $0
+ !insertmacro UnselectSection openOffice
+ skip:
+FunctionEnd
+
+Function .onVerifyInstDir
+ ;Check for OpenOffice installation
+ IfFileExists $INSTDIR\program\python-core-2.3.4\bin\python.exe Good
+ !insertmacro SelectSection openOffice
+ Goto fin
+ Good:
+ !insertmacro UnselectSection openOffice
+ fin:
+FunctionEnd
+
+Function leaveDir
+ IfFileExists $INSTDIR\program\python-core-2.3.4\bin\python.exe Good
+ MessageBox MB_OKCANCEL|MB_ICONINFORMATION "OpenOffice.org-2.0.3 could not be found. \
+ OpenOffice.org can be downloaded (ca. 100MB) and installed automatically. \
+ It will be installed to '$INSTDIR'. Press 'Cancel' if you want to change the destination \
+ folder or cancel the installation process. Press 'OK' to download and install \
+ OpenOffice.org now." IDOK Good
+ Abort
+ Good:
+FunctionEnd
+
+Function GetOpenOfficeInstPath
+ Push $0
+ Push $1
+ Push $2
+ ReadRegStr $0 HKLM "Software\OpenOffice.org\UNO\InstallPath" "OpenOffice.org 2.0"
+ IfFileExists $0\python-core-2.3.4\bin\python.exe continue
+ StrCpy $0 ""
+ continue:
+ StrCmp $0 "" fin
+ StrCpy $1 $0 1 0 ; get firstchar
+ StrCmp $1 '"' "" getparent
+ ; if first char is ", let's remove "'s first.
+ StrCpy $0 $0 "" 1
+ StrCpy $1 0
+ rqloop:
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '"' rqdone
+ StrCmp $2 "" rqdone
+ IntOp $1 $1 + 1
+ Goto rqloop
+ rqdone:
+ StrCpy $0 $0 $1
+ getparent:
+ ; the uninstall string goes to an EXE, let's get the directory.
+ StrCpy $1 -1
+ gploop:
+ StrCpy $2 $0 1 $1
+ StrCmp $2 "" gpexit
+ StrCmp $2 "\" gpexit
+ IntOp $1 $1 - 1
+ Goto gploop
+ gpexit:
+ StrCpy $0 $0 $1
+
+ StrCmp $0 "" fin
+ IfFileExists $0\program\python-core-2.3.4\bin\python.exe fin
+ StrCpy $0 ""
+ fin:
+ Pop $2
+ Pop $1
+ Exch $0
+FunctionEnd
+
+Function MakeSureIGotOpenOffice
+ Call GetOpenOfficeInstPath
+ Pop $0
+ StrCmp $0 "" getOpenOffice
+ Return
+ getOpenOffice:
+ Call ConnectInternet ;Make an internet connection (if no connection available)
+ StrCpy $2 "$3\Install\OpenOfficeInstall.exe"
+ NSISdl::download http://nexedi.org/static/OpenOfficeInstall.exe $2
+ Pop $0
+ StrCmp $0 success success
+ MessageBox MB_OK|MB_ICONSTOP "download failed: $0"
+ Abort
+ success:
+FunctionEnd
+
+Function ConnectInternet
+ Push $R0
+ ClearErrors
+ Dialer::AttemptConnect
+ IfErrors noie3
+ Pop $R0
+ StrCmp $R0 "online" connected
+ MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
+ Quit
+ noie3:
+ ; IE3 not installed
+ MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
+ connected:
+ Pop $R0
+FunctionEnd
Added: spec/windows/patches/Zope-2.8.1-ERP5_win.patch
URL: http://svn.erp5.org/spec/windows/patches/Zope-2.8.1-ERP5_win.patch?rev=16817&view=auto
==============================================================================
--- spec/windows/patches/Zope-2.8.1-ERP5_win.patch (added)
+++ spec/windows/patches/Zope-2.8.1-ERP5_win.patch Thu Oct 4 11:45:47 2007
@@ -1,0 +1,370 @@
+diff -urP -x *.pyc Zope-2.8.1-final\lib\python\Zope2\Startup\zopectl.py D:\Nexedi\erp5Mingw\Zope\lib\python\Zope2\Startup\zopectl.py
+--- Zope-2.8.1-final\lib\python\Zope2\Startup\zopectl.py Thu Aug 11 07:11:17 2005
++++ D:\Nexedi\erp5Mingw\Zope\lib\python\Zope2\Startup\zopectl.py Thu Jul 26 18:22:34 2007
+@@ -5,7 +5,7 @@
+ # All Rights Reserved.
+ #
+ # This software is subject to the provisions of the Zope Public License,
+-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
++# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+ # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+ # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+@@ -26,6 +26,7 @@
+ -l/--logfile -- log file to be read by logtail command
+ -u/--user -- run the daemon manager program as this user (or numeric id)
+ -m/--umask -- provide octal umask for files created by the managed process
++-s/--socket-name -- socket between zopectl and zdrun
+ action [arguments] -- see below
+
+ Actions are commands like "start", "stop" and "status". If -i is
+@@ -45,7 +46,11 @@
+ from zdaemon.zdctl import ZDCmd
+ from zdaemon.zdoptions import ZDOptions
+ from ZConfig.components.logger.handlers import FileHandlerFactory
++from ZConfig.datatypes import existing_dirpath
+
++WIN = False
++if sys.platform[:3].lower() == "win":
++ WIN = True
+
+ def string_list(arg):
+ return arg.split()
+@@ -86,6 +91,8 @@
+ self.add("user", "runner.user", "u:", "user=")
+ self.add("prompt", "runner.prompt", default="zopectl>")
+ self.add("umask", "runner.umask", "m:", "umask=")
++ self.add("sockname", "runner.socket_name", "s:", "socket-name=",
++ existing_dirpath, default=None)
+
+ def realize(self, *args, **kw):
+ ZDOptions.realize(self, *args, **kw)
+@@ -116,10 +123,19 @@
+ self.program = config.runner.program
+ else:
+ self.program = [os.path.join(self.directory, "bin", "runzope")]
+- self.sockname = os.path.join(self.clienthome, "zopectlsock")
++ if config.runner and config.runner.socket_name:
++ self.sockname = config.runner.socket_name
++ else:
++ self.sockname = os.path.join(self.clienthome, "zopectlsock")
+ self.python = sys.executable
+ self.zdrun = os.path.join(os.path.dirname(zdaemon.__file__),
+ "zdrun.py")
++ if WIN:
++ # Add the path to the zopeservice.py script, which is needed for
++ # some of the Windows specific commands
++ servicescript = os.path.join(self.directory, 'bin', 'zopeservice.py')
++ self.servicescript = '"%s" %s' % (self.python, servicescript)
++
+ self.exitcodes = [0, 2]
+ if self.logfile is None and config.eventlog is not None:
+ for handler in config.eventlog.handler_factories:
+@@ -151,11 +167,59 @@
+ args = [opt, svalue]
+ return args
+
++ if WIN:
++ def get_status(self):
++ # get_status from zdaemon relies on *nix specific socket handling.
++ # We just don't support getting the status and sending actions to
++ # the control server on Windows. This could be extended to ask for
++ # the status of the Windows service though
++ self.zd_up = 0
++ self.zd_pid = 0
++ self.zd_status = None
++ return
++
++ def do_stop(self, arg):
++ # Stop the Windows service
++ program = "%s stop" % self.options.servicescript
++ print program
++ os.system(program)
++
++ def do_restart(self, arg):
++ # Restart the Windows service
++ program = "%s restart" % self.options.servicescript
++ print program
++ os.system(program)
++
++ # Add extra commands to install and remove the Windows service
++
++ def do_install(self, arg):
++ program = "%s install" % self.options.servicescript
++ print program
++ os.system(program)
++
++ def help_install(self):
++ print "install -- Installs Zope as a Windows service."
++
++ def do_remove(self, arg):
++ program = "%s remove" % self.options.servicescript
++ print program
++ os.system(program)
++
++ def help_remove(self):
++ print "remove -- Removes the Zope Windows service."
++
+ def do_start(self, arg):
+ # signal to Zope that it is being managed
+- #(to indicate it's web-restartable)
++ # (to indicate it's web-restartable)
+ os.putenv('ZMANAGED', '1')
+- ZDCmd.do_start(self, arg)
++ if WIN:
++ # On Windows start the service, this fails with a reasonable
++ # error message as long as the service is not installed
++ program = "%s start" % self.options.servicescript
++ print program
++ os.system(program)
++ else:
++ ZDCmd.do_start(self, arg)
+
+ def get_startup_cmd(self, python, more):
+ cmdline = ( '%s -c "from Zope2 import configure;'
+@@ -172,12 +236,17 @@
+ os.system(cmdline)
+
+ def do_foreground(self, arg):
+- self.options.program[1:1] = ["-X", "debug-mode=on"]
+- try:
++ if WIN:
++ # Adding arguments to the program is not supported on Windows
++ # and the runzope script doesn't put you in debug-mode either
+ ZDCmd.do_foreground(self, arg)
+- finally:
+- self.options.program.remove("-X")
+- self.options.program.remove("debug-mode=on")
++ else:
++ self.options.program[1:1] = ["-X", "debug-mode=on"]
++ try:
++ ZDCmd.do_foreground(self, arg)
++ finally:
++ self.options.program.remove("-X")
++ self.options.program.remove("debug-mode=on")
+
+ def help_debug(self):
+ print "debug -- run the Zope debugger to inspect your database"
+@@ -238,14 +307,10 @@
+ return
+
+ script = os.path.join(zope_home, 'bin', 'test.py')
++ if not os.path.exists(script):
++ script = os.path.join(zope_home, 'test.py') # no inplace build!
+ assert os.path.exists(script)
+
+- # If --libdir is not supplied, use $INSTANCE_HOME/Products
+- # (rather than $INSTANCE_HOME/lib/python)
+- if '--libdir' not in args:
+- args.insert(0, 'Products')
+- args.insert(0, '--libdir')
+-
+ # Supply our config file by default.
+ if '--config-file' not in args and '-C' not in args:
+ args.insert(0, self.options.configfile)
+@@ -259,17 +324,27 @@
+ args.insert(0, self.options.python)
+
+ print 'Running tests via: %s' % ' '.join(args)
+- pid = os.fork()
+- if pid == 0: # child
+- os.execv(self.options.python, args)
++ if WIN:
++ # Windows process handling is quite different
++ os.system(' '.join(args))
+ else:
+- os.waitpid(pid, 0)
++ pid = os.fork()
++ if pid == 0: # child
++ os.execv(self.options.python, args)
++
++ # Parent process running (execv replaces process in child
++ while True:
++ try:
++ os.waitpid(pid, 0)
++ except (OSError, KeyboardInterrupt):
++ continue
++ else:
++ break
+
+ def help_test(self):
+ print "test [args]+ -- run unit / functional tests."
+ print " See $ZOPE_HOME/bin/test.py --help for syntax."
+
+-
+ def main(args=None):
+ # This is exactly like zdctl.main(), but uses ZopeCtlOptions and
+ # ZopeCmd instead of ZDCtlOptions and ZDCmd, so the default values
+@@ -308,5 +383,14 @@
+ # If it is not reset, 'os.wait[pid]' can non-deterministically fail.
+ # Thus, use a way such that "SIGCHLD" is definitely reset in children.
+ #signal.signal(signal.SIGCHLD, signal.SIG_IGN)
+- signal.signal(signal.SIGCHLD, _ignoreSIGCHLD)
++ if not WIN and os.uname()[0] != 'Darwin':
++ # On Windows the os.uname method does not exist.
++ # On Mac OS X, setting up a signal handler causes waitpid to
++ # raise EINTR, which is not preventable via the Python signal
++ # handler API and can't be dealt with properly as we can't pass
++ # the SA_RESTART to the signal API. Since Mac OS X doesn't
++ # appear to clutter up the process table with zombies if
++ # SIGCHILD is unset, just don't bother registering a SIGCHILD
++ # signal handler at all.
++ signal.signal(signal.SIGCHLD, _ignoreSIGCHLD)
+ main()
+diff -urP -x *.pyc Zope-2.8.1-final\skel\bin\run_all_unit_tests.py.in D:\Nexedi\erp5Mingw\Zope\skel\bin\run_all_unit_tests.py.in
+--- Zope-2.8.1-final\skel\bin\run_all_unit_tests.py.in Thu Jan 01 01:00:00 1970
++++ D:\Nexedi\erp5Mingw\Zope\skel\bin\run_all_unit_tests.py.in Wed Aug 29 04:15:11 2007
+@@ -0,0 +1,43 @@
++import os
++import sys
++from glob import glob
++from subprocess import call
++
++excluded_test_list = ('testCatalogSecurity', 'testImmobilisation', 'testCache', 'testDms')
++start_after = ''
++
++real_instance_home = r'<<INSTANCE_HOME>>'
++products_home = os.path.join(real_instance_home, 'Products')
++instance_home = os.path.join(real_instance_home, 'unit_test')
++log_dir = os.path.join(instance_home, 'tests')
++
++runUnitTest = os.path.join(products_home,'ERP5Type','tests','runUnitTest.py')
++test_output = os.path.join(log_dir, 'test_output.txt')
++zLOG = os.path.join(log_dir, 'zLOG.log')
++
++if not os.path.isdir(log_dir):
++ os.makedirs(log_dir)
++
++if os.path.isfile(test_output):
++ os.remove(test_output)
++if os.path.isfile(zLOG):
++ os.remove(zLOG)
++
++test_list = glob(os.path.join(products_home,'*','tests','test*.py'))
++test_list = [os.path.splitext(test)[0] for test in test_list]
++
++print "Excluding %s" %str(excluded_test_list)
++
++if start_after:
++ start = False
++else:
++ start=True
++for test in test_list:
++ test = os.path.basename(test)
++ test = os.path.splitext(test)[0]
++ if start:
++ if test not in excluded_test_list:
++ call((sys.executable,runUnitTest,test))
++ else:
++ if test == start_after:
++ start = True
+diff -urP -x *.pyc Zope-2.8.1-final\skel\bin\run_unit_test.bat.in D:\Nexedi\erp5Mingw\Zope\skel\bin\run_unit_test.bat.in
+--- Zope-2.8.1-final\skel\bin\run_unit_test.bat.in Thu Jan 01 01:00:00 1970
++++ D:\Nexedi\erp5Mingw\Zope\skel\bin\run_unit_test.bat.in Mon Aug 20 01:27:16 2007
+@@ -0,0 +1,8 @@
++ at setlocal
++ at set PATH=<<INSTANCE_HOME>>\..\external;<<INSTANCE_HOME>>\..\mysql\bin;%PATH%
++ at set PYTHON=<<PYTHON>>
++ at set TEST_FULL_OUT=<<INSTANCE_HOME>>\Products\test_full_output.txt
++ at set UNIT_TEST_RUN=<<INSTANCE_HOME>>\bin\run_all_unit_tests.py
++ at if exist "%TEST_FULL_OUT%" del "%TEST_FULL_OUT%"
++"%PYTHON%" "%UNIT_TEST_RUN%" >> "%TEST_FULL_OUT%" 2>&1
++ at endlocal
+diff -urP -x *.pyc Zope-2.8.1-final\skel\bin\runzope.bat.in D:\Nexedi\erp5Mingw\Zope\skel\bin\runzope.bat.in
+--- Zope-2.8.1-final\skel\bin\runzope.bat.in Thu Aug 11 07:11:37 2005
++++ D:\Nexedi\erp5Mingw\Zope\skel\bin\runzope.bat.in Mon Aug 20 01:25:31 2007
+@@ -1,3 +1,5 @@
++ at setlocal
++ at set PATH=<<INSTANCE_HOME>>\..\external;%PATH%
+ @set PYTHON=<<PYTHON>>
+ @set ZOPE_HOME=<<ZOPE_HOME>>
+ @set INSTANCE_HOME=<<INSTANCE_HOME>>
+@@ -6,3 +8,4 @@
+ @set PYTHONPATH=%SOFTWARE_HOME%
+ @set ZOPE_RUN=%SOFTWARE_HOME%\Zope2\Startup\run.py
+ "%PYTHON%" "%ZOPE_RUN%" -C "%CONFIG_FILE%" %1 %2 %3 %4 %5 %6 %7
++ at endlocal
+diff -urP -x *.pyc Zope-2.8.1-final\skel\bin\zopectl.bat.in D:\Nexedi\erp5Mingw\Zope\skel\bin\zopectl.bat.in
+--- Zope-2.8.1-final\skel\bin\zopectl.bat.in Thu Jan 01 01:00:00 1970
++++ D:\Nexedi\erp5Mingw\Zope\skel\bin\zopectl.bat.in Mon Aug 20 12:59:18 2007
+@@ -0,0 +1,11 @@
++ at setlocal
++ at set PATH=<<INSTANCE_HOME>>\..\external;%PATH%
++ at set ZOPE_HOME=<<ZOPE_HOME>>
++ at set INSTANCE_HOME=<<INSTANCE_HOME>>
++ at set PYTHON=<<PYTHON>>
++ at set SOFTWARE_HOME=%ZOPE_HOME%\lib\python
++ at set CONFIG_FILE=%INSTANCE_HOME%\etc\zope.conf
++ at set PYTHONPATH=%SOFTWARE_HOME%
++ at set ZDCTL=%SOFTWARE_HOME%\Zope2\Startup\zopectl.py
++"%PYTHON%" "%ZDCTL%" -C "%CONFIG_FILE%" %1 %2 %3 %4 %5 %6 %7
++ at endlocal
+diff -urP -x *.pyc Zope-2.8.1-final\skel\bin\zopeservice.py.in D:\Nexedi\erp5Mingw\Zope\skel\bin\zopeservice.py.in
+--- Zope-2.8.1-final\skel\bin\zopeservice.py.in Thu Aug 11 07:11:37 2005
++++ D:\Nexedi\erp5Mingw\Zope\skel\bin\zopeservice.py.in Mon Aug 20 01:41:06 2007
+@@ -88,7 +88,9 @@
+
+ ZOPE_RUN = r'%s\Zope2\Startup\run.py' % SOFTWARE_HOME
+ CONFIG_FILE= os.path.join(INSTANCE_HOME, 'etc', 'zope.conf')
+-PYTHONSERVICE_EXE=r'%s\bin\PythonService.exe' % ZOPE_HOME
++PYTHONSERVICE_EXE=r'%s\Lib\site-packages\win32\pythonservice.exe' % PYTHON
++
++os.environ['PATH'] = r'<<INSTANCE_HOME>>\..\external;' + os.environ['PATH']
+
+ # Setup the environment, so sub-processes see these variables
+ for check_dir in (os.path.join(SOFTWARE_HOME, 'third_party', 'docutils', 'extras'),
+@@ -111,11 +113,12 @@
+
+ from nt_svcutils.service import Service
+
+-servicename = 'Zope_%s' % str(hash(INSTANCE_HOME.lower()))
++servicename = 'ERP5'
+
+ class InstanceService(Service):
++ _svc_deps_ = ('ERP5MySQL',)
+ _svc_name_ = servicename
+- _svc_display_name_ = 'Zope instance at %s' % INSTANCE_HOME
++ _svc_display_name_ = 'ERP5'
+ # _svc_description_ can also be set (but what to say isn't clear!)
+ # If the exe we expect is not there, let the service framework search
+ # for it. This will be true for people running from source builds and
+diff -urP -x *.pyc Zope-2.8.1-final\skel\etc\zope.conf.in D:\Nexedi\erp5Mingw\Zope\skel\etc\zope.conf.in
+--- Zope-2.8.1-final\skel\etc\zope.conf.in Thu Aug 11 07:11:37 2005
++++ D:\Nexedi\erp5Mingw\Zope\skel\etc\zope.conf.in Fri Aug 17 00:19:33 2007
+@@ -132,6 +132,7 @@
+ # Example:
+ #
+ # debug-mode on
++debug-mode off
+
+
+ # Directive: effective-user
+@@ -877,6 +878,17 @@
+ # force-connection-close on
+ </http-server>
+
++<ftp-server>
++ # valid key is "address"
++ address 21
++</ftp-server>
++
++<webdav-source-server>
++ # valid keys are "address" and "force-connection-close"
++ address 81
++ force-connection-close off
++</webdav-source-server>
++
+ # Examples:
+ #
+ # <ftp-server>
+@@ -958,3 +970,10 @@
+ # #client zeo1
+ # </zeoclient>
+ # </zodb_db>
++
++# zoperunner section (tells zopectl where runzope is)
++
++%import timerserver
++<timer-server>
++ interval 5
++</timer-server>
Added: spec/windows/patches/Zope-2.8.1-aq_dynamic.patch
URL: http://svn.erp5.org/spec/windows/patches/Zope-2.8.1-aq_dynamic.patch?rev=16817&view=auto
==============================================================================
--- spec/windows/patches/Zope-2.8.1-aq_dynamic.patch (added)
+++ spec/windows/patches/Zope-2.8.1-aq_dynamic.patch Thu Oct 4 11:45:47 2007
@@ -1,0 +1,230 @@
+diff -urN Zope-2.10.4.orig/lib/python/Acquisition/_Acquisition.c Zope-2.10.4/lib/python/Acquisition/_Acquisition.c
+--- Zope-2.10.4.orig/lib/python/Acquisition/_Acquisition.c 2006-08-06 14:44:39.000000000 +0200
++++ Zope-2.10.4/lib/lib/python/Acquisition/_Acquisition.c 2006-08-07 01:04:12.617262632 +0100
+@@ -382,7 +382,65 @@
+ }
+
+ static PyObject *
+-Wrapper_acquire(Wrapper *self, PyObject *oname,
++Wrapper_GetAttr(PyObject *self, PyObject *attr_name, PyObject *orig)
++{
++ /* This function retrieves an attribute from an object by PyObject_GetAttr.
++
++ The main difference between Wrapper_GetAttr and PyObject_GetAttr is that
++ Wrapper_GetAttr calls _aq_dynamic to generate an attribute dynamically, if
++ the attribute is not found.
++ */
++ PyObject *r, *v, *tb;
++ PyObject *d, *m;
++ PyObject *o;
++
++ if (isWrapper (self))
++ o = WRAPPER(self)->obj;
++ else
++ o = self;
++
++ /* Try to get an attribute in the normal way first. */
++ r = PyObject_GetAttr(o, attr_name);
++ if (r)
++ return r;
++
++ /* If an unexpected error happens, return immediately. */
++ PyErr_Fetch(&r,&v,&tb);
++ if (r != PyExc_AttributeError)
++ {
++ PyErr_Restore(r,v,tb);
++ return NULL;
++ }
++
++ /* Try to get _aq_dynamic. */
++ m = PyObject_GetAttrString(o, "_aq_dynamic");
++ if (! m) {
++ PyErr_Restore(r,v,tb);
++ return NULL;
++ }
++
++ /* Call _aq_dynamic in the context of the original acquisition wrapper. */
++ if (PyECMethod_Check(m) && PyECMethod_Self(m)==o)
++ ASSIGN(m,PyECMethod_New(m,OBJECT(self)));
++ else if (has__of__(m)) ASSIGN(m,__of__(m,OBJECT(self)));
++ d = PyObject_CallFunction(m, "O", attr_name);
++ Py_DECREF(m);
++
++ /* In the case of None, assume that the attribute is not found. */
++ if (d == Py_None) {
++ Py_DECREF(d);
++ PyErr_Restore(r,v,tb);
++ return NULL;
++ }
++
++ Py_XDECREF(r);
++ Py_XDECREF(v);
++ Py_XDECREF(tb);
++ return d;
++}
++
++static PyObject *
++Wrapper_acquire(Wrapper *self, PyObject *oname,
+ PyObject *filter, PyObject *extra, PyObject *orig,
+ int explicit, int containment);
+
+@@ -453,12 +511,12 @@
+ Py_XDECREF(r); Py_XDECREF(v); Py_XDECREF(tb);
+ r=NULL;
+ }
+- else if ((r=PyObject_GetAttr(self->obj,oname)))
++ else if ((r=Wrapper_GetAttr(OBJECT(self),oname,orig)))
+ {
+ if (r==Acquired)
+ {
+ Py_DECREF(r);
+- return Wrapper_acquire(self, oname, filter, extra, orig, 1,
++ return Wrapper_acquire(self, oname, filter, extra, orig, 1,
+ containment);
+ }
+
+@@ -511,23 +569,23 @@
+ {
+ /* Try to optimize search by recognizing repeated obs in path */
+ if (WRAPPER(self->obj)->container==
+- WRAPPER(self->container)->container)
++ WRAPPER(self->container)->container)
+ sco=0;
+ else if (WRAPPER(self->obj)->container==
+- WRAPPER(self->container)->obj)
++ WRAPPER(self->container)->obj)
+ sob=0;
+ }
+
+ r=Wrapper_findattr((Wrapper*)self->container,
+- oname, filter, extra, orig, sob, sco, explicit,
++ oname, filter, extra, orig, sob, sco, explicit,
+ containment);
+-
++
+ if (r && has__of__(r)) ASSIGN(r,__of__(r,OBJECT(self)));
+ return r;
+ }
+ else
+ {
+- if ((r=PyObject_GetAttr(self->container,oname))) {
++ if ((r=Wrapper_GetAttr(self->container,oname,orig))) {
+ if (r == Acquired) {
+ Py_DECREF(r);
+ }
+@@ -564,7 +622,7 @@
+ Wrapper_getattro(Wrapper *self, PyObject *oname)
+ {
+ if (self->obj || self->container)
+- return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 1, 0, 0);
++ return Wrapper_findattr(self, oname, NULL, NULL, OBJECT(self), 1, 1, 0, 0);
+
+ /* Maybe we are getting initialized? */
+ return Py_FindAttr(OBJECT(self),oname);
+@@ -581,7 +639,7 @@
+ return Py_FindAttr(OBJECT(self),oname);
+
+ if (self->obj || self->container)
+- return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 0, 0, 0);
++ return Wrapper_findattr(self, oname, NULL, NULL, OBJECT(self), 1, 0, 0, 0);
+
+ /* Maybe we are getting initialized? */
+ return Py_FindAttr(OBJECT(self),oname);
+diff -urN Zope-2.10.4.orig/lib/python/Acquisition/test_dynamic_acquisition.py Zope-2.10.4.orig/lib/python/Acquisition/test_dynamic_acquisition.py
+--- Zope-2.10.4.orig/lib/python/Acquisition/test_dynamic_acquisition.py 2006-08-06 01:00:00.000000000 +0100
++++ Zope-2.10.4/lib/python/Acquisition/test_dynamic_acquisition.py 2006-08-07 01:03:50.469629584 +0100
+@@ -0,0 +1,94 @@
++##############################################################################
++#
++# Copyright (c) 1996-2002 Zope Corporation and Contributors.
++# All Rights Reserved.
++#
++# This software is subject to the provisions of the Zope Public License,
++# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
++# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
++# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
++# FOR A PARTICULAR PURPOSE
++#
++##############################################################################
++from ExtensionClass import Base
++import Acquisition
++
++def log(message):
++ print message
++ return message
++
++class B(Acquisition.Implicit):
++ color='red'
++ def _aq_dynamic(self, attr):
++ if attr == 'bonjour': return None
++ return lambda: log(self.__class__.__name__ + ':' + attr)
++
++class A(Acquisition.Implicit):
++ def hi(self):
++ print "%s()" % self.__class__.__name__, self.color
++ def _aq_dynamic(self, attr): return None
++
++
++b=B()
++b.a=A()
++b.a.hi()
++b.a.color='green'
++b.a.hi()
++
++b.a.salut()
++a=A()
++a.b=B()
++a.b.salut()
++
++try:
++ b.a.bonjour()
++except AttributeError: pass
++
++try:
++ a.b.bonjour()
++except AttributeError: pass
++
++try:
++ A().hi()
++ raise 'Program error', 'spam'
++except AttributeError: pass
++
++#
++# New test for wrapper comparisons.
++#
++foo = b.a
++bar = b.a
++assert( foo == bar )
++c = A()
++b.c = c
++b.c.d = c
++assert( b.c.d == c )
++assert( b.c.d == b.c )
++assert( b.c == c )
++
++
++def checkContext(self, o):
++ # Python equivalent to aq_inContextOf
++ from Acquisition import aq_base, aq_parent, aq_inner
++ subob = self
++ o = aq_base(o)
++ while 1:
++ if aq_base(subob) is o: return 1
++ self = aq_inner(subob)
++ if self is None: break
++ subob = aq_parent(self)
++ if subob is None: break
++
++
++assert checkContext(b.c, b)
++assert not checkContext(b.c, b.a)
++
++assert b.a.aq_inContextOf(b)
++assert b.c.aq_inContextOf(b)
++assert b.c.d.aq_inContextOf(b)
++assert b.c.d.aq_inContextOf(c)
++assert b.c.d.aq_inContextOf(b.c)
++assert not b.c.aq_inContextOf(foo)
++assert not b.c.aq_inContextOf(b.a)
++assert not b.a.aq_inContextOf('somestring')
Added: spec/windows/patches/Zope-2.8.9.1-aq_dynamic.patch
URL: http://svn.erp5.org/spec/windows/patches/Zope-2.8.9.1-aq_dynamic.patch?rev=16817&view=auto
==============================================================================
--- spec/windows/patches/Zope-2.8.9.1-aq_dynamic.patch (added)
+++ spec/windows/patches/Zope-2.8.9.1-aq_dynamic.patch Thu Oct 4 11:45:47 2007
@@ -1,0 +1,230 @@
+diff -urN Zope-2.8.9.1-final.orig/lib/python/Acquisition/_Acquisition.c Zope-2.8.9.1-final/lib/python/Acquisition/_Acquisition.c
+--- Zope-2.8.9.1-final.orig/lib/python/Acquisition/_Acquisition.c 2007-03-29 21:53:47.000000000 +0200
++++ Zope-2.8.9.1-final/lib/python/Acquisition/_Acquisition.c 2007-10-03 13:17:02.000000000 +0200
+@@ -405,7 +405,65 @@
+ }
+
+ static PyObject *
+-Wrapper_acquire(Wrapper *self, PyObject *oname,
++Wrapper_GetAttr(PyObject *self, PyObject *attr_name, PyObject *orig)
++{
++ /* This function retrieves an attribute from an object by PyObject_GetAttr.
++
++ The main difference between Wrapper_GetAttr and PyObject_GetAttr is that
++ Wrapper_GetAttr calls _aq_dynamic to generate an attribute dynamically, if
++ the attribute is not found.
++ */
++ PyObject *r, *v, *tb;
++ PyObject *d, *m;
++ PyObject *o;
++
++ if (isWrapper (self))
++ o = WRAPPER(self)->obj;
++ else
++ o = self;
++
++ /* Try to get an attribute in the normal way first. */
++ r = PyObject_GetAttr(o, attr_name);
++ if (r)
++ return r;
++
++ /* If an unexpected error happens, return immediately. */
++ PyErr_Fetch(&r,&v,&tb);
++ if (r != PyExc_AttributeError)
++ {
++ PyErr_Restore(r,v,tb);
++ return NULL;
++ }
++
++ /* Try to get _aq_dynamic. */
++ m = PyObject_GetAttrString(o, "_aq_dynamic");
++ if (! m) {
++ PyErr_Restore(r,v,tb);
++ return NULL;
++ }
++
++ /* Call _aq_dynamic in the context of the original acquisition wrapper. */
++ if (PyECMethod_Check(m) && PyECMethod_Self(m)==o)
++ ASSIGN(m,PyECMethod_New(m,OBJECT(self)));
++ else if (has__of__(m)) ASSIGN(m,__of__(m,OBJECT(self)));
++ d = PyObject_CallFunction(m, "O", attr_name);
++ Py_DECREF(m);
++
++ /* In the case of None, assume that the attribute is not found. */
++ if (d == Py_None) {
++ Py_DECREF(d);
++ PyErr_Restore(r,v,tb);
++ return NULL;
++ }
++
++ Py_XDECREF(r);
++ Py_XDECREF(v);
++ Py_XDECREF(tb);
++ return d;
++}
++
++static PyObject *
++Wrapper_acquire(Wrapper *self, PyObject *oname,
+ PyObject *filter, PyObject *extra, PyObject *orig,
+ int explicit, int containment);
+
+@@ -476,12 +534,12 @@
+ Py_XDECREF(r); Py_XDECREF(v); Py_XDECREF(tb);
+ r=NULL;
+ }
+- else if ((r=PyObject_GetAttr(self->obj,oname)))
++ else if ((r=Wrapper_GetAttr(OBJECT(self),oname,orig)))
+ {
+ if (r==Acquired)
+ {
+ Py_DECREF(r);
+- return Wrapper_acquire(self, oname, filter, extra, orig, 1,
++ return Wrapper_acquire(self, oname, filter, extra, orig, 1,
+ containment);
+ }
+
+@@ -534,23 +592,23 @@
+ {
+ /* Try to optimize search by recognizing repeated obs in path */
+ if (WRAPPER(self->obj)->container==
+- WRAPPER(self->container)->container)
++ WRAPPER(self->container)->container)
+ sco=0;
+ else if (WRAPPER(self->obj)->container==
+- WRAPPER(self->container)->obj)
++ WRAPPER(self->container)->obj)
+ sob=0;
+ }
+
+ r=Wrapper_findattr((Wrapper*)self->container,
+- oname, filter, extra, orig, sob, sco, explicit,
++ oname, filter, extra, orig, sob, sco, explicit,
+ containment);
+-
++
+ if (r && has__of__(r)) ASSIGN(r,__of__(r,OBJECT(self)));
+ return r;
+ }
+ else
+ {
+- if ((r=PyObject_GetAttr(self->container,oname))) {
++ if ((r=Wrapper_GetAttr(self->container,oname,orig))) {
+ if (r == Acquired) {
+ Py_DECREF(r);
+ }
+@@ -587,7 +645,7 @@
+ Wrapper_getattro(Wrapper *self, PyObject *oname)
+ {
+ if (self->obj || self->container)
+- return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 1, 0, 0);
++ return Wrapper_findattr(self, oname, NULL, NULL, OBJECT(self), 1, 1, 0, 0);
+
+ /* Maybe we are getting initialized? */
+ return Py_FindAttr(OBJECT(self),oname);
+@@ -604,7 +662,7 @@
+ return Py_FindAttr(OBJECT(self),oname);
+
+ if (self->obj || self->container)
+- return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 0, 0, 0);
++ return Wrapper_findattr(self, oname, NULL, NULL, OBJECT(self), 1, 0, 0, 0);
+
+ /* Maybe we are getting initialized? */
+ return Py_FindAttr(OBJECT(self),oname);
+diff -urN Zope-2.8.9.1-final.orig/lib/python/Acquisition/test_dynamic_acquisition.py Zope-2.8.9.1-final/lib/python/Acquisition/test_dynamic_acquisition.py
+--- Zope-2.8.9.1-final.orig/lib/python/Acquisition/test_dynamic_acquisition.py 1970-01-01 01:00:00.000000000 +0100
++++ Zope-2.8.9.1-final/lib/python/Acquisition/test_dynamic_acquisition.py 2007-10-03 13:16:37.000000000 +0200
+@@ -0,0 +1,94 @@
++##############################################################################
++#
++# Copyright (c) 1996-2002 Zope Corporation and Contributors.
++# All Rights Reserved.
++#
++# This software is subject to the provisions of the Zope Public License,
++# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
++# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
++# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
++# FOR A PARTICULAR PURPOSE
++#
++##############################################################################
++from ExtensionClass import Base
++import Acquisition
++
++def log(message):
++ print message
++ return message
++
++class B(Acquisition.Implicit):
++ color='red'
++ def _aq_dynamic(self, attr):
++ if attr == 'bonjour': return None
++ return lambda: log(self.__class__.__name__ + ':' + attr)
++
++class A(Acquisition.Implicit):
++ def hi(self):
++ print "%s()" % self.__class__.__name__, self.color
++ def _aq_dynamic(self, attr): return None
++
++
++b=B()
++b.a=A()
++b.a.hi()
++b.a.color='green'
++b.a.hi()
++
++b.a.salut()
++a=A()
++a.b=B()
++a.b.salut()
++
++try:
++ b.a.bonjour()
++except AttributeError: pass
++
++try:
++ a.b.bonjour()
++except AttributeError: pass
++
++try:
++ A().hi()
++ raise 'Program error', 'spam'
++except AttributeError: pass
++
++#
++# New test for wrapper comparisons.
++#
++foo = b.a
++bar = b.a
++assert( foo == bar )
++c = A()
++b.c = c
++b.c.d = c
++assert( b.c.d == c )
++assert( b.c.d == b.c )
++assert( b.c == c )
++
++
++def checkContext(self, o):
++ # Python equivalent to aq_inContextOf
++ from Acquisition import aq_base, aq_parent, aq_inner
++ subob = self
++ o = aq_base(o)
++ while 1:
++ if aq_base(subob) is o: return 1
++ self = aq_inner(subob)
++ if self is None: break
++ subob = aq_parent(self)
++ if subob is None: break
++
++
++assert checkContext(b.c, b)
++assert not checkContext(b.c, b.a)
++
++assert b.a.aq_inContextOf(b)
++assert b.c.aq_inContextOf(b)
++assert b.c.d.aq_inContextOf(b)
++assert b.c.d.aq_inContextOf(c)
++assert b.c.d.aq_inContextOf(b.c)
++assert not b.c.aq_inContextOf(foo)
++assert not b.c.aq_inContextOf(b.a)
++assert not b.a.aq_inContextOf('somestring')
Added: spec/windows/patches/tarfile.patch
URL: http://svn.erp5.org/spec/windows/patches/tarfile.patch?rev=16817&view=auto
==============================================================================
--- spec/windows/patches/tarfile.patch (added)
+++ spec/windows/patches/tarfile.patch Thu Oct 4 11:45:47 2007
@@ -1,0 +1,25 @@
+--- tarfile.py.orig 2007-05-16 10:40:28.000000000 +0200
++++ tarfile.py 2007-05-16 10:40:40.000000000 +0200
+@@ -688,17 +688,17 @@
+ tarinfo.devmajor = tarinfo.devmajor = 0
+ tarinfo.prefix = buf[345:500]
+
+- # Some old tar programs represent a directory as a regular
+- # file with a trailing slash.
+- if tarinfo.isreg() and tarinfo.name.endswith("/"):
+- tarinfo.type = DIRTYPE
+-
+ # The prefix field is used for filenames > 100 in
+ # the POSIX standard.
+ # name = prefix + '/' + name
+ if tarinfo.type != GNUTYPE_SPARSE:
+ tarinfo.name = normpath(os.path.join(nts(tarinfo.prefix), tarinfo.name))
+
++ # Some old tar programs represent a directory as a regular
++ # file with a trailing slash.
++ if tarinfo.isreg() and tarinfo.name.endswith("/"):
++ tarinfo.type = DIRTYPE
++
+ # Directory names should have a '/' at the end.
+ if tarinfo.isdir():
+ tarinfo.name += "/"
More information about the Erp5-report
mailing list