def run(self): self.tray_icon = TrayIcon(self.app_state, 'http://%s:%d' % (self.host, self.port), path(['geobox/lib/icon.ico'])) win32gui.PumpMessages() while not self.app_state.wait_for_app_shutdown(timeout=60): pass
def init_logging(app_state): user_log_dir = app_state.user_data_path("log", make_dirs=True) user_log_file = app_state.user_data_path("log.ini") if os.path.exists(user_log_file): logging.config.fileConfig(user_log_file, defaults={"user_log_dir": user_log_dir}) else: logging.config.fileConfig(path(["geobox/lib/default_log.ini"]), defaults={"user_log_dir": user_log_dir})
def run(self): self.tray_icon = TrayIcon( self.app_state, 'http://%s:%d' % (self.host, self.port), path(['geobox/lib/icon.ico']) ) win32gui.PumpMessages() while not self.app_state.wait_for_app_shutdown(timeout=60): pass
def init_logging(app_state): user_log_dir = app_state.user_data_path('log', make_dirs=True) user_log_file = app_state.user_data_path('log.ini') if os.path.exists(user_log_file): logging.config.fileConfig(user_log_file, defaults={'user_log_dir': user_log_dir}) else: logging.config.fileConfig(path(['geobox/lib/default_log.ini']), defaults={'user_log_dir': user_log_dir})
class GeoBoxConfig(ConfigParser): """ Configuration parser for basic GeoBox configuration. """ defaults = { 'app': { 'name': 'GeoBox-Client', 'host': '127.0.0.1', 'locale': 'de_DE', # 'en_UK' 'logging_server': '', 'vector_import': True, 'vector_export': False, 'raster_prefix': 'tiles', 'vector_prefix': 'vector', }, 'web': { 'port': 8090, 'server_list': [], 'available_srs': [('EPSG:4326', _('WGS 84 (EPSG:4326)'), _('EPSG:4326 help text')), ('EPSG:3857', _('WGS 84 / Pseudo-Mercator (EPSG:3857)'), _('EPSG:3857 help text')), ('EPSG:31467', _('Gauss-Kruger zone 3 (EPSG:31467)'), _('EPSG:31467 help text')), ('EPSG:25832', _('UTM zone 32N (EPSG:25832)'), _('EPSG:25832 help text'))], 'authorization_layer_name': 'flaechenbox', 'authorization_layer_title': 'Berechtigungslayer', 'wms_search_url': 'http://www.geoportal.rlp.de/mapbender/php/mod_callMetadata.php?', 'wms_cors_proxy_url': 'http://www.geoportal.rlp.de/cors_proxy/', # 'default_background': { # 'url': '', # 'name': 'default_background', # 'title': 'Default Background', # 'format': 'png', # 'view': { # 'coverage': { # "type": "Polygon", # "coordinates": [[ # [-20037508.3428, -20037508.3428], # [-20037508.3428, 20037508.3428], # [ 20037508.3428, 20037508.3428], # [ 20037508.3428, -20037508.3428], # [-20037508.3428, -20037508.3428] # ]] # }, # 'level_start': 0, # 'level_end': 18 # } # } }, 'mapproxy': { 'port': 8091, }, 'watermark': { 'text': 'GeoBox', }, 'user': { 'type': '0', }, 'couchdb': { # temp ports count backwards from this port -> leave room to other ports 'port': 8099, # use installed path for couchdb since couchdb in packaging/build # is only usable after installation 'bin_dir': path( dev=[ 'c:/Program Files/GeoBox-Client/couchdb/bin', 'c:/Programme/GeoBox-Client/couchdb/bin', '/usr/local/bin', '/usr/bin' ], frozen=['../couchdb/bin'], test=[ 'c:/Program Files/GeoBox-Client/couchdb/bin', 'c:/Programme/GeoBox-Client/couchdb/bin', '/usr/local/bin', '/usr/bin' ], cmd='erl', ), 'erl_cmd': 'erl -noinput -noshell -sasl errlog_type error -couch_ini', 'env': [ env("ERL_FLAGS", "-pa /usr/local/share/geocouch/ebin", platform='darwin'), env("ERL_LIBS", "/usr/local/lib/couchdb/erlang/lib", platform='darwin'), env("ERL_LIBS", "/usr/lib/couchdb/erlang/lib", platform='linux'), ], 'download_box': 'downloadbox', 'upload_box': 'uploadbox', 'file_box': 'filebox', }, 'tilebox': { 'path': None, 'port': 8092, } }