fredreichbier / genie

A Python module to access Genie engine (Age of Empires, ...) files
BSD 2-Clause "Simplified" License
19 stars 5 forks source link

OS X 10.10.3 crash #3

Closed phrohdoh closed 9 years ago

phrohdoh commented 9 years ago
2015-06-02 13:15:03.344 Python[24777:115531] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/nm/flcs9rxx14n5rv2b9kh64mlh0000gn/T/org.python.python.savedState

Welcome to browse_slp.py. You can do anything at browse_slp.py.
    You might want to start with `drs` to see which DRS file you are
    currently browsing. Then, you can type `ls` to see all available
    files, and `play ID` to play .WAV files or `show ID` to view SLP files.
genie> drs
We're current browsing graphics.drs
genie> ls
Traceback (most recent call last):
  File "browse_slp.py", line 401, in <module>
    browser.cmdloop()
  File "/usr/local/Cellar/python/HEAD/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/local/Cellar/python/HEAD/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "browse_slp.py", line 277, in do_ls
    names = [fname for resource_id, fname in self.loader.get_matching(pattern)]
  File "browse_slp.py", line 98, in get_matching
    for resource_id, filename in self.get_files():
  File "browse_slp.py", line 46, in get_files
    for table in self.drs_file.tables:
  File "browse_slp.py", line 40, in drs_file
    return self.env.get_drs(self.drs_filename)
  File "/Users/thill/projects/genie/genie/environment.py", line 29, in get_drs
    stream = self.cabinet.get_file(filename)
  File "/Users/thill/projects/genie/genie/cabinet.py", line 26, in get_file
    self._load_file(filename)
  File "/Users/thill/projects/genie/genie/cabinet.py", line 33, in _load_file
    self._files[filename] = open(filename, 'rb')
IOError: [Errno 2] No such file or directory: '/Users/thill/games/Age of Empires.app/Contents/Resources/drive_c/Program Files/Microsoft Games/Age of Empires/graphics.drs'

It appears that graphics.drs was not extracted.

fredreichbier commented 9 years ago

Hi, thanks for the bug report! I have no idea how the folder structure for AOE on OS X works. At least on the Windows installs (that I'm using through wine), there is a DATA subfolder, which you need to pass to browse_slp.py as the first argument. This DATA subfolder contains graphics.drs. Do you have that on OS X?

phrohdoh commented 9 years ago

Ah okay, I gave it the AOE directory instead of DATA. I will report back with the new results.

phrohdoh commented 9 years ago

Thanks that solved it. :-)