tralph3 / Steam-Metadata-Editor

An easy to use GUI that edits the metadata of your Steam Apps
GNU General Public License v3.0
161 stars 18 forks source link

Integrate SME into SteamTinkerLaunch #18

Open frostworx opened 2 years ago

frostworx commented 2 years ago

I recently found your tool (iirc via reddit), put it into my booksmarks, just tried it and now wanted to thank you for your work! Only played a bit with it so far, but I already like it a lot :) I think it would be also a nice to have it as feature in my linux tool steamtinkerlaunch, so I'd add support for it (probably not too soon) if you don't mind. Would be great if steammetadataeditor accepted the game appid as command line argument, so it could open directly for the current game. I'm not really good with python (yet), but it might be a good oppurtunity to learn it a bit.

Btw, I wished I had found your project earlier, because it very likely would have helped a lot to understand and write the appinfo.vdfparsing :) (was "fun" to write it in bash btw :D)

tralph3 commented 2 years ago

Oh my, you wrote an appinfo parser in bash? That does sound painful haha. It shouldn't be too hard to make it take an argument to open directly on that game. Thanks for the kind words, I'll look into it later today if I have some time.

tralph3 commented 2 years ago

By the way. How would this integration work? I don't think it's a good idea to open a GUI open from another GUI app. And I also don't think it would be a good idea to have my program as a dependency to yours, since most of the code is for the GUI (which is so ugly I have nightmares anytime I need to touch anything in it). I have plans to refactor the GUI, but for now it will stay as horrible as it is.

The reading/writing of appinfo however works quite nicely, it would probably be a better idea to integrate that part into your program. I can probably abstract that into its own module and make a command line interface for it. This may also benefit my program, making it depend on that module, and have the entire program be mostly just GUI.

frostworx commented 2 years ago

You're right, the integration could be confusing. Of course it would be great if you'd abstract the appinfo core functions into a standalone headless module and I'd be happy to integrate this. If there's anything I can do to help please let me know.

btw I can comprehend your nightmares when I have to touch certain parts (mostly gui as well) of steamtinkerlaunch code. but the program is too huge already, it is written in bash and therefore there are no real alternatives for other gui systems and there is no time to rewrite the beast, so it will stay as horrible as it is :D

frostworx commented 2 years ago

I just pushed this commit in my fork. I'm very sure this can be improved a lot, but providing an optional image path for the GUI assets and loading data for a command line appid directly seems to work fine.

If you think this can be useful, I'd be happy to open a PR.

Probably stupid question: Is your "Edit launch menu" button supposed to work currently? Because it is greyed out in your current master as soon as you click a game in the list. In my fork the button mostly works and opens the sub editor for the corresponding game, but for some games an empty window opens with this traceback:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/frostwork/.config/steamtinkerlaunch/downloads/Steam-Metadata-Editor/src/./steammetadataeditor", line 1101, in create_launch_menu_window
    self.update_launch_menu_window(appID)
  File "/home/frostwork/.config/steamtinkerlaunch/downloads/Steam-Metadata-Editor/src/./steammetadataeditor", line 1041, in update_launch_menu_window
    for launchOption in appLaunchOptions.keys():
AttributeError: 'str' object has no attribute 'keys'
tralph3 commented 2 years ago

Yes the launch menu button is supposed to be available only for games that you have currently installed. I did it this way since the launch menu options always take paths relative to the installation path of the game. If the game is not installed, then I can't calculate the relative path to the other files the user might add.

Also, I didn't quite catch why you're providing a different path for the assets. What's the point in that? Didn't you want to just pass an AppID?

frostworx commented 2 years ago

Ic, thanks for the explanation. the reason for the asset path is that steamtinkerlaunch could automatically checkout the project on demand and it could be used directly from the download directory (so no systemwide installation from root would be required)

tralph3 commented 2 years ago

I don't really like this solution. I'll propose you this. Give me some time to abstract the appinfo parser to its own python module. I'll try to upload it to PyPi so you can just pip install then. Then you can edit games as you wish through command line arguments.

frostworx commented 2 years ago

sure no problem, I didn't expect my solution to be nice, just wanted to play a bit with it :) Take your time and thanks for your work again!

frostworx commented 1 year ago

No rush, but are you still working on this (or the project at all)? If no, it might be worth a try to call for contributors.

sonic2kk commented 1 year ago

@tralph3 I'm the maintainer of SteamTinkerLaunch now and I'm still interested in adding support for SME to SteamTinkerLaunch. Of course, no rush on my side either, just a small ping to let you know of the change and that there is still interest whenever you're ready.

tralph3 commented 1 year ago

Yes, I still want to do this. I need to find the time that's all. There's too many projects + real life that call for my attention. I'll eventually get to it, don't worry.

sonic2kk commented 1 year ago

Real life comes first and wow yeah it looks like you have a bunch of other projects :-) Don't rush on our account, there is plenty to do to keep STL busy

sonic2kk commented 5 months ago

I am unsure what integration with SME would look like at this point, so I opted to close the downstream issue. This issue can probably be closed as well.

However, if there is any interest from another party or yourself, or if someone wants to just discuss this further, either the downstream STL issue or this issue could be removed.

As I noted in the STL issue, I still think SME is a great project! Please don't take this as an insult in any way, The issue has just gotten a little stale (through no one's fault) and integration is not something I'm clear on how I would implement anymore.