-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
[GOG]: Refactor almost all GOG components #3020
Merged
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
2fd3101
initial changes to downloading
imLinguin c844302
feat: changelog with html sanitizer, gogdl config sandboxing
imLinguin e8c6b65
ui for gog modfiy install, and minor additions for obtaining install …
imLinguin 7e3f61b
split reusable frontend components, add Cyberpunk REDmod support, gog…
imLinguin c1dd3e2
re-enable playtime sync
imLinguin f1e1130
feat: private branches, small fixes to redMod
imLinguin d2aff7e
impov: redmod windows support
imLinguin d9e1f75
feat: redistributable management
imLinguin 9a79fa2
feat: support instruction parsing compliant with backup installers
imLinguin d766c20
fix: lint
imLinguin fe1788d
improv: improvements to backup installers interop
imLinguin dc0d230
feat: setup should work on windows
imLinguin 21dda3a
add very important comment
imLinguin 4489c1f
improv: avoid refreshing library too much
imLinguin feed9b5
Pull upstream main changes
imLinguin 7b7b758
i18n: generate locales
imLinguin c138cba
chore: remove merge leftovers
imLinguin 4770278
linux: default to sniper steam runtime
imLinguin d1769f8
improv: use steam_compat_install_path env var on Linux (wine, proton …
imLinguin 78e0fce
feat: add redist state
imLinguin 5803351
fix: consistent styling of game card play button
imLinguin bac4914
generate i18n
imLinguin 667bf45
improv: hide spammy redist update notifications, change ok to apply
imLinguin 4da9a1b
improv: get accurate data for linux native games
imLinguin 3964599
chore: update gogdl binaries
imLinguin 7d9dc00
fix: lint
imLinguin b4e92ce
fix: error on download modal for Linux native games
imLinguin 28f31f0
shortcuts: prefer icons shipped with games
imLinguin 33f8407
fix: avoid emptying game library if some library page requests fail
imLinguin defafb1
tech: don't pass onIconClick prop to input element
imLinguin 0a60943
use run verb for uninstall, make clearer script interpreter error
imLinguin 2f77bc4
Merge branch 'main' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
imLinguin d8c023e
update gogdl with windows and mac fixes
imLinguin 4a47773
Merge branch 'main' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
imLinguin 4b23ba2
don't create prefix on uninstall
imLinguin 98cecbe
fix: loading indicator bug
imLinguin 4cd62b5
fix: uninstall status change, redmod error detection
imLinguin 9c62eaf
make gogdl use redmod config from info file (hacky)
imLinguin 42a8fd2
avoid overwriting metadata for paused installations
imLinguin 719b31c
Merge branch 'main' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
imLinguin b30564b
Pull upstream main
imLinguin 3134fa6
fix: move from Collapsable to Tabs in modifyinstall
imLinguin 625953d
update gogdl with xdelta patching
imLinguin e8b516b
improv: make modify install same size as settings modal
imLinguin e86c196
fix: re-add offline installers changes detection
imLinguin 20bcc34
Merge branch 'main' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
imLinguin 9e093df
fix: patching percentage going over 100%
imLinguin 4051518
Pull upstream main
imLinguin e2c271b
fix: branch password style
imLinguin fd5520e
improv: avoid retrying to fetch game data on 404 response
imLinguin 6916885
feat: add ability to select beta channel during install
imLinguin eb3a2f8
improv: use Intl instead of conspired/i18n-iso-languages
imLinguin 474ca99
Pull upstream
imLinguin e62e545
tech: gogdl update
imLinguin 476c2cc
linux: new download method
imLinguin a7bcaff
improv: don't run uninstall exe if we are going to remove the prefix
imLinguin 05f707f
linux: support symlinks - gogdl update
imLinguin a379515
fix: exception when some images are not defined
imLinguin 7ae8b57
fix: redist not being installed sometimes
imLinguin 2680b41
fix: library refresh + game push race condition
imLinguin f1bdf6c
Pull upstream main
imLinguin d741c03
Resolve conflicts afer merging #3393
imLinguin abf4ddf
fix: let the uninstall command know if we are removing the prefix
imLinguin 551abdb
:shushing_face:
imLinguin 9cd8b35
Pull upstream main v2.12.0
imLinguin 4ee3548
Merge branch 'main' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
imLinguin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,12 +176,14 @@ | |
"json5": "2.2.3", | ||
"plist": "3.0.5", | ||
"react": "18.2.0", | ||
"react-beautiful-dnd": "^13.1.1", | ||
"react-dom": "18.2.0", | ||
"react-i18next": "12.2.0", | ||
"react-markdown": "8.0.5", | ||
"react-router-dom": "6.9.0", | ||
"recharts": "2.4.3", | ||
"sanitize-filename": "1.6.3", | ||
"sanitize-html": "^2.11.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GOG's changelogs are HTML, we sanitize any script or other crap (just in case) with this |
||
"semver": "7.5.2", | ||
"shlex": "2.1.2", | ||
"short-uuid": "4.2.2", | ||
|
@@ -237,8 +239,10 @@ | |
"@types/node": "18.15.0", | ||
"@types/plist": "3.0.2", | ||
"@types/react": "18.2.34", | ||
"@types/react-beautiful-dnd": "13.1.4", | ||
"@types/react-dom": "18.2.14", | ||
"@types/react-router-dom": "5.3.3", | ||
"@types/sanitize-html": "2.9.0", | ||
"@types/tmp": "0.2.3", | ||
"@typescript-eslint/eslint-plugin": "5.47.1", | ||
"@typescript-eslint/parser": "5.47.1", | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { sendFrontendMessage } from '../main_window' | |
import { callAbortController } from 'backend/utils/aborthandler/aborthandler' | ||
import { notify } from '../dialog/dialog' | ||
import i18next from 'i18next' | ||
import { createRedistDMQueueElement } from 'backend/storeManagers/gog/redist' | ||
|
||
const downloadManager = new TypeCheckedStoreBackend('downloadManager', { | ||
cwd: 'store', | ||
|
@@ -115,19 +116,41 @@ async function addToQueue(element: DMQueueElement) { | |
const elements = downloadManager.get('queue', []) | ||
|
||
const elementIndex = elements.findIndex( | ||
(el) => el.params.appName === element.params.appName | ||
(el) => | ||
el.params.appName === element.params.appName && | ||
el.params.runner === element.params.runner | ||
Comment on lines
118
to
+121
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added runner check to avoid collisions |
||
) | ||
|
||
if (elementIndex >= 0) { | ||
elements[elementIndex] = element | ||
} else { | ||
const installInfo = await libraryManagerMap[ | ||
element.params.runner | ||
].getInstallInfo(element.params.appName, element.params.platformToInstall) | ||
].getInstallInfo( | ||
element.params.appName, | ||
element.params.platformToInstall, | ||
element.params.branch, | ||
element.params.build | ||
) | ||
|
||
element.params.size = installInfo?.manifest?.download_size | ||
? getFileSize(installInfo?.manifest?.download_size) | ||
: '?? MB' | ||
|
||
if ( | ||
element.params.runner === 'gog' && | ||
element.params.platformToInstall.toLowerCase() === 'windows' && | ||
installInfo && | ||
'dependencies' in installInfo.manifest | ||
) { | ||
const newDependencies = installInfo.manifest.dependencies | ||
if (newDependencies?.length) { | ||
// create redist element | ||
const redistElement = createRedistDMQueueElement() | ||
redistElement.params.dependencies = newDependencies | ||
elements.push(redistElement) | ||
} | ||
} | ||
elements.push(element) | ||
} | ||
|
||
|
@@ -226,6 +249,12 @@ function stopCurrentDownload() { | |
// notify the user based on the status of the element and the status of the queue | ||
function processNotification(element: DMQueueElement, status: DMStatus) { | ||
const action = element.type === 'install' ? 'Installation' : 'Update' | ||
if ( | ||
element.params.runner === 'gog' && | ||
element.params.appName === 'gog-redist' | ||
) { | ||
return | ||
} | ||
const { title } = gameManagerMap[element.params.runner].getGameInfo( | ||
element.params.appName | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drag&Drop for reordering of mods for REDMod integration, I believe we can re-use that in download queue