Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game move functionality #43

Open
buswedg opened this issue Oct 20, 2023 · 4 comments
Open

Game move functionality #43

buswedg opened this issue Oct 20, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@buswedg
Copy link

buswedg commented Oct 20, 2023

Would be great to have a command which allows installed games to be moved across different locations, with manifests updated accordingly for the Amazon Games Launcher to remain synced to what is installed (no matter location).

This would be similar to the move functionality offered in legendary. But would be particularly helpful, as I've always had problems installing games to network locations via the actual Amazon Games launcher, which tends to complain about 'restricted install locations'.

@buswedg
Copy link
Author

buswedg commented Oct 22, 2023

I've spent a little time looking at nile and legendary. Seems like Epic store manifest data in flat (*item) files, which are relatively straight forward to update based on a shift in game location. AG however, use sqlite files to store library data. The below seems to be the target file to update. I could probably make a PR to add this functionality if there is interest. If not, I'll just write something quick and dirty for my own needs.

%localappdata%\Amazon Games\Data\Games\Sql\GameInstallInfo.sqlite

@imLinguin
Copy link
Owner

This functionality is simple, just make nile move the game directory to desired location and update metadata in installed.json

@imLinguin imLinguin added the enhancement New feature or request label Oct 22, 2023
@buswedg
Copy link
Author

buswedg commented Oct 22, 2023

So, my focus was a little more around keeping AG launcher updated with the current install location, rather than nile (which might be out of scope for what you're doing here).

It's still straightforward, and I wrote + tested something last night which achieves my need by offering a pretty simple cli to select installed games, move them to a different location, and update Amazons sqlite stored info accordingly. See example drop of code below. But perhaps a better way to handle this would be to just update nile's installed.json, and focus on developing out some kind of resync functionality between nile and AG launcher? Similar to what legendary offers. What would you prefer?

DATABASE_PATH = os.path.expanduser(os.path.join("~", "AppData", "Local", "Amazon Games", "Data", "Games", "Sql", "GameInstallInfo.sqlite"))
conn = sqlite3.connect(DATABASE_PATH)
cursor = conn.cursor()
cursor.execute("UPDATE DbSet SET InstallDirectory = ? WHERE ProductAsin = ?", (new_install_game_dir, game_id))
conn.commit()
conn.close()

@imLinguin
Copy link
Owner

It feels best to have it as separate sync feature like legendary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants