コード例 #1
0
ファイル: digsby_dist.py プロジェクト: noamkfir/digsby
 def do(self):
     from buildutil.promptlib import prompt
     if not prompt(
             "Type 'blag' if you updated the blog post in res/release_notes.html",
             str).lower() == 'blag':
         raise Exception(
             'Update the blog post link in res/release_notes.html')
コード例 #2
0
ファイル: digsby_dist.py プロジェクト: noamkfir/digsby
    def pre(self):
        super(NSISInstaller, self).pre()
        from buildutil.promptlib import prompt

        self.tag = prompt('(optional) Please enter a tag for the installer:',
                          str, None)

        if self.tag:
            tag_path = self.source / 'tag.yaml'
            tag_path.open('wb').write('tag: %s' % self.tag)

        nsis_defaults = dict(DISTDIR=str(self.source),
                             SVNREV=str(self.build_identifier))

        nsis_options = {}
        nsis_options.update(nsis_defaults)
        nsis_options.update(self.options)
        self.outfile = self.dest / self.installer_name_for_settings(
            nsis_options)
        if not self.outfile.parent.isdir():
            self.outfile.parent.makedirs()

        with (self.script.parent / 'PyInfo.nsh').open('w') as f:
            outfile_str = '"%s"' % self.outfile
            f.write('OutFile %s\n' % outfile_str)

            for k, v in nsis_options.items():
                if v is None:
                    s = '!define %s\n' % (k, )
                else:
                    s = '!define %s "%s"\n' % (k, v)

                f.write(s)
コード例 #3
0
ファイル: digsby_dist.py プロジェクト: AlexUlrich/digsby
    def pre(self):
        super(NSISInstaller, self).pre()
        from buildutil.promptlib import prompt

        self.tag = prompt('(optional) Please enter a tag for the installer:', str, None)

        if self.tag:
            tag_path = self.source / 'tag.yaml'
            tag_path.open('wb').write('tag: %s' % self.tag)

        nsis_defaults = dict(DISTDIR = str(self.source),
                             SVNREV  = str(self.build_identifier))

        nsis_options = {}
        nsis_options.update(nsis_defaults)
        nsis_options.update(self.options)
        self.outfile = self.dest / self.installer_name_for_settings(nsis_options)
        if not self.outfile.parent.isdir():
            self.outfile.parent.makedirs()

        with (self.script.parent / 'PyInfo.nsh').open('w') as f:
            outfile_str = '"%s"' % self.outfile
            f.write('OutFile %s\n' % outfile_str)

            for k, v in nsis_options.items():
                if v is None:
                    s = '!define %s\n' % (k,)
                else:
                    s = '!define %s "%s"\n' % (k,v)

                f.write(s)
コード例 #4
0
ファイル: signing.py プロジェクト: sgricci/digsby
def Authenticode(exe):
    print '*** signing executable %r ***' % exe
    # signtool should be in a path like: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin
    # Add the directory to your %PATH%

    # You may also need the latest CAPICOM SDK, which was last seen at
    # http://www.microsoft.com/download/en/details.aspx?DisplayLang=en&id=25281
    try:
        run(["signtool", "sign", "/a", "/t", "http://timestamp.verisign.com/scripts/timstamp.dll", str(exe)])
    except Exception, e:
        print '\t\tError signing executable %r: %r' % (exe, e)
        keep_going = prompt("Continue?", bool, False)

        if not keep_going:
            raise e
コード例 #5
0
    def do(self):
        import util.net as net
        from buildutil.promptlib import prompt

        updateyaml_data = None
        abs_source = net.httpjoin(self.server, self.source)
        while updateyaml_data is None:
            try:
                print 'Fetching', abs_source
                res = urllib2.urlopen(abs_source)
            except Exception, e:
                tryagain = prompt("Error opening %r (e = %r). Try again?" % (abs_source, e),
                                  bool, True)
                if not tryagain:
                    break
            else:
                updateyaml_data = res.read()
コード例 #6
0
ファイル: digsby_s3upload.py プロジェクト: AlexUlrich/digsby
    def pre(self):
        super(InstallerDeploy, self).pre()
        from buildutil.promptlib import prompt

        plain_installer = self.install_package

        if not (self.path / 'install').isdir():
            (self.path / 'install').makedirs()

        for name in self.release_tags:
            if name == 'release':
                plain_installer.copyfile(self.path / 'install' / 'digsby_setup.exe' % name)
            else:
                plain_installer.copyfile(self.path / 'install' / ('digsby_setup_%s.exe' % name))

        plain_installer.copyfile(self.path / 'install' / plain_installer.name)

        if not prompt("Upload installers?", bool, True):
            self.cancel = True
コード例 #7
0
    def pre(self):
        super(InstallerDeploy, self).pre()
        from buildutil.promptlib import prompt

        plain_installer = self.install_package

        if not (self.path / 'install').isdir():
            (self.path / 'install').makedirs()

        for name in self.release_tags:
            if name == 'release':
                plain_installer.copyfile(self.path / 'install' /
                                         'digsby_setup.exe' % name)
            else:
                plain_installer.copyfile(self.path / 'install' /
                                         ('digsby_setup_%s.exe' % name))

        plain_installer.copyfile(self.path / 'install' / plain_installer.name)

        if not prompt("Upload installers?", bool, True):
            self.cancel = True
コード例 #8
0
ファイル: digsby_dist.py プロジェクト: AlexUlrich/digsby
 def do(self):
     from buildutil.promptlib import prompt
     if not prompt("Type 'blag' if you updated the blog post in res/release_notes.html", str).lower() == 'blag':
         raise Exception('Update the blog post link in res/release_notes.html')