Skip to content

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

@Alfagun74

Description

@Alfagun74

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

Metadata

Metadata

Labels

🎛️ serverThere are things to do on the server💻 clientThere are things to do on the client📖 docsImprovements or additions to documentation🔧 featureNew feature or request

Type

No type

Projects

Status

✅ Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions