Пример #1
0
from castervoice.lib.ctrl.updatecheck import UpdateChecker # requires settings/dependencies
UpdateChecker().initialize()

from castervoice.lib.ctrl.configure_engine import EngineConfigEarly, EngineConfigLate
EngineConfigEarly() # requires settings/dependencies

_NEXUS = None

from castervoice.lib import control

if control.nexus() is None: # Initialize Caster State
    from castervoice.lib.ctrl.mgr.loading.load.content_loader import ContentLoader
    from castervoice.lib.ctrl.mgr.loading.load.content_request_generator import ContentRequestGenerator
    from castervoice.lib.ctrl.mgr.loading.load.reload_fn_provider import ReloadFunctionProvider
    from castervoice.lib.ctrl.mgr.loading.load.modules_access import SysModulesAccessor
    _crg = ContentRequestGenerator()
    _rp = ReloadFunctionProvider()
    _sma = SysModulesAccessor()
    _content_loader = ContentLoader(_crg, importlib.import_module, _rp.get_reload_fn(), _sma)
    control.init_nexus(_content_loader)
    EngineConfigLate() # Requires grammars to be loaded and nexus
   
if settings.SETTINGS["sikuli"]["enabled"]:
    from castervoice.asynch.sikuli import sikuli_controller
    sikuli_controller.get_instance().bootstrap_start_server_proxy()

print("\n*- Starting " + settings.SOFTWARE_NAME + " -*")

for message in settings.STARTUP_MESSAGES:
    print("\n" + message + "\n")
Пример #2
0
from dragonfly import Function, MappingRule

from castervoice.asynch.sikuli import sikuli_controller
from castervoice.lib.ctrl.mgr.rule_details import RuleDetails
from castervoice.lib.merge.state.short import R

_sc = sikuli_controller.get_instance()


class SikuliManagementRule(MappingRule):

    mapping = {
        "launch sick IDE": R(Function(_sc.launch_IDE)),
        "launch sick server": R(Function(_sc.bootstrap_start_server_proxy)),
        "terminate sick server": R(Function(_sc.terminate_server_proxy)),
    }


def get_rule():
    details = RuleDetails(name="sikuli control rule")
    return SikuliManagementRule, details
Пример #3
0
 def _get_mapping(self):
     mapping = sikuli_controller.get_instance().generate_commands()
     if len(mapping) == 0:
         mapping["this was a test instantiation"] = NullAction()
     return mapping