Skip to content

Commit 2114eb1

Browse files
authored
Tech: gogdl update (#3541)
* tech: update gogdl * gog: trigger redist update if redist path doesn't exist before installing the game * add fallback to dependencies just in case
1 parent bda0871 commit 2114eb1

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

public/bin/darwin/gogdl

16.9 KB
Binary file not shown.

public/bin/linux/gogdl

17.5 KB
Binary file not shown.

public/bin/win32/gogdl.exe

80.6 KB
Binary file not shown.

src/backend/downloadmanager/downloadqueue.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { callAbortController } from 'backend/utils/aborthandler/aborthandler'
99
import { notify } from '../dialog/dialog'
1010
import i18next from 'i18next'
1111
import { createRedistDMQueueElement } from 'backend/storeManagers/gog/redist'
12+
import { existsSync } from 'fs'
13+
import { gogRedistPath } from 'backend/constants'
1214

1315
const downloadManager = new TypeCheckedStoreBackend('downloadManager', {
1416
cwd: 'store',
@@ -141,8 +143,8 @@ async function addToQueue(element: DMQueueElement) {
141143
installInfo &&
142144
'dependencies' in installInfo.manifest
143145
) {
144-
const newDependencies = installInfo.manifest.dependencies
145-
if (newDependencies?.length) {
146+
const newDependencies = installInfo.manifest.dependencies || []
147+
if (newDependencies?.length || !existsSync(gogRedistPath)) {
146148
// create redist element
147149
const redistElement = createRedistDMQueueElement()
148150
redistElement.params.dependencies = newDependencies

0 commit comments

Comments
 (0)