As far as I’m aware, the main problem with decompilers is the fact that they can’t name variables and functions automaticly. But that doesn’t matter if you are just going from binary -> decompiler -> compiler -> binary

And I know there’s a lot of platform dependent code like OS APIs (such as DirectX, and WinAPI). But surely there are substitutions of the functions defined in these APIs right? I think automated porting could be performed 90% of the time and the remaining 10% could be fixed with community patches

This feels like a incredibly stupid idea after writing down but I just want to know

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    WINE does essentially what you’re proposing in a smarter way. Rather than requiring each program to be re-compiled, it offers APIs that look like those of Windows, but then when those get called, it does the same substitution thing to make equivalent Linux API calls.

    If you’re thinking “but WINE doesn’t work very well”, yeah, because these OS APIs are complex and even mildly different behaviour will cause many programs to explode. Your approach would suffer from that same problem.