Github messages for voidlinux
 help / color / mirror / Atom feed
From: sirkhancision <sirkhancision@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: HeroicGamesLauncher-2.8.0
Date: Tue, 27 Jun 2023 23:18:43 +0200	[thread overview]
Message-ID: <20230627211843.OBZme0Koh72v0fXihBO6adIEACAwnEMU8bL1Y-R-jKs@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44207@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

There is an updated pull request by sirkhancision against master on the void-packages repository

https://github.com/sirkhancision/void-packages HeroicGamesLauncher
https://github.com/void-linux/void-packages/pull/44207

New package: HeroicGamesLauncher-2.8.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc


A patch file from https://github.com/void-linux/void-packages/pull/44207.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-HeroicGamesLauncher-44207.patch --]
[-- Type: text/x-diff, Size: 5416 bytes --]

From c9045cf4e377063dad5591cb65e18f08ae8143d7 Mon Sep 17 00:00:00 2001
From: sirkhancision <jsantiago12tone@gmail.com>
Date: Wed, 31 May 2023 23:02:43 -0300
Subject: [PATCH] New package: HeroicGamesLauncher-2.8.0

---
 srcpkgs/HeroicGamesLauncher/files/heroic-run  |  3 ++
 .../patches/electron-is-dev-env.patch         | 13 +++++
 srcpkgs/HeroicGamesLauncher/template          | 53 +++++++++++++++++++
 srcpkgs/heroic-gogdl/template                 | 20 +++++++
 4 files changed, 89 insertions(+)
 create mode 100644 srcpkgs/HeroicGamesLauncher/files/heroic-run
 create mode 100644 srcpkgs/HeroicGamesLauncher/patches/electron-is-dev-env.patch
 create mode 100644 srcpkgs/HeroicGamesLauncher/template
 create mode 100644 srcpkgs/heroic-gogdl/template

diff --git a/srcpkgs/HeroicGamesLauncher/files/heroic-run b/srcpkgs/HeroicGamesLauncher/files/heroic-run
new file mode 100644
index 000000000000..23d4c0142727
--- /dev/null
+++ b/srcpkgs/HeroicGamesLauncher/files/heroic-run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ELECTRON_IS_DEV=0 exec @@VERSION@@ /usr/lib/HeroicGamesLauncher/resources/app.asar "$@"
diff --git a/srcpkgs/HeroicGamesLauncher/patches/electron-is-dev-env.patch b/srcpkgs/HeroicGamesLauncher/patches/electron-is-dev-env.patch
new file mode 100644
index 000000000000..dd9e5e52a3d8
--- /dev/null
+++ b/srcpkgs/HeroicGamesLauncher/patches/electron-is-dev-env.patch
@@ -0,0 +1,13 @@
+--- a/src/backend/main.ts
++++ b/src/backend/main.ts
+@@ -208,7 +208,9 @@ async function initializeWindow(): Promi
+     detectVCRedist(mainWindow)
+   }
+ 
+-  if (!app.isPackaged && process.env.CI !== 'e2e') {
++  if (!app.isPackaged &&
++      process.env.CI !== 'e2e' &&
++      process.env.HEROIC_NO_REACT_DEVTOOLS != undefined) {
+     if (!process.env.HEROIC_NO_REACT_DEVTOOLS) {
+       import('electron-devtools-installer').then((devtools) => {
+         const { default: installExtension, REACT_DEVELOPER_TOOLS } = devtools
diff --git a/srcpkgs/HeroicGamesLauncher/template b/srcpkgs/HeroicGamesLauncher/template
new file mode 100644
index 000000000000..05a52e00239e
--- /dev/null
+++ b/srcpkgs/HeroicGamesLauncher/template
@@ -0,0 +1,53 @@
+# Template file for 'HeroicGamesLauncher'
+pkgname=HeroicGamesLauncher
+version=2.8.0
+revision=1
+archs="x86_64*"
+_electron_version=24
+hostmakedepends="electron${_electron_version} jq nodejs python3 yarn"
+depends="electron${_electron_version} legendary heroic-gogdl"
+checkdepends="tar xz"
+short_desc="Open source launcher for GOG and Epic Games"
+maintainer="sirkhancision <jsantiago12tone@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher"
+distfiles="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/archive/v${version}.tar.gz"
+checksum=59f068d6ba7e6c9c5d3c08f06b4cee23f07452777b9edb8baa61895fa9f40320
+nopie_files="/usr/lib/HeroicGamesLauncher/resources/app.asar.unpacked/build/bin/linux/gogdl
+/usr/lib/HeroicGamesLauncher/resources/app.asar.unpacked/build/bin/linux/legendary"
+
+pre_build() {
+	jq 'del(.scripts.prepare)' package.json >tmp.json
+	mv {tmp,package}.json
+}
+
+do_build() {
+	export ELECTRON_SKIP_BINARY_DOWNLOAD=1
+	export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
+
+	electronDist="/usr/lib/electron${_electron_version}"
+	electronVer="$(sed s/^v// $electronDist/version)"
+
+	yarn install
+	yarn dist:linux --dir -c.electronDist="$electronDist" -c.electronVersion="$electronVer"
+}
+
+do_install() {
+	heroic_name="com.heroicgameslauncher.hgl"
+
+	vmkdir usr/lib/HeroicGamesLauncher/resources
+
+	vcopy dist/linux-unpacked/resources/app.asar usr/lib/HeroicGamesLauncher/resources
+	vcopy dist/linux-unpacked/resources/app.asar.unpacked usr/lib/HeroicGamesLauncher/resources
+	vcopy build /usr/lib/HeroicGamesLauncher/resources/app.asar.unpacked
+	rm -rf "${DESTDIR}/usr/lib/HeroicGamesLauncher/resources/app.asar.unpacked/build/bin/{linux/{gogdl,legendary},darwin,win32}"
+	ln -sf "${DESTDIR}/usr/bin/{gogdl,legendary}" "${DESTDIR}/usr/lib/HeroicGamesLauncher/resources/app.asar.unpacked/build/bin/linux"
+	ln -sf build "${DESTDIR}/usr/lib/HeroicGamesLauncher/resources/app.asar.unpacked/public"
+
+	vinstall flatpak/$heroic_name.desktop 644 usr/share/applications
+	vinstall build/icon.png 644 usr/share/icons/hicolor/512x512/apps/$heroic_name.png
+	vinstall flatpak/$heroic_name.png 644 usr/share/icons/hicolor/128x128/apps
+
+	sed -i "s/@@VERSION@@/$_electron_version/" "${FILESDIR}/heroic-run"
+	vbin "${FILESDIR}/heroic-run"
+}
diff --git a/srcpkgs/heroic-gogdl/template b/srcpkgs/heroic-gogdl/template
new file mode 100644
index 000000000000..d9861534dfd4
--- /dev/null
+++ b/srcpkgs/heroic-gogdl/template
@@ -0,0 +1,20 @@
+# Template file for 'heroic-gogdl'
+pkgname=heroic-gogdl
+version=0.4
+revision=1
+hostmakedepends="python3-setuptools python3-build python3-installer python3-wheel"
+depends="python3-requests"
+short_desc="GOG Downloading module for Heroic Games Launcher"
+maintainer="sirkhancision <jsantiago12tone@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/Heroic-Games-Launcher/heroic-gogdl"
+distfiles="https://github.com/Heroic-Games-Launcher/heroic-gogdl/archive/refs/tags/v${version}.tar.gz"
+checksum=10103a398d6696b8f0891ce25a0ef85a59fb6bd985511c81798231a3f0b49fc5
+
+do_build() {
+	python3 -m build --wheel --skip-dependency-check --no-isolation
+}
+
+do_install() {
+	python3 -m installer --destdir "${DESTDIR}" dist/*.whl
+}

  parent reply	other threads:[~2023-06-27 21:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  2:27 [PR PATCH] " sirkhancision
2023-06-01  2:46 ` [PR PATCH] [Updated] " sirkhancision
2023-06-27 20:57 ` sirkhancision
2023-06-27 21:06 ` sirkhancision
2023-06-27 21:18 ` sirkhancision [this message]
2023-06-27 21:49 ` sirkhancision
2023-06-28 15:22 ` [PR REVIEW] " Duncaen
2023-06-28 15:37 ` [PR PATCH] [Updated] " sirkhancision
2023-07-01  1:05 ` sirkhancision
2023-07-26 14:41 ` Bnyro
2023-07-26 15:27 ` Bnyro
2023-07-26 20:33 ` [PR PATCH] [Updated] " sirkhancision
2023-07-26 20:33 ` sirkhancision
2023-07-26 21:31 ` sirkhancision
2023-10-25  1:45 ` github-actions
2023-11-08  1:45 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230627211843.OBZme0Koh72v0fXihBO6adIEACAwnEMU8bL1Y-R-jKs@z \
    --to=sirkhancision@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).