mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-03-08 09:07:57 +03:00
Minor changes
- added DXVK 1.10.1 - added `Wine-GE-Proton 7-7`, `GE-Proton 7-10`, `Lutris 7.2` - Marked as outdated: `GE-Proton 7-3`, `GE-Proton 7-2`, `Wine-GE 7.1-1`, `Wine-GE 7.2-1` and `Wine-GE 7.2-2` - added `dxvk_list` and `runners_list` fields to the `constants.uri` - now `DXVK.list()` and `Runners.list()` can fetch the lists changes from the launcher's repo - made DXVK 1.10.1 and Wine-GE-Proton 7-7 default to install
This commit is contained in:
parent
6fb33fa6b0
commit
d09a9c914d
7 changed files with 122 additions and 19 deletions
|
@ -1,3 +1,7 @@
|
|||
- version: '1.10.1'
|
||||
uri: https://github.com/doitsujin/dxvk/releases/download/v1.10.1/dxvk-1.10.1.tar.gz
|
||||
recommended: true
|
||||
|
||||
- version: '1.10'
|
||||
uri: https://github.com/doitsujin/dxvk/releases/download/v1.10/dxvk-1.10.tar.gz
|
||||
recommended: true
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
# Wine-GE-Proton versions
|
||||
- title: Wine-GE-Proton
|
||||
runners:
|
||||
# Wine-GE-Proton 7-7
|
||||
- family: Wine-GE-Proton
|
||||
name: lutris-GE-Proton7-7-x86_64
|
||||
title: Wine-GE-Proton 7-7
|
||||
uri: https://github.com/GloriousEggroll/wine-ge-custom/releases/download/GE-Proton7-7/wine-lutris-GE-Proton7-7-x86_64.tar.xz
|
||||
files:
|
||||
wine: bin/wine64
|
||||
wineserver: bin/wineserver
|
||||
winecfg: lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
|
||||
# Wine-GE-Proton 7-6
|
||||
- family: Wine-GE-Proton
|
||||
name: lutris-GE-Proton7-6-x86_64
|
||||
|
@ -84,7 +95,7 @@
|
|||
wine: bin/wine64
|
||||
wineserver: bin/wineserver
|
||||
winecfg: lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
recommended: false # works, but outdated
|
||||
|
||||
# Wine-GE 7.2-1
|
||||
- family: Wine-GE-Proton
|
||||
|
@ -95,7 +106,7 @@
|
|||
wine: bin/wine64
|
||||
wineserver: bin/wineserver
|
||||
winecfg: lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
recommended: false # works, but outdated
|
||||
|
||||
# Wine-GE 7.1-1
|
||||
- family: Wine-GE-Proton
|
||||
|
@ -106,7 +117,7 @@
|
|||
wine: bin/wine64
|
||||
wineserver: bin/wineserver
|
||||
winecfg: lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
recommended: false # works, but outdated
|
||||
|
||||
# Wine-GE 6.21-1
|
||||
- family: Wine-GE-Proton
|
||||
|
@ -166,6 +177,17 @@
|
|||
# GE-Proton versions
|
||||
- title: GE-Proton
|
||||
runners:
|
||||
# GE-Proton 7-10
|
||||
- family: GE-Proton
|
||||
name: GE-Proton7-10
|
||||
title: GE-Proton 7-10
|
||||
uri: https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton7-10/GE-Proton7-10.tar.gz
|
||||
files:
|
||||
wine: files/bin/wine64
|
||||
wineserver: files/bin/wineserver
|
||||
winecfg: files/lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
|
||||
# GE-Proton 7-9
|
||||
- family: GE-Proton
|
||||
name: GE-Proton7-9
|
||||
|
@ -245,7 +267,7 @@
|
|||
wine: files/bin/wine64
|
||||
wineserver: files/bin/wineserver
|
||||
winecfg: files/lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
recommended: false # works, but outdated
|
||||
|
||||
# GE-Proton 7-2
|
||||
- family: GE-Proton
|
||||
|
@ -256,7 +278,7 @@
|
|||
wine: dist/bin/wine64
|
||||
wineserver: dist/bin/wineserver
|
||||
winecfg: dist/lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
recommended: false # works, but outdated
|
||||
|
||||
# GE-Proton 7-1
|
||||
- family: GE-Proton
|
||||
|
@ -401,6 +423,17 @@
|
|||
# Lutris versions
|
||||
- title: Lutris
|
||||
runners:
|
||||
# Lutris 7.2
|
||||
- family: Lutris
|
||||
name: lutris-7.2-x86_64
|
||||
title: Lutris 7.2
|
||||
uri: https://github.com/lutris/wine/releases/download/lutris-wine-7.2/wine-lutris-7.2-x86_64.tar.xz
|
||||
files:
|
||||
wine: bin/wine64
|
||||
wineserver: bin/wineserver
|
||||
winecfg: lib64/wine/x86_64-windows/winecfg.exe
|
||||
recommended: true
|
||||
|
||||
# Lutris 7.1
|
||||
- family: Lutris
|
||||
name: lutris-7.1-x86_64
|
||||
|
|
|
@ -265,7 +265,9 @@ export default class constants
|
|||
},
|
||||
launcher: 'https://gitlab.com/KRypt0n_/an-anime-game-launcher',
|
||||
discord: 'https://discord.gg/ck37X6UWBp',
|
||||
analytics: 'https://aagl.launcher.moe/stat/'
|
||||
analytics: 'https://aagl.launcher.moe/stat/',
|
||||
dxvk_list: 'https://gitlab.com/KRypt0n_/an-anime-game-launcher/-/raw/main/public/dxvks.yaml',
|
||||
runners_list: 'https://gitlab.com/KRypt0n_/an-anime-game-launcher/-/raw/main/public/runners.yaml'
|
||||
};
|
||||
|
||||
public static readonly paths = Paths;
|
||||
|
|
|
@ -2,7 +2,7 @@ import YAML from 'yaml';
|
|||
|
||||
import type { DXVK as TDXVK } from '../types/DXVK';
|
||||
|
||||
import { Configs, Process, promisify, path } from '../../empathize';
|
||||
import { Configs, Process, promisify, path, Cache, fetch } from '../../empathize';
|
||||
import { DebugThread } from '@empathize/framework/dist/meta/Debug';
|
||||
|
||||
import constants from '../Constants';
|
||||
|
@ -62,9 +62,41 @@ export default class DXVK
|
|||
.catch(() => resolveList([]));
|
||||
|
||||
const resolveList = async (folders: { entry: string, type: string }[]) => {
|
||||
let list: TDXVK[] = YAML.parse(await Neutralino.filesystem.readFile(`${constants.paths.appDir}/public/dxvks.yaml`));
|
||||
let list: TDXVK[] = [];
|
||||
let dxvks: TDXVK[] = [];
|
||||
|
||||
const dxvk_list = await Cache.get('DXVK.list.remote');
|
||||
|
||||
// If the dxvks cache is no expired - return it
|
||||
if (dxvk_list && !dxvk_list.expired)
|
||||
list = dxvk_list.value['list'];
|
||||
|
||||
else
|
||||
{
|
||||
// Otherwise fetch remote list
|
||||
const response = await fetch(constants.uri.dxvk_list);
|
||||
|
||||
// If it wasn't fetched - load locally stored one
|
||||
if (!response.ok)
|
||||
list = YAML.parse(await Neutralino.filesystem.readFile(`${constants.paths.appDir}/public/dxvks.yaml`));
|
||||
|
||||
else
|
||||
{
|
||||
// Otherwise if the fetched list have the same content length as cached one
|
||||
// then ignore it and use the cached one because they're the same
|
||||
// otherwise load remote one
|
||||
list = dxvk_list && dxvk_list.value['length'] == response.length ?
|
||||
dxvk_list.value['list'] :
|
||||
YAML.parse(await response.body());
|
||||
|
||||
// Update the cache record for the next 24 hours
|
||||
Cache.set('DXVK.list.remote', {
|
||||
length: response.length,
|
||||
list: list
|
||||
}, 3600 * 24);
|
||||
}
|
||||
}
|
||||
|
||||
list.forEach((dxvk) => {
|
||||
let inst = false;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import type {
|
|||
RunnerFamily
|
||||
} from '../types/Runners';
|
||||
|
||||
import { Configs, Process, path } from '../../empathize';
|
||||
import { Configs, Process, path, Cache, fetch } from '../../empathize';
|
||||
import { DebugThread } from '@empathize/framework/dist/meta/Debug';
|
||||
|
||||
import constants from '../Constants';
|
||||
|
@ -64,9 +64,41 @@ class Runners
|
|||
.catch(() => resolveList([]));
|
||||
|
||||
const resolveList = async (folders: { entry: string, type: string }[]) => {
|
||||
let list: RunnerFamily[] = YAML.parse(await Neutralino.filesystem.readFile(`${constants.paths.appDir}/public/runners.yaml`));
|
||||
let list: RunnerFamily[] = [];
|
||||
let runners: RunnerFamily[] = [];
|
||||
|
||||
const runners_list = await Cache.get('Runners.list.remote');
|
||||
|
||||
// If the runners cache is no expired - return it
|
||||
if (runners_list && !runners_list.expired)
|
||||
list = runners_list.value['list'];
|
||||
|
||||
else
|
||||
{
|
||||
// Otherwise fetch remote list
|
||||
const response = await fetch(constants.uri.runners_list);
|
||||
|
||||
// If it wasn't fetched - load locally stored one
|
||||
if (!response.ok)
|
||||
list = YAML.parse(await Neutralino.filesystem.readFile(`${constants.paths.appDir}/public/runners.yaml`));
|
||||
|
||||
else
|
||||
{
|
||||
// Otherwise if the fetched list have the same content length as cached one
|
||||
// then ignore it and use the cached one because they're the same
|
||||
// otherwise load remote one
|
||||
list = runners_list && runners_list.value['length'] == response.length ?
|
||||
runners_list.value['list'] :
|
||||
YAML.parse(await response.body());
|
||||
|
||||
// Update the cache record for the next 24 hours
|
||||
Cache.set('Runners.list.remote', {
|
||||
length: response.length,
|
||||
list: list
|
||||
}, 3600 * 24);
|
||||
}
|
||||
}
|
||||
|
||||
list.forEach((family) => {
|
||||
let newFamily: RunnerFamily = {
|
||||
title: family.title,
|
||||
|
|
|
@ -9,9 +9,9 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
import('./CreatePrefix').then((module) => {
|
||||
module.default(launcher).then(() => {
|
||||
// And then download the DXVK
|
||||
DXVK.download('1.10').then((stream) => {
|
||||
DXVK.download('1.10.1').then((stream) => {
|
||||
launcher.progressBar?.init({
|
||||
label: 'Downloading DXVK 1.10...',
|
||||
label: 'Downloading DXVK 1.10.1...',
|
||||
showSpeed: true,
|
||||
showEta: true,
|
||||
showPercents: true,
|
||||
|
@ -28,7 +28,7 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
|
||||
stream?.unpackStart(() => {
|
||||
launcher.progressBar?.init({
|
||||
label: () => unpacking ? 'Unpacking DXVK 1.10...' : 'Applying DXVK 1.10...',
|
||||
label: () => unpacking ? 'Unpacking DXVK 1.10.1...' : 'Applying DXVK 1.10.1...',
|
||||
showSpeed: true,
|
||||
showEta: true,
|
||||
showPercents: true,
|
||||
|
@ -44,10 +44,10 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
unpacking = false;
|
||||
|
||||
// Select this DXVK
|
||||
await DXVK.current('1.10');
|
||||
await DXVK.current('1.10.1');
|
||||
|
||||
// And apply it
|
||||
DXVK.apply(await constants.paths.prefix.current, '1.10').then(() => {
|
||||
DXVK.apply(await constants.paths.prefix.current, '1.10.1').then(() => {
|
||||
launcher.progressBar?.hide();
|
||||
|
||||
resolve();
|
||||
|
|
|
@ -5,9 +5,9 @@ import DXVK from '../../core/DXVK';
|
|||
|
||||
export default (launcher: Launcher): Promise<void> => {
|
||||
return new Promise(async (resolve) => {
|
||||
Runners.download('lutris-GE-Proton7-6-x86_64').then((stream) => {
|
||||
Runners.download('lutris-GE-Proton7-7-x86_64').then((stream) => {
|
||||
launcher.progressBar?.init({
|
||||
label: 'Downloading Wine-GE-Proton 7-6...',
|
||||
label: 'Downloading Wine-GE-Proton 7-7...',
|
||||
showSpeed: true,
|
||||
showEta: true,
|
||||
showPercents: true,
|
||||
|
@ -22,7 +22,7 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
|
||||
stream?.unpackStart(() => {
|
||||
launcher.progressBar?.init({
|
||||
label: 'Unpacking Wine-GE-Proton 7-6...',
|
||||
label: 'Unpacking Wine-GE-Proton 7-7...',
|
||||
showSpeed: true,
|
||||
showEta: true,
|
||||
showPercents: true,
|
||||
|
@ -36,7 +36,7 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
|
||||
stream?.unpackFinish(async () => {
|
||||
// Select this runner
|
||||
await Runners.current('lutris-GE-Proton7-6-x86_64');
|
||||
await Runners.current('lutris-GE-Proton7-7-x86_64');
|
||||
|
||||
// Create prefix if it is not created
|
||||
import('./CreatePrefix').then((module) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue