Exemple #1
0
    def __call__ (self):
        # Find the DMG file
        dmg_refs = Downloads.get_latest_macosx_dmg()
        # no macos package found
        if not dmg_refs:
            content = CTK.Container()
            content += CTK.RawHTML ("<h3>%s</h3>" %(_("We can't find now packaged version...")))
            content += CTK.RawHTML ("<p>%s</p>" %(_("We recommend to use git and compile cherokee.")))
            return CTK.HTTP_Cacheable (60, body = content.Render().toStr())
        dmg_local, dmg_web = dmg_refs
        dmg_url = "http://www.cherokee-project.com%s"%(dmg_web)

        if os.path.exists (dmg_local):
            mbs = os.path.getsize (dmg_local) / (1024**2)
        else:
            mbs = 0
        ver = re.findall (r'(\d+\.\d+\.\d+)', dmg_web)[0]

        download_button = CTK.Button ('Get Cherokee %s DMG'%(ver)) # — %sMb'%(mbs))
        download_button.bind ('click', CTK.DruidContent__JS_to_goto (download_button.id, URL_MACOSX_2))

        content = CTK.Container()
        content += CTK.RawHTML ('<h3>Binary Package</h3>')
        content += CTK.RawHTML ('<p>%s</p>'%(_("A binary package for MacOS X (Intel) is available for download: %sMb"%(mbs))))
        content += download_button

        return CTK.HTTP_Cacheable (60, body=content.Render().toStr())
Exemple #2
0
    def __call__ (self):
        # Find the DMG file
        dmg_refs = Downloads.get_latest_macosx_dmg()

        # No MacOS package found
        if not dmg_refs:
            content = CTK.Container()
            content += CTK.RawHTML ("<h3>%s</h3>" %(_("Could not find the MacOS X package")))
            content += CTK.RawHTML ("<p>%s</p>" %(_("It seems that the MacOS X package for the latest version has not been compiled yet.")))
            content += CTK.RawHTML ("<p>%s</p>" %(_("Due the circunstances, we encourage you to download the source code and compile it by hand.")))
            return CTK.HTTP_Cacheable (60, body = content.Render().toStr())

        dmg_local, dmg_web = dmg_refs
        dmg_url = "http://www.cherokee-project.com%s"%(dmg_web)

        if os.path.exists (dmg_local):
            mbs = os.path.getsize (dmg_local) / (1024**2)
        else:
            mbs = 0
        ver = re.findall (r'(\d+\.\d+\.\d+)', dmg_web)[0]

        download_button = CTK.Button ('Get Cherokee %s DMG'%(ver)) # — %sMb'%(mbs))
        download_button.bind ('click', CTK.DruidContent__JS_to_goto (download_button.id, URL_MACOSX_2))

        content = CTK.Container()
        content += CTK.RawHTML ('<h3>Binary Package</h3>')
        content += CTK.RawHTML ('<p>%s</p>'%(_("A binary package for MacOS X (Intel) is available for download: %sMb"%(mbs))))
        content += download_button

        return CTK.HTTP_Cacheable (60, body=content.Render().toStr())
Exemple #3
0
    def __call__ (self):
        # Find the DMG file
        dmg_refs = Downloads.get_latest_macosx_dmg()

        # No MacOS package found
        if not dmg_refs:
            content = CTK.Container()
            content += CTK.RawHTML ("<h3>%s</h3>" %(_("Could not find the MacOS X package")))
            content += CTK.RawHTML ("<p>%s</p>" %(_("It seems that the MacOS X package for the latest version has not been compiled yet.")))
            content += CTK.RawHTML ("<p>%s</p>" %(_("Due the circunstances, we encourage you to download the source code and compile it by hand.")))
            return CTK.HTTP_Cacheable (60, body = content.Render().toStr())

        dmg_local, dmg_web = dmg_refs
        dmg_url = "http://www.cherokee-project.com%s"%(dmg_web)

        if os.path.exists (dmg_local):
            mbs = os.path.getsize (dmg_local) / (1024**2)
        else:
            mbs = 0
        ver = re.findall (r'(\d+\.\d+\.\d+)', dmg_web)[0]

        download_button = CTK.Button ('Get Cherokee %s DMG'%(ver)) # ??? %sMb'%(mbs))
        download_button.bind ('click', CTK.DruidContent__JS_to_goto (download_button.id, URL_MACOSX_2))

        content = CTK.Container()
        content += CTK.RawHTML ('<h3>Binary Package</h3>')
        content += CTK.RawHTML ('<p>%s</p>'%(_("A binary package for MacOS X (Intel) is available for download: %sMb"%(mbs))))
        content += download_button

        return CTK.HTTP_Cacheable (60, body=content.Render().toStr())
Exemple #4
0
    def __call__ (self):
        content = CTK.Box({'id': 'macosx-steps'})
        content += CTK.RawHTML ('<h3>MacOS X (Intel)</h3>')

        # Find the DMG file
        dmg_refs = Downloads.get_latest_macosx_dmg()
        dmg_local, dmg_web = dmg_refs
        dmg_url = "http://www.cherokee-project.com%s"%(dmg_web)
        content += CTK.RawHTML (js='setTimeout(function(){ %s }, 2000);' %(CTK.JS.GotoURL(dmg_url)))

        # Step 1
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg1.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 1")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Save and Open the Cherokee installer")))
        content += box

        # Step 2
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg2.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 2")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Install the package")))
        content += box

        # Step 3
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg3.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 3")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Drag Cherokee Admin to your application folder")))
        content += box

        # Step 4
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg4.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 4")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Open Cherokee Admin")))
        content += box

        return CTK.HTTP_Cacheable (60, body=content.Render().toStr())
Exemple #5
0
    def __call__ (self):
        content = CTK.Box({'id': 'macosx-steps'})
        content += CTK.RawHTML ('<h3>MacOS X (Intel)</h3>')

        # Find the DMG file
        dmg_refs = Downloads.get_latest_macosx_dmg()
        dmg_local, dmg_web = dmg_refs
        dmg_url = "http://www.cherokee-project.com%s"%(dmg_web)
        content += CTK.RawHTML (js='setTimeout(function(){ %s }, 2000);' %(CTK.JS.GotoURL(dmg_url)))

        # Step 1
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg1.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 1")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Save and Open the Cherokee installer")))
        content += box

        # Step 2
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg2.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 2")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Install the package")))
        content += box

        # Step 3
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg3.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 3")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Drag Cherokee Admin to your application folder")))
        content += box

        # Step 4
        box = CTK.Box({'class': 'macosx-step'})
        box += CTK.Image({'src': "/static/images/dmg4.png"})
        box += CTK.RawHTML ('<strong>%s</strong>' %(_("Step 4")))
        box += CTK.RawHTML ('<span>%s</span>' %(_("Open Cherokee Admin")))
        content += box

        return CTK.HTTP_Cacheable (60, body=content.Render().toStr())