~unifield-team/unifield-web/us-2156

« back to all changes in this revision

Viewing changes to win32/OpenERPWebService.py

  • Committer: Stephane Wirtel
  • Date: 2010-12-29 11:24:04 UTC
  • Revision ID: stephane@openerp.com-20101229112404-l6c0eenec52gnr0y
[IMP] Change the Win32 Installer

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
class OpenERPWebService(win32serviceutil.ServiceFramework):
36
36
    # required info
37
 
    _svc_name_ = "openerp-web"
38
 
    _svc_display_name_ = "OpenERP Web"
 
37
    _svc_name_ = "openerp-web-6.0"
 
38
    _svc_display_name_ = "OpenERP Web 6.0"
39
39
    # optionnal info
40
 
    _svc_description_ = "OpenERP Web service"
 
40
    _svc_description_ = "OpenERP Web 6.0 service"
41
41
 
42
42
    def __init__(self, args):
43
43
        win32serviceutil.ServiceFramework.__init__(self, args)
64
64
        # The server finds now its configuration automatically on Windows
65
65
        # We start the ERP Web as an independent process, but we keep its handle
66
66
        # The server's binary must be one directory above the service's binary (when py2exe'd the python libraries shouldn' mix)
 
67
 
67
68
        service_dir = os.path.dirname(sys.argv[0])
68
69
        server_dir = os.path.split(service_dir)[0]
69
70
        server_path = os.path.join(server_dir, 'openerp-web.exe')
 
71
 
70
72
        self.openerp_process = subprocess.Popen([server_path], cwd=server_dir, creationflags=win32process.CREATE_NO_WINDOW)
71
73
 
72
74