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

General repo cleanup #3420

Merged
merged 8 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sign/**
flatpak-build/**
playwright-report/**
build/**/*
dist/**/*
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn.lock -diff
yarn.lock linguist-generated=true
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/Source_Code.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 94 additions & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
appId: com.heroicgameslauncher.hgl
productName: Heroic
afterSign: sign/afterSign.js
afterPack: sign/afterPack.js
files:
- build/**/*
- node_modules/**/*
- '!build/bin/*'
- build/bin/legendary.LICENSE

asarUnpack:
- build/icon.png
- build/icon.icns
- build/win_icon.ico
- build/icon-dark.png
- build/icon-light.png
- build/webviewPreload.js

electronDownload:
mirror: https://github.com/castlabs/electron-releases/releases/download/v

protocols:
- name: heroic
schemes:
- heroic

win:
artifactName: ${productName}-${version}-Setup-${arch}.${ext}
icon: build/win_icon.ico
asarUnpack:
- build/bin/win32/legendary.exe
- build/bin/win32/gogdl.exe
- build/bin/win32/nile.exe
files: build/bin/win32/*

portable:
artifactName: ${productName}-${version}-Portable-${arch}.${ext}

mac:
artifactName: ${productName}-${version}-macOS-${arch}.${ext}
category: public.app-category.games
icon: build/icon.icns
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
com.apple.security.cs.allow-jit: true
asarUnpack:
- build/bin/darwin/legendary
- build/bin/darwin/gogdl
- build/bin/darwin/nile
files:
- build/bin/darwin/*

dmg:
background: public/dmg.png
window:
width: 600
height: 500
contents:
- x: 10
y: 215
type: file
- x: 420
y: 215
type: link
path: /Applications

linux:
category: Game
icon: build/icon.icns
description: An Open Source Launcher for GOG and Epic Games
desktop:
Name: Heroic Games Launcher
Comment[de]: Ein Open Source Spielelauncher for GOG und Epic Games
asarUnpack:
- build/bin/linux/legendary
- build/bin/linux/gogdl
- build/bin/linux/nile
- build/bin/linux/vulkan-helper
files:
- build/bin/linux/*

snap:
base: core20
confinement: strict
grade: stable
category: Games
synopsis: An Open Source Launcher for GOG Amazon and Epic Games
description: Heroic is an Open Source Games Launcher. Right now it supports launching games from the Epic Games Store using Legendary Amazon Games using Nile and GOG Games using our custom implementations Nile and gogdl.
publish:
provider: snapStore
channels:
- edge
repo: heroic
175 changes: 26 additions & 149 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,122 +21,32 @@
"engines": {
"node": ">= 16"
},
"build": {
"appId": "com.heroicgameslauncher.hgl",
"productName": "Heroic",
"afterSign": "sign/afterSign.js",
"afterPack": "sign/afterPack.js",
"files": [
"build/**/*",
"node_modules/**/*",
"!build/bin/*",
"build/bin/legendary.LICENSE"
],
"asarUnpack": [
"build/icon.png",
"build/icon.icns",
"build/win_icon.ico",
"build/icon-dark.png",
"build/icon-light.png",
"build/webviewPreload.js"
],
"electronDownload": {
"mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
},
"protocols": [
{
"name": "heroic",
"schemes": [
"heroic"
]
}
],
"win": {
"artifactName": "${productName}-${version}-Setup-${arch}.${ext}",
"icon": "build/win_icon.ico",
"asarUnpack": [
"build/bin/win32/legendary.exe",
"build/bin/win32/gogdl.exe",
"build/bin/win32/nile.exe"
],
"files": [
"build/bin/win32/*"
]
},
"portable": {
"artifactName": "${productName}-${version}-Portable-${arch}.${ext}"
},
"mac": {
"artifactName": "${productName}-${version}-macOS-${arch}.${ext}",
"category": "public.app-category.games",
"icon": "build/icon.icns",
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"extendInfo": {
"com.apple.security.cs.allow-jit": true
},
"asarUnpack": [
"build/bin/darwin/legendary",
"build/bin/darwin/gogdl",
"build/bin/darwin/nile"
],
"files": [
"build/bin/darwin/*"
]
},
"dmg": {
"background": "public/dmg.png",
"window": {
"width": "600",
"height": "500"
},
"contents": [
{
"x": 10,
"y": 215,
"type": "file"
},
{
"x": 420,
"y": 215,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"category": "Game",
"icon": "build/icon.icns",
"description": "An Open Source Launcher for GOG and Epic Games",
"desktop": {
"Name": "Heroic Games Launcher",
"Comment[de]": "Ein Open Source Spielelauncher for GOG und Epic Games"
},
"asarUnpack": [
"build/bin/linux/legendary",
"build/bin/linux/gogdl",
"build/bin/linux/nile",
"build/bin/linux/vulkan-helper"
],
"files": [
"build/bin/linux/*"
]
},
"snap": {
"base": "core20",
"confinement": "strict",
"grade": "stable",
"category": "Games",
"synopsis": "An Open Source Launcher for GOG, Amazon and Epic Games",
"description": "Heroic is an Open Source Games Launcher. Right now it supports launching games from the Epic Games Store using Legendary, Amazon Games using Nile and GOG Games using our custom implementations Nile and gogdl.",
"publish": {
"provider": "snapStore",
"channels": [
"edge"
],
"repo": "heroic"
}
}
"scripts": {
"start": "vite",
"codecheck": "tsc --noEmit",
"find-deadcode": "ts-prune --error",
"test": "jest",
"test-watch": "jest --watch --maxWorkers=25%",
"test:ci": "jest --runInBand --silent",
"test:e2e": "vite build && cross-env CI=e2e xvfb-maybe -- playwright test",
"release:linux": "vite build && electron-builder -p always --linux deb AppImage rpm pacman tar.xz snap",
"release:mac": "vite build && electron-builder -p always --mac --x64 --arm64",
"release:win": "vite build && electron-builder -p always --win portable --x64",
"release:updateFlathub:ci": "tsc flathub/update-flathub.ts --skipLibCheck --target es2015 --moduleResolution node --module commonjs && node flathub/update-flathub.js",
"sign:win": "vite build && electron-builder -p never --win nsis --x64",
"dist:linux": "vite build && electron-builder --linux",
"dist:mac": "export CSC_IDENTITY_AUTO_DISCOVERY=false && vite build && electron-builder --mac",
"dist:win": "vite build && electron-builder --win",
"dist:flatpak": "yarn dist:linux appimage && yarn flatpak:prepare && yarn flatpak:build",
"lint": "eslint --cache --ext .tsx,ts .",
"lint-fix": "eslint --fix --ext .tsx,ts ./src",
"flatpak:build": "cd flatpak-build && flatpak-builder build com.heroicgameslauncher.hgl.yml --install --force-clean --user",
"flatpak:prepare": "node ./flatpak/prepareFlatpak.js",
"flatpak:prepare-release": "node ./flatpak/prepareFlatpak.js release",
"i18n": "i18next --silent",
"prepare": "husky install",
"prettier": "prettier --check .",
"prettier-fix": "prettier --write ."
},
"dependencies": {
"@emotion/react": "11.10.6",
Expand Down Expand Up @@ -191,39 +101,6 @@
"xvfb-maybe": "^0.2.1",
"zod": "3.22.3"
},
"scripts": {
"start": "vite",
"codecheck": "tsc --noEmit",
"find-deadcode": "ts-prune --error",
"test": "jest",
"test-watch": "jest --watch --maxWorkers=25%",
"test:ci": "jest --runInBand --silent",
"test:e2e": "vite build && cross-env CI=e2e xvfb-maybe -- playwright test",
"release:linux": "vite build && electron-builder -p always --linux deb AppImage rpm pacman tar.xz snap",
"release:mac": "vite build && electron-builder -p always --mac --x64 --arm64",
"release:win": "vite build && electron-builder -p always --win portable --x64",
"release:updateFlathub:ci": "tsc flathub/update-flathub.ts --skipLibCheck --target es2015 --moduleResolution node --module commonjs && node flathub/update-flathub.js",
"sign:win": "vite build && electron-builder -p never --win nsis --x64",
"dist:linux": "vite build && electron-builder --linux",
"dist:mac": "export CSC_IDENTITY_AUTO_DISCOVERY=false && vite build && electron-builder --mac",
"dist:win": "vite build && electron-builder --win",
"dist:flatpak": "yarn dist:linux appimage && yarn flatpak:prepare && yarn flatpak:build",
"lint": "eslint --cache -c .eslintrc --ext .tsx,ts .",
"lint-fix": "eslint --fix -c .eslintrc --ext .tsx,ts ./src",
"flatpak:build": "cd flatpak-build && flatpak-builder build com.heroicgameslauncher.hgl.yml --install --force-clean --user",
"flatpak:prepare": "node ./flatpak/prepareFlatpak.js",
"flatpak:prepare-release": "node ./flatpak/prepareFlatpak.js release",
"i18n": "i18next --silent",
"prepare": "husky install",
"prettier": "prettier --check .",
"prettier-fix": "prettier --write ."
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"devDependencies": {
"@electron/notarize": "^2.1.0",
"@playwright/test": "1.39.0",
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
// extend your base config so you don't have to redefine your compilerOptions
"extends": "./tsconfig.json",
"include": ["**/*.ts", "**/*.tsx"],
"include": ["**/*.ts", "**/*.tsx", "**/*.js"],
"exclude": []
}
Loading