def __init__(self, filename, config_file, config_is_object=False): self.filename = filename self.rom = Rom(self.filename) if config_is_object: #If configs passed as object [needed for openCopy()] self.config = config_file #Use the objects else: #Otherwise, use the filenames. self.config = Config(config_file) romconfig = Config(filename, rom=True) if romconfig.get(['Database', 'Auto-Upgrade']): updb.doUpgrade(self.filename) self.database = Database(self.filenameBase() + '.awakedb') self.disasm = Z80Disasm(self) self.flow = ProcedureFlowCache(self)
def __init__(self, filename, config_file, config_is_object=False): """ Create a new Project with specified Rom Filename and configuration :type filename: str """ self.filename = filename self.rom = Rom(self.filename) if config_is_object: #If configs passed as object [needed for openCopy()] self.config = config_file #Use the objects else: #Otherwise, use the filenames. self.config = Config(config_file) romconfig = Config( filename, rom=True ) # TODO: Doesn't this negate the purpose of the previous self.config lines? if romconfig.get(['Database', 'Auto-Upgrade']): updb.doUpgrade(self.filename) self.database = Database(self.filenameBase() + '.awakedb') self.disasm = Z80Disasm(self) self.flow = ProcedureFlowCache(self) self.debug_symbols = None