Olá Rodrigo, algum resultado nesta batalha?
Estou tentando fazer funcionar para ver se vale a pena investir nesta configuração.
A minha necessidade é distribuir o app como um executável, e o app deve rodar como um serviço no windows.
Fiz o teste com a versão do código fonte (trunk), e com a distribuição windows (binários), e não funciona.
Microsoft Windows [versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.
C:\Windows\system32>cd D:\webconn\web2py_win\web2py
C:\Windows\system32>d:
D:\webconn\web2py_win\web2py>web2py.exe -W install
New installation: unable to create welcome.w2p fileweb2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 2.00.0 (2012-05-15 09:05:35) dev
Database drivers available: SQLite3, pymysql, pg8000, MSSQL/DB2/Teradata, mongoD
B, IMAP
Starting hardcron...
Installing service web2py
Changing service configuration
Service updated
D:\webconn\web2py_win\web2py>cd ..
D:\webconn\web2py_win>cd ..
D:\webconn>cd ..
D:\>cd web2py_win
D:\web2py_win>python web2py.exe -W install
File "web2py.exe", line 1
SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but no enc
oding declared; see http://www.python.org/peps/pep-0263.html for details
D:\web2py_win>web2py.exe -W install
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.7 (2012-03-04 22:12:08) stable
Database drivers available: SQLite3, pymysql, pg8000, IMAP
Starting hardcron...
Installing service web2py
Changing service configuration
Service updated
D:\web2py_win>web2py.exe -W start
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.7 (2012-03-04 22:12:08) stable
Database drivers available: SQLite3, pymysql, pg8000, IMAP
Starting hardcron...
Starting service web2py
Error starting service: O serviþo nÒo respondeu Ó requisiþÒo de inÝcio ou contro
le em tempo hßbil.
D:\web2py_win>
O serviço aparece como instalado, mas ao tentar iniciá-lo recebo a mensagem "Erro 1053: O serviço não respondeu à requisição de início ou controle em tempo hábil."
O options.py está no padrão:
#!/usr/bin/python
# -*- coding: utf-8 -*-
# when web2py is run as a windows service (web2py.exe -W)
# it does not load the command line options but it
# expects to find conifguration settings in a file called
#
# web2py/options.py
#
# this file is an example for options.py
import socket
import os
ip = '0.0.0.0'
port = 80
interfaces=[('0.0.0.0',80),('0.0.0.0',443,'ssl_private_key.pem','ssl_certificate.pem')]
password = '<recycle>' # ## <recycle> means use the previous password
pid_filename = 'httpserver.pid'
log_filename = 'httpserver.log'
profiler_filename = None
#ssl_certificate = 'ssl_certificate.pem' # ## path to certificate file
#ssl_private_key = 'ssl_private_key.pem' # ## path to private key file
#numthreads = 50 # ## deprecated; remove
minthreads = None
maxthreads = None
server_name = socket.gethostname()
request_queue_size = 5
timeout = 30
shutdown_timeout = 5
folder = os.getcwd()
extcron = None
nocron = None
Alguma idéia?
Obrigado,
Fernando Macedo