Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Simplify install location logic #16

Open
zrisher opened this issue Apr 13, 2017 · 0 comments
Open

Simplify install location logic #16

zrisher opened this issue Apr 13, 2017 · 0 comments

Comments

@zrisher
Copy link
Contributor

zrisher commented Apr 13, 2017

Currently updateApp() takes as its second argument "installDir" and readme says it:

Asks SteamCMD to install/update the given app to the given absolute directory.

But that's not entirely accurate. Passing installDir to force_install_dir in steamcmd, as updateApp() does, will actually install the app in installDir/steamapps/common/Some Long Name For App. This is because force_install_dir treats the provided directory as a new steamcmd dir and applies the same file structure as if the argument hadn't been provided at all.

Given that steam automatically structures the apps within the directory provided to force_install_dir and that the behavior when providing installDir = binDir is the same as not calling force_install_dir at all, I suggest we change the interface in the following ways:

  • Store installDir in opts (as opts.appDir), instead of providing it as argument to updateApp()
  • Set opts.appDir = opts.binDir

These changes will simplify the usage of updateApp() and make our treatment of installDir better reflect steamcmd's default functionality.

I've implemented this already in zrisher@4036ffc, but it's based on #14 so I'm waiting on it to be merged before submitting a PR.

I also would like to provide a method that returns the full path to the location where an app is installed. We can determine this in the same way that we find the local version - by querying appmanifest_appId.acf. But note that the need for this functionality exists whether the above changes occur or not - installDir was never actually the location of the installed files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant