mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Compare commits
20 Commits
v1.3.0-alpha.4
...
v1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b741ead15 | |||
| de03044ff9 | |||
| b3a3955f69 | |||
| f5c83ee9ca | |||
| e1546d0975 | |||
| d69ecac496 | |||
| 8f1a2015bd | |||
| 3e4afe5a07 | |||
| 288c219417 | |||
| 31db079b08 | |||
| 5e1eff7143 | |||
| 301d2fdfc4 | |||
| 9638c65407 | |||
| efd69e4bb3 | |||
| 90cb0d5038 | |||
| 73e8e0f15a | |||
| b169b04637 | |||
| 6296a78cbc | |||
| 1305756cac | |||
| 1f2601427b |
@@ -1,6 +1,6 @@
|
|||||||
[
|
[
|
||||||
{"username": "Shidorien"},
|
{"username": "Shidorien"},
|
||||||
{"username": "iPixelGalaxy", "type": "diamond", "link": "https://twitch.tv/ipixelgalaxy"},
|
{"username": "iPixelGalaxy"},
|
||||||
{"username": "Emyte", "type": "gold"},
|
{"username": "Emyte", "type": "gold"},
|
||||||
{"username": "GoodOldNervy"},
|
{"username": "GoodOldNervy"},
|
||||||
{"username": "Naysy"},
|
{"username": "Naysy"},
|
||||||
@@ -13,5 +13,7 @@
|
|||||||
{"username": "AndyIsHereBoi", "type": "gold"},
|
{"username": "AndyIsHereBoi", "type": "gold"},
|
||||||
{"username": "grtroadrunner"},
|
{"username": "grtroadrunner"},
|
||||||
{"username": "Ilnahro"},
|
{"username": "Ilnahro"},
|
||||||
{"username": "T3chLog"}
|
{"username": "T3chLog"},
|
||||||
|
{"username": "Phil", "type": "gold"},
|
||||||
|
{"username": "Protocrush", "type": "gold"}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
"ConnectionError": "Kann nach 10 Versuchen keine Verbindung zu Steam herstellen 🤯",
|
"ConnectionError": "Kann nach 10 Versuchen keine Verbindung zu Steam herstellen 🤯",
|
||||||
"LicenceError": "Die Liste der Lizenzen kann nicht abgerufen werden.",
|
"LicenceError": "Die Liste der Lizenzen kann nicht abgerufen werden.",
|
||||||
"RateLimitExceeded": "Du hast es zu oft versucht, warte eine Weile und versuche es später erneut.",
|
"RateLimitExceeded": "Du hast es zu oft versucht, warte eine Weile und versuche es später erneut.",
|
||||||
"TokenRejected": "BeatSaber kann nicht heruntergeladen werden 😥 versuche es später noch einmal 😕",
|
"TokenRejected": "Ihr Anmeldetoken wurde abgelehnt 😕 Bitte versuchen Sie es erneut.",
|
||||||
"AccessDenied": "Der Zugang zu Steam wurde verweigert.",
|
"AccessDenied": "Der Zugang zu Steam wurde verweigert.",
|
||||||
"dotnet-required": ".NET 6 Runtime muss installiert sein, um eine Version von BeatSaber herunterzuladen. Lade es herunter, indem Du auf die Schaltfläche unten klickst."
|
"dotnet-required": ".NET 6 Runtime muss installiert sein, um eine Version von BeatSaber herunterzuladen. Lade es herunter, indem Du auf die Schaltfläche unten klickst."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
"ConnectionError": "Unable to connect to Steam after 10 tries 🤯",
|
"ConnectionError": "Unable to connect to Steam after 10 tries 🤯",
|
||||||
"LicenceError": "Unable to get the list of licenses.",
|
"LicenceError": "Unable to get the list of licenses.",
|
||||||
"RateLimitExceeded": "You've tried too many times, wait a while and try again later.",
|
"RateLimitExceeded": "You've tried too many times, wait a while and try again later.",
|
||||||
"TokenRejected": "Unable to download Beat Saber 😥 try again later 😕",
|
"TokenRejected": "Your login token has been rejected 😕 Please try again.",
|
||||||
"AccessDenied": "Access to Steam has been denied.",
|
"AccessDenied": "Access to Steam has been denied.",
|
||||||
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
|
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
|
||||||
},
|
},
|
||||||
@@ -496,7 +496,7 @@
|
|||||||
"note":{
|
"note":{
|
||||||
"use-the":"Use the ",
|
"use-the":"Use the ",
|
||||||
"steam-mobile-app": "Steam Mobile App",
|
"steam-mobile-app": "Steam Mobile App",
|
||||||
"to-connect-with-qr": "to sign in with via QR code."
|
"to-connect-with-qr": "to sign in via QR code."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stay": "Remember me"
|
"stay": "Remember me"
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
"ConnectionError": "No se puede conectar a Steam después de 10 intentos 🤯",
|
"ConnectionError": "No se puede conectar a Steam después de 10 intentos 🤯",
|
||||||
"LicenceError": "No se puede obtener la lista de licencias.",
|
"LicenceError": "No se puede obtener la lista de licencias.",
|
||||||
"RateLimitExceeded": "Lo has intentado demasiadas veces, espera un poco y vuelve a intentarlo más tarde.",
|
"RateLimitExceeded": "Lo has intentado demasiadas veces, espera un poco y vuelve a intentarlo más tarde.",
|
||||||
"TokenRejected": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
|
"TokenRejected": "Tu token de inicio de sesión ha sido rechazado 😕 Por favor, inténtalo de nuevo.",
|
||||||
"AccessDenied": "El acceso a Steam ha sido denegado.",
|
"AccessDenied": "El acceso a Steam ha sido denegado.",
|
||||||
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 6 para descargar una versión de BeatSaber. Descárguelo haciendo clic en el botón de abajo."
|
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 6 para descargar una versión de BeatSaber. Descárguelo haciendo clic en el botón de abajo."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -244,7 +244,7 @@
|
|||||||
"ConnectionError": "Impossible de se connecter à Steam après 10 essais 🤯",
|
"ConnectionError": "Impossible de se connecter à Steam après 10 essais 🤯",
|
||||||
"LicenceError": "Impossible d'obtenir la liste des licences.",
|
"LicenceError": "Impossible d'obtenir la liste des licences.",
|
||||||
"RateLimitExceeded": "Tu as essayé trop de fois attends un peu et recommence plus tard.",
|
"RateLimitExceeded": "Tu as essayé trop de fois attends un peu et recommence plus tard.",
|
||||||
"TokenRejected": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
|
"TokenRejected": "Votre token de connexion a été rejeté 😕 Veuillez réessayer.",
|
||||||
"AccessDenied": "L'accès à Steam a été refusé.",
|
"AccessDenied": "L'accès à Steam a été refusé.",
|
||||||
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
|
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
"ConnectionError": "Не удалось подключиться к Steam за 10 попыток 🤯",
|
"ConnectionError": "Не удалось подключиться к Steam за 10 попыток 🤯",
|
||||||
"LicenceError": "Не удалось проверить наличие лицензии.",
|
"LicenceError": "Не удалось проверить наличие лицензии.",
|
||||||
"RateLimitExceeded": "Слишком много попыток, вернитесь позже и попробуйте снова.",
|
"RateLimitExceeded": "Слишком много попыток, вернитесь позже и попробуйте снова.",
|
||||||
"TokenRejected": "Не удалось скачать Beat Saber 😥 повторите попытку позже 😕",
|
"TokenRejected": "Ваш токен для входа был отклонен 😕 Пожалуйста, попробуйте снова.",
|
||||||
"AccessDenied": "Доступ к Steam был отклонен.",
|
"AccessDenied": "Доступ к Steam был отклонен.",
|
||||||
"dotnet-required": "Среда запуска .NET 6 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
|
"dotnet-required": "Среда запуска .NET 6 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bs-manager",
|
"name": "bs-manager",
|
||||||
"version": "1.3.0-alpha.4",
|
"version": "1.3.0",
|
||||||
"description": "BSManager",
|
"description": "BSManager",
|
||||||
"main": "./dist/main/main.js",
|
"main": "./dist/main/main.js",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ export class DepotDownloader {
|
|||||||
private processOut$: Observable<string>;
|
private processOut$: Observable<string>;
|
||||||
private subscriber: Subscriber<string>;
|
private subscriber: Subscriber<string>;
|
||||||
|
|
||||||
public constructor(options: {
|
public constructor(
|
||||||
command: string, args?: string[], options?: SpawnOptionsWithoutStdio, echoStartData?: unknown
|
options: {
|
||||||
}){
|
command: string, args?: string[], options?: SpawnOptionsWithoutStdio, echoStartData?: unknown
|
||||||
|
},
|
||||||
|
logger?: Logger
|
||||||
|
){
|
||||||
this.processOut$ = new Observable<string>(subscriber => {
|
this.processOut$ = new Observable<string>(subscriber => {
|
||||||
|
|
||||||
this.subscriber = subscriber;
|
this.subscriber = subscriber;
|
||||||
@@ -21,15 +23,23 @@ export class DepotDownloader {
|
|||||||
subscriber.next(`[Info]|[Start]|${JSON.stringify(options.echoStartData) ?? ""}`);
|
subscriber.next(`[Info]|[Start]|${JSON.stringify(options.echoStartData) ?? ""}`);
|
||||||
|
|
||||||
this.process.stdout.on("data", data => {
|
this.process.stdout.on("data", data => {
|
||||||
const lines: string[] = data.toString().split("\n");
|
const stringData: string = data.toString();
|
||||||
|
|
||||||
|
if(!stringData.includes(DepotDownloaderInfoEvent.Progress) && !stringData.includes(DepotDownloaderInfoEvent.Validated)){
|
||||||
|
logger?.info("DepotDownloader stdout:", stringData);
|
||||||
|
}
|
||||||
|
|
||||||
|
const lines: string[] = stringData.split("\n");
|
||||||
lines.forEach(line => subscriber.next(line));
|
lines.forEach(line => subscriber.next(line));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.process.on("error", error => subscriber.error(error));
|
||||||
this.process.stderr.on("error", error => subscriber.error(error));
|
this.process.stderr.on("error", error => subscriber.error(error));
|
||||||
this.process.on("exit", code => subscriber.complete());
|
this.process.on("exit", () => subscriber.complete());
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
this.process.kill();
|
this.process.kill();
|
||||||
|
logger?.info("DepotDownloader process end with code", this.process.exitCode);
|
||||||
this.process = null;
|
this.process = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,8 +58,6 @@ export class DepotDownloader {
|
|||||||
|
|
||||||
return this.processOut$.pipe(map(line => {
|
return this.processOut$.pipe(map(line => {
|
||||||
|
|
||||||
console.log(line);
|
|
||||||
|
|
||||||
const matched = (line.toString() as string).match(/(?:\[(.*?)\])\|(?:\[(.*?)\]\|)?(.*?)(?=$|\[)/gm)?.[0] ?? null;
|
const matched = (line.toString() as string).match(/(?:\[(.*?)\])\|(?:\[(.*?)\]\|)?(.*?)(?=$|\[)/gm)?.[0] ?? null;
|
||||||
|
|
||||||
if(!matched){ return null; }
|
if(!matched){ return null; }
|
||||||
@@ -98,4 +106,10 @@ export class DepotDownloader {
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Logger {
|
||||||
|
info: (...args: unknown[]) => void,
|
||||||
|
warn: (...args: unknown[]) => void,
|
||||||
|
error: (...args: unknown[]) => void,
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ import log from "electron-log";
|
|||||||
import { InstallationLocationService } from "./installation-location.service";
|
import { InstallationLocationService } from "./installation-location.service";
|
||||||
import { BSLocalVersionService } from "./bs-local-version.service";
|
import { BSLocalVersionService } from "./bs-local-version.service";
|
||||||
import { WindowManagerService } from "./window-manager.service";
|
import { WindowManagerService } from "./window-manager.service";
|
||||||
import { copy } from "fs-extra";
|
import { copy, ensureDir } from "fs-extra";
|
||||||
import { pathExist } from "../helpers/fs.helpers";
|
import { pathExist } from "../helpers/fs.helpers";
|
||||||
import { Observable, map } from "rxjs";
|
import { Observable, map } from "rxjs";
|
||||||
import { DepotDownloaderArgsOptions, DepotDownloaderErrorEvent, DepotDownloaderEvent, DepotDownloaderEventType, DepotDownloaderInfoEvent } from "../../shared/models/depot-downloader.model";
|
import { DepotDownloaderArgsOptions, DepotDownloaderErrorEvent, DepotDownloaderEvent, DepotDownloaderEventType, DepotDownloaderInfoEvent } from "../../shared/models/depot-downloader.model";
|
||||||
@@ -42,14 +42,16 @@ export class BSInstallerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getDepotDownloaderExePath(): string {
|
private getDepotDownloaderExePath(): string {
|
||||||
return path.join(this.utils.getAssetsScriptsPath(), "depot-downloader", "DepotDownloader.exe");
|
return path.join(this.utils.getAssetsScriptsPath(), "depot-downloader", `DepotDownloader.${process.platform === 'linux' ? 'dll' : 'exe'}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async isDotNet6Installed(): Promise<boolean> {
|
public async isDotNet6Installed(): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
const process = spawnSync(this.getDepotDownloaderExePath());
|
const proc = process.platform === 'linux'
|
||||||
if (process.stderr.toString()) {
|
? spawnSync('dotnet', [this.getDepotDownloaderExePath()])
|
||||||
log.error("no dotnet", process.stderr.toString());
|
: spawnSync(this.getDepotDownloaderExePath());
|
||||||
|
if (proc.stderr?.toString()) {
|
||||||
|
log.error("no dotnet", proc.stderr.toString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -77,12 +79,18 @@ export class BSInstallerService {
|
|||||||
qr
|
qr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await ensureDir(this.installLocationService.versionsDirectory);
|
||||||
|
|
||||||
|
const isLinux = process.platform === 'linux';
|
||||||
|
const exePath = this.getDepotDownloaderExePath();
|
||||||
|
const args = DepotDownloader.buildArgs(depotDownloaderOptions);
|
||||||
|
|
||||||
return new DepotDownloader({
|
return new DepotDownloader({
|
||||||
command: this.getDepotDownloaderExePath(),
|
command: isLinux ? 'dotnet' : exePath,
|
||||||
args: DepotDownloader.buildArgs(depotDownloaderOptions),
|
args: isLinux ? [exePath, ...args] : args,
|
||||||
options: { cwd: this.installLocationService.versionsDirectory },
|
options: { cwd: this.installLocationService.versionsDirectory },
|
||||||
echoStartData: downloadVersion
|
echoStartData: downloadVersion
|
||||||
});
|
}, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildDepotDownloaderObservable(downloadInfos: DownloadInfo, qr?: boolean): Observable<DepotDownloaderEvent> {
|
private buildDepotDownloaderObservable(downloadInfos: DownloadInfo, qr?: boolean): Observable<DepotDownloaderEvent> {
|
||||||
@@ -104,7 +112,7 @@ export class BSInstallerService {
|
|||||||
}
|
}
|
||||||
return event;
|
return event;
|
||||||
})).subscribe(sub);
|
})).subscribe(sub);
|
||||||
|
|
||||||
}).catch(err => sub.error({
|
}).catch(err => sub.error({
|
||||||
type: DepotDownloaderEventType.Error,
|
type: DepotDownloaderEventType.Error,
|
||||||
subType: DepotDownloaderErrorEvent.Unknown,
|
subType: DepotDownloaderErrorEvent.Unknown,
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export const LinkButton = motion(
|
|||||||
!props.disabled && props.onClick?.();
|
!props.disabled && props.onClick?.();
|
||||||
}}
|
}}
|
||||||
style={{ pointerEvents: props.disabled ? "none" : "auto" }}
|
style={{ pointerEvents: props.disabled ? "none" : "auto" }}
|
||||||
|
tabIndex={-1}
|
||||||
>
|
>
|
||||||
<span className="absolute top-0 left-0 h-full w-full rounded-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{ backgroundColor: linkedColor }} />
|
<span className="absolute top-0 left-0 h-full w-full rounded-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{ backgroundColor: linkedColor }} />
|
||||||
<BsmIcon className="p-1 absolute top-0 left-0 h-full w-full !bg-transparent -rotate-45 brightness-150" icon={props.linked ? "link" : "unlink"} style={{ color: linkedColor }} />
|
<BsmIcon className="p-1 absolute top-0 left-0 h-full w-full !bg-transparent -rotate-45 brightness-150" icon={props.linked ? "link" : "unlink"} style={{ color: linkedColor }} />
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onClickAdd(index);
|
onClickAdd(index);
|
||||||
}}
|
}}
|
||||||
|
tabIndex={-1}
|
||||||
>
|
>
|
||||||
<span className="absolute top-0 left-0 h-full w-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{ backgroundColor: "currentcolor" }} />
|
<span className="absolute top-0 left-0 h-full w-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{ backgroundColor: "currentcolor" }} />
|
||||||
<motion.div className="h-full p-0.5" variants={variants}>
|
<motion.div className="h-full p-0.5" variants={variants}>
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ function ModelItemElement<T = unknown>(props: Props<T>) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.li className={`relative flex-grow min-w-[16rem] h-64 cursor-pointer ${props.className ?? ""}`} onHoverStart={() => setHovered(() => true)} onHoverEnd={() => setHovered(() => false)}>
|
<motion.li className={`relative flex-grow min-w-[16rem] h-64 cursor-pointer text-gray-200 ${props.className ?? ""}`} onHoverStart={() => setHovered(() => true)} onHoverEnd={() => setHovered(() => false)}>
|
||||||
<GlowEffect visible={props.selected || hovered} />
|
<GlowEffect visible={props.selected || hovered} />
|
||||||
<div className="absolute top-0 left-0 w-full h-full rounded-lg overflow-hidden blur-none bg-black shadow-sm shadow-black">
|
<div className="absolute top-0 left-0 w-full h-full rounded-lg overflow-hidden blur-none bg-black shadow-sm shadow-black">
|
||||||
<div ref={ref} className="contents">
|
<div ref={ref} className="contents">
|
||||||
|
|||||||
Reference in New Issue
Block a user