示例#1
0
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)
示例#2
0
	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)
示例#3
0
    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)
示例#4
0
文件: mg9.py 项目: allanw1/Arianrhod
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)
示例#5
0
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)
示例#6
0
文件: mg9.py 项目: vivicai/GoSublime
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)
示例#7
0
文件: mg9.py 项目: OlingCat/GoSublime
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)
示例#8
0
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)
示例#9
0
def gs_init(m={}):
	atexit.register(killSrv)
	gsq.do('GoSublime', _install, msg='Installing MarGo', set_status=False)