Commit e63ae0d8 authored by D1plo1d's avatar D1plo1d

Removing pymdns and using pybonjour directly because pybonjour works on linux...

Removing pymdns and using pybonjour directly because pybonjour works on linux so pymdns was entirely redundant.
parent 0882a4af
...@@ -27,8 +27,8 @@ A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/ ...@@ -27,8 +27,8 @@ A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
You can run Printrun directly from source, as there are no packages available yet. Fetch and install the dependencies using You can run Printrun directly from source, as there are no packages available yet. Fetch and install the dependencies using
1. `sudo apt-get install python-serial python-wxgtk2.8 python-pyglet python-tornado python-setuptools python-libxml2 python-gobject` 1. `sudo apt-get install python-serial python-wxgtk2.8 python-pyglet python-tornado python-setuptools python-libxml2 python-gobject avahi-daemon libavahi-compat-libdnssd1`
2. `sudo apt-get install avahi-daemon python-avahi tornado` 2. `sudo easy_install pybonjour tornado`
3. `sudo easy_install https://github.com/D1plo1d/py-mdns/archive/master.zip` 3. `sudo easy_install https://github.com/D1plo1d/py-mdns/archive/master.zip`
### Fedora 15 and newer (untested) ### Fedora 15 and newer (untested)
......
...@@ -24,8 +24,8 @@ import json ...@@ -24,8 +24,8 @@ import json
import textwrap import textwrap
import SocketServer import SocketServer
import socket import socket
import mdns import pybonjour
from mdns.service import servicegroup, service import atexit
import uuid import uuid
import re import re
import traceback import traceback
...@@ -266,22 +266,17 @@ class Printserve(pronsole.pronsole, EventEmitter): ...@@ -266,22 +266,17 @@ class Printserve(pronsole.pronsole, EventEmitter):
self.previous_job_progress = 0 self.previous_job_progress = 0
self.silent = True self.silent = True
self.init_mdns() self.init_mdns()
self.jobs.listeners.add(self)
def init_mdns(self): def init_mdns(self):
# create the group sdRef = pybonjour.DNSServiceRegister(name = self.settings.name,
group = servicegroup() regtype = '_construct._tcp',
group.name = self.settings.name port = 8888,
domain = "local.")
# create the services atexit.register(self.cleanup_service, sdRef)
svc = service(type='_construct._tcp', port=8888, name='Pronsere',
sysname='training', state='SCHEMA-READY') def cleanup_service(self, sdRef):
svc.txt = { } sdRef.close()
group.services = [ svc ]
#services = ({'type': '_construct._tcp', 'port': 8888, 'domain': "local."})
#self.mdns = mdns.publisher().save_group({'name': self.settings.name, 'services': services })
self.mdns = mdns.publisher().save_group(group)
self.jobs.listeners.add(self)
def do_print(self): def do_print(self):
if not self.p.online: raise "not online" if not self.p.online: raise "not online"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment