mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Merge branch 'v1.5.0' into feature/playlists/107
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# This workflow will...
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: npm run package
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release
|
||||
path: release
|
||||
@@ -57,10 +57,12 @@
|
||||
<a href="https://discord.gg/uSqbHVpKdV"><img
|
||||
src="https://img.shields.io/badge/-DISCORD-5865f2?style=for-the-badge&logo=discord&logoColor=ffffff"
|
||||
alt="discord" /></a>
|
||||
<a href="https://www.patreon.com/bsmanager"><img
|
||||
src="https://img.shields.io/badge/-🥰%20Support%20BSM-EC4546?style=for-the-badge" alt="Donation" /></a>
|
||||
<a href="https://twitter.com/BSManager_"><img
|
||||
src="https://img.shields.io/badge/-Twitter-F5F8FA?style=for-the-badge&logo=Twitter" alt="Twitter" /></a>
|
||||
src="https://img.shields.io/badge/-Twitter-black?style=for-the-badge&logo=X" alt="Twitter" /></a>
|
||||
<a href="https://www.bsmanager.io">
|
||||
<img src="https://img.shields.io/badge/-WebSite-00649c?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiPgogIDxnIGZpbGw9IiMzYjgyZmYiPgogICAgPHBhdG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yIDEwMi40MiAwIDAgMS0zNi4xNy05Nmw1Ny43NS0zNDcuODNhMjIuMzQgMjIuMzQgMCAwIDEgMzYuMTgtMTMuNjNsMjczLjE3IDIyMy41MWExMDIuNDIgMTAyLjQyIDAgMCAxIDM2LjE3IDk2LjA0WiIvPgogIDwvZz4KICA8ZWxsaXBzZSBmaWxsPSIjZmZmIiBzdHJva2U9ImJsYWNrIiBjeD0iNzMyLjYxIiBjeT0iNDI5LjE2IiByeD0iNjIuODMiIHJ5PSIxMTAuNzMiIHRyYW5zZm9ybT0icm90YXRlKC0xNS40NSA3MzIuNzAzIDQyOS4xOTkpIi8+Cjwvc3ZnPg==" alt="Website" /></a>
|
||||
<a href="https://www.patreon.com/bsmanager"><img
|
||||
src="https://img.shields.io/badge/-🤍%20Support%20BSM-EC4546?style=for-the-badge" alt="Donation" /></a>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
@@ -287,13 +289,11 @@
|
||||
<div>
|
||||
<ul>
|
||||
<li><strong>via Oculus</strong>: For Oculus users, <a href="https://github.com/Zagrios/bs-manager">BSManager</a>
|
||||
uses authentication directly via the <a href="https://about.meta.com/fr/">META</a> website
|
||||
to retrieve the connection token, ensuring reliable and secure access to your account data.</li>
|
||||
requires you to retrieve a connection token by following the instructions in this guide: <a href="https://github.com/Zagrios/bs-manager/wiki/How-to-obtain-your-Oculus-Token">How to obtain your Oculus Token</a>. Once obtained, please insert it into the form.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<img height=450 src="https://github.com/Zagrios/bs-manager/assets/40648115/1e4a2f98-af16-45aa-821d-0c4e90e1e54b" />
|
||||
<img height=450 src="https://github.com/Zagrios/bs-manager/assets/40648115/3674e629-542d-4de3-b8db-b248f25126d7" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -86,5 +86,8 @@
|
||||
{
|
||||
"username": "Stuijvi",
|
||||
"type": "gold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "_ monaka"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -554,8 +554,8 @@
|
||||
},
|
||||
"steam-credentials": {
|
||||
"title": "Steam Credentials",
|
||||
"p-1": "The credentials are only used to download the game because steam need to verify that you paid the game in order to be allowed to download it. They aren't saved and directly passed to DepotDownloader. If you don't want to enter your credentials you can follow this tutorial :",
|
||||
"p-2": "and then click on the gear icon in the top right corner and select \"Import a version\", select the folder where beat saber has been downloaded (If you follow the tutorial above you should have the correct location)"
|
||||
"p-1": "Your Steam credentials are only required to download versions of Beat Saber, we use DepotDownloader to achieve this which requires your Steam credentials to verify that you own the game within your library before allowing you to retrieve the game files, your credentials are not stored or saved and are passed directly to DepotDownloader. However, if you don't want to do that, you can follow this tutorial instead: ",
|
||||
"p-2": "Afterwards you can click on the gear icon in the top right corner and select \"Import a version\", then you can select the folder where Beat Saber was downloaded to. (If you followed the tutorial, you will have the right location)"
|
||||
},
|
||||
"bs-import-version": {
|
||||
"title": "Import a version",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "bs-manager",
|
||||
"description": "Manage maps, mods and more for Beat Saber",
|
||||
"main": "./src/main/main.ts",
|
||||
"version": "1.5.0",
|
||||
"scripts": {
|
||||
"build-rust-scripts": "node -r esbuild-register ./.erb/scripts/build-rust-scripts.js",
|
||||
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
|
||||
|
||||
@@ -3,6 +3,7 @@ import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import { ChildProcessWithoutNullStreams, SpawnOptionsWithoutStdio, spawn } from "child_process";
|
||||
import path from "path";
|
||||
import log from "electron-log";
|
||||
import { sToMs } from "shared/helpers/time.helpers";
|
||||
|
||||
export abstract class AbstractLauncherService {
|
||||
|
||||
@@ -46,20 +47,40 @@ export abstract class AbstractLauncherService {
|
||||
|
||||
}
|
||||
|
||||
protected launchBs(bsExePath: string, args: string[], options?: SpawnOptionsWithoutStdio): {process: ChildProcessWithoutNullStreams, exit: Promise<number>} {
|
||||
protected launchBs(bsExePath: string, args: string[], options?: SpawnBsProcessOptions): {process: ChildProcessWithoutNullStreams, exit: Promise<number>} {
|
||||
const process = this.launchBSProcess(bsExePath, args, options);
|
||||
|
||||
let timoutId: NodeJS.Timeout;
|
||||
|
||||
const exit = new Promise<number>((resolve, reject) => {
|
||||
|
||||
process.on("error", (err) => {
|
||||
log.error(`Error while launching BS`, err);
|
||||
reject(err);
|
||||
});
|
||||
|
||||
process.on("exit", (code) => {
|
||||
log.info(`BS process exit with code ${code}`);
|
||||
resolve(code);
|
||||
});
|
||||
|
||||
const unrefAfter = options?.unrefAfter ?? sToMs(10);
|
||||
|
||||
timoutId = setTimeout(() => {
|
||||
log.error("BS process unref after timeout", unrefAfter);
|
||||
process.unref();
|
||||
process.removeAllListeners();
|
||||
resolve(-1);
|
||||
}, unrefAfter);
|
||||
|
||||
}).finally(() => {
|
||||
clearTimeout(timoutId);
|
||||
});
|
||||
|
||||
return { process, exit };
|
||||
}
|
||||
}
|
||||
|
||||
export type SpawnBsProcessOptions = {
|
||||
unrefAfter?: number;
|
||||
} & SpawnOptionsWithoutStdio;
|
||||
|
||||
@@ -112,7 +112,7 @@ export class BsModsManagerService {
|
||||
|
||||
private async getBsipaInstalled(version: BSVersion): Promise<Mod> {
|
||||
const bsPath = await this.bsLocalService.getVersionPath(version);
|
||||
const injectorPath = path.join(bsPath, "IPA", "winhttp.dll");
|
||||
const injectorPath = path.join(bsPath, "Beat Saber_Data", "Managed", "IPA.Injector.dll");
|
||||
if (!(await pathExist(injectorPath))) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,7 @@ import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { OsDiagnosticService } from "renderer/services/os-diagnostic.service";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
import { AutoUpdaterService } from "renderer/services/auto-updater.service";
|
||||
import { gt } from "semver"
|
||||
import { ModalService } from "renderer/services/modale.service";
|
||||
import { ChooseStore } from "renderer/components/modal/modal-types/bs-downgrade/choose-store-modal.component";
|
||||
import { gt, parse } from "semver"
|
||||
|
||||
export default function App() {
|
||||
useService(OsDiagnosticService);
|
||||
@@ -36,7 +34,6 @@ export default function App() {
|
||||
const notification = useService(NotificationService);
|
||||
const config = useService(ConfigurationService);
|
||||
const autoUpdater = useService(AutoUpdaterService);
|
||||
const modals = useService(ModalService);
|
||||
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
@@ -52,7 +49,7 @@ export default function App() {
|
||||
|
||||
autoUpdater.setLastAppVersion(appVersion);
|
||||
|
||||
if (lastAppVersion && gt(appVersion, lastAppVersion)) {
|
||||
if (parse(lastAppVersion) && gt(appVersion, lastAppVersion)) {
|
||||
autoUpdater.showChangelog(appVersion);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user