CVS: Packages/WinBuilders/zeo_addons/skel/bin - zeoservice.py.in:1.2

Sidnei da Silva <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Packages/WinBuilders/zeo_addons/skel/bin
In directory cvs.zope.org:/tmp/cvs-serv24787/zeo_addons/skel/bin

Modified Files:
	zeoservice.py.in 
Log Message:

- Use a newer pywin32 build
- Update build instructions
- Use python 2.3.5 for the installer
- Service improvements


=== Packages/WinBuilders/zeo_addons/skel/bin/zeoservice.py.in 1.1 => 1.2 ===
--- Packages/WinBuilders/zeo_addons/skel/bin/zeoservice.py.in:1.1	Wed Aug 20 16:53:52 2003
+++ Packages/WinBuilders/zeo_addons/skel/bin/zeoservice.py.in	Tue Apr 12 23:30:26 2005
@@ -95,15 +95,28 @@
 
 sys.path.insert(0, SOFTWARE_HOME)
 
+# Setup the environment, so sub-processes see these variables
+os.environ["PYTHONPATH"] = os.environ.get("PYTHONPATH", "") + ";" + SOFTWARE_HOME
+os.environ["INSTANCE_HOME"] = INSTANCE_HOME
+
 from nt_svcutils import service
 
-servicename = 'ZEO_%s' % str(hash(INSTANCE_HOME))
+servicename = 'ZEO_%s' % str(hash(INSTANCE_HOME.lower()))
 
 class InstanceService(service.Service):
     start_cmd = '"%s" "%s" -C "%s"' % (PYTHON, ZEO_RUN, CONFIG_FILE)
     _svc_name_ = servicename
     _svc_display_name_ = 'ZEO instance at %s' % INSTANCE_HOME
-    _exe_name_ = PYTHONSERVICE_EXE
+    # 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
+    # relying on pre-installed pythonservice.exe.
+    # Note this is only used at install time, not runtime.
+    if os.path.isfile(PYTHONSERVICE_EXE):
+        _exe_name_ = PYTHONSERVICE_EXE
+
+    process_runner = PYTHON
+    process_args = '"%s" -C "%s"' % (ZOPE_RUN, CONFIG_FILE)
+    evtlog_name = 'ZEO'
 
 if __name__ == '__main__':
     import win32serviceutil

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.