Пример #1
0
    def run(self):
        revision = str(get_revision())
        if is_2_6 and do_modify:
            self.modify_manifest("CellProfiler.exe")
            self.modify_manifest("python26.dll;#2")
            self.modify_manifest("_imaging.pyd;#2")
            self.modify_manifest("wx._stc.pyd;#2")
            self.modify_manifest("wx._controls_.pyd;#2")
            self.modify_manifest("wx._aui.pyd;#2")
            self.modify_manifest("wx._misc_.pyd;#2")
            self.modify_manifest("wx._windows_.pyd;#2")
            self.modify_manifest("wx._gdi_.pyd;#2")
            self.modify_manifest("wx._html.pyd;#2")
            self.modify_manifest("wx._grid.pyd;#2")
            self.modify_manifest("PIL._imaging.pyd;#2")
            self.modify_manifest("wx._core_.pyd;#2")
        fd = open("version.iss", "w")
        fd.write("""
AppVerName=CellProfiler 2.0 r%s
OutputBaseFilename=CellProfiler_2.0_win%d_r%s
""" % (revision, (64 if is_win64 else 32), revision))
        fd.close()
        if is_win64:
            cell_profiler_iss = "CellProfiler64.iss"
            cell_profiler_setup = "CellProfiler_2.0_win64_r%s.exe" % revision
        else:
            cell_profiler_iss = "CellProfiler.iss"
            cell_profiler_setup = "CellProfiler_2.0_win32_r%s.exe" % revision
        required_files = ["dist\\CellProfiler.exe", cell_profiler_iss]
        compile_command = self.__compile_command()
        compile_command = compile_command.replace("%1", cell_profiler_iss)
        self.make_file(required_files, "Output\\" + cell_profiler_setup,
                       subprocess.check_call, ([compile_command]),
                       "Compiling %s" % cell_profiler_iss)
        os.remove("version.iss")
Пример #2
0
def on_report(event, dialog, traceback_text, pipeline):
    '''Report an error to us'''
    from cellprofiler.utilities.get_revision import get_revision
    params = { "traceback":traceback_text,
               "revision":str(get_revision()),
               "platform":str(platform.platform())
               }
    try:
        obfuscated_pipeline = pipeline.copy()
        obfuscated_pipeline.obfuscate()
        fd = StringIO()
        obfuscated_pipeline.savetxt(fd)
        fd.seek(0)
        pipeline_text = fd.read()
        params["pipeline"] = pipeline_text
    except:
        pass
    headers = {"Accept": "text/plain"}
    data =  urllib.urlencode(params)
    req = urllib2.Request(ERROR_URL, data, headers)
    import wx
    try:
        conn = urllib2.urlopen(req)
        response = conn.read()
        wx.MessageBox("Report successfully sent to CellProfiler.org. Thank you.",
                      parent = dialog)
    except urllib2.HTTPError, e:
        wx.MessageBox("Failed to upload, server reported code %d"%(e.code))
Пример #3
0
def on_report(event, dialog, traceback_text, pipeline):
    '''Report an error to us'''
    from cellprofiler.utilities.get_revision import get_revision
    params = { "traceback":traceback_text,
               "revision":str(get_revision()),
               "platform":str(platform.platform())
               }
    try:
        obfuscated_pipeline = pipeline.copy()
        obfuscated_pipeline.obfuscate()
        fd = StringIO()
        obfuscated_pipeline.savetxt(fd)
        fd.seek(0)
        pipeline_text = fd.read()
        params["pipeline"] = pipeline_text
    except:
        pass
    headers = {"Accept": "text/plain"}
    data =  urllib.urlencode(params)
    req = urllib2.Request(ERROR_URL, data, headers)
    try:
        conn = urllib2.urlopen(req)
        response = conn.read()
        wx.MessageBox("Report successfully sent to CellProfiler.org. Thank you.",
                      parent = dialog)
    except urllib2.HTTPError, e:
        wx.MessageBox("Failed to upload, server reported code %d"%(e.code))
Пример #4
0
    def run(self):
        revision = str(get_revision())
        if is_2_6 and do_modify:
            self.modify_manifest("CellProfiler.exe")
            self.modify_manifest("python26.dll;#2")
            self.modify_manifest("_imaging.pyd;#2")
            self.modify_manifest("wx._stc.pyd;#2")
            self.modify_manifest("wx._controls_.pyd;#2")
            self.modify_manifest("wx._aui.pyd;#2")
            self.modify_manifest("wx._misc_.pyd;#2")
            self.modify_manifest("wx._windows_.pyd;#2")
            self.modify_manifest("wx._gdi_.pyd;#2")
            self.modify_manifest("wx._html.pyd;#2")
            self.modify_manifest("wx._grid.pyd;#2")
            self.modify_manifest("PIL._imaging.pyd;#2")
            self.modify_manifest("wx._core_.pyd;#2")
        fd = open("version.iss", "w")
        fd.write("""
AppVerName=CellProfiler 2.0 r%s
OutputBaseFilename=CellProfiler_2.0_win%d_r%s
""" % (revision, (64 if is_win64 else 32), revision))
        fd.close()
        if is_win64:
            cell_profiler_iss = "CellProfiler64.iss"
            cell_profiler_setup = "CellProfiler_2.0_win64_r%s.exe" % revision
        else:
            cell_profiler_iss = "CellProfiler.iss"
            cell_profiler_setup = "CellProfiler_2.0_win32_r%s.exe" % revision
        required_files = ["dist\\CellProfiler.exe",cell_profiler_iss]
        compile_command = self.__compile_command()
        compile_command = compile_command.replace("%1",cell_profiler_iss)
        self.make_file(required_files,"Output\\"+cell_profiler_setup, 
                       subprocess.check_call,([compile_command]),
                       "Compiling %s" % cell_profiler_iss)
        os.remove("version.iss")