heroic{,-unwrapped}: 2.18.1 -> 2.19.1, adopt (#484137)
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
{
|
||||
lib,
|
||||
writeScript,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
cacert,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "gogdl";
|
||||
version = "1.1.2";
|
||||
version = "1.2.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Heroic-Games-Launcher";
|
||||
repo = "heroic-gogdl";
|
||||
rev = "1ff09820915f855ea764c6e49ea2def63e86b3bb";
|
||||
hash = "sha256-pK6JeTJeBq9qVfflNSYs3s4HuD0Kz6k9DDUVHL81FV0=";
|
||||
# two commits after the v1.2.0 tag, because the release messed up submodule fetching
|
||||
rev = "9759dfb1f50e0c68854f938e9568d84cab59652c";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-yjiPHEiZjs9TnBRaKzm1TpLcPK0tfIrzM30DX66m+1Y=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
requests
|
||||
];
|
||||
|
||||
@@ -32,31 +35,4 @@ python3Packages.buildPythonApplication rec {
|
||||
license = with lib.licenses; [ gpl3 ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
# Upstream no longer create git tags when bumping the version, so we have to
|
||||
# extract it from the source code on the main branch.
|
||||
passthru.updateScript = writeScript "gogdl-update-script" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused jq common-updater-scripts
|
||||
set -eou pipefail;
|
||||
|
||||
owner=Heroic-Games-Launcher
|
||||
repo=heroic-gogdl
|
||||
path='gogdl/__init__.py'
|
||||
|
||||
version=$(
|
||||
curl --cacert "${cacert}/etc/ssl/certs/ca-bundle.crt" \
|
||||
https://raw.githubusercontent.com/$owner/$repo/main/$path |
|
||||
sed -n 's/^\s*version\s*=\s*"\([0-9]\.[0-9]\.[0-9]\)"\s*$/\1/p')
|
||||
|
||||
commit=$(curl --cacert "${cacert}/etc/ssl/certs/ca-bundle.crt" \
|
||||
https://api.github.com/repos/$owner/$repo/commits?path=$path |
|
||||
jq -r '.[0].sha')
|
||||
|
||||
update-source-version \
|
||||
${pname} \
|
||||
"$version" \
|
||||
--file=./pkgs/games/gogdl/default.nix \
|
||||
--rev=$commit
|
||||
'';
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "heroic-epic-integration";
|
||||
version = "0.3";
|
||||
version = "0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Etaash-mathamsetty";
|
||||
repo = "heroic-epic-integration";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Zn0MsaQd8Ro6eu8IQkMcLNGLVTUukwajkn8PRLfB+Yw=";
|
||||
hash = "sha256-pRgs1w4bzm5Ao0zXfaNxBAR8+h7w4I+C+bm4nT7kIgU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -33,6 +33,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
|
||||
meta = {
|
||||
description = "Wrapper process for games launched through Heroic Games Launcher";
|
||||
longDescription = ''
|
||||
@@ -44,6 +46,4 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
})
|
||||
|
||||
@@ -4,19 +4,17 @@
|
||||
fetchFromGitHub,
|
||||
python3Packages,
|
||||
}:
|
||||
let
|
||||
version = "0.20.37";
|
||||
in
|
||||
python3Packages.buildPythonApplication {
|
||||
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "legendary-heroic";
|
||||
inherit version;
|
||||
version = "0.20.39";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Heroic-Games-Launcher";
|
||||
repo = "legendary";
|
||||
rev = version;
|
||||
sha256 = "sha256-mOys7lOPrrzBUBMIM/JvKygFQ/qIGD68BDNigk5BCIo=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-2+9MRbwugBlBdZQQo6BUcLmwCqVdTAv9CZ+sPu5VAxY=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
@@ -25,11 +23,14 @@ python3Packages.buildPythonApplication {
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
requests
|
||||
requests-futures
|
||||
filelock
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "legendary" ];
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
|
||||
meta = {
|
||||
description = "Free and open-source Epic Games Launcher alternative";
|
||||
longDescription = ''
|
||||
@@ -40,6 +41,4 @@ python3Packages.buildPythonApplication {
|
||||
maintainers = [ ];
|
||||
mainProgram = "legendary";
|
||||
};
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
}
|
||||
})
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
nodejs,
|
||||
python3,
|
||||
makeWrapper,
|
||||
# Electron updates frequently break Heroic, so pin same version as upstream, or newest non-EOL.
|
||||
electron_37,
|
||||
# Electron updates can break Heroic, so try to use same version as upstream.
|
||||
# If the used electron version is higher than upstream's then the node-abi package might need to be updated
|
||||
electron_39,
|
||||
vulkan-helper,
|
||||
gogdl,
|
||||
nile,
|
||||
@@ -20,33 +21,40 @@
|
||||
}:
|
||||
|
||||
let
|
||||
pnpm = pnpm_10;
|
||||
electron = electron_39;
|
||||
|
||||
legendary = callPackage ./legendary.nix { };
|
||||
epic-integration = callPackage ./epic-integration.nix { };
|
||||
comet-gog = comet-gog_heroic;
|
||||
electron = electron_37;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "heroic-unwrapped";
|
||||
version = "2.18.1";
|
||||
version = "2.19.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Heroic-Games-Launcher";
|
||||
repo = "HeroicGamesLauncher";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-x792VA4PZleqUUgarh59JxJVXrvT95/rINYk8t9i3X0=";
|
||||
hash = "sha256-e+/FRvG9u6ZQsMGD5hqY+yLPjsbLSrjC9Wp0xdxVk6w=";
|
||||
};
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
pnpm = pnpm_10;
|
||||
fetcherVersion = 1;
|
||||
hash = "sha256-F8H0eYltIJ0S8AX+2S3cR+v8dvePw09VWToVOLM8qII=";
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
patches
|
||||
;
|
||||
inherit pnpm;
|
||||
fetcherVersion = 3;
|
||||
hash = "sha256-uwJYOm+2wGNRHAiIw1UjCBLBW6kjtj6AFLWihCqtL28=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
pnpmConfigHook
|
||||
pnpm_10
|
||||
pnpm
|
||||
python3
|
||||
makeWrapper
|
||||
];
|
||||
@@ -54,8 +62,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
patches = [
|
||||
# Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic.
|
||||
./fix-non-steam-shortcuts.patch
|
||||
# Fixes incorrect path to GalaxyCommunication.exe
|
||||
./pr-4885.patch
|
||||
];
|
||||
|
||||
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
@@ -68,9 +74,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
pnpm --offline electron-vite build
|
||||
pnpm --offline electron-builder \
|
||||
--linux \
|
||||
--dir \
|
||||
-c.asarUnpack="**/*.node" \
|
||||
-c.electronDist=${electron.dist} \
|
||||
-c.electronVersion=${electron.version}
|
||||
|
||||
@@ -85,25 +89,27 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mkdir -p "$out/opt/heroic"
|
||||
cp -r dist/linux-unpacked/resources "$out/opt/heroic"
|
||||
|
||||
cp -r public "$out/opt/heroic/resources/app.asar.unpacked/build"
|
||||
rm -rf "$out/opt/heroic/resources/app.asar.unpacked/build/bin"
|
||||
mkdir -p \
|
||||
"$out/opt/heroic/resources/app.asar.unpacked/build/bin/x64/linux" \
|
||||
"$out/opt/heroic/resources/app.asar.unpacked/build/bin/x64/win32"
|
||||
bin_dir="$out/opt/heroic/resources/app.asar.unpacked/build/bin"
|
||||
|
||||
# Clean up prebuilt binaries
|
||||
rm -r "$bin_dir"
|
||||
mkdir -p "$bin_dir/x64/linux/" "$bin_dir/x64/win32/"
|
||||
|
||||
ln -s \
|
||||
"${lib.getExe gogdl}" \
|
||||
"${lib.getExe legendary}" \
|
||||
"${lib.getExe nile}" \
|
||||
"${lib.getExe comet-gog}" \
|
||||
"${lib.getExe vulkan-helper}" \
|
||||
"$out/opt/heroic/resources/app.asar.unpacked/build/bin/x64/linux"
|
||||
"$bin_dir/x64/linux/"
|
||||
|
||||
# Don't symlink these so we don't confuse Windows applications under Wine/Proton.
|
||||
cp \
|
||||
"${comet-gog.dummy-service}/GalaxyCommunication.exe" \
|
||||
"${epic-integration}/EpicGamesLauncher.exe" \
|
||||
"$out/opt/heroic/resources/app.asar.unpacked/build/bin/x64/win32"
|
||||
"$bin_dir/x64/win32/"
|
||||
|
||||
makeWrapper "${electron}/bin/electron" "$out/bin/heroic" \
|
||||
makeWrapper "${lib.getExe electron}" "$out/bin/heroic" \
|
||||
--inherit-argv0 \
|
||||
--set ELECTRON_FORCE_IS_PACKAGED 1 \
|
||||
--suffix PATH ":" "${umu-launcher}/bin" \
|
||||
@@ -128,7 +134,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher";
|
||||
changelog = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = [ ];
|
||||
maintainers = with lib.maintainers; [
|
||||
tomasajt
|
||||
iedame
|
||||
keenanweaver
|
||||
DieracDelta
|
||||
baksa
|
||||
];
|
||||
# Heroic may work on nix-darwin, but it needs a dedicated maintainer for the platform.
|
||||
# It may also work on other Linux targets, but all the game stores only
|
||||
# support x86 Linux, so it would require extra hacking to run games via QEMU
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
From a98cc23b288e13665c8698eec56e0653613946d7 Mon Sep 17 00:00:00 2001
|
||||
From: Aidan Gauland <aidalgol@fastmail.net>
|
||||
Date: Tue, 19 Aug 2025 09:45:55 +1200
|
||||
Subject: [PATCH] [Fix] Run GalaxyComm executable path through fixAsarPath
|
||||
|
||||
---
|
||||
src/backend/constants/paths.ts | 4 ++++
|
||||
src/backend/launcher.ts | 15 +++++----------
|
||||
2 files changed, 9 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/backend/constants/paths.ts b/src/backend/constants/paths.ts
|
||||
index 1d05ce5b58..2e9cff1197 100644
|
||||
--- a/src/backend/constants/paths.ts
|
||||
+++ b/src/backend/constants/paths.ts
|
||||
@@ -44,6 +44,10 @@ export const fakeEpicExePath = fixAsarPath(
|
||||
join(publicDir, 'bin', 'x64', 'win32', 'EpicGamesLauncher.exe')
|
||||
)
|
||||
|
||||
+export const galaxyCommunicationExePath = fixAsarPath(
|
||||
+ join(publicDir, 'bin', 'x64', 'win32', 'GalaxyCommunication.exe')
|
||||
+)
|
||||
+
|
||||
export const webviewPreloadPath = fixAsarPath(
|
||||
join('file://', publicDir, 'webviewPreload.js')
|
||||
)
|
||||
diff --git a/src/backend/launcher.ts b/src/backend/launcher.ts
|
||||
index a239cff927..2262dc35b2 100644
|
||||
--- a/src/backend/launcher.ts
|
||||
+++ b/src/backend/launcher.ts
|
||||
@@ -80,7 +80,7 @@ import {
|
||||
defaultWinePrefix,
|
||||
fixesPath,
|
||||
flatpakHome,
|
||||
- publicDir,
|
||||
+ galaxyCommunicationExePath,
|
||||
runtimePath,
|
||||
userHome
|
||||
} from './constants/paths'
|
||||
@@ -888,28 +888,23 @@ async function prepareWineLaunch(
|
||||
|
||||
try {
|
||||
if (runner === 'gog' && experimentalFeatures?.cometSupport !== false) {
|
||||
- const communicationSource = join(
|
||||
- publicDir,
|
||||
- 'bin/x64/win32/GalaxyCommunication.exe'
|
||||
- )
|
||||
-
|
||||
- const galaxyCommPath =
|
||||
+ const galaxyCommWinePath =
|
||||
'C:\\ProgramData\\GOG.com\\Galaxy\\redists\\GalaxyCommunication.exe'
|
||||
const communicationDest = await getWinePath({
|
||||
- path: galaxyCommPath,
|
||||
+ path: galaxyCommWinePath,
|
||||
gameSettings,
|
||||
variant: 'unix'
|
||||
})
|
||||
|
||||
if (!existsSync(communicationDest)) {
|
||||
mkdirSync(dirname(communicationDest), { recursive: true })
|
||||
- await copyFile(communicationSource, communicationDest)
|
||||
+ await copyFile(galaxyCommunicationExePath, communicationDest)
|
||||
await runWineCommand({
|
||||
commandParts: [
|
||||
'sc',
|
||||
'create',
|
||||
'GalaxyCommunication',
|
||||
- `binpath=${galaxyCommPath}`
|
||||
+ `binpath=${galaxyCommWinePath}`
|
||||
],
|
||||
gameSettings,
|
||||
protonVerb: 'runinprefix'
|
||||
Reference in New Issue
Block a user