sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.11k stars 71 forks source link

image support on cli #909

Closed trentondyck closed 12 months ago

trentondyck commented 12 months ago

Hi Again,

Sorry to bother again, I think I'm doing something wrong (And I have a workaround so it's low priority for me) but trying to set the images command line I'm not getting the result I expect (any images).

Here's what I did:

  1. Kill/stop steam.
    
    (deck@steamdeck steamtinkerlaunch)$ ls ~/horizon-xi/appid*
    /home/deck/horizon-xi/appid_hero.png  /home/deck/horizon-xi/appid_logo.png  /home/deck/horizon-xi/appid.png  /home/deck/horizon-xi/appidp.png
    (deck@steamdeck steamtinkerlaunch)$ ./steamtinkerlaunch addnonsteamgame --appname="deleteme" --exepath="/home/deck/horizon-xi/lib/net45/HorizonXI-Launcher.exe" --startdir="/home/deck/horizon-xi/lib/net45/" --iconpath="/home/deck/horizon-xi/icon.png" --compatibilitytool="GE-Proton7-42" --hero="~/horizon-xi/appid_hero.png" --logo="~/horizon-xi/appid_logo.png" --boxart="~/horizon-xi/appidp.png" --tenfoot="appid.png" --copy
    Preparing to install SteamTinkerLaunch on Steam Deck
    Updating SteamTinkerLaunch to latest git

Dependency 'innoextract' already installed, nothing to do. Dependency 'cabextract' already installed, nothing to do. Dependency 'yad' already installed, nothing to do.

Finished updating SteamTinkerLaunch ('v14.0.20230916-2')! Finished setting game art for '3410598813'. Restart Steam for the changes to take effect. (deck@steamdeck steamtinkerlaunch)$ ls ~/.local/share/Steam/userdata/5610248/config/grid/3410598813 ls: cannot access '/home/deck/.local/share/Steam/userdata/5610248/config/grid/3410598813': No such file or directory



When I manually copy images to that grid directory they show up for me on non-steam games so I'm not sure what the issue is here. (I'm running on the compatibility branch by the way, which is working great).  I'm sure I'm making a silly mistake but just throwing this out there in case...

## System Information
- SteamTinkerLaunch version: <!-- e.g. v12.12 -->
- Distribution: <!-- e.g. Arch Linux, SteamOS -->
- Installation Method: <!-- e.g. Package Manager, Flatpak -->

## Issue Description
<!-- Describe the issue in as much detail as you can. -->

## Logs
<!--
Please provide logs to help debug your issue.
You can find your steamtinkerlaunch.log from the last execution in `/dev/shm/steamtinkerlaunch/steamtinkerlaunch.log`.
Ensure that you are attaching the log created directly after running SteamTinkerLaunch and reproducing your issue.

Feel free to attach any further logs you feel might be important as well.
-->
sonic2kk commented 12 months ago

The paths might need to be absolute: --hero="~/horizon-xi/appid_hero.png" --logo="~/horizon-xi/appid_logo.png" --boxart="~/horizon-xi/appidp.png" --tenfoot="appid.png" - As in, /home/deck/horizon-xi/appid_hero.png (${HOME}/horizon-xi/appid_hero.png or /home/${USER}/horizon-xi/appid_hero.png should also work, if you don't know what the home directory name will be). I haven't tested with '~' path names, but I know on the UI, the path names are given as absolute paths. Likewise, when testing setGameArt, I only tested absolute paths. Having said that, I'm not sure why relative paths aren't working.

Also, are those the names of the files? SteamTinkerLaunch will give the files the names they need, so myfancyhero.png for a shortcut with an AppID of 123456789 will become 123456789_hero.png (assuming this is passed to --hero="" of course :wink:).

I just did a very quick test and I got hero and logo to show up for a game (didn't have other art on-hand for that game). I used absolute paths for this test.

If you could attach a log for an attempted run I'll take a look, probably after work tomorrow as it's late for me tonight :-)

P.S. Glad to hear the compat tool setting is working, it's working in my tests too. Most likely will be merged tomorrow :partying_face:

trentondyck commented 12 months ago

Yeah that's exactly it. absolute paths worked for me. There's two issues to address then

sonic2kk commented 12 months ago

I think there is logging if the image doesn't exist. Returning an exit code might require a bit of a refactor since this reuses logic from setgameart command.

It's something I could investigate, though I wouldn't necessarily want anything to fail entirely if one image didn't exist out of four 😅

I'm not sure that other functions in STL do this either, but one could make the argument that they should, and a change like this would have to begin somewhere :-)

I'll close this for now, and keep it in mind as a future enhancement to commandline usage (which is probably the way I use SteamTinkerLaunch the most).

I should also add to the help screen and probably also the docs that paths should be absolute.