heroic: 2.4.3 -> 2.5.2

Upstream changes to build system required changes to the postBuild and
postInstall phases.

Add passthru.updateScript for future updates.
This commit is contained in:
Aidan Gauland 2022-12-06 19:49:58 +13:00
parent 1eb875e811
commit 04ba2aaf83
No known key found for this signature in database
GPG Key ID: 16E68DD2D0E77C91
4 changed files with 4097 additions and 11779 deletions

View File

@ -1,6 +1,7 @@
{ lib
, mkYarnPackage
, fetchFromGitHub
, gitUpdater
, makeWrapper
, electron
, gogdl
@ -9,13 +10,13 @@
mkYarnPackage rec {
pname = "heroic-unwrapped";
version = "2.4.3";
version = "2.5.2";
src = fetchFromGitHub {
owner = "Heroic-Games-Launcher";
repo = "HeroicGamesLauncher";
rev = "v${version}";
sha256 = "sha256-x9zIM2kKi+JgIGIidQYjyjqVGweFJ8DE7IX9gYULQuQ=";
sha256 = "sha256-vyZH/uOE7Oph8TuBFM2cUFwM4ed8Ri3fKRUrl9A6zHc=";
};
packageJSON = ./package.json;
@ -29,10 +30,11 @@ mkYarnPackage rec {
DISABLE_ESLINT_PLUGIN = "true";
postBuild = let
yarnCmd = "yarn --production --offline --frozen-lockfile --ignore-engines --ignore-scripts --lockfile ${yarnLock}";
yarnCmd = "yarn --offline --frozen-lockfile --ignore-engines --ignore-scripts --lockfile ${yarnLock}";
in ''
${yarnCmd} build-electron
${yarnCmd} build
rm deps/heroic/node_modules
ln -s ../../node_modules deps/heroic/
${yarnCmd} vite build
'';
# Disable bundling into a tar archive.
@ -44,8 +46,8 @@ mkYarnPackage rec {
deps = "$out/libexec/heroic/deps/heroic";
in ''
rm -rf "${deps}/public/bin" "${deps}/build/bin"
mkdir -p "${deps}/public/bin/linux"
ln -s "${gogdl}/bin/gogdl" "${legendary-gl}/bin/legendary" "${deps}/public/bin/linux"
mkdir -p "${deps}/build/bin/linux"
ln -s "${gogdl}/bin/gogdl" "${legendary-gl}/bin/legendary" "${deps}/build/bin/linux"
makeWrapper "${electron}/bin/electron" "$out/bin/heroic" \
--inherit-argv0 \
@ -59,6 +61,10 @@ mkYarnPackage rec {
ln -s "${deps}/flatpak/com.heroicgameslauncher.hgl.png" "$out/share/icons/hicolor/512x512/apps"
'';
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = with lib; {
description = "A Native GOG and Epic Games Launcher for Linux, Windows and Mac";
homepage = "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher";

View File

@ -1,8 +1,8 @@
{
"name": "heroic",
"version": "2.4.0",
"version": "2.5.2",
"private": true,
"main": "public/main.js",
"main": "build/electron/main.js",
"homepage": "./",
"license": "GPL-3.0-only",
"description": "An Open Source Launcher for GOG and Epic Games",
@ -30,9 +30,6 @@
"build/icon-dark.png",
"build/icon-light.png"
],
"directories": {
"buildResources": "public"
},
"protocols": [
{
"name": "heroic",
@ -42,7 +39,7 @@
}
],
"win": {
"artifactName": "Heroic_Setup_${version}.${ext}",
"artifactName": "${productName}-${version}-Setup.${ext}",
"icon": "build/win_icon.ico",
"asarUnpack": [
"build/bin/win32/legendary.exe",
@ -52,6 +49,9 @@
"build/bin/win32/*"
]
},
"portable": {
"artifactName": "${productName}-${version}-Portable.${ext}"
},
"mac": {
"target": "dmg",
"category": "public.app-category.games",
@ -103,21 +103,18 @@
"deb": {
"packageCategory": "games",
"depends": [
"gawk",
"curl"
]
},
"pacman": {
"packageCategory": "games",
"depends": [
"gawk",
"curl"
]
},
"rpm": {
"packageCategory": "games",
"depends": [
"gawk",
"curl"
]
}
@ -132,9 +129,10 @@
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@mui/icons-material": "^5.6.2",
"@mui/material": "^5.6.2",
"@mui/icons-material": "^5.10.9",
"@mui/material": "^5.10.12",
"@node-steam/vdf": "^2.2.0",
"@shockpkg/icon-encoder": "^2.1.3",
"axios": "^0.26.1",
"check-disk-space": "^3.3.1",
"classnames": "^2.3.1",
@ -148,44 +146,40 @@
"fuse.js": "^6.6.2",
"graceful-fs": "^4.2.10",
"heroic-wine-downloader": "^1.2.3",
"howlongtobeat": "^1.7.0",
"i18next": "^21.6.16",
"i18next-fs-backend": "^1.1.4",
"i18next-http-backend": "^1.4.0",
"ini": "^3.0.0",
"plist": "^3.0.5",
"react": "17",
"react-dom": "17",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.16.7",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"recharts": "^2.1.14",
"shlex": "^2.1.2",
"short-uuid": "^4.2.0",
"simple-keyboard": "^3.4.136",
"source-map-support": "^0.5.21",
"steam-shortcut-editor": "^3.1.1",
"systeminformation": "^5.12.3",
"systeminformation": "^5.15.0",
"tslib": "^2.4.0"
},
"scripts": {
"start": "DISABLE_ESLINT_PLUGIN=true nf start -p 3000 && electron-start",
"electron-start": "ELECTRON_IS_DEV=1 node public/start-react",
"electron": "yarn build-electron && electron . --trace-warnings",
"react-start": "HOST=localhost BROWSER=none react-scripts start",
"react-start:win": "react-scripts start",
"build": "react-scripts build",
"test": "jest --noStackTrace",
"start": "vite",
"codecheck": "tsc --noEmit",
"test": "jest",
"test-watch": "jest --watch --maxWorkers=25%",
"test:ci": "jest --runInBand --silent",
"eject": "react-scripts eject",
"release:linux": "GH_TOKEN='${{ secrets.WORKFLOW_TOKEN }}' yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js -p always --linux deb AppImage rpm pacman tar.xz",
"release:mac": "GH_TOKEN='${{ secrets.WORKFLOW_TOKEN }}' yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js -p always --mac",
"release:win": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js -p always --win nsis portable",
"dist:linux": "GH_TOKEN='${{ secrets.WORKFLOW_TOKEN }}' yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --linux",
"dist:mac": "GH_TOKEN='${{ secrets.WORKFLOW_TOKEN }}' yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --mac",
"dist:win": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --win",
"lint": "eslint -c .eslintrc --ext .tsx,ts ./src && eslint -c .eslintrc --ext .ts ./electron",
"lint-fix": "eslint --fix -c .eslintrc --ext .tsx,ts ./src && eslint --fix -c .eslintrc --ext .ts ./electron",
"build-electron": "tsc --project electron/tsconfig.json",
"watch-electron": "tsc --watch --project electron/tsconfig.json",
"release:linux": "vite build && electron-builder -p always --linux deb AppImage rpm pacman tar.xz",
"release:mac": "vite build && electron-builder -p always --mac",
"release:win": "vite build && electron-builder -p always --win nsis portable",
"dist:linux": "vite build && electron-builder --linux",
"dist:mac": "vite build && electron-builder --mac",
"dist:win": "vite build && electron-builder --win",
"lint": "eslint --cache -c .eslintrc --ext .tsx,ts ./src",
"lint-fix": "eslint --fix -c .eslintrc --ext .tsx,ts ./src",
"dist-flatpak": "cd flatpak && flatpak-builder build local.heroic.yml --install --force-clean --user",
"flatpak-test": "yarn dist:linux appimage && cd flatpak && flatpak-builder build local.heroic.yml --install --force-clean --user",
"i18n": "i18next",
@ -210,35 +204,31 @@
"@types/jest": "^27.4.1",
"@types/node": "^17.0.25",
"@types/plist": "^3.0.2",
"@types/react": "^18.0.6",
"@types/react-dom": "^18.0.2",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
"@types/react-router-dom": "^5.3.3",
"@types/tmp": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"electron": "^20.0.1",
"@vitejs/plugin-react": "^2.2.0",
"electron": "^21.2.1",
"electron-builder": "^23.1.0",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.29.4",
"foreman": "^3.0.1",
"husky": "^7.0.4",
"i18next-parser": "^6.3.0",
"jest": "^28.1.3",
"prettier": "^2.6.2",
"pretty-quick": "^3.1.3",
"sass": "^1.55.0",
"tmp": "^0.2.1",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version"
]
"ts-jest": "^28.0.7",
"typescript": "^4.8.4",
"vite": "^3.2.2",
"vite-plugin-electron": "^0.10.2",
"vite-plugin-svgr": "^2.2.2"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff