Exemple #1
0
    def make(self):
        assert sys.platform != "win32", "'webdist' not implemented for win32"
        build_dir = join(self.dir, "build", "webdist")
        zip_dir = join(build_dir, "go")
        if exists(build_dir):
            sh.rm(build_dir)
        os.makedirs(zip_dir)

        # Copy the webdist bits to the build tree.
        manifest = [
            "src/trentm.com/project-info.xml",
            "src/trentm.com/index.markdown",
            "LICENSE.txt",
            "lib/go.py",
            "src/trentm.com/logo.jpg",
        ]
        for src in manifest:
            sh.cp(src, dstdir=zip_dir, log=self.log.info)

        # Zip up the webdist contents.
        dist_dir = join(self.dir, "dist")
        bit = abspath(join(dist_dir, "go-%s.web" % _get_version()))
        if exists(bit):
            os.remove(bit)
        if not exists(dist_dir):
            os.makedirs(dist_dir)
        sh.run_in_dir("zip -r %s go" % bit, build_dir, self.log.info)
Exemple #2
0
 def clean_dir(self, dst_dir):
     """Clean out the target from files, but keep directories and svn files."""
     from os import walk
     self.log.info("cleaning target path...")
     for dirpath, dirnames, filenames in os.walk(dst_dir, topdown=True):
         if '.svn' in dirnames: dirnames.remove('.svn')
         for filename in filenames:
             sh.rm(join(dirpath, filename))
Exemple #3
0
 def make(self):
     patterns = [
         "dist",
         "build",
         "MANIFEST",
         "*.pyc",
     ]
     for pattern in patterns:
         p = join(self.dir, pattern)
         for path in glob(p):
             sh.rm(path, log=self.log)
Exemple #4
0
 def make(self):
     patterns = [
         "dist",
         "build",
         "MANIFEST",
         "*.pyc",
     ]
     for pattern in patterns:
         p = join(self.dir, pattern)
         for path in glob(p):
             sh.rm(path, log=self.log)
    def make(self):
        # komododoc.manifest
        defines = {"LANG": self.cfg.lang}
        src = join("mozhelp", "chrome.manifest")
        dst = join(self.cfg.chrome_dir, "komododoc.manifest")
        sh.mkdir(dirname(dst), log=self.log)
        self.log.info("preprocess %s %s", src, dst)
        preprocess.preprocess(src,
                              dst,
                              defines,
                              contentType="Text",
                              substitute=True)

        # content
        content_dir = join(self.cfg.chrome_dir, "komododoc", "content")
        sh.mkdir(content_dir, log=self.log)
        sh.cp(join("mozhelp", "helpOverlay.xul"),
              dstdir=content_dir,
              log=self.log.info)

        # locale
        sh.mkdir(self.locale_dir, log=self.log)
        sh.cp(join("mozhelp", "help_help.xhtml"),
              dstdir=self.locale_dir,
              log=self.log.info)
        sh.cp(join("mozhelp", "komodohelp.rdf"),
              dstdir=self.locale_dir,
              log=self.log.info)
        sh.cp(join(self.htdocs_dir, "*"),
              dstdir=self.locale_dir,
              recursive=True,
              log=self.log.info)

        junk = [
            join(self.locale_dir, "komodo-js-api.toc"),
            join(self.locale_dir, "manifest.ini"),
            join(self.locale_dir, "toc.xml")
        ]
        for path in junk:
            if exists(path):
                sh.rm(path, log=self.log)

        help_toc_rdf = join(self.locale_dir, "help-toc.rdf")
        try:
            sh.run(
                "python support/tocxml2helptocrdf.py %s > %s" %
                (join(self.htdocs_dir, "toc.xml"), help_toc_rdf),
                self.log.info)
        except:
            if exists(help_toc_rdf):
                sh.rm(help_toc_rdf)
            raise
    def make(self):
        sh.mkdir(self.cfg.ashelp_dir, log=self.log)
        sh.cp(join(self.htdocs_dir, "*"),
              dstdir=self.cfg.ashelp_dir,
              recursive=True,
              log=self.log.info)

        junk = [
            join(self.cfg.ashelp_dir, "komodo-js-api.toc"),
            join(self.cfg.ashelp_dir, "manifest.ini"),
            join(self.cfg.ashelp_dir, "aux_search.rdf"),
        ]
        for path in junk:
            if exists(path):
                sh.rm(path, log=self.log)
Exemple #7
0
 def make(self):
     if exists(self.cfg.obj_dir):
         sh.rm(self.cfg.obj_dir, self.log)
Exemple #8
0
 def make(self):
     if exists("config.py"):
         sh.rm("config.py", self.log)
Exemple #9
0
 def make(self):
     if exists(self.cfg.obj_dir):
         sh.rm(self.cfg.obj_dir, self.log)
 def make(self):
     if exists("config.py"):
         sh.rm("config.py", self.log)
 def make(self):
     if exists(self.cfg.build_dir):
         sh.rm(self.cfg.build_dir, self.log)
Exemple #12
0
 def make(self):
     sh.rm(build_dir)
Exemple #13
0
 def make(self):
     if exists("build"):
         sh.rm("build")
Exemple #14
0
 def make(self):
     sh.rm(build_dir)
Exemple #15
0
    def make(self):
        build_dir = join(self.dir, "build", "langpack")
        pkg_dir = join(self.dir, "packages")
        locale_dir = join(self.dir, "src", "chrome", "komodo", "locale")

        # Clean build dir.
        if exists(build_dir):
            sh.rm(build_dir, self.log)
        os.makedirs(build_dir)

        # Version
        ver_bits = [
            self.LANGPACK_VERSION,
            self._svnversion_from_dir(locale_dir)
        ]
        version = '.'.join([v for v in ver_bits if v])

        # Create the package contents.
        os.makedirs(join(build_dir, "chrome"))
        sh.cp(locale_dir,
              join(build_dir, "chrome", "locale"),
              recursive=True,
              log=self.log.info)
        for dirpath, dnames, fnames in os.walk(build_dir):
            if ".svn" in dnames:
                sh.rm(join(dirpath, ".svn"), self.log)
                dnames.remove(".svn")
            for fname in [".consign", "Conscript"]:
                if fname in fnames:
                    sh.rm(join(dirpath, fname), self.log)
        self._writefile(join(build_dir, "chrome.manifest"),
                        "locale komodo-langpack en-US chrome/locale/en-US/")
        self._writefile(
            join(build_dir, "install.rdf"),
            _dedent("""\
            <?xml version="1.0"?>
            
            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
            
              <Description about="urn:mozilla:install-manifest">
                <em:name>Komodo Langpack</em:name>
                <em:description>Interface Langpack for Komodo</em:description>
                <em:version>%s</em:version>
                <em:id>[email protected]</em:id>
                <em:creator>ActiveState</em:creator>
                <em:type>2</em:type>

                <!-- Komodo IDE -->
                <em:targetApplication>
                  <Description>
                    <em:id>{36E66FA0-F259-11D9-850E-000D935D3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
                <!-- Komodo Edit -->
                <em:targetApplication>
                  <Description>
                    <em:id>{b1042fb5-9e9c-11db-b107-000d935d3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
            </Description>
            </RDF>
            """ % version))

        # Package it up.
        if not exists(pkg_dir):
            os.makedirs(pkg_dir)
        pkg_name = ["Komodo", "LangPack", version]
        pkg_name = '-'.join(pkg_name) + ".xpi"
        pkg_path = join(pkg_dir, pkg_name)
        sh.run_in_dir('zip -rq "%s" .' % abspath(pkg_path), build_dir,
                      self.log.info)
        self.log.info("created `%s'", pkg_path)
Exemple #16
0
    def make(self):
        build_dir = join(self.dir, "build", "langpack")
        pkg_dir = join(self.dir, "packages")
        locale_dir = join(self.dir, "src", "chrome", "komodo", "locale")
        
        # Clean build dir.
        if exists(build_dir):
            sh.rm(build_dir, self.log)
        os.makedirs(build_dir)
        
        # Version
        ver_bits = [self.LANGPACK_VERSION,
                    self._svnversion_from_dir(locale_dir)]
        version = '.'.join([v for v in ver_bits if v])

        # Create the package contents.
        os.makedirs(join(build_dir, "chrome"))
        sh.cp(locale_dir, join(build_dir, "chrome", "locale"),
              recursive=True,
              log=self.log.info)
        for dirpath, dnames, fnames in os.walk(build_dir):
            if ".svn" in dnames:
                sh.rm(join(dirpath, ".svn"), self.log)
                dnames.remove(".svn")
            for fname in [".consign", "Conscript"]:
                if fname in fnames:
                    sh.rm(join(dirpath, fname), self.log)
        self._writefile(join(build_dir, "chrome.manifest"),
                        "locale komodo-langpack en-US chrome/locale/en-US/")
        self._writefile(join(build_dir, "install.rdf"), _dedent("""\
            <?xml version="1.0"?>
            
            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
            
              <Description about="urn:mozilla:install-manifest">
                <em:name>Komodo Langpack</em:name>
                <em:description>Interface Langpack for Komodo</em:description>
                <em:version>%s</em:version>
                <em:id>[email protected]</em:id>
                <em:creator>ActiveState</em:creator>
                <em:type>2</em:type>

                <!-- Komodo IDE -->
                <em:targetApplication>
                  <Description>
                    <em:id>{36E66FA0-F259-11D9-850E-000D935D3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
                <!-- Komodo Edit -->
                <em:targetApplication>
                  <Description>
                    <em:id>{b1042fb5-9e9c-11db-b107-000d935d3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
            </Description>
            </RDF>
            """ % version))
        
        # Package it up.
        if not exists(pkg_dir):
            os.makedirs(pkg_dir)
        pkg_name = ["Komodo", "LangPack", version]
        pkg_name = '-'.join(pkg_name) + ".xpi"
        pkg_path = join(pkg_dir, pkg_name)
        sh.run_in_dir('zip -rq "%s" .' % abspath(pkg_path), build_dir,
                      self.log.info)
        self.log.info("created `%s'", pkg_path)
Exemple #17
0
 def make(self):
     if exists("build"):
         sh.rm("build")