예제 #1
0
    def package_finish(self):
        version_vars_template = """
                !define INSTEXE  "%(final_exe)s"
                !define VERSION "%(version_short)s"
                !define VERSION_LONG "%(version)s"
                !define VERSION_DASHES "%(version_dashes)s"
                """
        if (self.args['grid'] == ''):
            installer_file = "Second Life %(version_dashes)s Setup.exe"
            grid_vars_template = """
                        OutFile "%(outfile)s"
                        !define INSTFLAGS "%(flags)s"
                        !define INSTNAME   "SecondLife"
                        !define SHORTCUT   "Second Life"
                        !define URLNAME   "secondlife"
                        Caption "Second Life ${VERSION}"
                        """
        else:
            installer_file = "Second Life %(version_dashes)s (%(grid_caps)s) Setup.exe"
            grid_vars_template = """
                        OutFile "%(outfile)s"
                        !define INSTFLAGS "%(flags)s"
                        !define INSTNAME   "SecondLife%(grid_caps)s"
                        !define SHORTCUT   "Second Life (%(grid_caps)s)"
                        !define URLNAME   "secondlife%(grid)s"
                        !define UNINSTALL_SETTINGS 1
                        Caption "Second Life %(grid)s ${VERSION}"
                        """
        if (self.args.has_key('installer_name')):
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % {
                'version_dashes': '-'.join(self.args['version']),
                'grid_caps': self.args['grid'].upper()
            }
        tempfile = "../secondlife_setup.nsi"
        # the following is an odd sort of double-string replacement
        self.replace_in(
            "installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%": version_vars_template % {
                    'version_short': '.'.join(self.args['version'][:-1]),
                    'version': '.'.join(self.args['version']),
                    'version_dashes': '-'.join(self.args['version']),
                    'final_exe': self.final_exe()
                },
                "%%GRID_VARS%%": grid_vars_template % {
                    'grid': self.args['grid'],
                    'grid_caps': self.args['grid'].upper(),
                    'outfile': installer_file,
                    'flags': self.flags_list()
                },
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False)
            })

        NSIS_path = 'C:\\Program Files\\NSIS\\makensis.exe'
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                         self.dst_path_of(tempfile))
        self.remove(self.dst_path_of(tempfile))
        self.created_path(installer_file)
예제 #2
0
        def package_finish(self):
                version_vars_template = """
                !define INSTEXE  "%(final_exe)s"
                !define VERSION "%(version_short)s"
                !define VERSION_LONG "%(version)s"
                !define VERSION_DASHES "%(version_dashes)s"
                """
                if(self.args['grid'] == ''):
                        installer_file = "Second Life %(version_dashes)s Setup.exe"
                        grid_vars_template = """
                        OutFile "%(outfile)s"
                        !define INSTFLAGS "%(flags)s"
                        !define INSTNAME   "SecondLife"
                        !define SHORTCUT   "Second Life"
                        !define URLNAME   "secondlife"
                        Caption "Second Life ${VERSION}"
                        """
                else:
                        installer_file = "Second Life %(version_dashes)s (%(grid_caps)s) Setup.exe"
                        grid_vars_template = """
                        OutFile "%(outfile)s"
                        !define INSTFLAGS "%(flags)s"
                        !define INSTNAME   "SecondLife%(grid_caps)s"
                        !define SHORTCUT   "Second Life (%(grid_caps)s)"
                        !define URLNAME   "secondlife%(grid)s"
                        !define UNINSTALL_SETTINGS 1
                        Caption "Second Life %(grid)s ${VERSION}"
                        """
                if(self.args.has_key('installer_name')):
                        installer_file = self.args['installer_name']
                else:
                        installer_file = installer_file % {'version_dashes' : '-'.join(self.args['version']),
                                                                                           'grid_caps' : self.args['grid'].upper()}
                tempfile = "../secondlife_setup.nsi"
                # the following is an odd sort of double-string replacement
                self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                        "%%VERSION%%":version_vars_template%{'version_short' : '.'.join(self.args['version'][:-1]),
                                                                                                 'version' : '.'.join(self.args['version']),
                                                                                                 'version_dashes' : '-'.join(self.args['version']),
                                                                                                 'final_exe' : self.final_exe()},
                        "%%GRID_VARS%%":grid_vars_template%{'grid':self.args['grid'],
                                                                                                'grid_caps':self.args['grid'].upper(),
                                                                                                'outfile':installer_file,
                                                                                                'flags':self.flags_list()},
                        "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                        "%%DELETE_FILES%%":self.nsi_file_commands(False)})

                NSIS_path = 'C:\\Program Files\\NSIS\\makensis.exe'
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
                self.remove(self.dst_path_of(tempfile))
                self.created_path(installer_file)
예제 #3
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version': '.'.join(self.args['version']),
            'version_short': '.'.join(self.args['version'][:-1]),
            'version_dashes': '-'.join(self.args['version']),
            'final_exe': self.final_exe(),
            'grid': self.args['grid'],
            'grid_caps': self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags': self.flags_list().replace('"', '$\\"'),
            'channel': self.channel(),
            'channel_oneword': self.channel_oneword(),
            'channel_unique': self.channel_unique(),
        }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        if self.default_channel() and self.viewer_branding_id(
        ) == "secondlife":
            if self.default_grid():
                # release viewer
                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define VIEWERNAME "Second Life"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "SecondLife"
                !define SHORTCUT   "Second Life"
                !define URLNAME   "secondlife"
                !define INSTALL_ICON "install_icon.ico"
                !define UNINSTALL_ICON "uninstall_icon.ico"
                Caption "Second Life ${VERSION}"
                """
            else:
                # beta grid viewer
                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define VIEWERNAME "Second Life"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "SecondLife%(grid_caps)s"
                !define SHORTCUT   "Second Life (%(grid_caps)s)"
                !define URLNAME   "secondlife%(grid)s"
                !define INSTALL_ICON "install_icon.ico"
                !define UNINSTALL_ICON "uninstall_icon.ico"
                !define UNINSTALL_SETTINGS 1
                Caption "Second Life %(grid)s ${VERSION}"
                """
        elif self.viewer_branding_id() == "snowglobe":
            installer_file = "Snowglobe_%(version_dashes)s_Setup.exe"
            grid_vars_template = """
                OutFile "%(installer_file)s"
                !define VIEWERNAME "Snowglobe"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "Snowglobe"
                !define SHORTCUT   "Snowglobe"
                !define URLNAME   "secondlife"
                !define INSTALL_ICON "install_icon_snowglobe.ico"
                !define UNINSTALL_ICON "uninstall_icon_snowglobe.ico"
                Caption "Snowglobe ${VERSION}"
                """
        else:
            # some other channel on some grid
            installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "SecondLife%(channel_oneword)s"
            !define SHORTCUT   "%(channel)s"
            !define URLNAME   "secondlife"
            !define UNINSTALL_SETTINGS 1
            Caption "%(channel)s ${VERSION}"
            """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in(
            "installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%": version_vars,
                "%%SOURCE%%": self.get_src_prefix(),
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False)
            })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                         self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("{SIGN_PY}")
        if sign_py == "" or sign_py == "{SIGN_PY}":
            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
        if os.path.exists(sign_py):
            self.run_command('python ' + sign_py + ' ' +
                             self.dst_path_of(installer_file))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #4
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version' : '.'.join(self.args['version']),
            'version_short' : '.'.join(self.args['version'][:-1]),
            'version_dashes' : '-'.join(self.args['version']),
            'final_exe' : self.final_exe(),
            'grid':self.args['grid'],
            'grid_caps':self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags':self.flags_list().replace('"', '$\\"'),
            'channel':self.channel(),
            'channel_oneword':self.channel_oneword(),
            'channel_unique':self.channel_unique(),
            }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        if self.default_channel():
            # release viewer
            installer_file = "KittyViewer_%(version_dashes)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "KittyViewer"
            !define SHORTCUT   "Kitty Viewer"
            !define URLNAME   "secondlife"
            Caption "Kitty Viewer ${VERSION}"
            """
        else:
            # some other channel on some grid
            installer_file = "%(channel_oneword)s_%(version_dashes)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "%(channel_oneword)s"
            !define SHORTCUT   "%(channel)s"
            !define URLNAME   "secondlife"
            !define UNINSTALL_SETTINGS 1
            Caption "%(channel)s ${VERSION}"
            """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%":version_vars,
                "%%SOURCE%%":self.get_src_prefix(),
                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                "%%DELETE_FILES%%":self.nsi_file_commands(False)})

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        # Check two paths, one for Program Files, and one for Program Files (x86).
        # Yay 64bit windows.
        NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
        if not os.path.exists(NSIS_path):
            NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("${SIGN}")
        if not sign_py or sign_py == "${SIGN}":
            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
        else:
            sign_py = sign_py.replace('\\', '\\\\\\\\')
        python = os.path.expandvars("${PYTHON}")
        if not python or python == "${PYTHON}":
            python = 'python'
        if os.path.exists(sign_py):
            self.run_command("%s %s %s" % (python, sign_py, self.dst_path_of(installer_file).replace('\\', '\\\\\\\\')))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #5
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            "version": ".".join(self.args["version"]),
            "version_short": ".".join(self.args["version"][:-1]),
            "version_dashes": "-".join(self.args["version"]),
            "final_exe": self.final_exe(),
            "grid": self.args["grid"],
            "grid_caps": self.args["grid"].upper(),
            # escape quotes becase NSIS doesn't handle them well
            "flags": self.flags_list().replace('"', '$\\"'),
            "channel": self.channel(),
            "channel_oneword": self.channel_oneword(),
            "channel_unique": self.channel_unique(),
        }

        version_vars = (
            """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """
            % substitution_strings
        )
        if self.default_channel():
            if self.default_grid():
                # release viewer
                installer_file = "Imprudence_%(version_dashes)s_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "Imprudence"
                !define SHORTCUT   "Imprudence"
                !define URLNAME   "imprudence"
                Caption "Imprudence ${VERSION}"
                """
            else:
                # beta grid viewer
                installer_file = "Imprudence_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "Imprudence%(grid_caps)s"
                !define SHORTCUT   "Imprudence (%(grid_caps)s)"
                !define URLNAME   "imprudence%(grid)s"
                !define UNINSTALL_SETTINGS 1
                Caption "Imprudence %(grid)s ${VERSION}"
                """
        else:
            # some other channel on some grid
            installer_file = "Imprudence_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "Imprudence%(channel_oneword)s"
            !define SHORTCUT   "%(channel)s"
            !define URLNAME   "imprudence"
            !define UNINSTALL_SETTINGS 1
            Caption "%(channel)s ${VERSION}"
            """
        if "installer_name" in self.args:
            installer_file = self.args["installer_name"]
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings["installer_file"] = installer_file

        tempfile = "imprudence_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in(
            "installers/windows/installer_template.nsi",
            tempfile,
            {
                "%%VERSION%%": version_vars,
                "%%SOURCE%%": self.get_src_prefix(),
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False),
            },
        )

        NSIS_path = "C:\\Program Files\\NSIS\\Unicode\\makensis.exe"
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #6
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version' : '.'.join(self.args['version']),
            'version_short' : '.'.join(self.args['version'][:-1]),
            'version_dashes' : '-'.join(self.args['version']),
            'final_exe' : self.final_exe(),
            'grid':self.args['grid'],
            'grid_caps':self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags':self.flags_list().replace('"', '$\\"'),
            'channel':self.channel(),
            'channel_oneword':self.channel_oneword(),
            'channel_unique':self.channel_unique(),
            }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        if self.default_channel():
            if self.default_grid():
                # release viewer
                installer_file = "Rainbow_Viewer_%(version_dashes)s_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "RainbowViewer"
                !define SHORTCUT   "Rainbow Viewer"
                !define URLNAME   "secondlife"
                Caption "Rainbow Viewer ${VERSION}"
                """
            else:
                # beta grid viewer
                installer_file = "Rainbow_Viewer_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "RainbowViewer%(grid_caps)s"
                !define SHORTCUT   "Rainbow Viewer (%(grid_caps)s)"
                !define URLNAME   "secondlife%(grid)s"
                !define UNINSTALL_SETTINGS 1
                Caption "Rainbow Viewer %(grid)s ${VERSION}"
                """
        else:
            # some other channel on some grid
            installer_file = "Rainbow_Viewer_%(version_dashes)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "RainbowViewer"
            !define SHORTCUT   "Rainbow Viewer"
            !define URLNAME   "secondlife"
            !define UNINSTALL_SETTINGS 1
            Caption "%(channel)s ${VERSION}"
            """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "rainbowviewer_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%":version_vars,
                "%%SOURCE%%":self.get_src_prefix(),
                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                "%%DELETE_FILES%%":self.nsi_file_commands(False)})

        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #7
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version': '.'.join(self.args['version']),
            'version_short': '.'.join(self.args['version'][:-1]),
            'version_dashes': '-'.join(self.args['version']),
            'final_exe': self.final_exe(),
            'grid': self.args['grid'],
            'grid_caps': self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags': self.flags_list().replace('"', '$\\"'),
            'channel': self.channel(),
            'channel_oneword': self.channel_oneword(),
            'channel_unique': self.channel_unique(),
        }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        if self.default_channel():
            # release viewer
            installer_file = "KittyViewer_%(version_dashes)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "KittyViewer"
            !define SHORTCUT   "Kitty Viewer"
            !define URLNAME   "secondlife"
            Caption "Kitty Viewer ${VERSION}"
            """
        else:
            # some other channel on some grid
            installer_file = "%(channel_oneword)s_%(version_dashes)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "%(channel_oneword)s"
            !define SHORTCUT   "%(channel)s"
            !define URLNAME   "secondlife"
            !define UNINSTALL_SETTINGS 1
            Caption "%(channel)s ${VERSION}"
            """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in(
            "installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%": version_vars,
                "%%SOURCE%%": self.get_src_prefix(),
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False)
            })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        # Check two paths, one for Program Files, and one for Program Files (x86).
        # Yay 64bit windows.
        NSIS_path = os.path.expandvars(
            '${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
        if not os.path.exists(NSIS_path):
            NSIS_path = os.path.expandvars(
                '${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                         self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("${SIGN}")
        if not sign_py or sign_py == "${SIGN}":
            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
        else:
            sign_py = sign_py.replace('\\', '\\\\\\\\')
        python = os.path.expandvars("${PYTHON}")
        if not python or python == "${PYTHON}":
            python = 'python'
        if os.path.exists(sign_py):
            self.run_command(
                "%s %s %s" %
                (python, sign_py, self.dst_path_of(installer_file).replace(
                    '\\', '\\\\\\\\')))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #8
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version': '.'.join(self.args['version']),
            'version_short': '.'.join(self.args['version'][:-1]),
            'version_dashes': '-'.join(self.args['version']),
            'final_exe': self.final_exe(),
            'grid': self.args['grid'],
            'grid_caps': self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags': self.flags_list().replace('"', '$\\"'),
            'channel': self.channel(),
            'channel_oneword': self.channel_oneword(),
            'channel_unique': self.channel_unique(),
        }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        installer_file = "Singularity_%(version_short)s_Setup.exe"
        grid_vars_template = """
        OutFile "%(installer_file)s"
        !define VIEWERNAME "Singularity Viewer"
        !define INSTFLAGS "%(flags)s"
        !define INSTNAME   "SingularityViewer"
        !define SHORTCUT   "Singularity Viewer"
        !define URLNAME   "secondlife"
        !define INSTALL_ICON "install_icon_singularity.ico"
        !define UNINSTALL_ICON "install_icon_singularity.ico"
        Caption "Singularity Viewer ${VERSION}"
        """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in(
            "installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%": version_vars,
                "%%SOURCE%%": self.get_src_prefix(),
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False)
            })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        try:
            import _winreg as reg
            NSIS_path = reg.QueryValue(
                reg.HKEY_LOCAL_MACHINE,
                r"SOFTWARE\NSIS\Unicode") + '\\makensis.exe'
            self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                             self.dst_path_of(tempfile))
        except:
            try:
                NSIS_path = os.environ[
                    'ProgramFiles'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                                 self.dst_path_of(tempfile))
            except:
                NSIS_path = os.environ[
                    'ProgramFiles(X86)'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                                 self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("{SIGN_PY}")
        if sign_py == "" or sign_py == "{SIGN_PY}":
            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
        if os.path.exists(sign_py):
            self.run_command('python ' + sign_py + ' ' +
                             self.dst_path_of(installer_file))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #9
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version' : '.'.join(self.args['version']),
            'version_short' : '.'.join(self.args['version'][:-1]),
            'version_dashes' : '-'.join(self.args['version']),
            'final_exe' : self.final_exe(),
            'grid':self.args['grid'],
            'grid_caps':self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags':self.flags_list().replace('"', '$\\"'),
            'channel':self.channel(),
            'channel_oneword':self.channel_oneword(),
            'channel_unique':self.channel_unique(),
            'inst_name':self.channel_oneword() + ' (64 bit)' if self.is_win64() else self.channel_oneword(),
            'installer_file':self.installer_file(),
            'viewer_name': "%s%s" % (self.channel(), " (64 bit)" if self.is_win64() else "" ),
            }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        installer_file = "%(installer_file)s"
        grid_vars_template = """
        OutFile "%(installer_file)s"
        !define VIEWERNAME "%(viewer_name)s"
        !define INSTFLAGS "%(flags)s"
        !define INSTNAME   "%(inst_name)s"
        !define SHORTCUT   "%(viewer_name)s Viewer"
        !define URLNAME   "secondlife"
        !define INSTALL_ICON "install_icon_singularity.ico"
        !define UNINSTALL_ICON "install_icon_singularity.ico"
        Caption "${VIEWERNAME} ${VERSION_LONG}"
        """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%":version_vars,
                "%%SOURCE%%":self.get_src_prefix(),
                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                "%%DELETE_FILES%%":self.nsi_file_commands(False),
                "%%INSTALLDIR%%":"%s\\%s" % ('$PROGRAMFILES64' if self.is_win64() else '$PROGRAMFILES', self.channel_oneword()),
                "%%WIN64_BIN_BUILD%%":"!define WIN64_BIN_BUILD 1" if self.is_win64() else "",
                })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        try:
            import _winreg as reg
            NSIS_path = reg.QueryValue(reg.HKEY_LOCAL_MACHINE, r"SOFTWARE\NSIS\Unicode") + '\\makensis.exe'
            self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        except:
            try:
                NSIS_path = os.environ['ProgramFiles'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
            except:
                NSIS_path = os.environ['ProgramFiles(X86)'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("{SIGN_PY}")
        if sign_py == "" or sign_py == "{SIGN_PY}":
            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
        if os.path.exists(sign_py):
            self.run_command('python ' + sign_py + ' ' + self.dst_path_of(installer_file))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version' : '.'.join(self.args['version']),
            'version_short' : '.'.join(self.args['version'][:-1]),
            'version_dashes' : '-'.join(self.args['version']),
            'final_exe' : self.final_exe(),
            'grid':self.args['grid'],
            'grid_caps':self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags':self.flags_list().replace('"', '$\\"'),
            'channel':self.channel(),
            'channel_oneword':self.channel_oneword(),
            'channel_unique':self.channel_unique(),
            }

        version_vars = """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """ % substitution_strings
        if self.default_channel() and self.viewer_branding_id()=="secondlife":
            if self.default_grid():
                # release viewer
                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define VIEWERNAME "Second Life"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "SecondLife"
                !define SHORTCUT   "Second Life"
                !define URLNAME   "secondlife"
                !define INSTALL_ICON "install_icon.ico"
                !define UNINSTALL_ICON "uninstall_icon.ico"
                Caption "Second Life ${VERSION}"
                """
            else:
                # beta grid viewer
                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define VIEWERNAME "Second Life"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "SecondLife%(grid_caps)s"
                !define SHORTCUT   "Second Life (%(grid_caps)s)"
                !define URLNAME   "secondlife%(grid)s"
                !define INSTALL_ICON "install_icon.ico"
                !define UNINSTALL_ICON "uninstall_icon.ico"
                !define UNINSTALL_SETTINGS 1
                Caption "Second Life %(grid)s ${VERSION}"
                """
        elif self.viewer_branding_id()=="snowglobe":
                installer_file = "Snowglobe_%(version_dashes)s_Setup.exe"
                grid_vars_template = """
                OutFile "%(installer_file)s"
                !define VIEWERNAME "Snowglobe"
                !define INSTFLAGS "%(flags)s"
                !define INSTNAME   "Snowglobe"
                !define SHORTCUT   "Snowglobe"
                !define URLNAME   "secondlife"
                !define INSTALL_ICON "install_icon_snowglobe.ico"
                !define UNINSTALL_ICON "uninstall_icon_snowglobe.ico"
                Caption "Snowglobe ${VERSION}"
                """
        else:
            # some other channel on some grid
            installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
            grid_vars_template = """
            OutFile "%(installer_file)s"
            !define INSTFLAGS "%(flags)s"
            !define INSTNAME   "SecondLife%(channel_oneword)s"
            !define SHORTCUT   "%(channel)s"
            !define URLNAME   "secondlife"
            !define UNINSTALL_SETTINGS 1
            Caption "%(channel)s ${VERSION}"
            """
        if 'installer_name' in self.args:
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%":version_vars,
                "%%SOURCE%%":self.get_src_prefix(),
                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                "%%DELETE_FILES%%":self.nsi_file_commands(False)})

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("{SIGN_PY}")
        if sign_py == "" or sign_py == "{SIGN_PY}":
            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
        if os.path.exists(sign_py):
            self.run_command('python ' + sign_py + ' ' + self.dst_path_of(installer_file))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #11
0
        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%":version_vars,
                "%%SOURCE%%":self.get_src_prefix(),
                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                "%%DELETE_FILES%%":self.nsi_file_commands(False),
                "%%INSTALLDIR%%":"%s\\%s" % ('$PROGRAMFILES64' if self.is_win64() else '$PROGRAMFILES', self.channel_oneword()),
                "%%WIN64_BIN_BUILD%%":"!define WIN64_BIN_BUILD 1" if self.is_win64() else "",
                })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        try:
            import _winreg as reg
            NSIS_path = reg.QueryValue(reg.HKEY_LOCAL_MACHINE, r"SOFTWARE\NSIS\Unicode") + '\\makensis.exe'
            self.run_command([proper_windows_path(NSIS_path), self.dst_path_of(tempfile)])
        except:
            try:
                NSIS_path = os.environ['ProgramFiles'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command([proper_windows_path(NSIS_path), self.dst_path_of(tempfile)])
            except:
                NSIS_path = os.environ['ProgramFiles(X86)'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command([proper_windows_path(NSIS_path),self.dst_path_of(tempfile)])
        # self.remove(self.dst_path_of(tempfile))

        # Sign the installer
	if 'VIEWER_SIGNING_PASSWORD' in os.environ:
            try:
                self.sign(self.args['configuration'] + "\\" + substitution_strings['installer_file'])
            except Exception, e:
                print "Couldn't sign windows installer. Tried to sign %s" % self.args['configuration'] + "\\" + substitution_strings['installer_file'] + "\nException: %s" % e
예제 #12
0
        # it also does python-style % substitution
        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%":version_vars,
                "%%SOURCE%%":self.get_src_prefix(),
                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
                "%%DELETE_FILES%%":self.nsi_file_commands(False)})

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        # Check two paths, one for Program Files, and one for Program Files (x86).
        # Yay 64bit windows.
        NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
        if not os.path.exists(NSIS_path):
            NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))

        #AO: Try to sign installer next, if we can, using best available signing cert.
        try:
            subprocess.check_call(["signtool.exe","sign","/a","/d","Firestorm","/du","http://www.phoenixviewer.com",self.args['configuration']+"\\"+substitution_strings['installer_file']])
        except Exception, e:
            print "Working directory: %s" % os.getcwd()
            print "Couldn't sign windows installer. Tried to sign %s" % self.args['configuration']+"\\"+substitution_strings['installer_file']


# If we're on a build machine, sign the code using our Authenticode certificate. JC
 
#        sign_py = os.path.expandvars("${SIGN}")
#        if not sign_py or sign_py == "${SIGN}":
#            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
예제 #13
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            "version": ".".join(self.args["version"]),
            "version_short": ".".join(self.args["version"][:-1]),
            "version_dashes": "-".join(self.args["version"]),
            "final_exe": self.final_exe(),
            "grid": self.args["grid"],
            "grid_caps": self.args["grid"].upper(),
            # escape quotes becase NSIS doesn't handle them well
            "flags": self.flags_list().replace('"', '$\\"'),
            "channel": self.channel(),
            "channel_oneword": self.channel_oneword(),
            "channel_unique": self.channel_unique(),
        }

        version_vars = (
            """
        !define INSTEXE  "%(final_exe)s"
        !define VERSION "%(version_short)s"
        !define VERSION_LONG "%(version)s"
        !define VERSION_DASHES "%(version_dashes)s"
        """
            % substitution_strings
        )
        installer_file = "%(channel_oneword)s_%(version_dashes)s_Setup.exe"
        grid_vars_template = """
        OutFile "%(installer_file)s"
        !define VIEWERNAME "%(channel)s"
        !define INSTFLAGS "%(flags)s"
        !define INSTNAME   "%(channel_oneword)s"
        !define SHORTCUT   "%(channel)s Viewer"
        !define URLNAME   "secondlife"
        !define INSTALL_ICON "install_icon_singularity.ico"
        !define UNINSTALL_ICON "install_icon_singularity.ico"
        Caption "${VIEWERNAME} ${VERSION_LONG}"
        """
        if "installer_name" in self.args:
            installer_file = self.args["installer_name"]
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings["installer_file"] = installer_file

        tempfile = "secondlife_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in(
            "installers/windows/installer_template.nsi",
            tempfile,
            {
                "%%VERSION%%": version_vars,
                "%%SOURCE%%": self.get_src_prefix(),
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False),
            },
        )

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        try:
            import _winreg as reg

            NSIS_path = reg.QueryValue(reg.HKEY_LOCAL_MACHINE, r"SOFTWARE\NSIS\Unicode") + "\\makensis.exe"
            self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        except:
            try:
                NSIS_path = os.environ["ProgramFiles"] + "\\NSIS\\Unicode\\makensis.exe"
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
            except:
                NSIS_path = os.environ["ProgramFiles(X86)"] + "\\NSIS\\Unicode\\makensis.exe"
                self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))
        # If we're on a build machine, sign the code using our Authenticode certificate. JC
        sign_py = os.path.expandvars("{SIGN_PY}")
        if sign_py == "" or sign_py == "{SIGN_PY}":
            sign_py = "C:\\buildscripts\\code-signing\\sign.py"
        if os.path.exists(sign_py):
            self.run_command("python " + sign_py + " " + self.dst_path_of(installer_file))
        else:
            print "Skipping code signing,", sign_py, "does not exist"
        self.created_path(self.dst_path_of(installer_file))
        self.package_file = installer_file
예제 #14
0
    def package_finish(self):
        # a standard map of strings for replacing in the templates
        substitution_strings = {
            'version': '.'.join(self.args['version']),
            'version_short': '.'.join(self.args['version'][:-1]),
            'version_dashes': '-'.join(self.args['version']),
            'final_exe': self.final_exe(),
            'grid': self.args['grid'],
            'grid_caps': self.args['grid'].upper(),
            # escape quotes becase NSIS doesn't handle them well
            'flags': self.flags_list().replace('"', '$\\"'),
            'channel': self.channel(),
            'channel_oneword': self.channel_oneword(),
            'channel_unique': self.channel_unique(),
        }

        version_vars = """
                !define INSTEXE  "%(final_exe)s"
                !define VERSION "%(version_short)s"
                !define VERSION_LONG "%(version)s"
                !define VERSION_DASHES "%(version_dashes)s"
                """ % substitution_strings
        if self.default_channel():
            if self.default_grid():
                # release viewer
                installer_file = "Rainbow_Viewer_%(version_dashes)s_Setup.exe"
                grid_vars_template = """
                                OutFile "%(installer_file)s"
                                !define INSTFLAGS "%(flags)s"
                                !define INSTNAME   "RainbowViewer"
                                !define SHORTCUT   "Rainbow Viewer"
                                !define URLNAME   "rainbowviewer"
                                Caption "Rainbow Viewer ${VERSION}"
                                """
            else:
                # beta grid viewer
                installer_file = "Rainbow_Viewer_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
                grid_vars_template = """
                                OutFile "%(installer_file)s"
                                !define INSTFLAGS "%(flags)s"
                                !define INSTNAME   "RainbowViewer%(grid_caps)s"
                                !define SHORTCUT   "Rainbow Viewer (%(grid_caps)s)"
                                !define URLNAME   "rainbowviewer%(grid)s"
                                !define UNINSTALL_SETTINGS 1
                                Caption "Rainbow Viewer %(grid)s ${VERSION}"
                                """
        else:
            # some other channel on some grid
            installer_file = "Rainbow_Viewer_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
            grid_vars_template = """
                        OutFile "%(installer_file)s"
                        !define INSTFLAGS "%(flags)s"
                        !define INSTNAME   "RainbowViewer%(channel_oneword)s"
                        !define SHORTCUT   "%(channel)s"
                        !define URLNAME   "rainbowviewer"
                        !define UNINSTALL_SETTINGS 1
                        Caption "%(channel)s ${VERSION}"
                        """
        if (self.args.has_key('installer_name')):
            installer_file = self.args['installer_name']
        else:
            installer_file = installer_file % substitution_strings
        substitution_strings['installer_file'] = installer_file

        tempfile = "../rainbowviewer_setup_tmp.nsi"
        # the following replaces strings in the nsi template
        # it also does python-style % substitution
        self.replace_in(
            "installers/windows/installer_template.nsi", tempfile, {
                "%%VERSION%%": version_vars,
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False)
            })

        NSIS_path = 'C:\\Program Files\\NSIS\\makensis.exe'
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                         self.dst_path_of(tempfile))
        self.remove(self.dst_path_of(tempfile))
        self.created_path(installer_file)
예제 #15
0
                "%%SOURCE%%": self.get_src_prefix(),
                "%%GRID_VARS%%": grid_vars_template % substitution_strings,
                "%%INSTALL_FILES%%": self.nsi_file_commands(True),
                "%%DELETE_FILES%%": self.nsi_file_commands(False)
            })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        # Check two paths, one for Program Files, and one for Program Files (x86).
        # Yay 64bit windows.
        NSIS_path = os.path.expandvars(
            '${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
        if not os.path.exists(NSIS_path):
            NSIS_path = os.path.expandvars(
                '${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' +
                         self.dst_path_of(tempfile))
        # self.remove(self.dst_path_of(tempfile))

        #AO: Try to sign installer next, if we can, using best available signing cert.
        try:
            subprocess.check_call([
                "signtool.exe", "sign", "/a", "/d", "Firestorm", "/du",
                "http://www.phoenixviewer.com", self.args['configuration'] +
                "\\" + substitution_strings['installer_file']
            ])
        except Exception, e:
            print "Working directory: %s" % os.getcwd()
            print "Couldn't sign windows installer. Tried to sign %s" % self.args[
                'configuration'] + "\\" + substitution_strings['installer_file']
예제 #16
0
                "%s\\%s" %
                ('$PROGRAMFILES64' if self.is_win64() else '$PROGRAMFILES',
                 self.channel_oneword()),
                "%%WIN64_BIN_BUILD%%":
                "!define WIN64_BIN_BUILD 1" if self.is_win64() else "",
            })

        # We use the Unicode version of NSIS, available from
        # http://www.scratchpaper.com/
        try:
            import _winreg as reg
            NSIS_path = reg.QueryValue(
                reg.HKEY_LOCAL_MACHINE,
                r"SOFTWARE\NSIS\Unicode") + '\\makensis.exe'
            self.run_command(
                [proper_windows_path(NSIS_path),
                 self.dst_path_of(tempfile)])
        except:
            try:
                NSIS_path = os.environ[
                    'ProgramFiles'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command([
                    proper_windows_path(NSIS_path),
                    self.dst_path_of(tempfile)
                ])
            except:
                NSIS_path = os.environ[
                    'ProgramFiles(X86)'] + '\\NSIS\\Unicode\\makensis.exe'
                self.run_command([
                    proper_windows_path(NSIS_path),
                    self.dst_path_of(tempfile)