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

[Feature] Download Manager #1832

Merged
merged 59 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
29485f4
First Download Manager poc
Nocccer Sep 22, 2022
c72616b
Added progress chart
Nocccer Sep 22, 2022
e83d963
yarn i18n
Nocccer Sep 22, 2022
102a97a
Added download speed and disk speed to progress
Nocccer Sep 23, 2022
06e8f15
yarn i18n
Nocccer Sep 23, 2022
4cadd87
Frontend fixes
Nocccer Sep 24, 2022
0186746
fix build error
Nocccer Sep 24, 2022
eec1003
Added abortcontrollers and removed kill method
Nocccer Sep 25, 2022
688f32f
Fixed killing of game and installation
Nocccer Sep 26, 2022
bd9aef3
Adapt sidebar progress
Nocccer Sep 26, 2022
436a9b3
css and layout changes (#1847)
BrettCleary Sep 27, 2022
55b5b0f
Added isQueued status
Nocccer Sep 28, 2022
7e139d3
Removed hasStatus
Nocccer Sep 28, 2022
1fd3d47
fix: stuck queued status
flavioislima Oct 3, 2022
d0b8e28
fix: stop install on gamepage
flavioislima Oct 3, 2022
2f7e365
fix: proper refresh after install
flavioislima Oct 3, 2022
03d3eb3
feat: remove from queue from gamecard
flavioislima Oct 3, 2022
311f7f6
i18n: updated keys
flavioislima Oct 3, 2022
25aa604
fix: button label on gamepage
flavioislima Oct 3, 2022
a7cda04
chore: more i18n
flavioislima Oct 3, 2022
c635420
Merge branch 'beta' into feat/download-manager
Nocccer Oct 3, 2022
c6c6c0e
Merge fixes
Nocccer Oct 3, 2022
db47003
yarn i18n
Nocccer Oct 3, 2022
3af5124
Merge fixes (2)
Nocccer Oct 3, 2022
176cbc0
Replace rechart with react-chartjs
Nocccer Oct 3, 2022
b4958cf
Revert "Replace rechart with react-chartjs"
Nocccer Oct 4, 2022
7ac2a34
feat: gameList header component
flavioislima Oct 4, 2022
4393a4f
feat: show list of finished elements
flavioislima Oct 4, 2022
d0ca4a7
Merge branch 'feat/download-manager' of github.com:Heroic-Games-Launc…
flavioislima Oct 4, 2022
23859ea
i18n: updated keys
flavioislima Oct 4, 2022
51bbd75
Log down and disk speed aswell
Nocccer Oct 4, 2022
0fe6942
Backend fixes/improvments
Nocccer Oct 4, 2022
a4b872a
fix: dm back route
flavioislima Oct 4, 2022
a32af8f
feat: clear completed list button
flavioislima Oct 4, 2022
5834d98
fix: dont show installed on finished list
flavioislima Oct 4, 2022
3cc40d7
i18n: more keys
flavioislima Oct 4, 2022
4de2885
fix: move done status do be
flavioislima Oct 4, 2022
85a9401
feat: UI adjustments
flavioislima Oct 4, 2022
7300741
Merge branch 'beta' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
flavioislima Oct 8, 2022
ca6df2e
fix: import
flavioislima Oct 8, 2022
accb901
chore: version + flatpak file
flavioislima Oct 11, 2022
24a0fc9
Merge branch 'beta' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
flavioislima Oct 11, 2022
f9f0308
fix: PR comments
flavioislima Oct 17, 2022
b51eb3f
fix: more comments
flavioislima Oct 17, 2022
4e56981
feat: add status to finished element
flavioislima Oct 17, 2022
0a60e9c
Merge branch 'beta' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
flavioislima Oct 25, 2022
a1e692f
fix: merge fixes
flavioislima Oct 25, 2022
c5478d7
feat: show canceled elements at the end of the list
flavioislima Oct 25, 2022
2911dc5
i18n: updated keys
flavioislima Oct 25, 2022
288e8de
Remove unnecessary try-catch
CommandMC Oct 25, 2022
6c86cc0
chore: remove unecessary try catch
flavioislima Oct 25, 2022
fb45f39
fix: installDialog width
flavioislima Oct 25, 2022
9495036
Merge branch 'feat/download-manager' of github.com:Heroic-Games-Launc…
flavioislima Oct 25, 2022
82613ca
chore: add try/catch around json parse
flavioislima Oct 26, 2022
8606acd
Merge branch 'beta' of github.com:Heroic-Games-Launcher/HeroicGamesLa…
flavioislima Oct 26, 2022
d54586f
i18n: fixes after merge
flavioislima Oct 26, 2022
359915c
fix: sorting and status
flavioislima Oct 26, 2022
79fc0c6
fix: pr comments
flavioislima Oct 26, 2022
a934dfc
other: fix missing gaminfo on install dialog from gamepage
flavioislima Oct 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
219 changes: 63 additions & 156 deletions flatpak/local.heroic.yml
@@ -1,127 +1,126 @@
id: com.heroicgameslauncher.hgl
sdk: org.freedesktop.Sdk
runtime: org.freedesktop.Platform
runtime-version: '21.08'
runtime-version: '22.08'
base: org.electronjs.Electron2.BaseApp
base-version: '21.08'
base-version: '22.08'
command: heroic-run
separate-locales: false

cleanup:
- /share/docs
- /share/man

sdk-extensions:
- org.freedesktop.Sdk.Compat.i386
- org.freedesktop.Sdk.Extension.toolchain-i386

finish-args:
- --allow=devel
- --allow=multiarch
- --device=all
- --env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin:/app/bin/heroic/resources/app.asar.unpacked/build/bin/linux
- --filesystem=xdg-data/lutris:rw
- --filesystem=xdg-data/Steam:rw
- --filesystem=xdg-data/applications:rw
- --filesystem=~/.steam:rw
- --filesystem=~/Games/Heroic:create
- --filesystem=~/.var/app/com.valvesoftware.Steam:rw
- --filesystem=xdg-documents
- --filesystem=xdg-desktop
# should fix access to SD card on the deck
- --filesystem=/run/media
# should fix steamdeck controler navigation
- --filesystem=/run/udev:ro
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland
- --socket=pulseaudio
- --allow=multiarch
- --allow=devel
- --device=all
- --talk-name=org.freedesktop.Notifications
- --persist=.wine
- --filesystem=host
- --env=LD_LIBRARY_PATH=/app/lib:/app/lib32
- --env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin/
- --env=GST_PLUGIN_SYSTEM_PATH=/app/lib/gstreamer-1.0:/app/lib32/gstreamer-1.0:/usr/lib/extensions/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0:/usr/lib/i386-linux-gnu/gstreamer-1.0


add-extensions:
org.freedesktop.Platform.Compat.i386:
directory: lib/i386-linux-gnu
version: '21.08'
version: '22.08'

org.freedesktop.Platform.Compat.i386.Debug:
directory: lib/debug/lib/i386-linux-gnu
version: '21.08'
version: '22.08'
no-autodownload: true

org.freedesktop.Platform.GL32:
directory: lib/i386-linux-gnu/GL
version: '1.4'
versions: 21.08;1.4
versions: 22.08;1.4
subdirectories: true
no-autodownload: true
autodelete: false
add-ld-path: lib
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d;OpenCL/vendors;lib/dri;lib/d3d;vulkan/explicit_layer.d;vulkan/implicit_layer.d
download-if: active-gl-driver
enable-if: active-gl-driver

x-compat-i386-opts: &compat_i386_opts
prepend-pkg-config-path: /app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig
ldflags: -L/app/lib32
append-path: /usr/lib/sdk/toolchain-i386/bin
env:
CC: i686-unknown-linux-gnu-gcc
CXX: i686-unknown-linux-gnu-g++
libdir: /app/lib32

org.freedesktop.Platform.VAAPI.Intel.i386:
directory: lib/i386-linux-gnu/dri/intel-vaapi-driver
version: '22.08'
versions: '22.08'
autodelete: false
no-autodownload: true
add-ld-path: lib
download-if: have-intel-gpu
autoprune-unless: have-intel-gpu

com.valvesoftware.Steam.Utility:
subdirectories: true
subdirectories: true
directory: utils
version: stable
versions: stable;beta;test
add-ld-path: lib
merge-dirs: bin
no-autodownload: true
autodelete: true

org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
add-ld-path: .
version: '21.08'
no-autodownload: true
autodelete: false

org.freedesktop.Platform.ffmpeg_full.i386:
directory: lib32/ffmpeg
add-ld-path: .
version: '21.08'
no-autodownload: true
autodelete: false

org.freedesktop.Platform.VAAPI.Intel.i386:
directory: lib/i386-linux-gnu/dri/intel-vaapi-driver
version: '21.08'
versions: '21.08'
autodelete: false
no-autodownload: true
add-ld-path: lib
download-if: have-intel-gpu
autoprune-unless: have-intel-gpu

modules:
- name: unappimage
buildsystem: simple
build-commands:
- make -C squashfs-tools -j ${FLATPAK_BUILDER_N_JOBS} install INSTALL_DIR=/app/bin
sources:
- type: git
url: https://github.com/refi64/unappimage
commit: d7f86f2a0d7ec3a69211125207d5f127386b849a

# --- Tools ---
- name: vulkan-tools
buildsystem: cmake-ninja
config-opts:
- -DGLSLANG_INSTALL_DIR=/app
- -DVULKAN_HEADERS_INSTALL_DIR=/app
- -DCMAKE_BUILD_TYPE=Release
sources:
- type: archive
url: https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/v1.2.186.tar.gz
sha256: 8ba0e21e8de0b70d31985d251d11150efee71266875262798784e9d1ec9b717b
- type: git
url: https://github.com/KhronosGroup/Vulkan-Tools.git
tag: sdk-1.3.224.1

- name: gamemode
buildsystem: meson
config-opts: &gamemode_opts
- -Dwith-systemd=false
- -Dwith-daemon=false
- -Dwith-examples=false
- -Dwith-util=false
- -Dwith-sd-bus-provider=no-daemon
sources: &gamemode_sources
- type: archive
url: https://github.com/FeralInteractive/gamemode/releases/download/1.6.1/gamemode-1.6.1.tar.xz
sha256: 10c2a3f142eae472f5a09e42616e38c666c05b25ca3e61e562a543bb3fda66c5
- type: git
url: https://github.com/FeralInteractive/gamemode.git
tag: '1.7'
commit: 4dc99dff76218718763a6b07fc1900fa6d1dafd9
x-checker-data:
type: git

- name: gamemode-32bit
build-options:
arch:
x86_64: &compat_i386_opts
x86_64: *compat_i386_opts
buildsystem: meson
config-opts: *gamemode_opts
sources: *gamemode_sources
Expand All @@ -132,23 +131,25 @@ modules:
- install -Dm755 data/gamemoderun -t /app/bin
sources: *gamemode_sources

# --- Heroic ---
- name: heroic
buildsystem: simple
build-commands:
- unappimage Heroic-2.4.0.AppImage
- rm Heroic-2.4.0.AppImage
- chmod +x Heroic-*.AppImage
- ./Heroic-*.AppImage --appimage-extract
- mv squashfs-root /app/bin/heroic
- install -D heroic-run -t /app/bin
- rm Heroic-2.5.0-beta.1.AppImage
sources:
- type: script
dest-filename: heroic-run
commands:
- zypak-wrapper /app/bin/heroic/heroic "$@"

- type: file
filename: Heroic-2.4.0.AppImage
filename: Heroic-2.5.0-beta.1.AppImage
# put right path here
path: ../dist/Heroic-2.4.0.AppImage
path: ../dist/Heroic-2.5.0-beta.1.AppImage

- name: platform-bootstrap
buildsystem: simple
Expand Down Expand Up @@ -180,49 +181,6 @@ modules:
- type: file
path: com.heroicgameslauncher.hgl.desktop

- name: p7zip
no-autogen: true
build-options:
strip: true
make-args:
- all2
- OPTFLAGS=-O2 -g -std=gnu++14
- DEST_HOME=$(FLATPAK_DEST)
- DEST_BIN=$(FLATPAK_DEST)/bin
- DEST_SHARE=$(FLATPAK_DEST)/lib/p7zip
- DEST_MAN=$(FLATPAK_DEST)/share/man
make-install-args:
- DEST_HOME=$(FLATPAK_DEST)
- DEST_BIN=$(FLATPAK_DEST)/bin
- DEST_SHARE=$(FLATPAK_DEST)/lib/p7zip
- DEST_MAN=$(FLATPAK_DEST)/share/man
sources:
- type: archive
url: "https://downloads.sourceforge.net/p7zip/p7zip_16.02_src_all.tar.bz2"
sha256: 5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f
- type: patch
paths:
- patches/p7zip/gcc10-conversion.patch
- type: shell
only-arches:
- "x86_64"
commands:
- ln -sf makefile.linux_amd64_asm makefile.machine
- type: shell
only-arches:
- "i386"
commands:
- ln -sf makefile.linux_x86_asm_gcc_4.X makefile.machine
modules:
- name: yasm
buildsystem: cmake-ninja
sources:
- type: archive
url: "https://github.com/yasm/yasm/archive/v1.3.0.tar.gz"
sha256: f708be0b7b8c59bc1dbe7134153cd2f31faeebaa8eec48676c10f972a1f13df3
cleanup:
- "*"

- name: cabextract
build-options:
strip: true
Expand All @@ -231,17 +189,6 @@ modules:
url: "https://www.cabextract.org.uk/cabextract-1.9.1.tar.gz"
sha256: afc253673c8ef316b4d5c29cc4aa8445844bee14afffbe092ee9469405851ca7

- name: unrar
no-autogen: true
build-options:
strip: true
make-install-args:
- DESTDIR=$(FLATPAK_DEST)
sources:
- type: archive
url: "https://www.rarlab.com/rar/unrarsrc-5.8.3.tar.gz"
sha256: 3591685c8f5bbcb0be09de3d0a0544adb88966b9cccb80986f6cd2b534fd91a6

- name: binutils-ar
buildsystem: simple
build-options:
Expand All @@ -250,46 +197,6 @@ modules:
- install -Dm755 /usr/bin/ar -t ${FLATPAK_DEST}/bin/
- install -Dm755 /usr/lib/$(gcc -print-multiarch)/libbfd-*.so -t ${FLATPAK_DEST}/lib/

- name: perl
no-autogen: true
config-opts:
- "-des"
cleanup:
- "*.pod"
- "/bin/perl5*"
- "/bin/c2ph"
- "/bin/corelist"
- "/bin/cpan"
- "/bin/enc2xs"
- "/bin/encguess"
- "/bin/h2*"
- "/bin/instmodsh"
- "/bin/json_pp"
- "/bin/libnetcfg"
- "/bin/perlbug"
- "/bin/perldoc"
- "/bin/perlthanks"
- "/bin/piconv"
- "/bin/pl2pm"
- "/bin/pod*"
- "/bin/prove"
- "/bin/pstruct"
- "/bin/ptar*"
- "/bin/shasum"
- "/bin/splain"
- "/bin/xsubpp"
- "/bin/zipdetails"
sources:
- type: archive
url: "https://www.cpan.org/src/5.0/perl-5.32.0.tar.gz"
sha256: efeb1ce1f10824190ad1cadbcccf6fdb8a5d37007d0100d2d9ae5f2b5900c0b4
- type: script
dest-filename: configure
commands:
- "exec ./configure.gnu $@"
post-install:
- "find ${FLATPAK_DEST}/lib/perl5 -type f -exec chmod u+w {} \\;"

- name: aria2
config-opts:
- --disable-libaria2
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -157,6 +157,7 @@
"react-dom": "17",
"react-i18next": "^11.16.7",
"react-router-dom": "^6.3.0",
"recharts": "^2.1.14",
"shlex": "^2.1.2",
"short-uuid": "^4.2.0",
"simple-keyboard": "^3.4.136",
Expand Down
Binary file modified public/bin/darwin/gogdl
Binary file not shown.
Binary file modified public/bin/linux/gogdl
Binary file not shown.
Binary file modified public/bin/win32/gogdl.exe
Binary file not shown.
11 changes: 11 additions & 0 deletions public/locales/az/gamepage.json
Expand Up @@ -55,6 +55,9 @@
"import": "İdxal Oyunu",
"install": "Yüklemek",
"no-path-selected": "No path selected",
"queue": {
"remove": "Remove from Queue"
},
"remove_from_favourites": "Sevimlilərdən Sil",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
Expand Down Expand Up @@ -126,6 +129,13 @@
"login": "Log in",
"title": "You are NOT logged in"
},
"Open": "",
"queue": {
"label": {
"canceled": "Download Canceled",
"remove": "Remove from download manager"
flavioislima marked this conversation as resolved.
Show resolved Hide resolved
}
},
"report_problem": "Bu oyunu idarə edən problemi bildirin",
"sdl": {
"title": "Quraşdırılacaq komponentləri seçin"
Expand Down Expand Up @@ -156,6 +166,7 @@
"moving": "Quraşdırma köçürülür, zəhmət olmasa gözləyin",
"notinstalled": "Bu oyun quraşdırılmayıb",
"processing": "Fayllar emal olunur, gözləyin",
"queued": "Queued",
"reparing": "Oyun Təmir edilir, zəhmət olmasa gözləyin",
"totalDownloaded": "Toplam Endirilib",
"updating": "Oyun Yenilənir"
Expand Down