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

[General] Beta-Feature: GOG implementation #872

Merged
merged 64 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
d9177fa
Fix wine prefixes not being created
imLinguin Dec 31, 2021
3586733
Merge branch 'main' into main
Jan 2, 2022
a690bcc
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 2, 2022
dc1fbb0
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 5, 2022
ee0bdd6
Add sidebar GOG button temporarly. Handle login and library sync
imLinguin Jan 5, 2022
1c225d3
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 6, 2022
df1bf00
Update with latest changes
imLinguin Jan 6, 2022
8701177
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 7, 2022
24f6803
Update to latest fixes
imLinguin Jan 7, 2022
cdfcc75
Getting images using gamesdb, displaying library
imLinguin Jan 7, 2022
e19b473
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 8, 2022
45cf279
Pull from upstream
imLinguin Jan 8, 2022
eda57b1
Add gog API endpoint, display requirements
imLinguin Jan 8, 2022
da125a8
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 10, 2022
e1d66ec
Pull latest changes
imLinguin Jan 10, 2022
c9c8e9c
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 14, 2022
16c6c3f
Fetch gamepad update
imLinguin Jan 14, 2022
69253f6
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 17, 2022
c69b558
Pull latest main
imLinguin Jan 17, 2022
9639af7
Basic heroic-gogdl integration (installing, canceling)
imLinguin Jan 22, 2022
ce22792
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 25, 2022
c3b9dc5
Pull latest changes
imLinguin Jan 25, 2022
5479aae
Update logging to new naming
imLinguin Jan 25, 2022
527b03f
Launching GOG games, move launching to one unified function
imLinguin Jan 29, 2022
e1b7c2a
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Jan 29, 2022
67a36e0
Merge from upstream
imLinguin Jan 29, 2022
6d40928
Fix not enough space issue and library state after authenticating
imLinguin Jan 29, 2022
acf593a
Uninstalling, Repairing
imLinguin Feb 1, 2022
a54bb9c
Fix gogdl not found in bundled app
imLinguin Feb 1, 2022
98d9ea2
Make login look like in Galaxy client
imLinguin Feb 2, 2022
ae304cd
Update gogdl, Add moving games
imLinguin Feb 4, 2022
a40d27d
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Feb 4, 2022
5a92f80
Pull latest changes from upstream
imLinguin Feb 4, 2022
0f0bd05
Add language select in InstallModal, allow importing games
imLinguin Feb 6, 2022
50a3bfb
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Feb 6, 2022
5d72a38
Pull latest upstream
imLinguin Feb 6, 2022
cc5840e
Fix linting
imLinguin Feb 6, 2022
e72ec0e
Load images and game descriptions from gamesdb
imLinguin Feb 7, 2022
f8e49fe
Update gogdl, fix removing multiple games from installed config
imLinguin Feb 8, 2022
c214065
Updating, changing install path, prevent convertToString from failing
imLinguin Feb 9, 2022
c84bb04
Add mac and windows gogdl builds, support for most known setup instru…
imLinguin Feb 13, 2022
cdf416f
Login manager gog warnings get gog shortcut icons
imLinguin Feb 15, 2022
977097d
Support libraries with more than 100 games :fearful:
imLinguin Feb 16, 2022
5d70d75
Linux native titles support (without updating yet)
imLinguin Feb 16, 2022
3a76ece
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Feb 17, 2022
0dc649b
Update gogdl, add external login for epic, add runner indicator, merge
imLinguin Feb 17, 2022
108472d
Display language options for linux installers, update linux natives
imLinguin Feb 18, 2022
8db0cff
Merge branch 'main' into gog_support
imLinguin Feb 18, 2022
d11a6c8
Resolve review suggestions
imLinguin Feb 18, 2022
c2d44f6
MacOS fixes
imLinguin Feb 19, 2022
22edb9a
[Fix] Windows titles not launching on MacOS
imLinguin Feb 20, 2022
ec7ccea
Review changes, generate i18n keys
imLinguin Feb 20, 2022
04cf669
Merge branch 'Heroic-Games-Launcher:main' into main
imLinguin Feb 20, 2022
6789888
Merge with upstream main
imLinguin Feb 20, 2022
1db4088
[Fix] Linux native games not installing correctly
imLinguin Feb 20, 2022
209490d
Add use Steam runtime setting, fix installed state not refreshing (pr…
imLinguin Feb 21, 2022
65af599
Generate i18n keys
imLinguin Feb 21, 2022
4e5f347
Better importing,Linux DLC support,minor bugs fix
imLinguin Feb 22, 2022
38daf84
Fix merge conflicts
imLinguin Feb 22, 2022
a5a5420
Hide Linux platform filter for non-GOG games
imLinguin Feb 22, 2022
e88b8e0
Pull upstream
imLinguin Feb 22, 2022
4361f59
Fix errors on Windows, make shortcuts on windows display Primary task…
imLinguin Feb 22, 2022
1cd11b1
Apply review suggestions
imLinguin Feb 23, 2022
f1cbab0
Resolve Branch out-of date
imLinguin Feb 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions electron/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,22 @@ function getLegendaryBin() {
return bin
}

function getGOGdlBin() {
const bin = fixAsarPath(
join(
__dirname,
'/bin/',
process.platform,
isWindows ? '/gogdl.exe' : '/gogdl'
)
)
logInfo(`Location: ${bin}`, LogPrefix.Gog)
return bin
}

const isMac = platform() === 'darwin'
const isWindows = platform() === 'win32'
const isLinux = platform() == 'linux'
const isFlatpak = execPath === '/app/main/heroic'
const currentGameConfigVersion: GameConfigVersion = 'v0'
const currentGlobalConfigVersion: GlobalConfigVersion = 'v0'
Expand All @@ -57,13 +71,18 @@ const heroicInstallPath = isWindows
? `${home}\\Games\\Heroic`
: `${home}/Games/Heroic`
const legendaryBin = getLegendaryBin()
const gogdlBin = getGOGdlBin()
const icon = fixAsarPath(join(__dirname, '/icon.png'))
const iconDark = fixAsarPath(join(__dirname, '/icon-dark.png'))
const iconLight = fixAsarPath(join(__dirname, '/icon-light.png'))
const installed = `${legendaryConfigPath}/installed.json`
const libraryPath = `${legendaryConfigPath}/metadata/`
const loginUrl =
const fallBackImage =
'https://user-images.githubusercontent.com/26871415/103480183-1fb00680-4dd3-11eb-9171-d8c4cc601fba.jpg'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this use an image inside the project? in case github is down or something weird

const epicLoginUrl =
'https://www.epicgames.com/id/login?redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fid%2Fapi%2Fredirect'
const gogLoginUrl =
'https://auth.gog.com/auth?client_id=46899977096215655&redirect_uri=https%3A%2F%2Fembed.gog.com%2Fon_login_success%3Forigin%3Dclient&response_type=code&layout=galaxy'
const sidInfoUrl =
'https://github.com/flavioislima/HeroicGamesLauncher/issues/42'
const heroicGithubURL =
Expand Down Expand Up @@ -139,13 +158,17 @@ export {
installed,
isMac,
isWindows,
isLinux,
legendaryBin,
gogdlBin,
legendaryConfigPath,
libraryPath,
loginUrl,
epicLoginUrl,
gogLoginUrl,
patreonPage,
sidInfoUrl,
supportURL,
fallBackImage,
userInfo,
weblateUrl,
wikiLink
Expand Down
14 changes: 8 additions & 6 deletions electron/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ import {
GameSettings,
InstallArgs,
InstallInfo,
LaunchResult
LaunchResult,
Runner
} from './types'

type Runner = 'legendary' | 'gog'
abstract class Game {
public static get(appName: string, runner: Runner = 'legendary') {
public static get(
appName: string,
runner: Runner = 'legendary'
): LegendaryGame | GOGGame {
if (runner === 'legendary') {
return LegendaryGame.get(appName)
} else if (runner === 'gog') {
logWarning('GOG integration is unimplemented.', LogPrefix.Gog)
return null
return GOGGame.get(appName)
}
}

Expand All @@ -39,7 +41,7 @@ abstract class Game {
}

import { LegendaryGame } from './legendary/games'
import { LogPrefix, logWarning } from './logger/logger'
import { BrowserWindow } from 'electron'
import { GOGGame } from './gog/games'

export { Game, Runner }
Loading