Giter VIP home page Giter VIP logo

andromeda-for-gog's Introduction

Andromeda-for-GOG

GitHub Release GitHub Release Date Last commit

This project aims at providing a Galaxy-like client for GOG with the help of https://www.gog.com/forum/general/unofficial_gog_api_documentation/page1 also for Linux systems. It will focus the downloading, installing and updating of games at first.

If you need something to play Multiplayer over Galaxy on linux, have a look at the comet project from the brilliant guy who started the unofficial documentation: https://gitlab.com/Yepoleb/comet

There is an alternative for Linux systems written in Python called Minigalaxy:
https://github.com/sharkwouter/minigalaxy

Screenshot

Installation

Just download the executable for your os from the GitHub releases. On linux you could use the AppImage, if you want to. It is updateable via AppImageUpdate.

Usage

Simply start the downloaded executable.

Define settings

If you start Andromeda for the first time, you should have a look at the settings of Andromeda. Click on the cog and configure e.g. your desired path for the games here. You can also alter the caching behaviour of Andromeda and define, if you want to update games on startup automatically.

Install game

Press the "Install game" button. Type the name of the game or a part of it. You will get a list of all games matching your search. Choose the one you want to install and click "Install".

If everything worked, you should see a status indicator of the download and installation.

Upgrade games

To upgrade all of your installed games, press the "Upgrade games" button. If Andromeda finds updates, it will install them. If there are no updates, you will see a notification at the top of the window.

Start game

This does not work all the time, but you can try to right click the game and click "Start" to start the game. The console output will be shown in the bottom right terminal. Often execution rights are missing. After you fixed that manually you can use Andromeda to start the game.

Development

For for information about development have a look at README-DEVELOPMENT.

andromeda-for-gog's People

Contributors

angelmunoz avatar nicoviii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

johnathonm1981

andromeda-for-gog's Issues

Think about giving execution rights to all files

Atm most games can not be started after installing because of a cascade of files which execute oneanother.
For now I did not simply mark all files as executable in a game folder because my gut feeling says that this is not very secure. I have to think about that problem and a possible solution for that.
Maybe there could be a way of automatic marking from console log or a setting with a warning for the user... But the question of security has a high priority for this.

Autoupgrade games on startup

I think that was in a old version already there, but it is missing now.
There should be an option in the settings which allows to enable automatic upgrading on startup.

Improve update mechanic

For now I do not use the version given by the installer info to install. This happened because I tried to make Andromeda very optional and make updating work for "normally" installed GOG games as well.
Unfortunatly I didn't find a way for some games to determine the installed version and on windows this doesn't work at all. Therefore I should create a file with version myself and add it to the games folder to allow easier updating.

Introduce tabs for single games in terminal output

For now the whole output of all games started through Andromeda is directed into one single terminal output.*

It would be nice, if each game could get a single tab with terminal output, so it is easier to know which output is from which game.

Add logo to publishing

In the release of the v0.3.0-beta.5 version I got a problem, because the logo was not included. I added it manually.
But this should be automated as well.

Implement settings

Andromeda needs a settings screen or window with a good structure behind it to easily enable settings for it.

Restructure Core

The code is not as clean as I want it to be. Therefore some refactoring should happen to improve code and the differentiation between Core and GUI.
For this the console UI could be updated to work again, this should show which features are UI independent and should be available in the core.

Implement choosing of games

At the moment you have to guess a unique search term for a game which you want to install. Otherwise you can not install anything with Andromeda.

The goal of this is to implement a list, which shows all matches for a search term so you can choose the game you want to install.

DLC handling

For now DLCs are not considered in designing Andromeda. This should be changed and it should be possible to install and update DLCs as easily as the main games.

[Windows] Windows do not close

On windows the dialog windows do not close when they should. The background stuff seems to work, so if you close the windows yourself, you should be fine.

But this is of course not optimal and should be fixed.

Current installer backup

The client should not only automatically update games, it should also update installers in a defined place, if configured.

Add AppStream Metadata to AppImage release

While preparing a new prerelease I noticed, that you can provide Appstream metadata while creating the AppImage.
This did not fully work on my manjaro system
/usr/bin/appstreamcli: symbol lookup error: /usr/lib/libappstream.so.4: undefined symbol: g_ptr_array_steal_index_fast
therefore I did not include it for now.
This may be a lowprio issue for another release.

Have a look at trimmed publishing

There is an option to trim unused libraries from the output file. I played around with that, but never used it "in production".
This topic should get some love to make the application even smaller.

Setting: Safe changes locally and not for user

We need a setting to use Andromeda locally e.g. to try a new version out without modifying saved data from earlier version.
For this we need a new Dialog at startup (additionally to setting in settings screen), which shows up, when saved data version for user is not the same as the running version.
Andromeda should use local savedata per default, if there is locally saved data, otherwise check for version of data in user folder and show dialog or use it.

[InstallGameWindow] Sometimes freezes after typing

Noticed while implementing #36 in #38

If you type and search much (maybe the select all and delete plays a role too?) in the InstallGameWindow, it will sometimes freeze.
This seems to happen because there are many events triggered which compete with each other.

The console trace looks like this:

New message:: ChangeSearch ""
Updated state:: { authentication =
                  Auth
                    { accessToken =
                                   "[..]"
                      refreshToken =
                                    "[..]"
                      accessExpires = 01.03.2020 09:12:14 +01:00 }
  productInfos =
                Some
                  [{ id = 1207664333
                     title = "Edna & Harvey: The Breakout" };
                   { id = 1207664343
                     title = "Edna & Harvey: Harvey's New Eyes" };
                   { id = 1706173745
                     title = "Edna & Harvey: The Breakout - Anniversary Edition" }]
  search = ""
  selected = None
  window = Andromeda.AvaloniaApp.FSharp.InstallGame+InstallGameWindow }
New message:: ChangeSearch "t"
Updated state:: { authentication =
                  Auth
                    { accessToken =
                                   "[..]"
                      refreshToken =
                                    "[..]"
                      accessExpires = 01.03.2020 09:12:14 +01:00 }
  productInfos =
                Some
                  [{ id = 1207664333
                     title = "Edna & Harvey: The Breakout" };
                   { id = 1207664343
                     title = "Edna & Harvey: Harvey's New Eyes" };
                   { id = 1706173745
                     title = "Edna & Harvey: The Breakout - Anniversary Edition" }]
  search = "t"
  selected = None
  window = Andromeda.AvaloniaApp.FSharp.InstallGame+InstallGameWindow }
New message:: ChangeSearch ""
Updated state:: { authentication =
                  Auth
                    { accessToken =
                                   "[..]"
                      refreshToken =
                                    "[..]"
                      accessExpires = 01.03.2020 09:12:14 +01:00 }
  productInfos =
                Some
                  [{ id = 1207664333
                     title = "Edna & Harvey: The Breakout" };
                   { id = 1207664343
                     title = "Edna & Harvey: Harvey's New Eyes" };
                   { id = 1706173745
                     title = "Edna & Harvey: The Breakout - Anniversary Edition" }]
  search = ""
  selected = None
  window = Andromeda.AvaloniaApp.FSharp.InstallGame+InstallGameWindow }
New message:: ChangeSearch "t"
Updated state:: { authentication =
                  Auth
                    { accessToken =
                                   "[..]"
                      refreshToken =
                                    "[..]"
                      accessExpires = 01.03.2020 09:12:14 +01:00 }
  productInfos =
                Some
                  [{ id = 1207664333
                     title = "Edna & Harvey: The Breakout" };
                   { id = 1207664343
                     title = "Edna & Harvey: Harvey's New Eyes" };
                   { id = 1706173745
                     title = "Edna & Harvey: The Breakout - Anniversary Edition" }]
  search = "t"
  selected = None
  window = Andromeda.AvaloniaApp.FSharp.InstallGame+InstallGameWindow }
New message:: ChangeSearch ""
Updated state:: { authentication =
                  Auth
                    { accessToken =
                                   "[..]"
                      refreshToken =
                                    "[..]"
                      accessExpires = 01.03.2020 09:12:14 +01:00 }
  productInfos =
                Some
                  [{ id = 1207664333
                     title = "Edna & Harvey: The Breakout" };
                   { id = 1207664343
                     title = "Edna & Harvey: Harvey's New Eyes" };
                   { id = 1706173745
                     title = "Edna & Harvey: The Breakout - Anniversary Edition" }]
  search = ""
  selected = None
  window = Andromeda.AvaloniaApp.FSharp.InstallGame+InstallGameWindow }
New message:: ChangeSearch "t"
Updated state:: { authentication =
                  Auth
                    { accessToken =
                                   "[..]"
                      refreshToken =
                                    "[..]"
                      accessExpires = 01.03.2020 09:12:14 +01:00 }
  productInfos =
                Some
                  [{ id = 1207664333
                     title = "Edna & Harvey: The Breakout" };
                   { id = 1207664343
                     title = "Edna & Harvey: Harvey's New Eyes" };
                   { id = 1706173745
                     title = "Edna & Harvey: The Breakout - Anniversary Edition" }]
  search = "t"
  selected = None
  window = Andromeda.AvaloniaApp.FSharp.InstallGame+InstallGameWindow }

[Suggestion] Move the window references out of the state

Hey there ๐Ÿ˜
this looks incredible!

I was recently working on something and I can't say I did find a way to remove stateful references from the state because I'm sure I've seen it somewhere else but

for example

            Program.mkProgram init update view
            |> Program.withHost this
            |> Program.withSyncDispatch syncDispatch
#if DEBUG
            |> Program.withConsoleTrace
#endif
            |> Program.runWith (settings, authentication, this)

on the first samples I put out for FuncUI I used the same approach, pass the window in the init fn and use Program.runWith ...params... (I'm sorry I didn't know what I was doing, pretty sure I still don't know)

however, that has it's gotchas mostly related with having non-comparable types in the record, making it hard to compare states if needed as well as having issues with the state serialization/deserialization

I think a better approach is to use the update function to pass the window (or any other services) like I did here
https://gitlab.com/AngelMunoz/Playsole/-/blob/master/Program.fs#L27
https://gitlab.com/AngelMunoz/Playsole/-/blob/master/Shell.fs#L48
https://gitlab.com/AngelMunoz/Playsole/-/blob/master/Shell.fs#L85

let updateWithPlayer (msg: Shell.Msg) (state: Shell.State) =
            Shell.update msg state Player.getPlayer.Value

Program.mkProgram Shell.init updateWithPlayer Shell.view
|> Program.run
let update msg state player =
    match msg with 
    | PlaySong index ->
        player.Play index

that way you always have a window/services available in your update function
I think in the case of your app it also can apply for the settings and auth information

what do you think?

Internationalize

Andromeda should support different languages. For that it needs a simple mechanism for i18n.

For now it would be enough to create a record with all keys (nested if applicable) and this will be filled by every language. And this translation can then be used to print out strings.

For now every language will simply be a part of the application, at a later point one can think about loading the translation on-demand to minimize application size.

Gamepath not existing -> Loses authentication

For now the initial settings screen is implemented in such a way, that it will override everything in appdata.
If the problem is just the missing gamepath (e.g. you moved your library) this is annoying, because you have to authenticate again.

Introduce unit tests

After the first functionality is ready, it is time to introduce unit tests to ensure correct functionality.

Prevent new install, if game is already installed

If a game is already installed, the installwindow should prevent another installation for now (with custom paths etc. this could be interesting but not for now).

If a game should be updated, you could use the "Upgrade games" button.

[Suggestion] Use an HttpListener for Authentication redirect

Hey it's me again ๐Ÿ˜

Not sure if the Authentications methods for GOG allow redirecting to custom URLs on localhost but here's my suggestion.

Inside the core Library add an Auth Module which has a type that uses an HttpListener to lift a really small webserver to listen for any visit. if the GOG authentication goes alright it should re-direct you to your "website" with the auth code on the URL, use that small webserver to grab the code and perform any persistence needed once the auth code is accepted and validated (either char length or something) you can just show a "You can close this window now, and you should be logged into Andromeda For Gog" and then stop the HttpListener I have put a small Sample here

and this is kind of what It can look like
image

If GOG accepts redirect URLs I think this could be a way to remove some windows from the app (I don't have anything against windows but I feel in FuncUI they kind of complicate stuff some times)

Let me know what you think

Improve building with fake

I did recently some build stuff and use FAKE again. I'm not fully satisfied though, because I have FAKE only installed inside of the projects and not globally for all.
I have to have a deeper look at how to use FAKE with solutions.

Add lutris integration

Have a look at lutris and try to figure out, if it is possible to add a game from outside to the lutris library.
All games installed by Andromeda should be added to lutris on linux systems, if lutris is present.

Use checksum to check file integrity

Atm if an installer is in the cache, it will not be redownloaded.
The checksum should used for two purposes:

  1. check, if the downloaded file was downloaded correctly
  2. check, if the cached installer has still the same checksum as it has to

Introduce the railway oriented programming approach in core

For now I often react to errors with a failwith in Andromeda.Core. This is not very defensive and can totally corrupt running of the application.
Therefore I should use railway oriented programming to let the typesystem help me more to consider that errors can happen and let me react in a nice, non-destructive way to them.

Add console commands

Because I removed the ConsoleUI completely, there is for now no way to use scripts with Andromeda.
I want to work around that by allowing console commands.

e.g.
./Andromeda should start Andromeda regularly but something like ./Andromeda install "CoolGame" could trigger a console command instead and install the game with settings of Andromeda.
This could also help restructuring the code.

[Settings] Automatic cache management

Installers are cached atm. Those cached version are never deleted automatically.
There should be settings and a command to do that automatically or manually.

Improve logging

The logger can be vastly improved.
Instead of implementing logging myself I should use e.g. the library NLog or Logary.
Also the GoG API should not use logging itself, it should give the errors back to the calling code in a usable way.

Download images outside of UI Thread

That the async download of the game images is performed inside of the UI Thread is not very nice. This should happen outside of it.
But it's okay for now I guess (hopefully with every newly installed game the download is fast enough).

[Linux] Make installation of windows installers via wine possible

At the moment you can only install games which have a linux version.

Maybe it would be cool, if you could also install windows installer in a new wine prefix and try to play them from there.
This should only be some basic "try wine"-mechanic, more complex stuff should be handled by better software for that e.g. Lutris.

Log output when starting games

Atm a normal user can not see why a game did not start. This should be logged in some console window (maybe with setting?) so that the user does not have to start andromeda again from console to see the error.

Have a look at single file publishing

Since .NET Core 3.0 it is possible to publish self-contained applications (like Andromeda is deployed atm) as a single file.
This enhances UX in my opinion, therefore I should try to use that as well.

Maybe an entry in the .fsproj is enough to support that.
<PublishSingleFile>true</PublishSingleFile>

Setting: Game folder

It should be possible to configure a different folder for GOG games.
You can think about automatic moving, if folder is changed but old folder holds games. Or about multiple game folders with a default one to install into.

Alternative sources

It should be possible to define folders, which can be searched to find an installer of a game.

Split components more

There are some possibilities to seperate more code to enhance the oversight over some Viewmodels and Components.

MainWindow -> GameBar & Toolbar (top) & Right stuff maybe

Implement uninstall functionality

Atm uninstallation can only be done manually by deleting the game folder.
There should be an uninstall option.
For this there should at first be checked, if there is a uninstall script and otherwise simply delete the game folder.
Maybe add a message that savegames will not be deleted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.