Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.
/ Steam-Lite Public archive

A minimal Steam Client frontend.

License

Notifications You must be signed in to change notification settings

Aetopia/Steam-Lite

Repository files navigation

Steam Lite

A minimal Steam Client frontend.

Important

This is an alternative frontend not client.
Meaning, the project simply serves as a way to interact with a running Steam Client instance.
Currently there is only Windows support due to the way, the project works.
In the future, other platforms might be also supported if possible.

Usage

  1. Download the latest release from GitHub Releases.
  2. Start the program.
  3. To launch an app:
    • Select an app from the list and click the Play button to launch it.
    • Double click on the app's name to launch it.

Note

Closing Steam Lite will also close the Steam Client instance it launched automatically.

Aim

This project started with the intention of replacing the entire Steam Client frontend with something similar to the UI of the Steam Client with the CEF disabled.
Steam Lite provides a minimal GUI frontend with the ability to launch apps.

How does program work?

This program wouldn't have been possible without NoSteamWebHelper.
Mainly due the fact without it suppressing the Steam WebHelper wouldn't have been possible.

Note

Steam must be running the background to do the following:

  1. Allows any Steam DRM based apps to be launched.
  2. Allows apps to use any Steam related services.
  1. The program will attempt to invoke SteamClient.Launch() and initialize a new Steam Client instance, if an instance of the Steam Client is running, it will be discarded/shutdown.
  2. Once the new Steam Client instance is running, the Steam WebHelper is disabled to save on resources or to make the instance "minimal".
  3. To launch a apps, the program calls SteamClient.RunGameId(string gameId), the method re-enables the Steam WebHelper, waits for the app to launch and then suspends the WebHelper again.

Note

The frontend restricts the user to only launching a single app.
Technically the SteamClient class, allows you to launch multiple apps but blocks the invoking thread until the app terminates.

Why not use SteamCMD?

That's a good question, I actually decided to avoid SteamCMD since:

  • Steam dumps and writes useful information to the following registry key HKEY_CURRENT_USER\SOFTWARE\Valve\Steam.
  • Considering what information is required by the SteamClient class using SteamCMD is not required.

Features

  • Ability to launch Steam apps with directly using a Steam Client instance.
  • Ability to minimize to the tray.

    [!NOTE] The program will always minimize to the tray if an app is launched.

  • Doesn't require the Steam WebHelper.

    [!NOTE] The Steam Webhelper must be re-enabled briefly for invoking actions like launching an app.
    If you would like to implement your own methods to invoke specific Steam Client actions make sure to surround the method with SteamClient.WebHelper(bool enable).

    SteamClient.WebHelper(true);
    YourMethod();
    SteamClient.WebHelper(false);

SteamClient class Documentation

The SteamClient provides methods for interacting with a Steam Client instance ("steam.exe"").

Methods

SteamClient.Launch()

Initialize a Steam Client instance and if required shutdown/discard any running Steam Client instance that wasn't invoked by this method.
The method may fail if Steam isn't installed or an instance invoked by this is already running.
The method returns a Process class object if a Steam Client instance is created else null.

SteamClient.Shutdown()

Shutdown any instance invoked by SteamClient.Launch().
The method returns true if a Steam Client instance invoked by SteamClient.Launch() is running else false.

SteamClient.GetInstance()

Obtain an already running Steam Client instance invoked by SteamClient.Launch().
The method returns Process class object if a Steam Client instance invoked by SteamClient.Launch() is running else null.

SteamClient.GetApps()

Obtains installed Steam applications with their App ID and name.
This methods returns a dictionary contains the App IDs and names.
The key-value pair is present as follows {App ID: Name}.

SteamClient.GetAppsForUser()

This method is similar to SteamClient.GetApps() except it queries installed applications for the currently signed in user.

SteamClient.WebHelper(bool enable)

Disables or enables the Steam WebHelper for a Steam Client instance.

Value of enable Effect
true Steam WebHelper is enabled.
false Steam WebHelper is disabled.

The method returns true if a Steam Client instance invoked by SteamClient.Launch() is running else false.

SteamClient.StartGameId(string gameId)

Runs the specified App ID.
The method will block the invoking thread until the the app is terminated, so its best to use this method in a thread of its own.
The method returns true if a Steam Client instance invoked by SteamClient.Launch() is running else false.

Building

  1. Install the follwing:
  2. Run the following commands in the repository's root directory to build the project:
    dotnet clean
    dotnet build --configuration Release