Compare commits

...

17 Commits

Author SHA1 Message Date
MathieuG-P f5c83ee9ca bumb to 1.3.0-alpha.6 2023-08-10 01:31:42 +02:00
MathieuG-P e1546d0975 Merge pull request #301 from Zagrios/chore/add-logs-for-depotdownloader-events
[chore] add logs for depotdownloader events
2023-08-10 01:26:09 +02:00
MathieuG-P d69ecac496 [chore] add logs for depotdownloader events 2023-08-10 01:19:06 +02:00
MathieuG-P 8f1a2015bd Merge pull request #300 from Zagrios/bugfix/change-token-rejected-translation
[bugfix] change error message for TokenReject error from DepotDownloader
2023-08-10 00:40:22 +02:00
MathieuG-P 3e4afe5a07 [bugfix] change error message for TokenReject error from DepotDownloader 2023-08-10 00:34:44 +02:00
MathieuG-P 288c219417 Merge pull request #297 from Insprill/fix/depot-downloader-linux
Fix Depot Downloader not working on Linux
2023-08-09 23:50:45 +02:00
Pierce Thompson 31db079b08 Fix process command/args 2023-08-09 17:16:15 -04:00
MathieuG-P 5e1eff7143 Merge pull request #299 from Zagrios/bugfix/fix-focus-outside-element-with-tabs/298
[bugfix-298] fix focus outside element with tab key
2023-08-09 23:01:39 +02:00
MathieuG-P 301d2fdfc4 [bugfix-298] fix focus outside element with tab key 2023-08-09 22:46:10 +02:00
Pierce Thompson 9638c65407 Fix Depot Downloader not working on Linux 2023-08-08 23:51:38 -04:00
MathieuG-P efd69e4bb3 bumb to 1.3.0-alpha.5 2023-08-08 02:13:45 +02:00
MathieuG-P 90cb0d5038 Merge pull request #296 from Zagrios/bugfix/incorrect-text-colors-on-models-elemtnts-with-light-theme
[bugfix] Incorrect text colors on Models elements with light theme in download modal
2023-08-08 02:11:01 +02:00
MathieuG-P 73e8e0f15a Merge pull request #295 from Zagrios/bugfix/unable-download-bs-version-with-fresh-install
[bugfix] Ensure BSInstances exist before running depotdownloader
2023-08-08 02:07:10 +02:00
MathieuG-P b169b04637 [bugfix] Incorrect text colors on Models elements with light theme in download modal 2023-08-08 02:06:50 +02:00
MathieuG-P 6296a78cbc [bugfix] Ensure BSInstances exist before running depotdownloader 2023-08-08 01:51:07 +02:00
MathieuG-P 1305756cac add patreon 2023-08-07 19:07:48 +02:00
MathieuG-P 1f2601427b add patreon 2023-08-06 21:41:35 +02:00
12 changed files with 51 additions and 25 deletions
+3 -1
View File
@@ -13,5 +13,7 @@
{"username": "AndyIsHereBoi", "type": "gold"},
{"username": "grtroadrunner"},
{"username": "Ilnahro"},
{"username": "T3chLog"}
{"username": "T3chLog"},
{"username": "Phil", "type": "gold"},
{"username": "Protocrush", "type": "gold"}
]
+1 -1
View File
@@ -248,7 +248,7 @@
"ConnectionError": "Kann nach 10 Versuchen keine Verbindung zu Steam herstellen 🤯",
"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.",
"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.",
"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."
},
+1 -1
View File
@@ -248,7 +248,7 @@
"ConnectionError": "Unable to connect to Steam after 10 tries 🤯",
"LicenceError": "Unable to get the list of licenses.",
"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.",
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
},
+1 -1
View File
@@ -247,7 +247,7 @@
"ConnectionError": "No se puede conectar a Steam después de 10 intentos 🤯",
"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.",
"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.",
"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."
},
+1 -1
View File
@@ -244,7 +244,7 @@
"ConnectionError": "Impossible de se connecter à Steam après 10 essais 🤯",
"LicenceError": "Impossible d'obtenir la liste des licences.",
"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é.",
"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."
},
+1 -1
View File
@@ -248,7 +248,7 @@
"ConnectionError": "Не удалось подключиться к Steam за 10 попыток 🤯",
"LicenceError": "Не удалось проверить наличие лицензии.",
"RateLimitExceeded": "Слишком много попыток, вернитесь позже и попробуйте снова.",
"TokenRejected": "Не удалось скачать Beat Saber 😥 повторите попытку позже 😕",
"TokenRejected": "Ваш токен для входа был отклонен 😕 Пожалуйста, попробуйте снова.",
"AccessDenied": "Доступ к Steam был отклонен.",
"dotnet-required": "Среда запуска .NET 6 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "bs-manager",
"version": "1.3.0-alpha.4",
"version": "1.3.0-alpha.6",
"description": "BSManager",
"main": "./dist/main/main.js",
"author": {
+22 -8
View File
@@ -8,10 +8,12 @@ export class DepotDownloader {
private processOut$: Observable<string>;
private subscriber: Subscriber<string>;
public constructor(options: {
command: string, args?: string[], options?: SpawnOptionsWithoutStdio, echoStartData?: unknown
}){
public constructor(
options: {
command: string, args?: string[], options?: SpawnOptionsWithoutStdio, echoStartData?: unknown
},
logger?: Logger
){
this.processOut$ = new Observable<string>(subscriber => {
this.subscriber = subscriber;
@@ -21,15 +23,23 @@ export class DepotDownloader {
subscriber.next(`[Info]|[Start]|${JSON.stringify(options.echoStartData) ?? ""}`);
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));
});
this.process.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 () => {
this.process.kill();
logger?.info("DepotDownloader process end with code", this.process.exitCode);
this.process = null;
}
@@ -48,8 +58,6 @@ export class DepotDownloader {
return this.processOut$.pipe(map(line => {
console.log(line);
const matched = (line.toString() as string).match(/(?:\[(.*?)\])\|(?:\[(.*?)\]\|)?(.*?)(?=$|\[)/gm)?.[0] ?? null;
if(!matched){ return null; }
@@ -98,4 +106,10 @@ export class DepotDownloader {
return args;
}
}
interface Logger {
info: (...args: unknown[]) => void,
warn: (...args: unknown[]) => void,
error: (...args: unknown[]) => void,
}
+17 -9
View File
@@ -7,7 +7,7 @@ import log from "electron-log";
import { InstallationLocationService } from "./installation-location.service";
import { BSLocalVersionService } from "./bs-local-version.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 { Observable, map } from "rxjs";
import { DepotDownloaderArgsOptions, DepotDownloaderErrorEvent, DepotDownloaderEvent, DepotDownloaderEventType, DepotDownloaderInfoEvent } from "../../shared/models/depot-downloader.model";
@@ -42,14 +42,16 @@ export class BSInstallerService {
}
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> {
try {
const process = spawnSync(this.getDepotDownloaderExePath());
if (process.stderr.toString()) {
log.error("no dotnet", process.stderr.toString());
const proc = process.platform === 'linux'
? spawnSync('dotnet', [this.getDepotDownloaderExePath()])
: spawnSync(this.getDepotDownloaderExePath());
if (proc.stderr?.toString()) {
log.error("no dotnet", proc.stderr.toString());
return false;
}
return true;
@@ -77,12 +79,18 @@ export class BSInstallerService {
qr
}
await ensureDir(this.installLocationService.versionsDirectory);
const isLinux = process.platform === 'linux';
const exePath = this.getDepotDownloaderExePath();
const args = DepotDownloader.buildArgs(depotDownloaderOptions);
return new DepotDownloader({
command: this.getDepotDownloaderExePath(),
args: DepotDownloader.buildArgs(depotDownloaderOptions),
command: isLinux ? 'dotnet' : exePath,
args: isLinux ? [exePath, ...args] : args,
options: { cwd: this.installLocationService.versionsDirectory },
echoStartData: downloadVersion
});
}, log);
}
private buildDepotDownloaderObservable(downloadInfos: DownloadInfo, qr?: boolean): Observable<DepotDownloaderEvent> {
@@ -104,7 +112,7 @@ export class BSInstallerService {
}
return event;
})).subscribe(sub);
}).catch(err => sub.error({
type: DepotDownloaderEventType.Error,
subType: DepotDownloaderErrorEvent.Unknown,
@@ -38,6 +38,7 @@ export const LinkButton = motion(
!props.disabled && props.onClick?.();
}}
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 }} />
<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();
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" }} />
<motion.div className="h-full p-0.5" variants={variants}>
@@ -112,7 +112,7 @@ function ModelItemElement<T = unknown>(props: Props<T>) {
};
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} />
<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">