SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.63k stars 1.11k forks source link

convert string ressource dll: Invalid section name: CODE #461

Closed niklasf closed 8 years ago

niklasf commented 8 years ago

I am using the latest Age2HD from Steam, with African Kingdoms expansion installed.

$ make run
./run game
INFO [py] No converted assets have been found
media conversion is required.
please provide your AoE II installation dir:
> /media/niklas/E4DE307EDE304AD6/Program Files (x86)/Steam/SteamApps/common/Age2HD
INFO [py] Game version(s) detected: Age of Empires 2: HD Edition (Version 3.x); Forgotten Empires; Age of Empires 2: The Conquerors, Patch 1.0c
INFO [py] converting metadata
INFO [py] [0] palette
INFO [py] [1] empires.dat
INFO [py] [2] blendomatic.dat
INFO [py] blending masks successfully exported
INFO [py] [3] player color palette
INFO [py] [4] terminal color palette
INFO [py] [5] string resources
Traceback (most recent call last):
  File "run.py", line 15, in init run (/home/niklas/Projekte/openage/run.cpp:832)
    main()
  File "/home/niklas/Projekte/openage/openage/__main__.py", line 94, in main
    return args.entrypoint(args, cli.error)
  File "/home/niklas/Projekte/openage/openage/game/main.py", line 33, in main
    if not convert_assets(assets, args):
  File "/home/niklas/Projekte/openage/openage/convert/main.py", line 125, in convert_assets
    for current_item in convert(args):
  File "/home/niklas/Projekte/openage/openage/convert/driver.py", line 126, in convert
    yield from convert_metadata(args)
  File "/home/niklas/Projekte/openage/openage/convert/driver.py", line 179, in convert_metadata
    stringres = get_string_resources(args)
  File "/home/niklas/Projekte/openage/openage/convert/driver.py", line 37, in get_string_resources
    pefile = PEFile(srcdir[name].open('rb'))
  File "/home/niklas/Projekte/openage/openage/convert/pefile.py", line 191, in __init__
    raise Exception("Invalid section name: " + section.name)
Exception: Invalid section name: CODE
Makefile:22: recipe for target 'run' failed
make: *** [run] Error 1
TheJJ commented 8 years ago

So i see you got HD+african 4.x installed, right? But the converter detects you have 3.x, which is a bug.

goto-bus-stop commented 8 years ago

Woah. That's a really weird combination of detected versions. Age of Empires 2: The Conquerors, Patch 1.0c is detected by the existence of Age2_x1/age2_x1.exe, which I don't think ships with any version.

Although…are you using the HD/1.0c compatibility patch?

niklasf commented 8 years ago

Ah, yes. That is the one shipped with Voobly, right?

I should also mention that this is not a fresh install, but got updated to HD+African 4.x.

$ ls -r > ls-r.txt

TheJJ commented 8 years ago

Wait what? Did you install HD and 1.0c with vooblypatch into the same folder? That's not particularly good, but i guess by defining some priority order our converter may still detect it the right way.

goto-bus-stop commented 8 years ago

Thanks for the file list @niklasf :) Happenings:

However, only HD 4.x should be detected here, ideally. Perhaps there could be an exclusion rule on the other two, to avoid detecting them if the resources/_common/dat/empires2…dat file exists?

niklasf commented 8 years ago

462 indicates that version detection may not be the only thing going on, here.