Esempio n. 1
0
    def __safe_call__(self):
        box = CTK.Box()
        box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Dependencies")))

        buttons = CTK.DruidButtonsPanel()
        buttons += CTK.DruidButton_Close(_('Cancel'))
        buttons += CTK.DruidButton_Goto(_('Retry'),
                                        URL_PRECONDITION,
                                        do_submit=True)

        # Check PHP
        php_cgi_bin = php.figure_phpcgi_binary()

        if not php_cgi_bin:
            box += php.PHP_Interpreter_Not_Found_Widget()
            box += buttons
            return box.Render().toStr()

        # Database
        supported_dbs = database.get_supported_dbs(DB_SUPPORTED)
        if not supported_dbs:
            box += database.PreconditionError(DB_SUPPORTED)
            box += buttons
            return box.Render().toStr()

        # PHP modules
        error = tools.check_requirements()
        if error:
            box += InstructionBox(error[0], error[1])
            box += buttons
            return box.Render().toStr()

        box += CTK.RawHTML(js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET))
        return box.Render().toStr()
Esempio n. 2
0
    def __safe_call__(self):
        box = CTK.Box()
        box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Requirements")))

        buttons = CTK.DruidButtonsPanel()
        buttons += CTK.DruidButton_Close(_('Cancel'))
        buttons += CTK.DruidButton_Goto(
            _('Retry'),
            market.Install.URL_INSTALL_SETUP_EXTERNAL,
            do_submit=True)

        # Ruby
        ruby_bin = ruby.detect_ruby('1.8')
        gem_bin = ruby.detect_gem()

        if not ruby_bin or not gem_bin:
            box += InstructionBox(_(ruby.RUBY18_NOTE),
                                  ruby.RUBY18_INSTRUCTIONS)
            box += buttons
            return box.Render().toStr()

        # CC
        cc_bin = cc.detect_cc(cache=False)
        if not cc_bin:
            box += InstructionBox(_(cc.CC_NOTE), cc.CC_INSTRUCTIONS)
            box += buttons
            return box.Render().toStr()

        # C++
        cpp_bin = cpp.detect_cpp(cache=False)
        if not cpp_bin:
            box += InstructionBox(_(cpp.CPP_NOTE), cpp.CPP_INSTRUCTIONS)
            box += buttons
            return box.Render().toStr()

        # Database
        supported_dbs = database.get_supported_dbs(DB_SUPPORTED)
        if not supported_dbs:
            box += database.PreconditionError(DB_SUPPORTED)
            box += buttons
            return box.Render().toStr()

        box += CTK.RawHTML(js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET))
        return box.Render().toStr()
Esempio n. 3
0
    def __safe_call__(self):
        box = CTK.Box()
        box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Dependencies")))

        if tools.check_cc():
            box += CTK.RawHTML(
                js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET))
            return box.Render().toStr()

        box += InstructionBox(_(tools.DEP_NOTE), tools.DEP_INSTRUCTIONS)
        buttons = CTK.DruidButtonsPanel()
        buttons += CTK.DruidButton_Close(_('Cancel'))
        buttons += CTK.DruidButton_Goto(_('Retry'),
                                        URL_PRECONDITION,
                                        do_submit=True)
        return box.Render().toStr()
    def __safe_call__(self):
        box = CTK.Box()
        box += CTK.RawHTML('<h1>%s</h1>' %
                           (_("Checking for installation requirements")))

        if java.detect_java('1.6'):
            box += CTK.RawHTML(
                js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET))
            return box.Render().toStr()

        box += InstructionBox(_(java.JAVA6_NOTE), java.JAVA6_INSTRUCTIONS)
        buttons = CTK.DruidButtonsPanel()
        buttons += CTK.DruidButton_Close(_('Cancel'))
        buttons += CTK.DruidButton_Goto(
            _('Retry'),
            market.Install.URL_INSTALL_SETUP_EXTERNAL,
            do_submit=True)
        return box.Render().toStr()
    def __init__ (self, dbtypes):
        CTK.Box.__init__ (self)

        self += CTK.RawHTML ('<h1>%s</h1>' %(_("No supported database engines were detected.")))

        if not dbtypes:
            note = _("This installer doesn't seem to support any databases.")
        elif len(dbtypes) == 1:
            note = '%s %s.' %(_('The only database supported by this installer is'), dbtypes[0])
        else:
            note = '%s: %s.' %(_('The database options supported by this installer are'), ', '.join(dbtypes))

        instructions = []
        for db in dbtypes:
            if db == 'mysql':
                instructions.append (MYSQL5_INSTRUCTIONS)
            elif db == 'postgresql':
                instructions.append (PGSQL8_INSTRUCTIONS)
            elif db == 'sqlite3':
                instructions.append (PYSQLITE3_INSTRUCTIONS)

        self += InstructionBox (note, instructions)
    def __init__ (self):
        CTK.Box.__init__ (self)

        self += InstructionBox (_(INSTALL_NOTE_P1), PHP_INSTRUCTIONS)
        self += CTK.RawHTML ('<p>%s</p>' %(_(INSTALL_NOTE_P2)))