philippj / SteamworksPy

A working Python API system for Valve's Steamworks.
MIT License
212 stars 39 forks source link

Is it possible to put the .dll and .lib files in a separate folder? #79

Closed majikat768 closed 1 year ago

majikat768 commented 1 year ago

I have SteamworksPy working fine, but the dll and lib files have to be in the project root directory. I'd prefer to be able to put them under a src/ or assets/ or lib/ directory.

I tried doing this, and I modified the SteamworksPy init.py file, such that rather than searching in os.getcwd() for the library files, it loads them from the correct directory where they're stored. If Steam is not running, it correctly raises the error "Steam is not running". but if Steam is running, it raises the error "OSError: exception: access violation reading 0x0000000000000000", at line 157 in teamworks/init.py in initialize(): result = self._cdll.SteamInit()

For now I can just keep them in root, but I'd like to be able to organize my project structure a little more thoroughly.

majikat768 commented 1 year ago

Edit:

So it looks like it only requires that steam_appid.txt needs to be in the root directory. Seems like this should be fixable, I'll see what I can do.