Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: py2exe and dynamic service installation ? (http://www.velocityreviews.com/forums/t318784-re-py2exe-and-dynamic-service-installation.html)

Thomas Heller 06-24-2003 09:15 AM

Re: py2exe and dynamic service installation ?
 
mmillikan@vfa.com writes:

> The attached diff to py2exe v.0.3.4 run_svc.c adds the following optional
> command line args to the users exe file:
>
> -service <desired name>
> -display <display name>
> -depends <pipe|separated|dependencies>
> -user <account name>
> -pass <password>
> -auto no param, sets service to autostart
>
> Rebuild the py2exe interpreters by running 'python setup.py build' in
> the py2exe directory.
>
> This is only lightly tested and not yet used in production.
>
> I also have a run_svc_w.c which provides a consoleless analog to
> run_w.c (usefull for avoiding 'flashing window syndrome' when bundling
> exe's for use within an installer such as NSIS or Inno Setup).


If you want this to be included in the next px2exe release,
please upload it as a patch to the SF tracker:
http://sourceforge.net/tracker/?grou...83&atid=315583

Myself I use Wise, which can register the service itself, so I had no
need for this. Is a separate console version and console-less version
needed? For debugging?

Besides, I would think that eventually the best approach would be to
rewrite PythonService.cpp (which is used by run_svc.c) in pure python
with ctypes, but currently I have neither a need nor time for this.

Thomas

Harald Schneider 06-24-2003 10:09 AM

Re: py2exe and dynamic service installation ?
 
> If you want this to be included in the next px2exe release,
> please upload it as a patch to the SF tracker:
> http://sourceforge.net/tracker/?grou...83&atid=315583
>


At the moment I'm not able to run the patch on my sytem, since the
executable
which Mark has sent me has got some references to Python21.dll (I run 2.2).
But it is a good approach wich makes a flexible tool even more flexible :-)

It would be nice, if Mark could contribute this to the project. I'm not that
deep in C to modify the files myself ...

> Myself I use Wise, which can register the service itself, so I had no
> need for this. Is a separate console version and console-less version
> needed? For debugging?


Console-less only would be OK.

> Besides, I would think that eventually the best approach would be to
> rewrite PythonService.cpp (which is used by run_svc.c) in pure python
> with ctypes, but currently I have neither a need nor time for this.


I absolutely understand this!
But if you are hit someday by the urgent need to write 1.000 lines in Python
(like I do sometimes), it would be nice to see this feature ;-)

>
> Thomas


-- Harald



Harald Schneider 06-24-2003 12:49 PM

Re: py2exe and dynamic service installation ?
 
Thomas,

do I need to prepare my Python app for the use with WISE, when I want to
install it as a service? Does it need to provide a certain service API or
some special response codes ?

--Harald


"Thomas Heller" <theller@python.net> schrieb im Newsbeitrag
news:adc7hm57.fsf@python.net...
> mmillikan@vfa.com writes:
>
> > The attached diff to py2exe v.0.3.4 run_svc.c adds the following

optional
> > command line args to the users exe file:
> >
> > -service <desired name>
> > -display <display name>
> > -depends <pipe|separated|dependencies>
> > -user <account name>
> > -pass <password>
> > -auto no param, sets service to autostart
> >
> > Rebuild the py2exe interpreters by running 'python setup.py build' in
> > the py2exe directory.
> >
> > This is only lightly tested and not yet used in production.
> >
> > I also have a run_svc_w.c which provides a consoleless analog to
> > run_w.c (usefull for avoiding 'flashing window syndrome' when bundling
> > exe's for use within an installer such as NSIS or Inno Setup).

>
> If you want this to be included in the next px2exe release,
> please upload it as a patch to the SF tracker:
> http://sourceforge.net/tracker/?grou...83&atid=315583
>
> Myself I use Wise, which can register the service itself, so I had no
> need for this. Is a separate console version and console-less version
> needed? For debugging?
>
> Besides, I would think that eventually the best approach would be to
> rewrite PythonService.cpp (which is used by run_svc.c) in pure python
> with ctypes, but currently I have neither a need nor time for this.
>
> Thomas




Thomas Heller 06-24-2003 01:12 PM

Re: py2exe and dynamic service installation ?
 
"Harald Schneider" <h_schneider@marketmix.com> writes:

> Thomas,
>
> do I need to prepare my Python app for the use with WISE, when I want to
> install it as a service? Does it need to provide a certain service API or
> some special response codes ?


No, you create your service with py2exe as always, and Wise does the
rest - create a windows installer, install the files on the target
machine and register the serice there. The registration is done from the
installer, not from the service.

I'll try to attach a screenshot of the dialogbox that the wise program
displays (at build time), so you can see the options which are
available.
Hm, doesn't work in the newsgroup - will send by private mail.

Thomas

Harald Schneider 06-24-2003 01:52 PM

SOLVED: py2exe and dynamic service installation ?
 
OK -- I catched the point :-)
I generated the service exe like usual and used XNET.EXE (part of the free
KIX package, see www.kixstart.org ) to install the service under any name.
Thanks!

--Harald


"Thomas Heller" <theller@python.net> schrieb im Newsbeitrag
news:wufbfwlg.fsf@python.net...
> "Harald Schneider" <h_schneider@marketmix.com> writes:
>
> > Thomas,
> >
> > do I need to prepare my Python app for the use with WISE, when I want to
> > install it as a service? Does it need to provide a certain service API

or
> > some special response codes ?

>
> No, you create your service with py2exe as always, and Wise does the
> rest - create a windows installer, install the files on the target
> machine and register the serice there. The registration is done from the
> installer, not from the service.
>
> I'll try to attach a screenshot of the dialogbox that the wise program
> displays (at build time), so you can see the options which are
> available.
> Hm, doesn't work in the newsgroup - will send by private mail.
>
> Thomas





All times are GMT. The time now is 10:24 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.