DjScribbles / GamePipe

An application that automates the movement of Steam games from drive to drive or computer to computer
GNU General Public License v2.0
196 stars 12 forks source link

Can't quit without restarting steam #8

Closed skath closed 7 years ago

skath commented 8 years ago

I moved some games and then restarted steam manually.

When I tried to quit gamepipe, a dialog box says Steam must be restarted after moving games. I know, I did that already.

When I say "no" to an unnecessary additional restart, the application doesn't close.

DjScribbles commented 8 years ago

Everything you encountered here is functionally correct (although there are bugs in that part of code if steam is already closed when you exit), but this isn't the final work-flow. Currently, this check is only done at application shutdown (in the future it will be on a thread in a separate application), and it performs some work that has to be done after steam is restarted.

The reason for all of this is that during shutdown, steam actually recreates the app manifest files of moved games at the original locations. If those aren't deleted, those app manifest files may be loaded as the default instead of the game in it's new location (depending on the index order of the drives). When this happens, the user gets "Missing Executable" error messages when trying to play the moved game.

skath commented 8 years ago

The reason for all of this is that during shutdown, steam actually recreates the app manifest files of moved games at the original locations.

Huh, that might be why game pipe showed copies of games in old locations after moving some manually as described in Issue #9.

DjScribbles commented 8 years ago

That's entirely possible. I honestly didn't learn about this until a month ago or so during development. At first I thought I was losing my mind, because I would move a game and follow my normal procedure, but sometime some games would fail to run (missing executable) and other times they would be fine. It wasn't until I witnessed the game show back up in it's old location right as I shutdown Steam that I finally figured out what was happening, whether or not they worked was dependent on the order the drives are listed in Steam, as it always takes the first occurrence of an ACF it sees..

DjScribbles commented 8 years ago

I've improved this behavior in (release 0.1.7)[https://github.com/DjScribbles/GamePipe/releases/tag/0.1.7]. Now, Game Pipe will ask if you want to restart Steam, but will still close if you say no. The Wingman application will remain open in the background, and close once Steam has been restarted.

I also discovered that the write-back to the appManifest.acf file doesn't always occur, it seems to be linked to trying to run the game without restarting (and perhaps some other cases). I've submitted a support ticket to Steam to see if they can fix this either by adding a "RefreshLibraryFromDisk" API function (which would remove the need to restart steam at all) or by not writing to the ACF file if it doesn't exist (which would remove the need for the wingman app).

DjScribbles commented 7 years ago

After a few additional releases, I like how GamePipe_Helper is working, and I'm going to mark this issue closed. Game Pipe no longer forces you to restart, and if you choose not to do so, the helper will run in the background and do any necessary cleanup when steam does close, and if your computer is idle it will quietly restart Steam.

The latest commit (which should release in 1.0.2 ) also ensures that you don't get asked to restart if you have already done so after your game has moved.