Skip to content

FEATURE: Compile xoreos-tools as a DLL/library #58

Description

@lachjames

Hi :)

I've been using xoreos-tools for several of my projects, and up until now I've been mainly doing so through subprocess calls and writing files to disk. For example, I use it in my Python-based dialog editor (which I admittedly could write in C++ but that would be a significant changeover as I use several Python libraries for the project) as well as a Unity-based KOTOR level editor (which is in C# and can't be ported to C++ without changing game engines). This subprocess-based solution is less than ideal, and on machines without an SSD it could even become a significant bottleneck (although on my relatively fast SSD-based machine it's been fine so far).

Rather than moving to C++ (which is difficult and even not really possible in some cases), it seems that having "xoreos-tools come to us" through a DLL (which I could then write bindings for in all relevant languages) would be a better solution.

I took a look through the codebase and it seems that a lot of the code for the executables is also written in a way conducive to compiling as a DLL. Minor refactoring would be required for some files which include necessary logic in the main function (for example, eff and keybif would need a slight refactor). I think the ideal starting point would be the ability to do anything you can do through running the .exe files through a call to the DLL instead. I'm sure that there are other interesting/useful things that your code does behind the scenes which might be useful for other projects too though, so this is also worth considering down the track.

Is making xoreos-tools available as a DLL something that you'd consider?

Thanks :)

Lachjames

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions