def gs_init(m={}): """Called by GoSublime.py::plugin_loaded m = { 'version': VERSION, 'ann': ANN, 'margo_exe': MARGO_EXE, } """ global INSTALL_VERSION global INSTALL_EXE # Kill server on process exit. atexit.register(killSrv) version = m.get("version") if version: INSTALL_VERSION = version margo_exe = m.get("margo_exe") if margo_exe: INSTALL_EXE = margo_exe force = about.FORCE_INSTALL is True # install_version recorded in 'GoSublime-aux.sublime-settings' aso_install_vesion = gs.aso().get("install_version", "") f = lambda: install(aso_install_vesion, force) # GsQ handles threaded processes. # Install latest version. gsq.do("GoSublime", f, msg="Installing MarGo", set_status=False)
def run(self, dir=''): o = kv.O(cancelled=False) def cancel(): o.cancelled = True if not dir: view = self.window.active_view() dir = gs.basedir_or_cwd(view.file_name() if view is not None else None) gsq.do(DOMAIN, lambda: show_pkgfiles(dir, o), 'scanning directory for package files', cancel=cancel)
def run(self, dir=''): o = kv.O(cancelled=False) def cancel(): o.cancelled = True if not dir: view = self.window.active_view() dir = gs.basedir_or_cwd( view.file_name() if view is not None else None) gsq.do(DOMAIN, lambda: show_pkgfiles(dir, o), 'scanning directory for package files', cancel=cancel)
def gs_init(m={}): global INSTALL_VERSION global INSTALL_EXE atexit.register(killSrv) version = m.get('version') if version: INSTALL_VERSION = version margo_exe = m.get('margo_exe') if margo_exe: INSTALL_EXE = margo_exe aso_install_vesion = gs.aso().get('install_version', '') f = lambda: install(aso_install_vesion, bool(ext_main_file())) gsq.do('GoSublime', f, msg='Installing MarGo', set_status=False)
def gs_init(m={}): global INSTALL_VERSION global INSTALL_EXE atexit.register(killSrv) version = m.get("version") if version: INSTALL_VERSION = version margo_exe = m.get("margo_exe") if margo_exe: INSTALL_EXE = margo_exe aso_install_vesion = gs.aso().get("install_version", "") f = lambda: install(aso_install_vesion, False) gsq.do("GoSublime", f, msg="Installing MarGo", set_status=True)
def gs_init(): atexit.register(killSrv) aso_tokens = gs.aso().get('mg9_install_tokens', '') f = lambda: install(aso_tokens, False) gsq.do('GoSublime', f, msg='Installing MarGo', set_status=True)
def gs_init(m={}): atexit.register(killSrv) gsq.do('GoSublime', _install, msg='Installing MarGo', set_status=False)