Skip to content

Commit

Permalink
[Feature] Download Manager (#1832)
Browse files Browse the repository at this point in the history
* First Download Manager poc

* Added progress chart

* yarn i18n

* Added download speed and disk speed to progress

* yarn i18n

* Frontend fixes

* fix build error

* Added abortcontrollers and removed kill method

* Fixed killing of game and installation

* Adapt sidebar progress

* css and layout changes (#1847)

* css and layout changes

* rounding disk and down values, layout improvements, colored disk and down labels

* Added isQueued status

* Removed hasStatus

* fix: stuck queued status

* fix: stop install on gamepage

* fix: proper refresh after install

* feat: remove from queue from gamecard

* i18n: updated keys

* fix: button label on gamepage

* chore: more i18n

* Merge fixes

* yarn i18n

* Merge fixes (2)

* Replace rechart with react-chartjs

* Revert "Replace rechart with react-chartjs"

This reverts commit 176cbc0.

* feat: gameList header component

* feat: show list of finished elements

* i18n: updated keys

* Log down and disk speed aswell

* Backend fixes/improvments

* fix: dm back route

* feat: clear completed list button

* fix: dont show installed on finished list

* i18n: more keys

* fix: move done status do be

* feat: UI adjustments

* fix: import

* chore: version +  flatpak file

* fix: PR comments

* fix: more comments

* feat: add status to finished element

* fix: merge fixes

* feat: show canceled elements at the end of the list

* i18n: updated keys

* Remove unnecessary try-catch

* chore: remove unecessary try catch

* fix: installDialog width

* chore: add try/catch around json parse

* i18n: fixes after merge

* fix: sorting and status

* fix: pr comments

* other: fix missing gaminfo on install dialog from gamepage

Co-authored-by: Brett <27568879+BrettCleary@users.noreply.github.com>
Co-authored-by: Flavio F Lima <flavioislima@gmail.com>
Co-authored-by: Mathis Dröge <mathis.droege@ewe.net>
  • Loading branch information
4 people committed Oct 26, 2022
1 parent a3eb82b commit 1e01cb2
Show file tree
Hide file tree
Showing 135 changed files with 3,332 additions and 572 deletions.
219 changes: 63 additions & 156 deletions flatpak/local.heroic.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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"
}
},
"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

0 comments on commit 1e01cb2

Please sign in to comment.