GOG Galaxy 2.0 Community integration for Steam.
Table of Contents
This project is in open beta. It is not completely bulletproof, but it has been extensively tested. We are hoping that crowdsourcing the error checking will help find anything we may have missed.
windows.zip
file of the latest version in the Releases page.%localappdata%\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8
~/Library/Application Support/GOG.com/Galaxy/plugins/installed/steam_ca27391f-2675-49b1-92c0-896d43afa4f8
windows.zip
to that directory. We tried to kill as many bugs and test as many behaviors as possible, but we aren't perfect.
You may find some case we haven't tested.
Please raise an issue here, and in the comment, attach your logs.
They can be found here:
%programdata%\GOG.com\Galaxy\logs
/Users/Shared/GOG.com/Galaxy/Logs
We typically only need the steam_<numbers and letters>.log
file.
You will need Python 3.7, and at least Python 3.7.9. If on Windows, you need to use the 32-bit version. You will then need to set up your python virtual environment, and then have pip
get all the dependencies the project needs in your virtual environment. Once you have that, you can start making changes. Some IDEs will do this for you, but here are explicit instructions for doing it on your own.
py
when you go through the installer. Our tools are designed to use py
if it's available, but fallback to just python
. When you have multiple versions of python installed, python
may not refer to 3.7 and that would break the code.py -3.7 -m venv .venv
python -m venv .venv
.venv\Scripts\activate.ps1
pip install -r requirements/dev.txt
pyenv
and install python 3.7 through there. It's likely to be a newer version of python 3.7.
Homebrew
. This can be installed from Homebrew � The Missing Package Manager for macOS (or Linux)brew install pyenv
pyenv install 3.7.9
. You can also use a newer version of 3.7, like 3.7.16 pyenv local 3.7.9
or whatever newer version you used.python -m venv .venv
.venv/Scripts/activate
pip install -r requirements/dev.txt
Install Certificates.command
that you can run. We have also provided a slimmed-down version of it, but it likely does not have permission to run.
chmod +x "Install Certificates.command"
./Install Certificates.command
You may need to allow it through gatekeeper. we recommend viewing the script before allowing it if you are uncomfortable with executing our script. It is copied directly from the python 3.7.9 pkg, we just remove the install certifi command (we already did that).Once you are set up, you can make whatever changes you need to. There are, however, a few commands we'd like to make you aware of.
Steam uses protobufs for its messages. Please see README_UPDATE_PROTOBUF_FILES.md in the protobuf_files directory for more information on how these work and how to update them.
There are several commands that make your life easier. These are done via the invoke
python module. To do so, make sure your virtual environment is active (.venv\Scripts\activate.ps1
on Windows via cmd/powershell, .venv/Scripts/activate
on macOS via Terminal) and then the following commands will be available to you:
To build your code, run inv build
To run the defined python tests on your code, run inv test
To install the changed code on your local GOG Galaxy instance, run inv install
. Note that GOG Galaxy must not be running when you do this.
To pack a zipped release file that you can share with others, run inv pack
For some testing, we will require you build to the latest version from scratch. For non-developers, however, the full developer install is overkill, so we've made a simplified version that only does the bare essentials to take the source code and install a plugin from it. There are only a few commands you need to run. If you want to know what they do, they are documented above each command. A tl;dr: version is below it.
Please do the following:
Download or clone this repo. If you download a zip, make sure to extract it. You need to be in the main directory for this to work.
Download Python 3.7.9 32-bit. FOR WINDOWS:
If you have another version of python installed, make sure install py
is checked.
This makes it easier to select which version of python you are using and we need our virtual environment in 3.7.9.
If using Windows, make sure you have enabled the setting that adds Python to the PATH environmental variable
.
These should be the default settings, but make sure anyway.
FOR MAC: run Install Certificates.command
Create a new virtual env:
python -m venv .venv
py
as well)py -3.7 -m venv .venv
Activate the virtual env
.venv\Scripts\activate
.venv/Scripts/activate
Use Pip to get the python tools we need to install the plugin.
These will only be applied to the .venv
virtual environment you created earlier:
pip install -r requirements/install.txt
Install the plugin. It should work if you have deleted the original plugin, but will patch it if it is there.
inv install
Windows (Powershell recommended)
@echo You must have installed python 3.7.9 (32 bit). If not, the rest of this won't work.
py.exe -3.7 -m venv .venv
@echo If the previous command did not work, you do not have py installed or py is not in your PATH.
@echo If you only have python 3.7.9, run the next command.
@echo If it worked, skip the next command.
python.exe -m venv .venv
@echo virtual environment is installed. on to the next step.
.venv\Scripts\activate
pip install -r requirements/install.txt
inv install
macOS (assumes your shell is bash, which is the default. if you are good enough to change that, you can figure out how to run these)
echo You must have installed python 3.7.9 (macOS). If not, the rest of this won't work.
py -3.7 -m venv .venv
echo If the previous command did not work, you do not have py installed or py is not in your PATH.
echo If you only have python 3.7.9, run the next command.
echo If it worked, skip the next command.
python -m venv .venv
echo virtual environment is installed. on to the next step.
.venv/Scripts/activate
pip install -r requirements/install.txt
inv install
If inv install
throws a bunch of errors, make sure you have the proper python venv set up. It should complain about getargspec
. If this happens, you created the wrong virtual environment. You can either delete the .venv
folder and reinstall it, or create a new virtual environment with a different name and use that.
Make sure you use py -3.7
when creating your venv. If you don't have py
, get it. You can specify the full path to python 3.7 instead if you want, but that's harder to do and harder to explain here.
Well, without being too complicated, Steam changed how they do authentication. We used to be able to use one call and magically get a lot of info we needed. But, if we're being honest, it was a little insecure, and it easy. While we were using it for legitimate purposes, not everyone else was, and one of Valve's greatest deterrence to botting or DOS attacks (etc) is making things difficult. The new workflow uses a significant back-and-forth between a Steam Server and ourselves, closely resembling a common web form of authentication called OAuth2. This meant a lot of under-the-hood changes.
This is a fork of https://github.com/FriendsOfGalaxy/galaxy-integration-steam
The new Authorization flow implementation is heavily influenced by SteamKit. https://github.com/SteamRE/SteamKit
While we have not utilized their source code, they have implemented the new authentication workflow before we did, and we used their knowledge of how to do so in order to implement it ourselves. If you are doing anything steam related in C#, you should check them out; their project has far more features than our own.
Some work was influenced by ValvePython. https://github.com/ValvePython/steam
Our projects do the same thing, but use different methods (we use asyncio, they use gevent, for example). Both projects were working on the new Auth Flow simultaneously, with little collaboration between us. That said, their scope is much larger than our own and lets you do a lot more things. If you are looking for a python means of implementing a steam network authentication, you should use their work instead.
Original Plugin was based on work and research done by others: