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

Auto-Extract and -Install games (a.k.a. Installation Pipeline) #18

Closed
9 of 11 tasks
Alfagun74 opened this issue Jul 7, 2023 · 10 comments
Closed
9 of 11 tasks

Auto-Extract and -Install games (a.k.a. Installation Pipeline) #18

Alfagun74 opened this issue Jul 7, 2023 · 10 comments
Assignees
Labels
💻 client There are things to do on the client 📖 docs Improvements or additions to documentation 🔧 feature New feature or request 🎛️ server There are things to do on the server

Comments

@Alfagun74
Copy link
Contributor

Alfagun74 commented Jul 7, 2023

Users need a pipeline to automatically extract and install downloaded games.

States of the Pipeline

  1. Nothing - No game available
  2. Downloading - User clicked Download
    2.1 Download failed - Offer Retry
  3. Downloaded - Download is complete
  4. Extracting - User pressed Extract
    4.1 Extraction Failed - Offer Retry
  5. Extracted - Game is ready for installation
  6. Installing - User clicked Install (Depending on the Game Type diefferent stuff happens only here)
    6.1 Installation failed - Offer Retry
  7. Installed - Game has been installed (Installation folder is full)

Extraction Process

  1. Unzip downloaded games by clicking a button on the Downloads page or enabling auto-extract settings (default off).

After clicking the button:

  • Games are extracted to the directory: <Root>/Downloads/Game/Extracted/ using the 7z dll.

  • The extraction progress is displayed in the user interface.

  • If the extraction is successful, a gamevault-metadata file is created in the /Extracted folder.

    • For now, the content is extraction_completed=true.
  • If the extraction fails during runtime, the /Extracted directory is deleted, and an error message is displayed on the downloaded entry with an option to Extract again.

    • If the PC shuts down or the app crashes during extraction, the extraction failure can be detected by the presence of gamevault-metadata on the next startup. Assume the user never clicked Extract and delete the existing "Extracted" folder on the next retry.
    • Eventually display State: Extraction Failure.

Installation Process

If the <Root>/Downloads/Game/Extracted/gamevault-metadata file has extraction_completed=true, offer an Install Button based on the game type:

  • WINDOWS_PORTABLE (games that dont need installation):

    • Show an install button that moves the extracted folder contents into the games installations folder.
  • WINDOWS_SETUP (games that require a setup installation):

    • install button is initially grayed out.
    • The user can enable the install button by selecting the setup executable from the "Select setup.exe" dropdown menu, similar to the installations tab.
  • Undetected:

    • User has to install game manually like it has always have been.

Other game types may be added in the future (Emulators, Linux etc.).

Further Instructions like Pre- and Postinstall steps can be implmemented in this Stage later aswell

Error Scenarios

Game type is set to WINOWS_PORTABLE but game is actually WINOWS_SETUP

  • The game will mistakenly appear in the Installation Tab.
  • The game will be shown in installations but will be unplayable as the exe may not be listed due to our ignore file.

Game type is set to WINOWS_SETUP but game is actually WINDOWS_PORTABLE

  • The user will be presented with a list of non-setup EXEs, which would inconveniently start the game from the downloads tab.

Game Type

A persisted enum in the game entity determines the game's type.

  • Automatically setting the Game Type would be beneficial. We have a significant amount of data on the server to develop a solution. Algorithmic approach (checking for setup.exe, install.exe, etc., in the archive)
  • Game Type can be manually flagged/overwritten by server admins using (W_P) or (W_S) in the file name.
  • Additional game types may be introduced later (such as Emulators).

To-Dos Client

  • Add game type as a dropdown filter in the Game Library UI
  • Add a pill-shaped label on the Game View, displaying the game type, like "Windows Setup ⚙️"
  • Add archive extraction (With metadata in UI)
  • Implement Auto-Extraction with Toggle in Settings
  • Implement Install Procedure as described above

To-Dos Server

  • Add a direct-play boolean to the game entity (defaulting to false for Setup Needed)
  • Add (W_P) to the naming scheme to manually set the game type as Windows Portable
  • Add (W_S) to the naming scheme to manually set the game type as Windows Setup
  • Analyze our game data
  • Set up an algorithm that auto-detects game type

To-Dos Docs

  • Update our documentation

Additional Future Ideas

  • Edit Game Type from the client
@Alfagun74 Alfagun74 added this to 🧑‍💻 In progress in GameVault: Public Roadmap Jul 20, 2023
@Alfagun74 Alfagun74 added the 🔧 feature New feature or request label Jul 20, 2023
@Phalcode Phalcode deleted a comment from Yelo420 Jul 21, 2023
@Alfagun74 Alfagun74 added 🎛️ server There are things to do on the server 💻 client There are things to do on the client labels Jul 21, 2023
@KairuByte
Copy link
Contributor

One thing caught my eye, direct play games should really just immediately move into the final destination, potentially even directly from the archive. Installation shouldn’t really be a thing for live-play games, and just adds one more step (and potentially time if the download and install directories are on different physical disks.)

@Alfagun74
Copy link
Contributor Author

@KairuByte Y'know, we seriously considered it but weren't keen on having direct-play games extract to the games install folder directly. There are several reasons for this:

  • FileWatcher would trigger and display the game in the installations tab, even if the extraction hadn't finished yet or was aborted.
  • The "Pipeline" is no longer consistent. It should just behave differently based on game type in the "install" part.
  • Any future post and preinstall scripts we implement would require additional handling.
  • It doesn't take up much time to press install.
  • It keeps downloads and installations decoupled, ensuring that users only see games in their installations that they truly "installed".
  • Installation and downloads are always located next to each other, so there's no possibility for a different drive.

@Alfagun74
Copy link
Contributor Author

Changed Terms Direct Play and Setup Needed to:

  • WINDOWS_PORTABLE
  • WINDOWS_SETUP

to support other types and platforms in the future.

@lenaxia
Copy link

lenaxia commented Jul 26, 2023

From a user standpoint, extraction and installation should be a single step. In the case of an installable game, the admin should be able to define the installer in the backend so that when the user/client extracts the game, it should auto launch the installer right after.

In the case of a direct play game, the admin should still be able to define the exe on the backend. It doesn't make sense to make ALL users define the exe over and over again, thats a repeated task for something that should not change from installation to installation.

Also, instead of defaulting to off for auto extraction, it should be something prompted to the user upon first launch. The reality is most users will not dig through settings to enable something like this. A prime example is Plex, where 90% of my users don't change from the default 720p streaming quality, even if I tell them to. If the user isn't prompted for this, most users won't take advantage of this setting.

@KairuByte
Copy link
Contributor

KairuByte commented Jul 26, 2023

As someone who has a direct view into the world of both the technical (myself) and non technical (my wife) worlds, I find myself agreeing with auto extraction. It’s part of the reason I am pushing for live play game support as hard as I am.

A typical end user (not a power user) wants to click less, and have things done for them. If things sound scary in the dialog prompt, they will click no, or freeze because they don’t know what the “proper” choice is. If they don’t understand the question, they will just pick an answer at random.

Important decisions for the average end user should be neither opt in, nor opt out, but opt “most convenient for the average user.” Power users will go into the settings and explore every corner.

The best way I have seen to handle such a conundrum, is ask the user if they want default settings (auto everything), or to customize their settings on install. This will give average users the most seamless experience, at the “cost” of some decisions being defaulted like auto extracting/auto installing dependencies/auto running scripts/etc, and power users will be able to make those decisions on their own.

Keep in mind, you need to target people who don’t even understand what the word extraction means. There’s a reason Steam and other game libraries handle all the download/extract in one go, and dependencies/first run scripts/etc on first play. It’s to cut down on confusion for the end user who doesn’t know what any of that even is.

@Alfagun74
Copy link
Contributor Author

@KairuByte I really like the idea of having a fourth setup page where the user has preselected "use defaults", and it automatically enables autostart, autoextract, autosearch and so on with the ability to toggle them each if the user wants to.

@lenaxia
Copy link

lenaxia commented Jul 27, 2023

Might be asking a but much, but I would like to enable the server admin to define the defaults that show up for their users. So a client would login and fetch defaults as provided by the backend.

The use case for this again goes back to plex. I would love to define 1080p as the default playback quality for any client that connects because I have that bandwidth. However the other guy over there may not have that bandwidth so it wouldn't make sense for clients connecting to his server to default to 1080p. This gives server admin the power to better shape his or her users' experiences.

@Alfagun74
Copy link
Contributor Author

@lenaxia I understand your perspective, but allowing server admins to define user defaults can lead to inconsistency and confusion. My preference is to create a standardized experience for all users, irrespective of the connected server. This is particularly important when implementing settings that the admin cannot be certain whether the user prefers or not.

@Alfagun74
Copy link
Contributor Author

Mockup for Download Tab

@Yelo420
Copy link
Contributor

Yelo420 commented Aug 10, 2023

The installation pipeline will finally be available in the upcoming version. I hope it is understandable and reliably fulfills its purpose. None of this is not still changeable. Glad about feedback.

@Yelo420 Yelo420 closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 client There are things to do on the client 📖 docs Improvements or additions to documentation 🔧 feature New feature or request 🎛️ server There are things to do on the server
Projects
Archived in project
GameVault: Public Roadmap
🧑‍💻 In progress
Development

No branches or pull requests

4 participants