mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Compare commits
72 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ad81a68fc | |||
| e08c7b7109 | |||
| 2991ff4ad2 | |||
| 14eadbe274 | |||
| 9089f84f33 | |||
| f43eae8222 | |||
| 9ecb3daf55 | |||
| 054f457055 | |||
| 0f7c42a90c | |||
| 992f41238c | |||
| 17d7b4ee31 | |||
| 0e7ae4dd99 | |||
| ca1049977e | |||
| 46684fb757 | |||
| b620cf19b5 | |||
| e40e010ab5 | |||
| efebd221c9 | |||
| 4805e74a2a | |||
| 52d9fe4cf2 | |||
| dff827a06c | |||
| e6ee58b560 | |||
| 7c871f84a4 | |||
| 6aed7810d8 | |||
| 6f332f66bc | |||
| 6dde2fa5d0 | |||
| 4a977332c9 | |||
| 81c5a7928a | |||
| 4b60be5846 | |||
| f07706c4f4 | |||
| 64ed9d24b1 | |||
| da40448ca1 | |||
| 2e6224825f | |||
| 8caea035ed | |||
| 507e8e04f2 | |||
| 02c856b5d6 | |||
| d8cb6a3892 | |||
| b763a909b7 | |||
| 4bbfe72381 | |||
| 27f36dfa54 | |||
| f70df59e21 | |||
| 844ca12b9c | |||
| ee9e10170c | |||
| 40365b44e3 | |||
| 6c29081d84 | |||
| 1c9bf7dab0 | |||
| dd572226bb | |||
| 5e33efbb06 | |||
| 99d125d35d | |||
| ce6fb95aa2 | |||
| 499956d3b3 | |||
| c313685f6f | |||
| 88a1691d4b | |||
| cdd25b458c | |||
| 30a53c013f | |||
| 1db3db7bdd | |||
| e0e647b22a | |||
| 69914e3063 | |||
| 0c2624ed37 | |||
| cf11277541 | |||
| d028e144fc | |||
| 59c624d58d | |||
| 2d67876ee1 | |||
| 6b30d74628 | |||
| eb76bb5df0 | |||
| 590daf3be2 | |||
| ecf18b9967 | |||
| bc26f329a5 | |||
| 030df21619 | |||
| d61588c09f | |||
| 7ed2b5c820 | |||
| 239a68821e | |||
| fc512091e4 |
@@ -52,6 +52,19 @@ module.exports = {
|
||||
Function: false,
|
||||
}
|
||||
}]
|
||||
"import/extensions": "off",
|
||||
"lines-between-class-members": "off",
|
||||
"no-throw-literal": "warn",
|
||||
"no-use-before-define": "off",
|
||||
"no-useless-constructor": "off",
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
'react/jsx-filename-extension': [2, { 'extensions': ['.js', '.jsx', '.ts', '.tsx'] }],
|
||||
"no-shadow": "off",
|
||||
"react/function-component-definition": "off",
|
||||
"jsx-a11y/control-has-associated-label": "off",
|
||||
"react/button-has-type": "off",
|
||||
"max-classes-per-file": "off",
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
|
||||
@@ -15,3 +15,5 @@
|
||||
*.ttf binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
assets/scripts/* binary
|
||||
*.zip binary
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -26,6 +26,7 @@ jobs:
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
# Currently typescript, eslint, and prettier are unhappy
|
||||
continue-on-error: true
|
||||
|
||||
- name: Unit tests
|
||||
run: npm run test:unit
|
||||
|
||||
|
||||
+1
-1
@@ -29,4 +29,4 @@ npm-debug.log.*
|
||||
*.scss.d.ts
|
||||
|
||||
# externals
|
||||
externals/bs-admin-start/target/*
|
||||
externals/**/target/*
|
||||
|
||||
@@ -598,8 +598,7 @@
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/6169409105101272202",
|
||||
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans/32055887/c328e407367e9914abaf92f609501877ee5abb63.png",
|
||||
"ReleaseDate": "1680623885",
|
||||
"year": "2023",
|
||||
"recommended": true
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.29.4",
|
||||
@@ -682,7 +681,7 @@
|
||||
"ReleaseDate": "1702309893",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
{
|
||||
"BSVersion": "1.34.5",
|
||||
"BSManifest": "7413405154512822201",
|
||||
"OculusBinaryId": "6639053626194360",
|
||||
@@ -690,5 +689,120 @@
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/925e60f14c6815f7617fde11a894ed20f54a0846.png",
|
||||
"ReleaseDate": "1707745958",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.34.6",
|
||||
"BSManifest": "4398761375819224126",
|
||||
"OculusBinaryId": "6682206641879058",
|
||||
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/7595953477644376720",
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/e7c75bdfc76d00713adc3fbdf221c9ce8ab3620d.png",
|
||||
"ReleaseDate": "1708091473",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.35.0",
|
||||
"BSManifest": "1490986193481243578",
|
||||
"OculusBinaryId": "6720809361352119",
|
||||
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4142820264819707009",
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images//32055887/9a141be5c44ca6fc81551a2c7e7f28407df413ed.png",
|
||||
"ReleaseDate": "1709831174",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.36.0",
|
||||
"BSManifest": "8533509040167838423",
|
||||
"OculusBinaryId": "6863072637125790",
|
||||
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4205873192610459250",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images//32055887/b8bd8a050e2bc3903cf18a277c5489ade01f7e75.png",
|
||||
"ReleaseDate": "1712681263",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.36.2",
|
||||
"BSManifest": "4832237377879752064",
|
||||
"OculusBinaryId": "6983660338400352",
|
||||
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4181105931135110118",
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images//32055887/74541417f14dee210bcfd89eefeabd7c0cc27c7d.png",
|
||||
"ReleaseDate": "1715008020",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.37.0",
|
||||
"BSManifest": "7270690075584855288",
|
||||
"OculusBinaryId": "7062062833893435",
|
||||
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4161968170153497460",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images//32055887/f82d34c7582137a6748a28c5b02670ff4b235356.png",
|
||||
"ReleaseDate": "1717513346",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.37.1",
|
||||
"BSManifest": "9129356330007601179",
|
||||
"OculusBinaryId": "7313068492126200",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4253168598913260422",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/039be718c1494f948257cd5b09f0082986484a58.png",
|
||||
"ReleaseDate": "1720710529",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.37.2",
|
||||
"BSManifest": "6848299977215652352",
|
||||
"OculusBinaryId": "7438773609555687",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4349999161850643744",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/7c03af6d12fad23f1d439666d4be86b492d40003.png",
|
||||
"ReleaseDate": "1722945814",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.37.3",
|
||||
"BSManifest": "5834150512217183366",
|
||||
"OculusBinaryId": "7553569971409383",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/6808965920900622902",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/a1c9a6737cc5182fca8cddc7c8088eda6dd4d82d.png",
|
||||
"ReleaseDate": "1724061712",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.37.4",
|
||||
"BSManifest": "7585106640515547731",
|
||||
"OculusBinaryId": "7630971613669218",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4601078012425941968",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/23e6e6f219a56d2f9ea4a27b560c54ac1214aec3.png",
|
||||
"ReleaseDate": "1725548547",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.37.5",
|
||||
"BSManifest": "3122533396458693889",
|
||||
"OculusBinaryId": "7685108391588873",
|
||||
"ReleaseDate": "1725628356",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.38.0",
|
||||
"BSManifest": "3482902979520746178",
|
||||
"OculusBinaryId": "7834818833284494",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4669760442595134838",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/57cfa043407c091e67b7e0a8ae86fe5590deae33.png",
|
||||
"ReleaseDate": "1728399815",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.39.0",
|
||||
"BSManifest": "5365094543246905054",
|
||||
"OculusBinaryId": "7978663688900007",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4451339035198095638",
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/fd8e2c783e46decdf5e10fed1e16f124616d9321.png",
|
||||
"ReleaseDate": "1731426932",
|
||||
"year": "2024"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.39.1",
|
||||
"BSManifest": "2179614296547473280",
|
||||
"OculusBinaryId": "8189133517853022",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4451340304252928024",
|
||||
"ReleaseDate": "1732107748",
|
||||
"year": "2024",
|
||||
"recommended": true
|
||||
}
|
||||
]
|
||||
@@ -79,5 +79,15 @@
|
||||
},
|
||||
{
|
||||
"username": "mereknom"
|
||||
},
|
||||
{
|
||||
"username": "Jascha"
|
||||
},
|
||||
{
|
||||
"username": "Celldweller",
|
||||
"type": "gold"
|
||||
},
|
||||
{
|
||||
"username": "rhythmshade"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "Ablehnen",
|
||||
"apply": "Übernehmen",
|
||||
"copy": "Kopieren",
|
||||
"copied": "Kopiert!"
|
||||
"copied": "Kopiert!",
|
||||
"confirm": "Bestätigen",
|
||||
"choose-folder": "Ordner Wählen",
|
||||
"unknown": "Ein unbekannter Fehler ist aufgetreten ¯\\_(ツ)_/¯",
|
||||
"warning": "Achtung",
|
||||
"continue": "Weiter"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "Version Hinzufügen",
|
||||
@@ -32,7 +37,8 @@
|
||||
"desktop": "FPFC Modus",
|
||||
"desktop-description": "Auf diese Weise kannst du WASD und die Maus verwenden, um im Spiel durch das Menü zu navigieren. Dies erleichtert das Testen erheblich, da Du dein Headset nicht aufsetzen musst!",
|
||||
"debug": "Debug Modus",
|
||||
"debug-description": "Aktiviert das Ausgabeprotokollfenster für IPA. Dies zeigt die Debug-Konsole, die Mods verwenden.",
|
||||
"debug-description": "Aktiviert das Ausgabeprotokollfenster für IPA. Dies zeigt die Debug-Konsole, welche die Mods verwenden.",
|
||||
"outdated-tippy": "Diese Version ist veraltet, und einige Mods oder Funktionen funktionieren möglicherweise nicht wie erwartet. Es wird empfohlen, die empfohlene Version ({recommendedVersion}) von Beat Saber zu verwenden, um die neuesten Funktionen und Fehlerbehebungen zu genießen.",
|
||||
"advanced-launch": {
|
||||
"button": "Erweiterter Start",
|
||||
"placeholder": "Weitere Argumente Bspw: --revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "Neueste",
|
||||
"description": "Beschreibung",
|
||||
"dropdown": {
|
||||
"uninstall-all": "Alle deinstallieren"
|
||||
"uninstall-all": "Alle deinstallieren",
|
||||
"unselect-all": "Alle abwählen"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "Bearbeiten",
|
||||
"uninstall": "Entfernen",
|
||||
"create-shortcut": "Verknüpfung erstellen",
|
||||
"shared-folders": "Geteilte Ordner",
|
||||
"restore-oculus-folder": "Ordner wiederherstellen"
|
||||
"shared-folders": "Geteilte Ordner"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Benötigt"
|
||||
"dotnet-required": ".NET 8 Benötigt"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam scheint uns BeatSaber nicht herunterladen zu lassen 😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "Du hast es zu oft versucht, warte eine Weile und versuche es später erneut.",
|
||||
"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."
|
||||
"dotnet-required": ".NET 8 Runtime muss installiert sein, um eine Version von BeatSaber herunterzuladen. Lade es herunter, indem Du auf die Schaltfläche unten klickst."
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": ".NET 6 Herunterladen"
|
||||
"download-dotnet": ".NET 8 Herunterladen"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,16 +387,20 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber läuft bereits",
|
||||
"EXE_NOT_FINDED": "Dateien Fehlen",
|
||||
"EXIT": "Abrupter Stop",
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculus-Bibliothek nicht gefunden"
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculus-Bibliothek nicht gefunden",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Original Oculus-Version nicht gefunden"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Ein unbekannter Fehler ist aufgetreten.",
|
||||
"STEAM_NOT_RUNNING": "Steam muss laufen, um Beat Saber zu starten.",
|
||||
"OCULUS_NOT_RUNNING": "Oculus muss ausgeführt werden, um Beat Saber zu starten.",
|
||||
"BS_ALREADY_RUNNING": "Schließe Beat Saber, bevor Du es erneut startest.",
|
||||
"EXE_NOT_FINDED": "Einige Dateien scheinen zu fehlen, versuche die Dateien zu überprüfen.",
|
||||
"EXIT": "Beat Saber stoppte abrupt, versuche die Dateien zu überprüfen.",
|
||||
"OCULUS_LIB_NOT_FOUND": "Überprüfe, ob die Oculus-Anwendung korrekt installiert ist und dass die Bibliotheken in Oculus richtig definiert sind."
|
||||
"BS_ALREADY_RUNNING": "Schließe Beat Saber, bevor du es erneut startest.",
|
||||
"EXE_NOT_FINDED": "Einige Dateien scheinen zu fehlen. Versuche, die Dateien zu überprüfen.",
|
||||
"EXIT": "Beat Saber stoppte abrupt. Versuche, die Dateien zu überprüfen.",
|
||||
"OCULUS_LIB_NOT_FOUND": "Überprüfe, ob die Oculus-Anwendung korrekt installiert ist und dass die Bibliotheken in Oculus richtig definiert sind.",
|
||||
"PROTON_NOT_SET": "Stellen Sie den Proton-Pfad in den Einstellungen ein.",
|
||||
"PROTON_NOT_FOUND": "Stellen Sie den Proton-Pfad in den Einstellungen ein.",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Beat Saber muss vor dem Öffnen über die Oculus-App installiert werden."
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Starte Steam"
|
||||
@@ -460,7 +470,7 @@
|
||||
},
|
||||
"maps": {
|
||||
"one-click-install": {
|
||||
"success": "Map installation abegschlossen",
|
||||
"success": "Map installation abgeschlossen",
|
||||
"error": "Ein Fehler ist aufgetreten während der installation der Map"
|
||||
}
|
||||
},
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "Sicherung erstellt",
|
||||
"msg": "Das Freigeben des Ordners „UserData“ kann zu Fehlern führen. Bei Problemen trenne den Ordner, um die Sicherung wiederherzustellen"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "Fehler beim Verknüpfen des Ordners",
|
||||
"msg": {
|
||||
"EPERM": "BSManager hat nicht die erforderlichen Berechtigungen, um den Ordner zu verknüpfen.",
|
||||
"EACCES": "BSManager hat nicht die erforderlichen Berechtigungen, um den Ordner zu verknüpfen.",
|
||||
"ENOSPC": "Die Festplatte ist voll, machen Sie Platz und versuchen Sie es erneut.",
|
||||
"UNKNOWN_ERROR": "Ein unbekannter Fehler ist beim Verknüpfen des Ordners aufgetreten."
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "Beim Erstellen der Verknüpfung ist ein Fehler aufgetreten."
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "Veraltete Version",
|
||||
"msg": "Diese Version von Beat Saber ist veraltet. Verwenden Sie die empfohlene Version, um die neuesten Funktionen und Fehlerbehebungen zu nutzen.",
|
||||
"actions": {
|
||||
"do-not-remind": "Nicht mehr daran erinnern",
|
||||
"ok": "Ok"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,15 +718,12 @@
|
||||
"stay": "Angemeldet bleiben",
|
||||
"connect-to-meta": "Mit Meta verbinden"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "Achtung",
|
||||
"body": {
|
||||
"must-be-installed-once": "Sie müssen Beat Saber mindestens einmal aus dem Oculus Store installiert haben, sonst könnte sich Beat Saber nach dem Start automatisch schließen.",
|
||||
"need-backup": "Um diese Version zu starten, wird der Installationsordner von Beat Saber in Ihrer Oculus-Bibliothek umbenannt.",
|
||||
"can-restore-later": "Bei Bedarf können Sie ihn vom BSManager aus wiederherstellen, indem Sie zu den Optionen der originalen Oculus-Version gehen und auf 'Ordner wiederherstellen' klicken",
|
||||
"tips-launch-oculus": "Tipp: Sie können diese Version direkt über Oculus starten, solange die Originalversion nicht wiederhergestellt ist."
|
||||
},
|
||||
"not-remind-me": "Nicht mehr erinnern",
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "Sideloading aktivieren",
|
||||
"info-1": "Um Beat Saber starten zu können, muss die Möglichkeit aktiviert werden, Sideloading-Apps auszuführen. BSManager wird Administratorrechte anfordern, um diese Funktion automatisch zu aktivieren.",
|
||||
"info-2": "Die Sideloading-Funktion ermöglicht das Starten von Spielen, die sich außerhalb Ihres Oculus-Bibliotheksordners befinden.",
|
||||
"info-3": "Nachdem das Sideloading aktiviert wurde, bleibt die Funktion aktiv, und Sie werden nicht mehr aufgefordert, sie zu aktivieren.",
|
||||
"i-want-to-do-it-myself": "Ich möchte es selbst machen",
|
||||
"understood": "Verstanden"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
@@ -729,6 +753,9 @@
|
||||
},
|
||||
"launch-as-admin": "Als Administrator starten",
|
||||
"not-remind-me": "Nicht mehr erinnern"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "Die Version {outdatedVersion} ist veraltet, und einige Mods oder Funktionen funktionieren möglicherweise nicht mehr wie erwartet. Bitte lade die neueste empfohlene Version ({recommendedVersion}) von Beat Saber herunter, um die neuesten Funktionen und Fehlerbehebungen zu nutzen."
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,54 +764,55 @@
|
||||
"nps" : "Noten Pro Sekunde",
|
||||
"tags": "Stichworte",
|
||||
"specificities": "Allgemein",
|
||||
"requirements": "Anforderungen"
|
||||
"requirements": "Anforderungen",
|
||||
"exclude": "ausschließen"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "Präzision",
|
||||
"balanced": "Ausgeglichen",
|
||||
"challenge": "Herausforderung",
|
||||
"dancestyle": "Tanz",
|
||||
"dance-style": "Tanz",
|
||||
"fitness": "Fitness",
|
||||
"speed": "Geschwindigkeit",
|
||||
"tech": "Tech"
|
||||
},
|
||||
"map-styles": {
|
||||
"dance": "Tanz",
|
||||
"swing": "Swing",
|
||||
"nightcore": "Nightcore",
|
||||
"folk": "Folk",
|
||||
"family": "Familie",
|
||||
"ambient": "umgebung",
|
||||
"funk": "Funk",
|
||||
"jazz": "Jazz",
|
||||
"soul": "Soul",
|
||||
"speedcore": "Speedcore",
|
||||
"punk": "Punk",
|
||||
"rb": "R&B",
|
||||
"holiday": "Urlaub",
|
||||
"vocaloid": "Vokaloid",
|
||||
"jrock": "J-Rock",
|
||||
"trance": "Trance",
|
||||
"drumbass": "Basstrommel",
|
||||
"comedy": "Komödie",
|
||||
"instrumental": "Instrumental",
|
||||
"hardcore": "Hardcore",
|
||||
"kpop": "K-Pop",
|
||||
"indie": "Indie",
|
||||
"techno": "Techno",
|
||||
"house": "House",
|
||||
"game": "Videospiele",
|
||||
"film": "Filme",
|
||||
"alt": "Alternativ",
|
||||
"dubstep": "Dubstep",
|
||||
"metal": "Metal",
|
||||
"anime": "Anime",
|
||||
"hiphop": "HipHop",
|
||||
"jpop": "J-Pop",
|
||||
"rock": "Rock",
|
||||
"pop": "Pop",
|
||||
"electronic": "Elektronisch",
|
||||
"classical-orchestral": "Klassisch & Orchestra"
|
||||
"dance": "tanz",
|
||||
"swing": "swing",
|
||||
"nightcore": "nightcore",
|
||||
"folk-acoustic": "folk & akustisch",
|
||||
"kids-family": "kinder & familie",
|
||||
"ambient": "ambient",
|
||||
"funk-disco": "funk & disco",
|
||||
"jazz": "jazz",
|
||||
"soul": "soul",
|
||||
"speedcore": "speedcore",
|
||||
"punk": "punk",
|
||||
"rb": "r&b",
|
||||
"holiday": "urlaub",
|
||||
"vocaloid": "vocaloid",
|
||||
"j-rock": "j-rock",
|
||||
"trance": "trance",
|
||||
"drum-and-bass": "drum & bass",
|
||||
"comedy-meme": "komödie & meme",
|
||||
"instrumental": "instrumental",
|
||||
"hardcore": "hardcore",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "indie",
|
||||
"techno": "techno",
|
||||
"house": "house",
|
||||
"video-game-soundtrack": "videospiel",
|
||||
"tv-movie-soundtrack": "TV & film",
|
||||
"alternative": "alternativ",
|
||||
"dubstep": "dubstep",
|
||||
"metal": "metal",
|
||||
"anime": "anime",
|
||||
"hip-hop-rap": "hip hop & rap",
|
||||
"j-pop": "j-pop",
|
||||
"rock": "rock",
|
||||
"pop": "pop",
|
||||
"electronic": "elektronisch",
|
||||
"classical-orchestral": "Klassisch & Orchestral"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "KI",
|
||||
@@ -793,6 +821,9 @@
|
||||
"verified": "verifiziert",
|
||||
"fullSpread": "full spread"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "installiert"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "einfach",
|
||||
"Normal": "normal",
|
||||
@@ -965,10 +996,6 @@
|
||||
"go-to-mods": "Gehe zu Mods",
|
||||
"not-remind": "Erinnere mich nicht"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Gebrochene Modelle",
|
||||
"desc": "Seit dem Update der Beat Saber Engine sind alle benutzerdefinierten Modellmods defekt und müssen aktualisiert werden. Sie wurden noch nicht aktualisiert."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export abgeschlossen 🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "Refuse",
|
||||
"apply": "Apply",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied!"
|
||||
"copied": "Copied!",
|
||||
"confirm": "Confirm",
|
||||
"choose-folder": "Choose folder",
|
||||
"unknown": "An unknown error occurred ¯\\_(ツ)_/¯",
|
||||
"warning": "Warning",
|
||||
"continue": "Continue"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "Add a version",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "First Person Flying Controller mode allows you to use WASD and the mouse to navigate around the menu in game. This makes testing much easier, because you don't have to put on your headset!",
|
||||
"debug": "Debug Mode",
|
||||
"debug-description": "Enables the output log window for IPA. This will show the debug console that mods use.",
|
||||
"outdated-tippy": "This version is outdated, and some mods or features may no longer work as expected. Prefer using the recommended version ({recommendedVersion}) of Beat Saber to enjoy the latest features and bugfixes.",
|
||||
"advanced-launch": {
|
||||
"button": "Advanced launch",
|
||||
"placeholder": "Additional arguments ex: --revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "Latest",
|
||||
"description": "Description",
|
||||
"dropdown": {
|
||||
"uninstall-all": "Uninstall all"
|
||||
"uninstall-all": "Uninstall all",
|
||||
"unselect-all": "Unselect all"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "Edit",
|
||||
"uninstall": "Uninstall",
|
||||
"create-shortcut": "Create a shortcut",
|
||||
"shared-folders": "Shared Folders",
|
||||
"restore-oculus-folder": "Restore the folder"
|
||||
"shared-folders": "Shared Folders"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Required"
|
||||
"dotnet-required": ".NET 8 Required"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam doesn't seem to want to let us download Beat Saber 😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "You've tried too many times, wait a while and 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."
|
||||
"dotnet-required": ".NET 8 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": "Download .NET 6"
|
||||
"download-dotnet": "Download .NET 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber already running",
|
||||
"EXE_NOT_FINDED": "Missing files",
|
||||
"EXIT": "Abrupt stop",
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculus library not found"
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculus library not found",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Original Oculus version not found"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "An unknown error has occurred.",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "Close BeatSaber before launching it again.",
|
||||
"EXE_NOT_FINDED": "Some files seem to be missing, try to verify the files.",
|
||||
"EXIT": "BeatSaber stopped abruptly, tries to check the files.",
|
||||
"OCULUS_LIB_NOT_FOUND": "Check that the Oculus application is properly installed, and that the libraries are correctly defined in Oculus."
|
||||
"OCULUS_LIB_NOT_FOUND": "Check that the Oculus application is properly installed, and that the libraries are correctly defined in Oculus.",
|
||||
"PROTON_NOT_SET": "Set the Proton path in settings.",
|
||||
"PROTON_NOT_FOUND": "Set the Proton path in settings.",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Beat Saber must be installed from the Oculus app before opening."
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Launch Steam"
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "Backup created",
|
||||
"msg": "Sharing the 'UserData' folder can generate errors, in case of problems unlink the folder to restore the backup"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "Error while linking folder",
|
||||
"msg": {
|
||||
"EPERM": "BSManager does not have the necessary permissions to link the folder.",
|
||||
"EACCES": "BSManager does not have the necessary permissions to link the folder.",
|
||||
"ENOSPC": "The disk is full, make some space and try again.",
|
||||
"UNKNOWN_ERROR":"An unknown error has occurred while linking the folder."
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "An error occurred while creating the shortcut."
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "Version Outdated",
|
||||
"msg": "This Beat Saber version is outdated, use the recommended version to enjoy the latest features and bugfixes",
|
||||
"actions": {
|
||||
"do-not-remind": "Do not remind me",
|
||||
"ok": "Ok"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,15 +718,12 @@
|
||||
"stay": "Remember me",
|
||||
"connect-to-meta": "Connect to Meta"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "Warning",
|
||||
"body": {
|
||||
"must-be-installed-once": "You must have installed Beat Saber at least once from the Oculus Store, otherwise Beat Saber might automatically close after launching.",
|
||||
"need-backup": "To launch this version, the Beat Saber installation folder located in your Oculus library will be renamed.",
|
||||
"can-restore-later": "If needed, you can restore it from BSManager by going to the options of the original Oculus version and clicking on 'Restore the folder'",
|
||||
"tips-launch-oculus": "Tip: You can launch this version directly from Oculus, as long as the original version is not restored."
|
||||
},
|
||||
"not-remind-me": "Do not remind me",
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "Enable Sideloading",
|
||||
"info-1": "In order to launch Beat Saber, the ability to run sideloaded apps must be enabled. BSManager will request administrator rights to enable this feature automatically.",
|
||||
"info-2": "The sideloaded apps feature allows launching games located outside your Oculus library folder.",
|
||||
"info-3": "After sideloading is activated, the feature will remain active, and you will no longer be prompted to enable it.",
|
||||
"i-want-to-do-it-myself": "I want to do it myself",
|
||||
"understood": "Understood"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
@@ -729,6 +753,9 @@
|
||||
},
|
||||
"launch-as-admin": "Launch as Administrator",
|
||||
"not-remind-me": "Do not remind me"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "The version {outdatedVersion} is outdated, and some mods or features may no longer work as expected. Please download the latest recommended version ({recommendedVersion}) of Beat Saber to enjoy the latest features and bugfixes."
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,13 +764,14 @@
|
||||
"nps" : "Notes Per Second",
|
||||
"tags": "tags",
|
||||
"specificities": "general",
|
||||
"requirements": "requirements"
|
||||
"requirements": "requirements",
|
||||
"exclude": "exclude"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "accuracy",
|
||||
"balanced": "balanced",
|
||||
"challenge": "challenge",
|
||||
"dancestyle": "dance",
|
||||
"dance-style": "dance",
|
||||
"fitness": "fitness",
|
||||
"speed": "speed",
|
||||
"tech": "tech"
|
||||
@@ -752,10 +780,10 @@
|
||||
"dance": "dance",
|
||||
"swing": "swing",
|
||||
"nightcore": "nightcore",
|
||||
"folk": "folk",
|
||||
"family": "family",
|
||||
"folk-acoustic": "folk & acoustic",
|
||||
"kids-family": "kids & family",
|
||||
"ambient": "ambient",
|
||||
"funk": "funk",
|
||||
"funk-disco": "funk & disco",
|
||||
"jazz": "jazz",
|
||||
"soul": "soul",
|
||||
"speedcore": "speedcore",
|
||||
@@ -763,24 +791,24 @@
|
||||
"rb": "r&b",
|
||||
"holiday": "holiday",
|
||||
"vocaloid": "vocaloid",
|
||||
"jrock": "j-rock",
|
||||
"j-rock": "j-rock",
|
||||
"trance": "trance",
|
||||
"drumbass": "drum & bass",
|
||||
"comedy": "comedy",
|
||||
"drum-and-bass": "drum & bass",
|
||||
"comedy-meme": "comedy & meme",
|
||||
"instrumental": "instrumental",
|
||||
"hardcore": "hardcore",
|
||||
"kpop": "k-pop",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "indie",
|
||||
"techno": "techno",
|
||||
"house": "house",
|
||||
"game": "video game",
|
||||
"film": "film",
|
||||
"alt": "alternative",
|
||||
"video-game-soundtrack": "video game",
|
||||
"tv-movie-soundtrack": "TV & film",
|
||||
"alternative": "alternative",
|
||||
"dubstep": "dubstep",
|
||||
"metal": "metal",
|
||||
"anime": "anime",
|
||||
"hiphop": "hiphop",
|
||||
"jpop": "j-pop",
|
||||
"hip-hop-rap": "hip hop & rap",
|
||||
"j-pop": "j-pop",
|
||||
"rock": "rock",
|
||||
"pop": "pop",
|
||||
"electronic": "electronic",
|
||||
@@ -793,6 +821,9 @@
|
||||
"verified": "verified",
|
||||
"fullSpread": "full spread"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "installed"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "easy",
|
||||
"Normal": "normal",
|
||||
@@ -965,10 +996,6 @@
|
||||
"go-to-mods": "Go to mods",
|
||||
"not-remind": "Don't remind me"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Broken models",
|
||||
"desc": "Since the Beat Saber engine update, all custom model mods have broken and need to be updated. They have not been updated yet."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export completed 🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "Rechazar",
|
||||
"apply": "Aplicar",
|
||||
"copy": "Copiar",
|
||||
"copied": "¡Copiado!"
|
||||
"copied": "¡Copiado!",
|
||||
"confirm": "Confirmar",
|
||||
"choose-folder": "Elige la carpeta",
|
||||
"unknown": "Se ha producido un error desconocido ¯\\_(ツ)_/¯",
|
||||
"warning": "Advertencia",
|
||||
"continue": "Continuar"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "Agregar una versión",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "El modo FPFC te permite usar WASD y el mouse para navegar por el menú en juego. Esto hace que las pruebas sean mucho más fáciles, ¡porque no tienes que ponerte las gafas VR!",
|
||||
"debug": "Modo Depuración",
|
||||
"debug-description": "Habilita la ventana de registro de salida para IPA. Esto mostrará la consola de depuración que usan los mods.",
|
||||
"outdated-tippy": "Esta versión está desactualizada, y algunos mods o funciones pueden no funcionar como se espera. Es mejor usar la versión recomendada ({recommendedVersion}) de Beat Saber para disfrutar de las últimas características y correcciones.",
|
||||
"advanced-launch": {
|
||||
"button": "Opciones avanzadas",
|
||||
"placeholder": "Argumentos adicionales ej: --revert; --no-wait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "Último",
|
||||
"description": "Descripción",
|
||||
"dropdown": {
|
||||
"uninstall-all": "Desinstalar todos"
|
||||
"uninstall-all": "Desinstalar todos",
|
||||
"unselect-all": "Deseleccionar todo"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "Editar",
|
||||
"uninstall": "Desinstalar",
|
||||
"create-shortcut": "Crear un atajo",
|
||||
"shared-folders": "Carpetas Compartidas",
|
||||
"restore-oculus-folder": "Restaurar la carpeta"
|
||||
"shared-folders": "Carpetas Compartidas"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Requerido"
|
||||
"dotnet-required": ".NET 8 Requerido"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Parece que Steam no quiere dejarnos descargar Beat Saber 😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "Lo has intentado demasiadas veces, espera un poco y vuelve a intentarlo más tarde.",
|
||||
"TokenRejected": "Tu token de inicio de sesión ha sido rechazada 😕 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 Beat Saber. Descárgalo haciendo clic en el botón de abajo."
|
||||
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 8 para descargar una versión de Beat Saber. Descárgalo haciendo clic en el botón de abajo."
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": "Descargar .NET 6"
|
||||
"download-dotnet": "Descargar .NET 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber ya está en marcha",
|
||||
"EXE_NOT_FINDED": "Archivos no encontrados",
|
||||
"EXIT": "Parada abrupta",
|
||||
"OCULUS_LIB_NOT_FOUND": "Librería Oculus no encontrada"
|
||||
"OCULUS_LIB_NOT_FOUND": "Librería Oculus no encontrada",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "No se encontró la versión original de Oculus"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Se ha producido un error desconocido.",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "Cierra Beat Saber antes de volver a iniciarlo.",
|
||||
"EXE_NOT_FINDED": "Parece que faltan algunos archivos, intenta verificar los archivos.",
|
||||
"EXIT": "Beat Saber se detuvo abruptamente, trata de verificar los archivos.",
|
||||
"OCULUS_LIB_NOT_FOUND": "Verifica que la aplicación Oculus esté correctamente instalada y que las librerías estén bien definidas en Oculus."
|
||||
"OCULUS_LIB_NOT_FOUND": "Verifica que la aplicación Oculus esté correctamente instalada y que las librerías estén bien definidas en Oculus.",
|
||||
"PROTON_NOT_SET": "Establece la ruta de Proton en la configuración.",
|
||||
"PROTON_NOT_FOUND": "Establece la ruta de Proton en la configuración.",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Beat Saber debe instalarse desde la aplicación de Oculus antes de abrirlo."
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Iniciar Steam"
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "Backup creado",
|
||||
"msg": "Compartir la carpeta 'UserData' puede generar errores, en caso de problemas desvincula la carpeta para restaurar la copia de seguridad"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "Error al enlazar la carpeta",
|
||||
"msg": {
|
||||
"EPERM": "BSManager no tiene los permisos necesarios para enlazar la carpeta.",
|
||||
"EACCES": "BSManager no tiene los permisos necesarios para enlazar la carpeta.",
|
||||
"ENOSPC": "El disco está lleno, libera espacio e inténtalo de nuevo.",
|
||||
"UNKNOWN_ERROR": "Se ha producido un error desconocido al enlazar la carpeta."
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "Se produjo un error al crear el acceso directo."
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "Versión desactualizada",
|
||||
"msg": "Esta versión de Beat Saber está desactualizada. Usa la versión recomendada para disfrutar de las últimas características y correcciones.",
|
||||
"actions": {
|
||||
"do-not-remind": "No volver a recordármelo",
|
||||
"ok": "Ok"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,15 +718,12 @@
|
||||
"stay": "Recuérdame",
|
||||
"connect-to-meta": "Conectarse a Meta"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "Atención",
|
||||
"body": {
|
||||
"must-be-installed-once": "Debes haber instalado Beat Saber al menos una vez desde la Oculus Store, de lo contrario, Beat Saber podría cerrarse automáticamente después de iniciar.",
|
||||
"need-backup": "Para iniciar esta versión, la carpeta de instalación de Beat Saber que se encuentra en tu biblioteca de Oculus será renombrada.",
|
||||
"can-restore-later": "Si es necesario, podrás restaurarla desde el BSManager accediendo a las opciones de la versión original de Oculus y haciendo clic en 'Restaurar la carpeta'",
|
||||
"tips-launch-oculus": "Consejo: Podrás iniciar esta versión directamente desde Oculus, siempre que la versión original no haya sido restaurada."
|
||||
},
|
||||
"not-remind-me": "No volver a recordármelo",
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "Habilitar Sideloading",
|
||||
"info-1": "Para poder iniciar Beat Saber, se debe habilitar la capacidad de ejecutar aplicaciones en sideloading. BSManager solicitará permisos de administrador para habilitar esta función automáticamente.",
|
||||
"info-2": "La función de sideloading permite iniciar juegos ubicados fuera de la carpeta de la biblioteca de Oculus.",
|
||||
"info-3": "Una vez que se active el sideloading, la función permanecerá activa y ya no se le pedirá que la habilite.",
|
||||
"i-want-to-do-it-myself": "Quiero hacerlo yo mismo",
|
||||
"understood": "Entendido"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
@@ -729,6 +753,9 @@
|
||||
},
|
||||
"launch-as-admin": "Iniciar como Administrador",
|
||||
"not-remind-me": "No volver a recordármelo"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "La versión {outdatedVersion} está obsoleta, y algunos mods o funciones pueden no funcionar como se espera. Por favor, descarga la última versión recomendada ({recommendedVersion}) de Beat Saber para disfrutar de las últimas funciones y correcciones de errores."
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,25 +764,26 @@
|
||||
"nps" : "Notas Por Segundo",
|
||||
"tags": "tags",
|
||||
"specificities": "general",
|
||||
"requirements": "requisitos"
|
||||
"requirements": "requisitos",
|
||||
"exclude": "excluir"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "precisión",
|
||||
"balanced": "equilibrado",
|
||||
"challenge": "desafío",
|
||||
"dancestyle": "baile",
|
||||
"dance-style": "baile",
|
||||
"fitness": "fitness",
|
||||
"speed": "speed",
|
||||
"tech": "tech"
|
||||
},
|
||||
"map-styles": {
|
||||
"dance": "baile",
|
||||
"dance": "danza",
|
||||
"swing": "swing",
|
||||
"nightcore": "nightcore",
|
||||
"folk": "folk",
|
||||
"family": "familia",
|
||||
"ambient": "ambiente",
|
||||
"funk": "funk",
|
||||
"folk-acoustic": "folk & acústico",
|
||||
"kids-family": "niños & familia",
|
||||
"ambient": "ambiental",
|
||||
"funk-disco": "funk & disco",
|
||||
"jazz": "jazz",
|
||||
"soul": "soul",
|
||||
"speedcore": "speedcore",
|
||||
@@ -763,28 +791,28 @@
|
||||
"rb": "r&b",
|
||||
"holiday": "vacaciones",
|
||||
"vocaloid": "vocaloid",
|
||||
"jrock": "j-rock",
|
||||
"j-rock": "j-rock",
|
||||
"trance": "trance",
|
||||
"drumbass": "drum & bass",
|
||||
"comedy": "comedia",
|
||||
"drum-and-bass": "drum & bass",
|
||||
"comedy-meme": "comedia & meme",
|
||||
"instrumental": "instrumental",
|
||||
"hardcore": "hardcore",
|
||||
"kpop": "k-pop",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "indie",
|
||||
"techno": "tecno",
|
||||
"techno": "techno",
|
||||
"house": "house",
|
||||
"game": "videojuego",
|
||||
"film": "film",
|
||||
"alt": "alternativa",
|
||||
"video-game-soundtrack": "videojuego",
|
||||
"tv-movie-soundtrack": "TV & cine",
|
||||
"alternative": "alternativo",
|
||||
"dubstep": "dubstep",
|
||||
"metal": "metal",
|
||||
"anime": "anime",
|
||||
"hiphop": "hiphop",
|
||||
"jpop": "j-pop",
|
||||
"hip-hop-rap": "hip hop & rap",
|
||||
"j-pop": "j-pop",
|
||||
"rock": "rock",
|
||||
"pop": "pop",
|
||||
"electronic": "electrónico",
|
||||
"classical-orchestral": "Clásico y orquestal"
|
||||
"electronic": "electrónica",
|
||||
"classical-orchestral": "Clásica & Orquestal"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "IA",
|
||||
@@ -793,6 +821,9 @@
|
||||
"verified": "verificado",
|
||||
"fullSpread": "panel completo"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "instalado"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "fácil",
|
||||
"Normal": "normal",
|
||||
@@ -965,10 +996,6 @@
|
||||
"go-to-mods": "Ir a mods",
|
||||
"not-remind": "No volver a recordarme"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Modelos rotos",
|
||||
"desc": "Desde la actualización del motor de Beat Saber, todos los mods de modelos personalizados se han roto y necesitan ser actualizados. Todavía no han sido actualizados."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Exportación completada 🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "Refuser",
|
||||
"apply": "Appliquer",
|
||||
"copy": "Copier",
|
||||
"copied": "Copié !"
|
||||
"copied": "Copié !",
|
||||
"confirm": "Confirmer",
|
||||
"choose-folder": "Choisir un dossier",
|
||||
"unknown": "Une erreur inconnue s'est produite ¯\\_(ツ)_/¯",
|
||||
"warning": "Attention",
|
||||
"continue": "Continuer"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "Ajouter une version",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "Cela vous permet d'utiliser WASD et la souris pour naviguer dans le menu en jeu. Cela rend les tests beaucoup plus faciles, car vous n'avez pas à mettre votre casque!",
|
||||
"debug": "Mode Debug",
|
||||
"debug-description": "Active la fenêtre de log pour IPA. Cela affichera la console de débogage utilisée par les mods.",
|
||||
"outdated-tippy": "Cette version est obsolète et certains mods ou fonctionnalités peuvent ne plus fonctionner comme prévu. Préférez utiliser la version recommandée ({recommendedVersion}) de Beat Saber pour profiter des dernières fonctionnalités et correctifs.",
|
||||
"advanced-launch": {
|
||||
"button": "Lancement avancé",
|
||||
"placeholder": "Arguments supplémentaires ex: --revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "Récent",
|
||||
"description": "Description",
|
||||
"dropdown": {
|
||||
"uninstall-all": "Tout désinstaller"
|
||||
"uninstall-all": "Tout désinstaller",
|
||||
"unselect-all": "Tout désélectionner"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "Modifier",
|
||||
"uninstall": "Désinstaller",
|
||||
"create-shortcut": "Créer un raccourci",
|
||||
"shared-folders": "Dossiers partagés",
|
||||
"restore-oculus-folder": "Restaurer le dossier"
|
||||
"shared-folders": "Dossiers partagés"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Requis"
|
||||
"dotnet-required": ".NET 8 Requis"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam ne semble pas vouloir nous laisser télécharger Beat Saber 😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "Tu as essayé trop de fois attends un peu et recommence 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."
|
||||
"dotnet-required": ".NET 8 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."
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": "Télécharger .NET 6"
|
||||
"download-dotnet": "Télécharger .NET 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber est déjà lancé",
|
||||
"EXE_NOT_FINDED": "Fichiers manquants",
|
||||
"EXIT": "Arrêt brutal",
|
||||
"OCULUS_LIB_NOT_FOUND": "Librairie Oculus introuvable"
|
||||
"OCULUS_LIB_NOT_FOUND": "Librairie Oculus introuvable",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Version originale Oculus non trouvée"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Une erreur inconnue s'est produite.",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "Ferme Beat Saber avant de le lancer à nouveau.",
|
||||
"EXE_NOT_FINDED": "Quelques fichiers semblent manquants. Essaye de vérifier les fichiers.",
|
||||
"EXIT": "Beat Saber s'est arrêté brusquement, essaye de vérifier les fichiers.",
|
||||
"OCULUS_LIB_NOT_FOUND": "Vérifie que l'application Oculus est correctement installée, et que les librairies sont bien définies dans Oculus."
|
||||
"OCULUS_LIB_NOT_FOUND": "Vérifie que l'application Oculus est correctement installée, et que les librairies sont bien définies dans Oculus.",
|
||||
"PROTON_NOT_SET": "Définissez le chemin de Proton dans les paramètres.",
|
||||
"PROTON_NOT_FOUND": "Définissez le chemin de Proton dans les paramètres.",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Beat Saber doit être installé depuis l'application Oculus avant de l'ouvrir."
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Lancer Steam"
|
||||
@@ -482,7 +492,17 @@
|
||||
"title": "Sauvegarde créée",
|
||||
"msg": "Le partage du dossier 'UserData' peut générer des erreurs, en cas de soucis déliez le dossier pour restaurer la sauvegarde"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "Erreur lors de la liaison du dossier",
|
||||
"msg": {
|
||||
"EPERM": "BSManager n'a pas les autorisations nécessaires pour lier le dossier.",
|
||||
"EACCES": "BSManager n'a pas les autorisations nécessaires pour lier le dossier.",
|
||||
"ENOSPC": "Le disque est plein, faites de la place et réessayez.",
|
||||
"UNKNOWN_ERROR": "Une erreur inconnue est survenue lors de la liaison du dossier."
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"success": {
|
||||
@@ -492,6 +512,14 @@
|
||||
"error": {
|
||||
"msg": "Une erreur s'est produite lors de la création du raccourci."
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "Version obsolète",
|
||||
"msg": "Cette version de Beat Saber est obsolète. Utilisez la version recommandée pour profiter des dernières fonctionnalités et correctifs.",
|
||||
"actions": {
|
||||
"do-not-remind": "Ne plus me rappeler",
|
||||
"ok": "Ok"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -675,7 +703,7 @@
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"title": "Créer un raccourci",
|
||||
"desc": "Créer un raccourci te permettra de démarrer Beat Saber avec les options choisi sans passé par BSManager.",
|
||||
"desc": "Créer un raccourci te permettra de démarrer Beat Saber avec les options choisies sans passer par BSManager.",
|
||||
"launch-options": "Options de lancement",
|
||||
"advanced-launch": "Lancement avancé",
|
||||
"valid-btn": "Créer le raccourci"
|
||||
@@ -691,15 +719,12 @@
|
||||
"stay": "Se souvenir de moi",
|
||||
"connect-to-meta": "Se connecter à Meta"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "Attention",
|
||||
"body": {
|
||||
"must-be-installed-once": "Vous devez avoir installé au moins une fois Beat Saber depuis l'Oculus Store, sinon Beat Saber pourrait se fermer automatiquement après son lancement.",
|
||||
"need-backup": "Pour lancer cette version, le dossier d'installation de Beat Saber se trouvant dans votre librairie Oculus va être renommé.",
|
||||
"can-restore-later": "Au besoin, vous pourrez le restaurer depuis BSManager en vous rendant dans les options de la version originale Oculus et en cliquant sur \"Restaurer le dossier\"",
|
||||
"tips-launch-oculus": "Astuce : Vous pourrez lancer cette version directement depuis Oculus, tant que la version originale n'est pas restaurée."
|
||||
},
|
||||
"not-remind-me": "Ne plus me rappeler",
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "Activer le sideloading",
|
||||
"info-1": "Pour lancer Beat Saber, la possibilité d'exécuter des applications en sideloading doit être activée. BSManager demandera les droits administrateur pour activer cette fonctionnalité automatiquement.",
|
||||
"info-2": "La fonctionnalité de sideloading permet de lancer des jeux situés en dehors de votre dossier de bibliothèque Oculus.",
|
||||
"info-3": "Une fois le sideloading activé, la fonctionnalité restera active et vous ne serez plus invité à l’activer.",
|
||||
"i-want-to-do-it-myself": "Je veux le faire moi-même",
|
||||
"understood": "J'ai compris"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
@@ -729,6 +754,9 @@
|
||||
},
|
||||
"launch-as-admin": "Lancer en administateur",
|
||||
"not-remind-me": "Ne plus me rappeler"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "La version {outdatedVersion} est obsolète, et certains mods ou fonctionnalités peuvent ne plus fonctionner comme prévu. Veuillez télécharger la dernière version recommandée ({recommendedVersion}) de Beat Saber pour profiter des dernières fonctionnalités et corrections de bugs."
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,54 +765,55 @@
|
||||
"nps" : "Notes Par Seconde",
|
||||
"tags": "tags",
|
||||
"specificities": "général",
|
||||
"requirements": "requis"
|
||||
"requirements": "requis",
|
||||
"exclude": "exclure"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "précision",
|
||||
"balanced": "équilibrée",
|
||||
"challenge": "challenge",
|
||||
"dancestyle": "dance",
|
||||
"dance-style": "dance",
|
||||
"fitness": "fitness",
|
||||
"speed": "vitesse",
|
||||
"tech": "tech"
|
||||
},
|
||||
"map-styles": {
|
||||
"dance": "dance",
|
||||
"dance": "danse",
|
||||
"swing": "swing",
|
||||
"nightcore": "nightcore",
|
||||
"folk": "folk",
|
||||
"family": "famille",
|
||||
"ambient": "ambiante",
|
||||
"funk": "funk",
|
||||
"folk-acoustic": "folk & acoustique",
|
||||
"kids-family": "enfants & famille",
|
||||
"ambient": "ambiant",
|
||||
"funk-disco": "funk & disco",
|
||||
"jazz": "jazz",
|
||||
"soul": "soul",
|
||||
"speedcore": "speedcore",
|
||||
"punk": "punk",
|
||||
"rb": "r&b",
|
||||
"holiday": "vacance",
|
||||
"holiday": "vacances",
|
||||
"vocaloid": "vocaloid",
|
||||
"jrock": "j-rock",
|
||||
"j-rock": "j-rock",
|
||||
"trance": "trance",
|
||||
"drumbass": "drum & bass",
|
||||
"comedy": "comédie",
|
||||
"drum-and-bass": "drum & bass",
|
||||
"comedy-meme": "comédie & meme",
|
||||
"instrumental": "instrumental",
|
||||
"hardcore": "hardcore",
|
||||
"kpop": "k-pop",
|
||||
"indie": "indé",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "indie",
|
||||
"techno": "techno",
|
||||
"house": "house",
|
||||
"game": "jeu vidéo",
|
||||
"film": "film",
|
||||
"alt": "alternative",
|
||||
"video-game-soundtrack": "jeu vidéo",
|
||||
"tv-movie-soundtrack": "TV & film",
|
||||
"alternative": "alternatif",
|
||||
"dubstep": "dubstep",
|
||||
"metal": "metal",
|
||||
"metal": "métal",
|
||||
"anime": "anime",
|
||||
"hiphop": "hiphop",
|
||||
"jpop": "j-pop",
|
||||
"hip-hop-rap": "hip hop & rap",
|
||||
"j-pop": "j-pop",
|
||||
"rock": "rock",
|
||||
"pop": "pop",
|
||||
"electronic": "électronique",
|
||||
"classical-orchestral": "classique & orchestrale"
|
||||
"classical-orchestral": "Classique & Orchestral"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "IA",
|
||||
@@ -793,6 +822,9 @@
|
||||
"verified": "vérifiée",
|
||||
"fullSpread": "panel complet"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "installé"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "facile",
|
||||
"Normal": "normal",
|
||||
@@ -965,10 +997,6 @@
|
||||
"go-to-mods": "Aller aux mods",
|
||||
"not-remind": "Ne plus me rappeler"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Modèles cassés",
|
||||
"desc": "Depuis la mise à jour du moteur Beat Saber, tous les mods de modèles personnalisés ne sont plus fonctionnels et doivent être mis à jour. Ils n'ont pas encore été mis à jour."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export terminé 🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "拒否する",
|
||||
"apply": "適用",
|
||||
"copy": "コピー",
|
||||
"copied": "コピー済み!"
|
||||
"copied": "コピー済み!",
|
||||
"confirm": "確認",
|
||||
"choose-folder": "フォルダーを選択",
|
||||
"unknown": "不明なエラーが発生しました (´・ω・`)",
|
||||
"warning": "警告",
|
||||
"continue": "続ける"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "バージョンを追加",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "ファーストパーソン・フライング・コントローラー・モードでは、WASDとマウスを使ってゲーム内のメニューを操作できます。ヘッドセットを装着する必要がないので、テストがより簡単になります!",
|
||||
"debug": "デバックモード",
|
||||
"debug-description": "IPAの出力ログウィンドウを有効にします。これはMODのデバッグコンソールを表示します。",
|
||||
"outdated-tippy": "このバージョンは古いため、一部のMODや機能が期待通りに動作しない可能性があります。最新の機能やバグ修正を楽しむには、推奨バージョン ({recommendedVersion}) のBeat Saberを使用することをお勧めします。",
|
||||
"advanced-launch": {
|
||||
"button": "高度な起動",
|
||||
"placeholder": "追加引数 例:--revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "最新",
|
||||
"description": "說明",
|
||||
"dropdown": {
|
||||
"uninstall-all": "全てアンインストールする"
|
||||
"uninstall-all": "全てアンインストールする",
|
||||
"unselect-all": "すべて選択解除"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "編集",
|
||||
"uninstall": "アンインストール",
|
||||
"create-shortcut": "ショートカットを作成",
|
||||
"shared-folders": "共有フォルダー",
|
||||
"restore-oculus-folder": "フォルダーの復元"
|
||||
"shared-folders": "共有フォルダー"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6が必要です!"
|
||||
"dotnet-required": ".NET 8が必要です!"
|
||||
},
|
||||
"msg": {
|
||||
"401": "SteamがBeat Saberのダウンロードを許可してくれないようだ。😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "何度も試しているのでしばらくたって、もう一度お試しください。",
|
||||
"TokenRejected": "ログイントークンが拒否されました 😕 もう一度お試しください。",
|
||||
"AccessDenied": "Steamへのアクセスが拒否されました。",
|
||||
"dotnet-required": "Beat Saberをダウンロードするには、.NET 6 Runtimeがインストールされている必要があります。下のボタンをクリックしてダウンロードしてください。"
|
||||
"dotnet-required": "Beat Saberをダウンロードするには、.NET 8 Runtimeがインストールされている必要があります。下のボタンをクリックしてダウンロードしてください。"
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": ".NET 6をダウンロード"
|
||||
"download-dotnet": ".NET 8をダウンロード"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saberはすでに起動しています",
|
||||
"EXE_NOT_FINDED": "ファイルが見つかりません",
|
||||
"EXIT": "緊急停止",
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculusライブラリが見つかりません"
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculusライブラリが見つかりません",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "オリジナルのOculusバージョンが見つかりませんでした"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "不明なエラーが発生しました。",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "再度起動する前にBeatSaberを閉じてください。",
|
||||
"EXE_NOT_FINDED": "いくつかのファイルが見つからないようです。",
|
||||
"EXIT": "BeatSaberが緊急停止したため、ファイルをチェックします。",
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculusアプリケーションが正しくインストールしていることと、Oculusライブラリが正しく定義されていることを確認してください。"
|
||||
"OCULUS_LIB_NOT_FOUND": "Oculusアプリケーションが正しくインストールしていることと、Oculusライブラリが正しく定義されていることを確認してください。",
|
||||
"PROTON_NOT_SET": "設定でProtonのパスを設定してください。",
|
||||
"PROTON_NOT_FOUND": "設定でProtonのパスを設定してください。",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Beat Saberは、開く前にOculusアプリからインストールする必要があります。"
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Steamを起動"
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "バックアップを作成しました",
|
||||
"msg": "'UserData'フォルダを共有するとエラーが発生する可能性があります。問題が発生した場合は、フォルダをリンク解除してバックアップを復元してください。"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "フォルダのリンク中にエラーが発生しました",
|
||||
"msg": {
|
||||
"EPERM": "BSManagerにはフォルダをリンクするための必要な権限がありません。",
|
||||
"EACCES": "BSManagerにはフォルダをリンクするための必要な権限がありません。",
|
||||
"ENOSPC": "ディスクがいっぱいです。空き容量を作ってもう一度試してください。",
|
||||
"UNKNOWN_ERROR": "フォルダをリンク中に不明なエラーが発生しました。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "ショートカットの作成中にエラーが発生しました。"
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "バージョンが古い",
|
||||
"msg": "このBeat Saberのバージョンは古いため、推奨バージョンを使用して最新の機能やバグ修正をお楽しみください。",
|
||||
"actions": {
|
||||
"do-not-remind": "再度通知しない",
|
||||
"ok": "OK"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,16 +718,13 @@
|
||||
"stay": "記憶する",
|
||||
"connect-to-meta": "Metaに接続する"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "注意",
|
||||
"body": {
|
||||
"must-be-installed-once": "少なくとも一度はOculus StoreからBeat Saberをインストールしている必要があります。そうしないとBeat Saberは起動後に自動的に終了する可能性があります。",
|
||||
"need-backup": "このバージョンを起動するには、OculusライブラリにあるBeat Saberインストールフォルダの名前を変更します。",
|
||||
"can-restore-later": "必要であれば、BSManagerから元のOculusバージョンのオプションに行き、'フォルダを復元'をクリックして復元することができます。",
|
||||
"tips-launch-oculus": "ヒント: 元のバージョンが復元されない限り、Oculusから直接このバージョンを起動することができます。"
|
||||
},
|
||||
"not-remind-me": "二度と表示しないでください",
|
||||
"understood": "分かった"
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "サイドローディングを有効化",
|
||||
"info-1": "Beat Saberを起動するには、サイドローディングアプリを実行する機能を有効にする必要があります。BSManagerは、この機能を自動的に有効にするために管理者権限を要求します。",
|
||||
"info-2": "サイドローディング機能により、Oculusライブラリフォルダ外にあるゲームを起動できます。",
|
||||
"info-3": "サイドローディングを有効化すると、この機能はアクティブなままとなり、再度有効化を求められることはありません。",
|
||||
"i-want-to-do-it-myself": "自分でやりたい",
|
||||
"understood": "了解しました"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
"title": "Oculusトークン",
|
||||
@@ -729,6 +753,9 @@
|
||||
},
|
||||
"launch-as-admin": "管理者として起動",
|
||||
"not-remind-me": "Больше не напоминать"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "バージョン {outdatedVersion} は古いため、一部のモッドや機能が期待通りに動作しない場合があります。最新の機能やバグ修正を楽しむために、推奨される最新バージョンの Beat Saber ({recommendedVersion}) をダウンロードしてください。"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,7 +764,8 @@
|
||||
"nps" : "秒間ノート数",
|
||||
"tags": "タグ",
|
||||
"specificities": "一般",
|
||||
"requirements": "要Mod"
|
||||
"requirements": "要Mod",
|
||||
"exclude": "除外する"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "正確",
|
||||
@@ -752,39 +780,39 @@
|
||||
"dance": "ダンス",
|
||||
"swing": "スウィング",
|
||||
"nightcore": "ナイトコア",
|
||||
"folk": "フォーク",
|
||||
"family": "ファミリー",
|
||||
"folk-acoustic": "フォーク & アコースティック",
|
||||
"kids-family": "キッズ & ファミリー",
|
||||
"ambient": "アンビエント",
|
||||
"funk": "ファンク",
|
||||
"funk-disco": "ファンク & ディスコ",
|
||||
"jazz": "ジャズ",
|
||||
"soul": "ソウル",
|
||||
"speedcore": "スピードコア ",
|
||||
"speedcore": "スピードコア",
|
||||
"punk": "パンク",
|
||||
"rb": "r&b",
|
||||
"holiday": "休日",
|
||||
"holiday": "ホリデー",
|
||||
"vocaloid": "ボーカロイド",
|
||||
"jrock": "j-rock",
|
||||
"j-rock": "J-ロック",
|
||||
"trance": "トランス",
|
||||
"drumbass": "ドラムンベース",
|
||||
"comedy": "コメディ",
|
||||
"instrumental": "器楽",
|
||||
"drum-and-bass": "ドラム & ベース",
|
||||
"comedy-meme": "コメディ & ミーム",
|
||||
"instrumental": "インストゥルメンタル",
|
||||
"hardcore": "ハードコア",
|
||||
"kpop": "k-pop",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "インディー",
|
||||
"techno": "テクノ",
|
||||
"house": "家",
|
||||
"game": "ビデオゲーム",
|
||||
"film": "映画音楽",
|
||||
"alt": "オルタナティヴ",
|
||||
"house": "ハウス",
|
||||
"video-game-soundtrack": "ゲーム音楽",
|
||||
"tv-movie-soundtrack": "TV & 映画",
|
||||
"alternative": "オルタナティブ",
|
||||
"dubstep": "ダブステップ",
|
||||
"metal": "メタル",
|
||||
"anime": "アニメ",
|
||||
"hiphop": "ヒップポップ",
|
||||
"jpop": "j-pop",
|
||||
"hip-hop-rap": "ヒップホップ & ラップ",
|
||||
"j-pop": "J-ポップ",
|
||||
"rock": "ロック",
|
||||
"pop": "ポップ",
|
||||
"electronic": "エレクトロニック",
|
||||
"classical-orchestral": "Classical & Orchestral"
|
||||
"classical-orchestral": "クラシック & オーケストラ"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "AI",
|
||||
@@ -793,6 +821,9 @@
|
||||
"verified": "認証済み",
|
||||
"fullSpread": "フルスプレッド"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "インストール済み"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "easy",
|
||||
"Normal": "normal",
|
||||
@@ -965,10 +996,6 @@
|
||||
"go-to-mods": "Modインストーラーに移動",
|
||||
"not-remind": "二度と表示しないで"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "モデルが壊れています!",
|
||||
"desc": "Beat Saberのエンジンアップデート以来、すべてのカスタムモデルのMODが壊れており、更新が必要です。まだ更新されていません。"
|
||||
},
|
||||
"export-success": {
|
||||
"title": "エクスポート完了🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "Отказаться",
|
||||
"apply": "Применить",
|
||||
"copy": "Скопировать",
|
||||
"copied": "Скопировано!"
|
||||
"copied": "Скопировано!",
|
||||
"confirm": "Подтвердить",
|
||||
"choose-folder": "Изменить папку",
|
||||
"unknown": "Неизвестная ошибка ¯\\_(ツ)_/¯",
|
||||
"warning": "Внимание",
|
||||
"continue": "Продолжить"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "Добавить версию игры",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "Режим Летающих контроллеров от первого лица(FPFC) позволит вам использовать меню с помощью WASD и мышки. Это облегчает тестирование модов, потому что вам не нужно подключать шлем!",
|
||||
"debug": "Режим отладки",
|
||||
"debug-description": "Включает окно логов для IPA. В окне будут отображаться логи модов.",
|
||||
"outdated-tippy": "Эта версия устарела, и некоторые моды или функции могут работать не так, как ожидалось. Рекомендуется использовать рекомендуемую версию ({recommendedVersion}) Beat Saber, чтобы воспользоваться последними функциями и исправлениями ошибок.",
|
||||
"advanced-launch": {
|
||||
"button": "Расширенный запуск",
|
||||
"placeholder": "Параметры запуска, например: --revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "Latest",
|
||||
"description": "Описание",
|
||||
"dropdown": {
|
||||
"uninstall-all": "Удалить всё"
|
||||
"uninstall-all": "Удалить всё",
|
||||
"unselect-all": "Снять все выделения"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "Редактировать",
|
||||
"uninstall": "Удалить",
|
||||
"create-shortcut": "Создать ярлык",
|
||||
"shared-folders": "Общие папки",
|
||||
"restore-oculus-folder": "Восстановить папку"
|
||||
"shared-folders": "Общие папки"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": "Требуется .NET 6"
|
||||
"dotnet-required": "Требуется .NET 8"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Похоже Steam не хочет, чтобы мы скачали Beat Saber 😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "Слишком много попыток, вернитесь позже и попробуйте снова.",
|
||||
"TokenRejected": "Ваш токен для входа был отклонен 😕 Пожалуйста, попробуйте снова.",
|
||||
"AccessDenied": "Доступ к Steam был отклонен.",
|
||||
"dotnet-required": "Среда запуска .NET 6 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
|
||||
"dotnet-required": "Среда запуска .NET 8 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": "Скачать .NET 6"
|
||||
"download-dotnet": "Скачать .NET 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber уде запущен",
|
||||
"EXE_NOT_FINDED": "Отсутствуют файлы",
|
||||
"EXIT": "Вылет",
|
||||
"OCULUS_LIB_NOT_FOUND": "Библиотека Oculus не найдена"
|
||||
"OCULUS_LIB_NOT_FOUND": "Библиотека Oculus не найдена",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Оригинальная версия Oculus не найдена"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Возникла неизвестная ошибка.",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "Закройте Beat Saber, чтобы запустить его.",
|
||||
"EXE_NOT_FINDED": "Некоторые файлы отсутствуют, пробуем их проверить.",
|
||||
"EXIT": "Beat Saber вылетел, пытаемся проверить файлы.",
|
||||
"OCULUS_LIB_NOT_FOUND": "Проверьте, правильно ли установлено приложение Oculus, и правильно ли определены библиотеки в Oculus."
|
||||
"OCULUS_LIB_NOT_FOUND": "Проверьте, правильно ли установлено приложение Oculus, и правильно ли определены библиотеки в Oculus.",
|
||||
"PROTON_NOT_SET": "Установите путь к Proton в настройках.",
|
||||
"PROTON_NOT_FOUND": "Установите путь к Proton в настройках.",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "Beat Saber должен быть установлен из приложения Oculus перед открытием."
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Запустить Steam"
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "Бэкап создан",
|
||||
"msg": "Общая папка 'UserData' может создавать ошибки. В случае проблем отвяжите папку, чтобы восстановить бэкап."
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "Ошибка при связывании папки",
|
||||
"msg": {
|
||||
"EPERM": "BSManager не имеет необходимых прав для связывания папки.",
|
||||
"EACCES": "BSManager не имеет необходимых прав для связывания папки.",
|
||||
"ENOSPC": "Диск заполнен, освободите место и попробуйте снова.",
|
||||
"UNKNOWN_ERROR": "Произошла неизвестная ошибка при связывании папки."
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "Ошибка создания ярлыка."
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "Устаревшая версия",
|
||||
"msg": "Эта версия Beat Saber устарела. Используйте рекомендуемую версию, чтобы воспользоваться последними функциями и исправлениями ошибок.",
|
||||
"actions": {
|
||||
"do-not-remind": "Больше не напоминать",
|
||||
"ok": "Ок"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,16 +718,13 @@
|
||||
"stay": "Запомнить меня",
|
||||
"connect-to-meta": "Подключиться к Meta"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "Внимание",
|
||||
"body": {
|
||||
"must-be-installed-once": "Вы должны были установить Beat Saber хотя бы один раз из Oculus Store, иначе Beat Saber может автоматически закрыться после запуска.",
|
||||
"need-backup": "Для запуска этой версии папка установки Beat Saber в вашей библиотеке Oculus будет переименована.",
|
||||
"can-restore-later": "При необходимости вы можете восстановить её через BSManager, перейдя в опции оригинальной версии Oculus и нажав на 'Восстановить папку'",
|
||||
"tips-launch-oculus": "Совет: Вы можете запустить эту версию напрямую через Oculus, пока оригинальная версия не восстановлена."
|
||||
},
|
||||
"not-remind-me": "Больше не напоминать",
|
||||
"understood": "Понял"
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "Включить Sideloading",
|
||||
"info-1": "Чтобы запустить Beat Saber, необходимо включить возможность запуска приложений через sideloading. BSManager запросит права администратора для автоматического включения этой функции.",
|
||||
"info-2": "Функция sideloading позволяет запускать игры, расположенные за пределами папки библиотеки Oculus.",
|
||||
"info-3": "После активации сайдлоадинга функция останется активной, и вам больше не будет предложено её включить.",
|
||||
"i-want-to-do-it-myself": "Я хочу сделать это сам",
|
||||
"understood": "Понято"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
"title": "Токен Oculus",
|
||||
@@ -728,6 +752,9 @@
|
||||
"info-3": "Обратите внимание, что не рекомендуется предоставлять права администратора Steam, так как это также влияет на установленные игры и моды, представляя угрозу безопасности."
|
||||
},
|
||||
"launch-as-admin": "Запустить от имени администратора"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "Версия {outdatedVersion} устарела, и некоторые моды или функции могут работать некорректно. Пожалуйста, скачайте последнюю рекомендуемую версию ({recommendedVersion}) Beat Saber, чтобы воспользоваться новейшими функциями и исправлениями ошибок."
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -736,13 +763,14 @@
|
||||
"nps" : "Нот в Секунду",
|
||||
"tags": "тэги",
|
||||
"specificities": "основное",
|
||||
"requirements": "требуемые моды"
|
||||
"requirements": "требуемые моды",
|
||||
"exclude": "исключить"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "точность",
|
||||
"balanced": "баланс",
|
||||
"challenge": "испытание",
|
||||
"dancestyle": "танец",
|
||||
"dance-style": "танец",
|
||||
"fitness": "фитнес",
|
||||
"speed": "скорость",
|
||||
"tech": "техника"
|
||||
@@ -751,36 +779,36 @@
|
||||
"dance": "танец",
|
||||
"swing": "свинг",
|
||||
"nightcore": "найткор",
|
||||
"folk": "народные",
|
||||
"family": "семейные",
|
||||
"folk-acoustic": "фолк и акустика",
|
||||
"kids-family": "дети и семья",
|
||||
"ambient": "эмбиент",
|
||||
"funk": "фанк",
|
||||
"funk-disco": "фанк и диско",
|
||||
"jazz": "джаз",
|
||||
"soul": "соул",
|
||||
"speedcore": "спидкор",
|
||||
"punk": "панк",
|
||||
"rb": "ар-н-би",
|
||||
"holiday": "праздник",
|
||||
"vocaloid": "вокалоиды",
|
||||
"jrock": "джей-рок",
|
||||
"rb": "r&b",
|
||||
"holiday": "праздники",
|
||||
"vocaloid": "вокалоид",
|
||||
"j-rock": "джей-рок",
|
||||
"trance": "транс",
|
||||
"drumbass": "драм-н-бейс",
|
||||
"comedy": "комедия",
|
||||
"instrumental": "инструментальные",
|
||||
"drum-and-bass": "драм-н-бейс",
|
||||
"comedy-meme": "комедия и мемы",
|
||||
"instrumental": "инструментал",
|
||||
"hardcore": "хардкор",
|
||||
"kpop": "кей-поп",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "инди",
|
||||
"techno": "техно",
|
||||
"house": "хаус",
|
||||
"game": "видеоигры",
|
||||
"film": "фильмы",
|
||||
"alt": "альтернативные",
|
||||
"dubstep": "дапстеп",
|
||||
"video-game-soundtrack": "видеоигра",
|
||||
"tv-movie-soundtrack": "ТВ и кино",
|
||||
"alternative": "альтернатива",
|
||||
"dubstep": "дабстеп",
|
||||
"metal": "метал",
|
||||
"anime": "аниме",
|
||||
"hiphop": "хипхоп",
|
||||
"jpop": "джей-поп",
|
||||
"rock": "прк",
|
||||
"hip-hop-rap": "хип-хоп и рэп",
|
||||
"j-pop": "j-pop",
|
||||
"rock": "рок",
|
||||
"pop": "поп",
|
||||
"electronic": "электроника",
|
||||
"classical-orchestral": "Классика и Оркестр"
|
||||
@@ -792,6 +820,9 @@
|
||||
"verified": "проверенные авторы",
|
||||
"fullSpread": "полный набор"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "установленный"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "легко",
|
||||
"Normal": "нормально",
|
||||
@@ -964,10 +995,6 @@
|
||||
"go-to-mods": "Перейти к модам",
|
||||
"not-remind": "Больше не напоминать"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Сломанные модели",
|
||||
"desc": "С момента обновления движка Beat Saber, все пользовательские модификации моделей сломались и требуют обновления. Они еще не были обновлены."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Экспорт завершен 🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "拒絕",
|
||||
"apply": "應用",
|
||||
"copy": "複製",
|
||||
"copied": "已複製!"
|
||||
"copied": "已複製!",
|
||||
"confirm": "確認",
|
||||
"choose-folder": "選擇文件夾",
|
||||
"unknown": "發生了一個錯誤 ¯\\_(ツ)_/¯",
|
||||
"warning": "警告",
|
||||
"continue": "繼續"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "新增版本",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "第一人稱飛控模式允許你使用鍵盤 WASD 和滑鼠在遊戲中進行導航。你無需帶上頭顯即可進行測試!",
|
||||
"debug": "Debug 模式",
|
||||
"debug-description": "為 IPA 啟用輸出日誌窗口。 會顯示所用 Mod 的 debug 輸出",
|
||||
"outdated-tippy": "此版本已過時,某些模組或功能可能無法按預期運作。建議使用推薦版本的 Beat Saber ({recommendedVersion}),以享受最新功能和修復。",
|
||||
"advanced-launch": {
|
||||
"button": "高級啟動",
|
||||
"placeholder": "額外啟動參數,例如: --revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "最新",
|
||||
"description": "描述",
|
||||
"dropdown": {
|
||||
"uninstall-all": "全部移除"
|
||||
"uninstall-all": "全部移除",
|
||||
"unselect-all": "取消全選"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "編輯",
|
||||
"uninstall": "移除",
|
||||
"create-shortcut": "創建捷徑",
|
||||
"shared-folders": "Shared Folders",
|
||||
"restore-oculus-folder": "Restore the folder"
|
||||
"shared-folders": "Shared Folders"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": "需要 .NET 6"
|
||||
"dotnet-required": "需要 .NET 8"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam 似乎不想讓我們下載 Beat Saber😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "你已經嘗試了太多次,請稍等片刻,稍後再試。",
|
||||
"TokenRejected": "你的登錄令牌已被拒絕 😕 請重試。",
|
||||
"AccessDenied": "訪問 Steam 被拒絕。",
|
||||
"dotnet-required": "必須安裝 .NET 6 Runtime 才能下載 Beat Saber 版本。單擊下面的按鈕下載它。"
|
||||
"dotnet-required": "必須安裝 .NET 8 Runtime 才能下載 Beat Saber 版本。單擊下面的按鈕下載它。"
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": "下載 .NET 6"
|
||||
"download-dotnet": "下載 .NET 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber 已在運行",
|
||||
"EXE_NOT_FINDED": "缺少文件",
|
||||
"EXIT": "突然停止",
|
||||
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 庫"
|
||||
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 庫",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "找不到原始Oculus版本"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "發生未知錯誤。",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "再次啟動前請關閉 BeatSaber。",
|
||||
"EXE_NOT_FINDED": "某些文件似乎遺失了,嘗試驗證文件。",
|
||||
"EXIT": "BeatSaber 突然停止,請檢查文件。",
|
||||
"OCULUS_LIB_NOT_FOUND": "檢查 Oculus 應用是否正確安裝,以及庫是否在 Oculus 中正確定義。"
|
||||
"OCULUS_LIB_NOT_FOUND": "檢查 Oculus 應用是否正確安裝,以及庫是否在 Oculus 中正確定義。",
|
||||
"PROTON_NOT_SET": "在設定中設置Proton路徑。",
|
||||
"PROTON_NOT_FOUND": "在設定中設置Proton路徑。",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "在打開之前,必須從Oculus應用程式安裝Beat Saber。"
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "啟動 Steam"
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "備份已創建",
|
||||
"msg": "共享 “UserData” 文件夾可能會產生錯誤,如果出現問題,請取消關聯該文件夾以恢復備份"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "連結文件夾時出錯",
|
||||
"msg": {
|
||||
"EPERM": "BSManager沒有必要的權限來連結文件夾。",
|
||||
"EACCES": "BSManager沒有必要的權限來連結文件夾。",
|
||||
"ENOSPC": "磁碟已滿,請騰出空間後再試。",
|
||||
"UNKNOWN_ERROR": "連結文件夾時發生未知錯誤。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "創建捷徑時發生錯誤"
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "版本過時",
|
||||
"msg": "此 Beat Saber 版本已過時,請使用推薦版本以享受最新功能和修復。",
|
||||
"actions": {
|
||||
"do-not-remind": "不要再提醒我",
|
||||
"ok": "確定"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,16 +718,13 @@
|
||||
"stay": "記住我",
|
||||
"connect-to-meta": "連接到 Meta"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "警告",
|
||||
"body": {
|
||||
"must-be-installed-once": "你必須至少從 Oculus 商店安裝過一次 BeatSaber,否則 BeatSaber 可能會在啟動後自動關閉。",
|
||||
"need-backup": "要啟動該版本,位於你的 Oculus 庫中的 BeatSaber 安裝文件夾將被重命名。",
|
||||
"can-restore-later": "如果需要,你可以通過前往 BSManager 的原始 Oculus 版本選項並點擊'恢復文件夾'來恢復它。",
|
||||
"tips-launch-oculus": "提示:只要原始版本沒有被恢復,你就可以直接從 Oculus 啟動該版本。"
|
||||
},
|
||||
"not-remind-me": "不再提醒我",
|
||||
"understood": "明白了"
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "啟用旁載",
|
||||
"info-1": "為了啟動 Beat Saber,必須啟用執行旁載應用程式的功能。BSManager 將請求管理員權限以自動啟用此功能。",
|
||||
"info-2": "旁載功能允許啟動位於 Oculus 資料庫資料夾之外的遊戲。",
|
||||
"info-3": "啟用 sideloading 後,此功能將保持啟用狀態,您將不再被提示啟用它。",
|
||||
"i-want-to-do-it-myself": "我想自己完成",
|
||||
"understood": "了解"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
"title": "Oculus令牌",
|
||||
@@ -729,6 +753,9 @@
|
||||
},
|
||||
"launch-as-admin": "以管理員身份啟動",
|
||||
"not-remind-me": "不再提醒我"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "版本 {outdatedVersion} 已過時,某些模組或功能可能無法正常運作。請下載最新推薦的 Beat Saber 版本 ({recommendedVersion}),以享受最新功能和修正。"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,54 +764,55 @@
|
||||
"nps" : "每秒音符數",
|
||||
"tags": "標籤",
|
||||
"specificities": "general",
|
||||
"requirements": "要求"
|
||||
"requirements": "要求",
|
||||
"exclude": "排除"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "精確度",
|
||||
"balanced": "平衡",
|
||||
"challenge": "挑戰",
|
||||
"dancestyle": "舞蹈",
|
||||
"dance-style": "舞蹈",
|
||||
"fitness": "健身",
|
||||
"speed": "速度",
|
||||
"tech": "技術"
|
||||
},
|
||||
"map-styles": {
|
||||
"dance": "Dance",
|
||||
"swing": "Swing",
|
||||
"nightcore": "Nightcore",
|
||||
"folk": "Folk",
|
||||
"family": "Family",
|
||||
"ambient": "Ambient",
|
||||
"funk": "Funk",
|
||||
"jazz": "Jazz",
|
||||
"soul": "Soul",
|
||||
"speedcore": "Speedcore",
|
||||
"punk": "Punk",
|
||||
"rb": "R&B",
|
||||
"holiday": "Holiday",
|
||||
"vocaloid": "Vocaloid",
|
||||
"jrock": "J-rock",
|
||||
"trance": "Trance",
|
||||
"drumbass": "Drum & Bass",
|
||||
"comedy": "Comedy",
|
||||
"instrumental": "Instrumental",
|
||||
"hardcore": "Hardcore",
|
||||
"kpop": "K-pop",
|
||||
"indie": "Indie",
|
||||
"techno": "Techno",
|
||||
"house": "House",
|
||||
"game": "Video game",
|
||||
"film": "Film",
|
||||
"alt": "Alternative",
|
||||
"dubstep": "Dubstep",
|
||||
"metal": "Metal",
|
||||
"anime": "Anime",
|
||||
"hiphop": "Hiphop",
|
||||
"jpop": "J-pop",
|
||||
"rock": "Rock",
|
||||
"pop": "Pop",
|
||||
"electronic": "Electronic",
|
||||
"classical-orchestral": "Classical & Orchestral"
|
||||
"dance": "舞蹈",
|
||||
"swing": "搖擺",
|
||||
"nightcore": "夜核",
|
||||
"folk-acoustic": "民謠 & 原聲",
|
||||
"kids-family": "兒童 & 家庭",
|
||||
"ambient": "氛圍音樂",
|
||||
"funk-disco": "放克 & 迪斯科",
|
||||
"jazz": "爵士",
|
||||
"soul": "靈魂",
|
||||
"speedcore": "極速核",
|
||||
"punk": "龐克",
|
||||
"rb": "r&b",
|
||||
"holiday": "假日",
|
||||
"vocaloid": "聲庫",
|
||||
"j-rock": "日式搖滾",
|
||||
"trance": "迷幻",
|
||||
"drum-and-bass": "鼓 & 貝斯",
|
||||
"comedy-meme": "喜劇 & 表情包",
|
||||
"instrumental": "純音樂",
|
||||
"hardcore": "硬核",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "獨立",
|
||||
"techno": "電子舞曲",
|
||||
"house": "浩室音樂",
|
||||
"video-game-soundtrack": "遊戲音樂",
|
||||
"tv-movie-soundtrack": "電視 & 電影",
|
||||
"alternative": "另類",
|
||||
"dubstep": "電音鼓",
|
||||
"metal": "金屬",
|
||||
"anime": "動漫",
|
||||
"hip-hop-rap": "嘻哈 & 說唱",
|
||||
"j-pop": "日式流行",
|
||||
"rock": "搖滾",
|
||||
"pop": "流行",
|
||||
"electronic": "電子",
|
||||
"classical-orchestral": "古典 & 管弦樂"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "AI",
|
||||
@@ -793,6 +821,9 @@
|
||||
"verified": "Verified",
|
||||
"fullSpread": "Full spread"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "已安裝"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "Easy",
|
||||
"Normal": "Normal",
|
||||
@@ -965,10 +996,6 @@
|
||||
"go-to-mods": "前往 Mod 頁",
|
||||
"not-remind": "不再提醒我"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "已損壞的模型",
|
||||
"desc": "自從Beat Saber引擎更新以來,所有自定義模型的MOD都已損壞,需要更新。它們還沒有被更新。"
|
||||
},
|
||||
"export-success": {
|
||||
"title": "導出成功 🎉"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
"refuse": "拒绝",
|
||||
"apply": "应用",
|
||||
"copy": "复制",
|
||||
"copied": "已复制!"
|
||||
"copied": "已复制!",
|
||||
"confirm": "确认",
|
||||
"choose-folder": "选择文件夹",
|
||||
"Unknown": "发生了一个错误 ¯\\_(ツ)_/¯",
|
||||
"warning": "警告",
|
||||
"continue": "继续"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "添加版本",
|
||||
@@ -33,6 +38,7 @@
|
||||
"desktop-description": "第一人称飞控模式允许你使用键盘 WASD 和鼠标在游戏中进行导航。你无需带上头显即可进行测试!",
|
||||
"debug": "Debug 模式",
|
||||
"debug-description": "为 IPA 启用输出日志窗口。 会显示所用 Mod 的 debug 输出",
|
||||
"outdated-tippy": "此版本已过时,某些模组或功能可能无法按预期运行。建议使用推荐版本的 Beat Saber ({recommendedVersion}),以享受最新功能和修复。",
|
||||
"advanced-launch": {
|
||||
"button": "高级启动",
|
||||
"placeholder": "额外启动参数,例如: --revert; --nowait"
|
||||
@@ -82,7 +88,8 @@
|
||||
"latest": "最新",
|
||||
"description": "描述",
|
||||
"dropdown": {
|
||||
"uninstall-all": "全部卸载"
|
||||
"uninstall-all": "全部卸载",
|
||||
"unselect-all": "取消全选"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +101,7 @@
|
||||
"edit": "编辑",
|
||||
"uninstall": "卸载",
|
||||
"create-shortcut": "创建快捷方式",
|
||||
"shared-folders": "Shared Folders",
|
||||
"restore-oculus-folder": "Restore the folder"
|
||||
"shared-folders": "Shared Folders"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -236,7 +242,7 @@
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": "需要 .NET 6"
|
||||
"dotnet-required": "需要 .NET 8"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam 似乎不想让我们下载 Beat Saber😢",
|
||||
@@ -261,10 +267,10 @@
|
||||
"RateLimitExceeded": "你已经尝试了太多次,请稍等片刻,稍后再试。",
|
||||
"TokenRejected": "你的登录令牌已被拒绝 😕 请重试。",
|
||||
"AccessDenied": "访问 Steam 被拒绝。",
|
||||
"dotnet-required": "必须安装 .NET 6 Runtime 才能下载 Beat Saber 版本。单击下面的按钮下载它。"
|
||||
"dotnet-required": "必须安装 .NET 8 Runtime 才能下载 Beat Saber 版本。单击下面的按钮下载它。"
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": "下载 .NET 6"
|
||||
"download-dotnet": "下载 .NET 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -381,7 +387,8 @@
|
||||
"BS_ALREADY_RUNNING": "Beat Saber 已在运行",
|
||||
"EXE_NOT_FINDED": "缺少文件",
|
||||
"EXIT": "突然停止",
|
||||
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 库"
|
||||
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 库",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "未找到原始Oculus版本"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "发生未知错误。",
|
||||
@@ -390,7 +397,10 @@
|
||||
"BS_ALREADY_RUNNING": "再次启动前请关闭 BeatSaber。",
|
||||
"EXE_NOT_FINDED": "某些文件似乎丢失了,尝试验证文件。",
|
||||
"EXIT": "BeatSaber 突然停止,请检查文件。",
|
||||
"OCULUS_LIB_NOT_FOUND": "检查 Oculus 应用是否正确安装,以及库是否在 Oculus 中正确定义。"
|
||||
"OCULUS_LIB_NOT_FOUND": "检查 Oculus 应用是否正确安装,以及库是否在 Oculus 中正确定义。",
|
||||
"PROTON_NOT_SET": "在设置中设置Proton路径。",
|
||||
"PROTON_NOT_FOUND": "在设置中设置Proton路径。",
|
||||
"ORIGINAL_OCULUS_NOT_INSTALLED": "在打开之前,必须从Oculus应用程序安装Beat Saber。"
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "启动 Steam"
|
||||
@@ -482,6 +492,15 @@
|
||||
"title": "备份已创建",
|
||||
"msg": "共享 “UserData” 文件夹可能会产生错误,如果出现问题,请取消关联该文件夹以恢复备份"
|
||||
}
|
||||
},
|
||||
"linking-error": {
|
||||
"title": "链接文件夹时出错",
|
||||
"msg": {
|
||||
"EPERM": "BSManager没有必要的权限来链接文件夹。",
|
||||
"EACCES": "BSManager没有必要的权限来链接文件夹。",
|
||||
"ENOSPC": "磁盘已满,请腾出空间后再试。",
|
||||
"UNKNOWN_ERROR": "链接文件夹时发生未知错误。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
@@ -492,6 +511,14 @@
|
||||
"error": {
|
||||
"msg": "创建快捷方式时发生错误"
|
||||
}
|
||||
},
|
||||
"bs-version-oudated": {
|
||||
"title": "版本过时",
|
||||
"msg": "此 Beat Saber 版本已过时,请使用推荐版本以享受最新功能和修复。",
|
||||
"actions": {
|
||||
"do-not-remind": "不再提醒",
|
||||
"ok": "确定"
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
@@ -691,15 +718,12 @@
|
||||
"stay": "记住我",
|
||||
"connect-to-meta": "连接到 Meta"
|
||||
},
|
||||
"original-version-backup-oculus": {
|
||||
"title": "警告",
|
||||
"body": {
|
||||
"must-be-installed-once": "你必须至少从 Oculus 商店安装过一次 BeatSaber,否则 BeatSaber 可能会在启动后自动关闭。",
|
||||
"need-backup": "要启动该版本,位于你的 Oculus 库中的 BeatSaber 安装文件夹将被重命名。",
|
||||
"can-restore-later": "如果需要,你可以通过前往 BSManager 的原始 Oculus 版本选项并点击'恢复文件夹'来恢复它。",
|
||||
"tips-launch-oculus": "提示:只要原始版本没有被恢复,你就可以直接从 Oculus 启动该版本。"
|
||||
},
|
||||
"not-remind-me": "不再提醒我",
|
||||
"enable-oculus-sideloaded-apps": {
|
||||
"title": "启用旁加载",
|
||||
"info-1": "为了启动 Beat Saber,必须启用运行旁加载应用程序的功能。BSManager 将请求管理员权限以自动启用此功能。",
|
||||
"info-2": "旁加载功能允许启动位于 Oculus 库文件夹之外的游戏。",
|
||||
"info-3": "激活 sideloading 后,该功能将保持激活状态,您将不再被提示启用它。",
|
||||
"i-want-to-do-it-myself": "我想自己完成",
|
||||
"understood": "明白了"
|
||||
},
|
||||
"enter-meta-token": {
|
||||
@@ -729,6 +753,9 @@
|
||||
},
|
||||
"launch-as-admin": "以管理员身份启动",
|
||||
"not-remind-me": "不再提醒我"
|
||||
},
|
||||
"bs-version-outdated": {
|
||||
"body": "版本 {outdatedVersion} 已过时,某些模组或功能可能无法正常工作。请下载最新推荐的 Beat Saber 版本 ({recommendedVersion}),以享受最新功能和修复。"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -737,54 +764,55 @@
|
||||
"nps" : "每秒音符数",
|
||||
"tags": "标签",
|
||||
"specificities": "general",
|
||||
"requirements": "要求"
|
||||
"requirements": "要求",
|
||||
"exclude": "排除"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "精确度",
|
||||
"balanced": "平衡",
|
||||
"challenge": "挑战",
|
||||
"dancestyle": "舞蹈",
|
||||
"dance-style": "舞蹈",
|
||||
"fitness": "健身",
|
||||
"speed": "速度",
|
||||
"tech": "技术"
|
||||
},
|
||||
"map-styles": {
|
||||
"dance": "dance",
|
||||
"swing": "swing",
|
||||
"nightcore": "nightcore",
|
||||
"folk": "folk",
|
||||
"family": "family",
|
||||
"ambient": "ambient",
|
||||
"funk": "funk",
|
||||
"jazz": "jazz",
|
||||
"soul": "soul",
|
||||
"speedcore": "speedcore",
|
||||
"punk": "punk",
|
||||
"dance": "舞蹈",
|
||||
"swing": "摇摆",
|
||||
"nightcore": "夜核",
|
||||
"folk-acoustic": "民谣 & 原声",
|
||||
"kids-family": "儿童 & 家庭",
|
||||
"ambient": "氛围音乐",
|
||||
"funk-disco": "放克 & 迪斯科",
|
||||
"jazz": "爵士",
|
||||
"soul": "灵魂",
|
||||
"speedcore": "极速核",
|
||||
"punk": "朋克",
|
||||
"rb": "r&b",
|
||||
"holiday": "holiday",
|
||||
"vocaloid": "vocaloid",
|
||||
"jrock": "j-rock",
|
||||
"trance": "trance",
|
||||
"drumbass": "drum & bass",
|
||||
"comedy": "comedy",
|
||||
"instrumental": "instrumental",
|
||||
"hardcore": "hardcore",
|
||||
"kpop": "k-pop",
|
||||
"indie": "indie",
|
||||
"techno": "techno",
|
||||
"house": "house",
|
||||
"game": "video game",
|
||||
"film": "film",
|
||||
"alt": "alternative",
|
||||
"dubstep": "dubstep",
|
||||
"metal": "metal",
|
||||
"anime": "anime",
|
||||
"hiphop": "hiphop",
|
||||
"jpop": "j-pop",
|
||||
"rock": "rock",
|
||||
"pop": "pop",
|
||||
"electronic": "electronic",
|
||||
"classical-orchestral": "Classical & Orchestral"
|
||||
"holiday": "假日",
|
||||
"vocaloid": "声库",
|
||||
"j-rock": "日式摇滚",
|
||||
"trance": "迷幻",
|
||||
"drum-and-bass": "鼓 & 贝斯",
|
||||
"comedy-meme": "喜剧 & 表情包",
|
||||
"instrumental": "纯音乐",
|
||||
"hardcore": "硬核",
|
||||
"k-pop": "k-pop",
|
||||
"indie": "独立",
|
||||
"techno": "电子舞曲",
|
||||
"house": "浩室音乐",
|
||||
"video-game-soundtrack": "游戏音乐",
|
||||
"tv-movie-soundtrack": "电视 & 电影",
|
||||
"alternative": "另类",
|
||||
"dubstep": "电音鼓",
|
||||
"metal": "金属",
|
||||
"anime": "动漫",
|
||||
"hip-hop-rap": "嘻哈 & 说唱",
|
||||
"j-pop": "日式流行",
|
||||
"rock": "摇滚",
|
||||
"pop": "流行",
|
||||
"electronic": "电子",
|
||||
"classical-orchestral": "古典 & 管弦乐"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "AI",
|
||||
@@ -793,6 +821,9 @@
|
||||
"verified": "verified",
|
||||
"fullSpread": "full spread"
|
||||
},
|
||||
"map-excludes": {
|
||||
"installed": "已安装"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "easy",
|
||||
"Normal": "normal",
|
||||
@@ -965,10 +996,6 @@
|
||||
"go-to-mods": "前往 Mod 页",
|
||||
"not-remind": "不再提醒我"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "已损坏的模型",
|
||||
"desc": "自从Beat Saber引擎更新以来,所有自定义模型的MOD都已损坏,需要更新。它们还没有被更新。"
|
||||
},
|
||||
"export-success": {
|
||||
"title": "导出成功 🎉"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"name": ".NETCoreApp,Version=v8.0/win-x64",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"DepotDownloader/2.5.0": {
|
||||
".NETCoreApp,Version=v8.0": {},
|
||||
".NETCoreApp,Version=v8.0/win-x64": {
|
||||
"DepotDownloader/2.7.3": {
|
||||
"dependencies": {
|
||||
"QRCoder": "1.4.3",
|
||||
"SteamKit2": "2.5.0-Beta.1",
|
||||
"protobuf-net": "3.2.16"
|
||||
"Microsoft.Windows.CsWin32": "0.3.106",
|
||||
"SteamKit2": "3.0.0-Beta.4",
|
||||
"protobuf-net": "3.2.30"
|
||||
},
|
||||
"runtime": {
|
||||
"DepotDownloader.dll": {}
|
||||
@@ -23,60 +24,64 @@
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.2.16": {
|
||||
"Microsoft.Windows.CsWin32/0.3.106": {
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.2.16"
|
||||
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
|
||||
"Microsoft.Windows.SDK.Win32Metadata": "60.0.34-preview",
|
||||
"Microsoft.Windows.WDK.Win32Metadata": "0.11.4-experimental"
|
||||
}
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {},
|
||||
"Microsoft.Windows.SDK.Win32Metadata/60.0.34-preview": {},
|
||||
"Microsoft.Windows.WDK.Win32Metadata/0.11.4-experimental": {
|
||||
"dependencies": {
|
||||
"Microsoft.Windows.SDK.Win32Metadata": "60.0.34-preview"
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.2.30": {
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.2.30"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.2.16.54102"
|
||||
"fileVersion": "3.2.30.709"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net.Core/3.2.16": {
|
||||
"protobuf-net.Core/3.2.30": {
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "7.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.Core.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.2.16.54102"
|
||||
"fileVersion": "3.2.30.709"
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRCoder/1.4.3": {
|
||||
"runtime": {
|
||||
"lib/net6.0/QRCoder.dll": {
|
||||
"assemblyVersion": "1.4.3.0",
|
||||
"fileVersion": "1.4.3.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SteamKit2/2.5.0-Beta.1": {
|
||||
"SteamKit2/3.0.0-Beta.4": {
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "5.0.0",
|
||||
"protobuf-net": "3.2.16"
|
||||
"System.IO.Hashing": "8.0.0",
|
||||
"protobuf-net": "3.2.30"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/SteamKit2.dll": {
|
||||
"assemblyVersion": "2.5.0.0",
|
||||
"fileVersion": "2.5.0.0"
|
||||
"lib/net8.0/SteamKit2.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {},
|
||||
"System.IO.Hashing/8.0.0": {
|
||||
"runtime": {
|
||||
"lib/net6.0/System.Collections.Immutable.dll": {
|
||||
"assemblyVersion": "7.0.0.0",
|
||||
"fileVersion": "7.0.22.51805"
|
||||
"lib/net8.0/System.IO.Hashing.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.23.53103"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||
@@ -87,7 +92,7 @@
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"DepotDownloader/2.5.0": {
|
||||
"DepotDownloader/2.7.3": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
@@ -106,33 +111,54 @@
|
||||
"path": "microsoft.win32.registry/5.0.0",
|
||||
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net/3.2.16": {
|
||||
"Microsoft.Windows.CsWin32/0.3.106": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-W6RM2B2f5O7SigBGfkXFYzI/a7Mks+rCHtuGlE/b5O3NMupDon7I0akjCLhrfcnqIfdWDkDafseav/MnIzUSHA==",
|
||||
"path": "protobuf-net/3.2.16",
|
||||
"hashPath": "protobuf-net.3.2.16.nupkg.sha512"
|
||||
"sha512": "sha512-Mx5fK7uN6fwLR4wUghs6//HonAnwPBNmC2oonyJVhCUlHS/r6SUS3NkBc3+gaQiv+0/9bqdj1oSCKQFkNI+21Q==",
|
||||
"path": "microsoft.windows.cswin32/0.3.106",
|
||||
"hashPath": "microsoft.windows.cswin32.0.3.106.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net.Core/3.2.16": {
|
||||
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ZFoY0lfMUWGJ4RoyI0oNj2o2l8t08n3k27YyDD0kYWQ+vXj0hTbWEwYWOpGAfCWvyUPkq9Jcc/4uR74GICZL2g==",
|
||||
"path": "protobuf-net.core/3.2.16",
|
||||
"hashPath": "protobuf-net.core.3.2.16.nupkg.sha512"
|
||||
"sha512": "sha512-Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA==",
|
||||
"path": "microsoft.windows.sdk.win32docs/0.1.42-alpha",
|
||||
"hashPath": "microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512"
|
||||
},
|
||||
"QRCoder/1.4.3": {
|
||||
"Microsoft.Windows.SDK.Win32Metadata/60.0.34-preview": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-fWuFqjm8GTlEb2GqBl3Hi8HZZeZQwBSHxvRPtPjyNbT82H0ff0JwavKRBmMaXCno1Av6McPC8aJzri0Mj2w9Jw==",
|
||||
"path": "qrcoder/1.4.3",
|
||||
"hashPath": "qrcoder.1.4.3.nupkg.sha512"
|
||||
"sha512": "sha512-TA3DUNi4CTeo+ItTXBnGZFt2159XOGSl0UOlG5vjDj4WHqZjhwYyyUnzOtrbCERiSaP2Hzg7otJNWwOSZgutyA==",
|
||||
"path": "microsoft.windows.sdk.win32metadata/60.0.34-preview",
|
||||
"hashPath": "microsoft.windows.sdk.win32metadata.60.0.34-preview.nupkg.sha512"
|
||||
},
|
||||
"SteamKit2/2.5.0-Beta.1": {
|
||||
"Microsoft.Windows.WDK.Win32Metadata/0.11.4-experimental": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-fwwdF0cZZEIdNpcUc1+B9zbP5Q48A3DFOAclPhBh2dMTU03aROaIDktFW+Ww/NN1Z/Emp/LwVqHB+hCM8uxS4Q==",
|
||||
"path": "steamkit2/2.5.0-beta.1",
|
||||
"hashPath": "steamkit2.2.5.0-beta.1.nupkg.sha512"
|
||||
"sha512": "sha512-bf5MCmUyZf0gBlYQjx9UpRAZWBkRndyt9XicR+UNLvAUAFTZQbu6YaX/sNKZlR98Grn0gydfh/yT4I3vc0AIQA==",
|
||||
"path": "microsoft.windows.wdk.win32metadata/0.11.4-experimental",
|
||||
"hashPath": "microsoft.windows.wdk.win32metadata.0.11.4-experimental.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net/3.2.30": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-C/UTlmxEJHAHpqm8xQK1UyJKaIynVCSNG4mVrbLgnZ7ccH28nN49O8iMJvKEodTgVbnimvy+3mIiAdW6mATwnw==",
|
||||
"path": "protobuf-net/3.2.30",
|
||||
"hashPath": "protobuf-net.3.2.30.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net.Core/3.2.30": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-v2ZxxYrz+X212ukSx+uqkLuPu414bvmSAnTyf+PBUKR9ENJxO4P/csorA/27456MCp1JNoMssDj/f91RDiwBfQ==",
|
||||
"path": "protobuf-net.core/3.2.30",
|
||||
"hashPath": "protobuf-net.core.3.2.30.nupkg.sha512"
|
||||
},
|
||||
"SteamKit2/3.0.0-Beta.4": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-gDLccGTbvg5RzqQE75uqL3z2Z0F8MTOnier97DdbBGi9F6DDbZQvquHf0INOAEyN7S5Ku+CgaKnkm409UD7avA==",
|
||||
"path": "steamkit2/3.0.0-beta.4",
|
||||
"hashPath": "steamkit2.3.0.0-beta.4.nupkg.sha512"
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {
|
||||
"type": "package",
|
||||
@@ -141,12 +167,12 @@
|
||||
"path": "system.collections.immutable/7.0.0",
|
||||
"hashPath": "system.collections.immutable.7.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"System.IO.Hashing/8.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
|
||||
"sha512": "sha512-ne1843evDugl0md7Fjzy6QjJrzsjh46ZKbhf8GwBXb5f/gw97J4bxMs0NQKifDuThh/f0bZ0e62NPl1jzTuRqA==",
|
||||
"path": "system.io.hashing/8.0.0",
|
||||
"hashPath": "system.io.hashing.8.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"type": "package",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +1,14 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"tfm": "net8.0",
|
||||
"rollForward": "LatestMajor",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,11 @@
|
||||
Enabling Oculus sideloading allows games located outside if your Oculus library to be played on your Oculus Quest.
|
||||
|
||||
- **Step 1:** Start the regedit application by pressing `Win + R` and typing `regedit` in the dialog box.
|
||||
- **Step 2:** Navigate to `HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oculus VR, LLC\Oculus`.
|
||||
- **Step 3:** Right-click on the right panel and select `New > DWORD (32-bit) Value`.
|
||||
- **Step 4:** Name the new value `AllowDevSideloaded` and set the value to `1`.
|
||||
|
||||
You should end up with something like this:
|
||||

|
||||
|
||||
After completing these steps, you should be able to start Beat Saber from BSManager and play it on your Oculus Quest. If you are still having issues, please join our [Discord](https://discord.gg/uSqbHVpKdV) server for further assistance.
|
||||
@@ -0,0 +1,2 @@
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "oculus-allow-dev-sideloaded"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"winreg",
|
||||
"winres",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.217"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.217"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winres"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c"
|
||||
dependencies = [
|
||||
"toml",
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
[package]
|
||||
name = "oculus-allow-dev-sideloaded"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[build-dependencies]
|
||||
winres = "0.1.12"
|
||||
|
||||
[dependencies]
|
||||
winreg = "0.52.0"
|
||||
|
||||
[package.metadata.winres]
|
||||
FileDescription = "Enable Sideloaded Apps"
|
||||
LegalCopyright = "Copyright © 2024 Zagrios"
|
||||
CompanyName = "Zagrios"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
opt-level = "z"
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
extern crate winres;
|
||||
|
||||
fn main() {
|
||||
if cfg!(target_os = "windows") {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_manifest(r#"
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
"#);
|
||||
res.set_icon("./icon.ico");
|
||||
res.compile().unwrap();
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@@ -0,0 +1,22 @@
|
||||
use winreg::enums::HKEY_LOCAL_MACHINE;
|
||||
use winreg::RegKey;
|
||||
|
||||
const PATH: &str = "SOFTWARE\\Wow6432Node\\Oculus VR, LLC\\Oculus";
|
||||
|
||||
fn main() {
|
||||
let hklm = RegKey::predef(HKEY_LOCAL_MACHINE);
|
||||
|
||||
// Create (or open if it already exists) the subkey
|
||||
let (key, _) = match hklm.create_subkey(PATH) {
|
||||
Ok(res) => res,
|
||||
Err(err) => return println!("{}", err.to_string()),
|
||||
};
|
||||
|
||||
let res = key.set_value("AllowDevSideloaded", &1u32);
|
||||
|
||||
if let Err(err) = res {
|
||||
return println!("{}", err.to_string());
|
||||
}
|
||||
|
||||
println!("AllowDevSideloaded = 1 has been successfully set in {PATH}");
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import type { Config } from "jest";
|
||||
|
||||
const config: Config = {
|
||||
// testURL: "http://localhost/",
|
||||
// testEnvironment: "jsdom",
|
||||
transform: {
|
||||
"\\.(ts|tsx|js|jsx)$": "ts-jest",
|
||||
},
|
||||
moduleNameMapper: {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.erb/mocks/fileMock.js",
|
||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
|
||||
},
|
||||
moduleFileExtensions: ["js", "jsx", "ts", "tsx", "json"],
|
||||
moduleDirectories: ["node_modules", "src"],
|
||||
testPathIgnorePatterns: ["release/app/dist"],
|
||||
setupFiles: ["./.erb/scripts/check-build-exists.ts"],
|
||||
};
|
||||
|
||||
export default config;
|
||||
Generated
+10903
-5073
File diff suppressed because it is too large
Load Diff
+20
-41
@@ -14,7 +14,8 @@
|
||||
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
|
||||
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
|
||||
"test": "jest",
|
||||
"publish": "npm run build && electron-builder -c.win.certificateSha1=842a817a51e2a1d360fcd62f54bf5f9193e919e1 --publish always --win --x64"
|
||||
"test:unit": "jest ./src/__tests__/unit",
|
||||
"publish": "npm run build && electron-builder -c.win.certificateSha1=206941d969c4fa8a0e04d9427def361e13b02fd0 --publish always --win --x64"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
@@ -76,6 +77,9 @@
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"signingHashAlgorithms": [
|
||||
"sha256"
|
||||
],
|
||||
"target": [
|
||||
"nsis",
|
||||
"nsis-web"
|
||||
@@ -119,46 +123,18 @@
|
||||
"beat-saber"
|
||||
],
|
||||
"homepage": "https://github.com/Zagrios/bs-manager#readme",
|
||||
"jest": {
|
||||
"testURL": "http://localhost/",
|
||||
"testEnvironment": "jsdom",
|
||||
"transform": {
|
||||
"\\.(ts|tsx|js|jsx)$": "ts-jest"
|
||||
},
|
||||
"moduleNameMapper": {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.erb/mocks/fileMock.js",
|
||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"jsx",
|
||||
"ts",
|
||||
"tsx",
|
||||
"json"
|
||||
],
|
||||
"moduleDirectories": [
|
||||
"node_modules",
|
||||
"src"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"release/app/dist"
|
||||
],
|
||||
"setupFiles": [
|
||||
"./.erb/scripts/check-build-exists.ts"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron/rebuild": "^3.2.13",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
||||
"@teamsupercell/typings-for-css-modules-loader": "^2.5.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/jest-dom": "^6.4.1",
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@types/archiver": "^5.3.1",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/dateformat": "^5.0.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "17.0.23",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/node": "^20",
|
||||
"@types/node-fetch": "^2.6.3",
|
||||
"@types/pako": "^2.0.1",
|
||||
"@types/react": "^18.0.33",
|
||||
@@ -196,7 +172,7 @@
|
||||
"eslint-import-resolver-webpack": "^0.13.2",
|
||||
"eslint-plugin-compat": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-jest": "^26.8.7",
|
||||
"eslint-plugin-jest": "^27.6.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
@@ -204,7 +180,7 @@
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^27.5.1",
|
||||
"jest": "^29.7.0",
|
||||
"lint-staged": "^12.5.0",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"opencollective-postinstall": "^2.0.3",
|
||||
@@ -220,9 +196,9 @@
|
||||
"sass-loader": "^12.6.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tailwind-scrollbar": "^2.0.1",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"terser-webpack-plugin": "^5.3.5",
|
||||
"ts-jest": "^27.1.5",
|
||||
"ts-jest": "^29.1.2",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.8.2",
|
||||
"typescript": "^4.7.4",
|
||||
@@ -237,6 +213,7 @@
|
||||
"@electron/fuses": "^1.6.2",
|
||||
"@node-steam/vdf": "^2.2.0",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@nextui-org/react": "^2.3.6",
|
||||
"archiver": "^6.0.1",
|
||||
"color": "^4.2.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
@@ -247,15 +224,13 @@
|
||||
"electron-store": "^8.1.0",
|
||||
"electron-updater": "^6.1.7",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"framer-motion": "^10.16.16",
|
||||
"framer-motion": "^11.2.6",
|
||||
"fs-extra": "^11.2.0",
|
||||
"history": "^5.3.0",
|
||||
"is-elevated": "^3.0.0",
|
||||
"jszip": "^3.10.1",
|
||||
"md5-file": "^5.0.0",
|
||||
"node-abi": "^3.47.0",
|
||||
"node-abi": "^3.65.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-stream-zip": "^1.15.0",
|
||||
"pako": "^2.1.0",
|
||||
"ps-list": "^7.2.0",
|
||||
"qrcode.react": "^3.1.0",
|
||||
@@ -278,7 +253,8 @@
|
||||
"tippy.js": "^6.3.7",
|
||||
"to-ico": "^1.1.5",
|
||||
"use-double-click": "^1.0.5",
|
||||
"use-fit-text": "^2.4.0"
|
||||
"use-fit-text": "^2.4.0",
|
||||
"yauzl": "^3.2.0"
|
||||
},
|
||||
"devEngines": {
|
||||
"node": ">=14.x",
|
||||
@@ -317,5 +293,8 @@
|
||||
"!assets/**"
|
||||
],
|
||||
"logLevel": "quiet"
|
||||
},
|
||||
"volta": {
|
||||
"node": "20.18.0"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.15",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bs-manager",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.15",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.4.5",
|
||||
"version": "1.4.15",
|
||||
"description": "BSManager",
|
||||
"main": "./dist/main/main.js",
|
||||
"author": {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import "@testing-library/jest-dom";
|
||||
import { render } from "@testing-library/react";
|
||||
import App from "../renderer/windows/App";
|
||||
|
||||
describe("App", () => {
|
||||
it("should render", () => {
|
||||
expect(render(<App />)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,329 @@
|
||||
import path from "path";
|
||||
import { mkdir, pathExistsSync, readFile, rm } from "fs-extra";
|
||||
import { BsmZipExtractor } from "main/models/bsm-zip-extractor.class";
|
||||
|
||||
const TEST_FOLDER = path.resolve(__dirname, "..", "assets", "zip");
|
||||
const STANDARD_ZIP = path.join(TEST_FOLDER, "standard.zip");
|
||||
const WINDOWS_LEGACY_MAP_ZIP = path.join(TEST_FOLDER, "windows_legacy.zip");
|
||||
const SUBFOLDERS_ZIP = path.join(TEST_FOLDER, "subfolders.zip");
|
||||
const MANIFEST_ZIP = path.join(TEST_FOLDER, "manifest.zip");
|
||||
const EMPTY_ZIP = path.join(TEST_FOLDER, "empty.zip");
|
||||
const UNICODE_ZIP = path.join(TEST_FOLDER, "unicode.zip");
|
||||
const DESTINATION_FOLDER = path.join(TEST_FOLDER, "out");
|
||||
|
||||
describe("Test BsmZipExtractor class", () => {
|
||||
let zip: BsmZipExtractor;
|
||||
|
||||
beforeAll(async () => {
|
||||
if (pathExistsSync(DESTINATION_FOLDER)) {
|
||||
await rm(DESTINATION_FOLDER, { recursive: true, force: true });
|
||||
}
|
||||
await mkdir(DESTINATION_FOLDER);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
if (zip) {
|
||||
zip.close();
|
||||
}
|
||||
if (pathExistsSync(DESTINATION_FOLDER)) {
|
||||
await rm(DESTINATION_FOLDER, { recursive: true, force: true });
|
||||
}
|
||||
await mkdir(DESTINATION_FOLDER);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (pathExistsSync(DESTINATION_FOLDER)) {
|
||||
await rm(DESTINATION_FOLDER, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("Extract standard zip", async () => {
|
||||
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
const res = await zip.extract(DESTINATION_FOLDER);
|
||||
|
||||
expect(res.sort()).toEqual([
|
||||
"file_1.2.txt",
|
||||
"file_1.3.txt",
|
||||
"folder_1.1/",
|
||||
"folder_1.1/file_2.1.txt",
|
||||
"folder_1.1/file_2.2.txt",
|
||||
].sort())
|
||||
|
||||
for (const file of [
|
||||
"file_1.2.txt",
|
||||
"file_1.3.txt",
|
||||
]) {
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, file)))
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
const SUBFOLDER_PATH = path.join(DESTINATION_FOLDER, "folder_1.1");
|
||||
for (const file of [
|
||||
"file_2.1.txt",
|
||||
"file_2.2.txt",
|
||||
]) {
|
||||
expect(pathExistsSync(path.join(SUBFOLDER_PATH, file)))
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it("Extract map zips using back slashes", async () => {
|
||||
|
||||
zip = await BsmZipExtractor.fromPath(WINDOWS_LEGACY_MAP_ZIP);
|
||||
const res = await zip.extract(DESTINATION_FOLDER);
|
||||
|
||||
expect(res.sort()).toEqual([
|
||||
"BPMInfo.dat",
|
||||
"cover.jpg",
|
||||
"ExpertLegacy.dat",
|
||||
"ExpertPlusLawless.dat",
|
||||
"ExpertPlusLegacy.dat",
|
||||
"ExpertPlusStandard.dat",
|
||||
"ExpertStandard.dat",
|
||||
"Info.dat",
|
||||
"song.egg",
|
||||
"pfp/",
|
||||
"pfp/galaxyCompressed.jpg",
|
||||
"pfp/gojiCompressed.jpg",
|
||||
].sort());
|
||||
|
||||
// Expect all the files to exists
|
||||
for (const file of [
|
||||
"BPMInfo.dat",
|
||||
"cover.jpg",
|
||||
"ExpertLegacy.dat",
|
||||
"ExpertPlusLawless.dat",
|
||||
"ExpertPlusLegacy.dat",
|
||||
"ExpertPlusStandard.dat",
|
||||
"ExpertStandard.dat",
|
||||
"Info.dat",
|
||||
"song.egg",
|
||||
]) {
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, file)))
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
const SUBFOLDER_PATH = path.join(DESTINATION_FOLDER, "pfp");
|
||||
for (const file of [
|
||||
"galaxyCompressed.jpg",
|
||||
"gojiCompressed.jpg",
|
||||
]) {
|
||||
expect(pathExistsSync(path.join(SUBFOLDER_PATH, file)))
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it("Read Zip with multiple subfolders", async () => {
|
||||
|
||||
const zip = await BsmZipExtractor.fromPath(SUBFOLDERS_ZIP);
|
||||
const res = await zip.extract(DESTINATION_FOLDER);
|
||||
|
||||
expect(res.sort()).toEqual([
|
||||
"1/",
|
||||
"1/2/",
|
||||
"1/2/3/",
|
||||
"1/2/3/4/",
|
||||
"1/2/3/4/5.txt",
|
||||
].sort());
|
||||
|
||||
for (const folder of [
|
||||
"1/",
|
||||
"1/2/",
|
||||
"1/2/3/",
|
||||
"1/2/3/4/",
|
||||
]) {
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, folder)))
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
const file = "1/2/3/4/5.txt";
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, file)))
|
||||
.toBe(true);
|
||||
});
|
||||
|
||||
it("Read manifest.json from zip file", async () => {
|
||||
|
||||
const zipBuffer = await readFile(MANIFEST_ZIP);
|
||||
zip = await BsmZipExtractor.fromBuffer(zipBuffer);
|
||||
const buffer = await (await zip.findEntry(entry => entry.fileName === "manifest.json")).read();
|
||||
const manifest = JSON.parse(buffer.toString());
|
||||
expect(manifest).toBeTruthy();
|
||||
|
||||
// Check some of the fields if they are correct
|
||||
expect(manifest.appId).toBe("some-app-id");
|
||||
expect(manifest.canonicalName).toBe("some-canonical-name");
|
||||
expect(manifest.isCore).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
it("Should find an entry using findEntry", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
const entry = await zip.findEntry(entry => entry.fileName === "file_1.2.txt");
|
||||
|
||||
expect(entry).toBeTruthy();
|
||||
expect(entry.fileName).toBe("file_1.2.txt");
|
||||
|
||||
const contentBuffer = await entry.read();
|
||||
const content = contentBuffer.toString();
|
||||
|
||||
expect(content).toContain("This is file 1.2"); // Assurez-vous que le contenu correspond
|
||||
});
|
||||
|
||||
it("Should filter entries using filterEntries", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
const entries = await zip.filterEntries(entry => !entry.isDirectory && entry.fileName.startsWith("folder_1.1/"));
|
||||
|
||||
expect(entries.length).toBe(2);
|
||||
const fileNames = entries.map(entry => entry.fileName).sort();
|
||||
|
||||
expect(fileNames).toEqual([
|
||||
"folder_1.1/file_2.1.txt",
|
||||
"folder_1.1/file_2.2.txt",
|
||||
]);
|
||||
});
|
||||
|
||||
it("Should get an entry by file name using getEntry", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
const entry = await zip.getEntry("file_1.3.txt");
|
||||
|
||||
expect(entry).toBeTruthy();
|
||||
expect(entry.fileName).toBe("file_1.3.txt");
|
||||
|
||||
const contentBuffer = await entry.read();
|
||||
const content = contentBuffer.toString();
|
||||
|
||||
expect(content).toContain("This is file 1.3"); // Assurez-vous que le contenu correspond
|
||||
});
|
||||
|
||||
it("Should extract only specified entries using entriesNames option", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
const res = await zip.extract(DESTINATION_FOLDER, { entriesNames: ["file_1.2.txt", "folder_1.1/file_2.1.txt"] });
|
||||
|
||||
expect(res.sort()).toEqual([
|
||||
"file_1.2.txt",
|
||||
"folder_1.1/",
|
||||
"folder_1.1/file_2.1.txt",
|
||||
].sort());
|
||||
|
||||
for (const file of [
|
||||
"file_1.2.txt",
|
||||
"folder_1.1/file_2.1.txt",
|
||||
]) {
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, file)))
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
// Vérifiez que les autres fichiers ne sont pas extraits
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, "file_1.3.txt")))
|
||||
.toBe(false);
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, "folder_1.1/file_2.2.txt")))
|
||||
.toBe(false);
|
||||
});
|
||||
|
||||
it("Should not extract any files if abortToken is already aborted", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
const abortController = new AbortController();
|
||||
|
||||
// Abortez avant d'appeler extract
|
||||
abortController.abort();
|
||||
|
||||
const res = await zip.extract(DESTINATION_FOLDER, { abortToken: abortController });
|
||||
|
||||
expect(res.length).toBe(0);
|
||||
|
||||
// Vérifiez qu'aucun fichier n'a été extrait
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, "file_1.2.txt")))
|
||||
.toBe(false);
|
||||
});
|
||||
|
||||
|
||||
it("Should throw an error when opening a non-existent zip file", async () => {
|
||||
await expect(BsmZipExtractor.fromPath("non_existent.zip"))
|
||||
.rejects
|
||||
.toThrow();
|
||||
});
|
||||
|
||||
it("Should handle empty zip file correctly", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(EMPTY_ZIP);
|
||||
const entries = [];
|
||||
|
||||
for await (const entry of zip.entries()) {
|
||||
entries.push(entry);
|
||||
}
|
||||
|
||||
expect(entries.length).toBe(0);
|
||||
|
||||
const res = await zip.extract(DESTINATION_FOLDER);
|
||||
expect(res.length).toBe(0);
|
||||
});
|
||||
|
||||
it("Should return the same entries on multiple calls to entries()", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
|
||||
const entries1 = [];
|
||||
for await (const entry of zip.entries()) {
|
||||
entries1.push(entry);
|
||||
}
|
||||
|
||||
expect(entries1.length).toBe(5); // Basé sur le contenu de STANDARD_ZIP
|
||||
|
||||
const entries2 = [];
|
||||
for await (const entry of zip.entries()) {
|
||||
entries2.push(entry);
|
||||
}
|
||||
|
||||
expect(entries2.length).toBe(5);
|
||||
expect(entries2.map(e => e.fileName).sort()).toEqual(entries1.map(e => e.fileName).sort());
|
||||
});
|
||||
|
||||
it("Should not be able to read entries after zip is closed", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(STANDARD_ZIP);
|
||||
|
||||
zip.close();
|
||||
|
||||
await expect(zip.entries().next()).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("Should handle zip file from buffer", async () => {
|
||||
const zipBuffer = await readFile(STANDARD_ZIP);
|
||||
zip = await BsmZipExtractor.fromBuffer(zipBuffer);
|
||||
|
||||
const entries = [];
|
||||
for await (const entry of zip.entries()) {
|
||||
entries.push(entry.fileName);
|
||||
}
|
||||
|
||||
expect(entries.sort()).toEqual([
|
||||
"file_1.2.txt",
|
||||
"file_1.3.txt",
|
||||
"folder_1.1/",
|
||||
"folder_1.1/file_2.1.txt",
|
||||
"folder_1.1/file_2.2.txt",
|
||||
].sort());
|
||||
});
|
||||
|
||||
it("Should read and extract files with Unicode filenames", async () => {
|
||||
zip = await BsmZipExtractor.fromPath(UNICODE_ZIP);
|
||||
|
||||
const entries = [];
|
||||
for await (const entry of zip.entries()) {
|
||||
entries.push(entry);
|
||||
}
|
||||
|
||||
expect(entries.map(e => e.fileName)).toContain("こんにちは.txt"); // "Bonjour" en japonais
|
||||
|
||||
const res = await zip.extract(DESTINATION_FOLDER);
|
||||
expect(res).toContain("こんにちは.txt");
|
||||
expect(pathExistsSync(path.join(DESTINATION_FOLDER, "こんにちは.txt")))
|
||||
.toBe(true);
|
||||
|
||||
});
|
||||
|
||||
it("Should throw an error when reading a corrupted zip file", async () => {
|
||||
const CORRUPTED_ZIP = path.join(TEST_FOLDER, "corrupted.zip");
|
||||
await expect(BsmZipExtractor.fromPath(CORRUPTED_ZIP)).rejects.toThrow(/.*[Error: Invalid comment length].*/)
|
||||
});
|
||||
});
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CopyOptions, copy, createReadStream, ensureDir, move, realpath, stat, symlink } from "fs-extra";
|
||||
import { CopyOptions, MoveOptions, copy, createReadStream, ensureDir, move, pathExists, pathExistsSync, realpath, stat, symlink } from "fs-extra";
|
||||
import { access, mkdir, rm, readdir, unlink, lstat, readlink } from "fs/promises";
|
||||
import path from "path";
|
||||
import { Observable, concatMap, from } from "rxjs";
|
||||
@@ -7,6 +7,7 @@ import { BsmException } from "shared/models/bsm-exception.model";
|
||||
import crypto from "crypto";
|
||||
import { execSync } from "child_process";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
import { CustomError } from "../../shared/models/exceptions/custom-error.class"
|
||||
|
||||
export async function pathExist(path: string): Promise<boolean> {
|
||||
try {
|
||||
@@ -77,37 +78,37 @@ export async function getFilesInFolder(folderPath: string): Promise<string[]> {
|
||||
|
||||
return dirEntries.filter(entry => entry.isFile()).map(file => path.join(folderPath, file.name));
|
||||
}
|
||||
|
||||
export function moveFolderContent(src: string, dest: string): Observable<Progression> {
|
||||
export function moveFolderContent(src: string, dest: string, option?: MoveOptions): Observable<Progression> {
|
||||
const progress: Progression = { current: 0, total: 0 };
|
||||
return new Observable<Progression>(subscriber => {
|
||||
subscriber.next(progress);
|
||||
(async () => {
|
||||
const srcExist = await pathExist(src);
|
||||
const srcExist = await pathExists(src);
|
||||
|
||||
if (!srcExist) {
|
||||
return subscriber.complete();
|
||||
}
|
||||
|
||||
ensureFolderExist(dest);
|
||||
await ensureFolderExist(dest);
|
||||
|
||||
const files = await readdir(src, { encoding: "utf-8" });
|
||||
const files = await readdir(src, { encoding: "utf-8", withFileTypes: true });
|
||||
progress.total = files.length;
|
||||
|
||||
const promises = files.map(async file => {
|
||||
const srcFullPath = path.join(src, file);
|
||||
const destFullPath = path.join(dest, file);
|
||||
if (await pathExist(destFullPath)) {
|
||||
progress.current++;
|
||||
return subscriber.next(progress);
|
||||
for(const file of files){
|
||||
const srcFullPath = path.join(src, file.name);
|
||||
const destFullPath = path.join(dest, file.name);
|
||||
|
||||
const srcChilds = file.isDirectory() ? await readdir(srcFullPath, { encoding: "utf-8", recursive: true }) : [];
|
||||
const allChildsAlreadyExist = srcChilds.every(child => pathExistsSync(path.join(destFullPath, child)));
|
||||
|
||||
if(file.isFile() || !allChildsAlreadyExist){
|
||||
await move(srcFullPath, destFullPath, option);
|
||||
}
|
||||
await move(srcFullPath, destFullPath);
|
||||
|
||||
progress.current++;
|
||||
subscriber.next(progress);
|
||||
});
|
||||
|
||||
Promise.allSettled(promises).then(() => subscriber.complete());
|
||||
})();
|
||||
}
|
||||
})().catch(err => subscriber.error(CustomError.fromError(err, err?.code))).finally(() => subscriber.complete());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -175,7 +176,7 @@ export async function dirSize(dirPath: string): Promise<number>{
|
||||
const realPath = await realpath(fullPath);
|
||||
const stat = await lstat(realPath);
|
||||
|
||||
if (stat.isDirectory()) {
|
||||
if (stat.isDirectory()) {
|
||||
return dirSize(fullPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
import JSZip from "jszip";
|
||||
import { pathExist } from "./fs.helpers";
|
||||
import path from "path";
|
||||
import { mkdir, writeFile } from "fs/promises";
|
||||
|
||||
export async function extractZip(zip: JSZip, dest: string): Promise<string[]> {
|
||||
if (!(await pathExist(dest))) {
|
||||
throw new Error(`Path ${dest} does not exist`);
|
||||
}
|
||||
const files: string[] = [];
|
||||
|
||||
for (const [relativePath, entry] of Object.entries(zip.files)) {
|
||||
if (entry.dir) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const content = await entry.async("nodebuffer");
|
||||
const outPath = path.join(dest, relativePath);
|
||||
const outDir = path.dirname(outPath);
|
||||
|
||||
await mkdir(outDir, { recursive: true });
|
||||
await writeFile(outPath, content);
|
||||
|
||||
files.push(outPath);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
@@ -37,10 +37,3 @@ ipc.on<void>("bs-launch.restore-steamvr", (_, reply) => {
|
||||
const steamLauncher = SteamLauncherService.getInstance();
|
||||
reply(from(steamLauncher.restoreSteamVR()));
|
||||
});
|
||||
|
||||
ipc.on<void>("restore-original-oculus-folder", (_, reply) => {
|
||||
const oculusLauncher = OculusLauncherService.getInstance();
|
||||
reply(from(
|
||||
oculusLauncher.deleteBsSymlinks().then(() => oculusLauncher.restoreOriginalBeatSaber())
|
||||
));
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ import { BsModsManagerService } from "../services/mods/bs-mods-manager.service";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { BbmFullMod } from "shared/models/mods/mod.interface";
|
||||
import { InstallModsResult } from "shared/models/mods";
|
||||
import log from "electron-log";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
@@ -21,7 +21,7 @@ ipc.on<BSVersion>("get-installed-mods", (req, reply) => {
|
||||
reply(from(modsManager.getInstalledMods(req.args)));
|
||||
});
|
||||
|
||||
ipcMain.on("install-mods", (event, request: IpcRequest<{ mods: Mod[]; version: BSVersion }>) => {
|
||||
ipcMain.on("install-mods", (event, request: IpcRequest<{ mods: BbmFullMod[]; version: BSVersion }>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
@@ -36,7 +36,7 @@ ipcMain.on("install-mods", (event, request: IpcRequest<{ mods: Mod[]; version: B
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("uninstall-mods", (event, request: IpcRequest<{ mods: Mod[]; version: BSVersion }>) => {
|
||||
ipcMain.on("uninstall-mods", (event, request: IpcRequest<{ mods: BbmFullMod[]; version: BSVersion }>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ ipc.on<ImportVersionOptions>("import-version", (req, reply) => {
|
||||
reply(versionManager.importVersion(req.args));
|
||||
});
|
||||
|
||||
// #region Steam
|
||||
// #region Steam
|
||||
|
||||
ipc.on("is-dotnet-6-installed", (_, reply) => {
|
||||
ipc.on("is-dotnet-installed", (_, reply) => {
|
||||
const installer = BsSteamDownloaderService.getInstance();
|
||||
reply(from(installer.isDotNet6Installed()));
|
||||
reply(from(installer.isDotNetInstalled()));
|
||||
});
|
||||
|
||||
ipc.on("bs-download.installation-folder", (_, reply) => {
|
||||
@@ -83,4 +83,4 @@ ipc.on("bs-oculus-clear-auth-token", async (_, reply) => {
|
||||
reply(from(oculusDownloader.clearAuthToken()));
|
||||
});
|
||||
|
||||
// #endregion
|
||||
// #endregion
|
||||
|
||||
@@ -12,3 +12,4 @@ import "./bs-playlist-ipcs";
|
||||
import "./model-saber.ipcs";
|
||||
import "./bs-model-ipcs";
|
||||
import "./bs-version-download/bs-download-ipcs";
|
||||
import "./oculus.ipcs";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { OculusService } from "../services/oculus.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from } from "rxjs";
|
||||
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipc.on("is-oculus-sideloaded-apps-enabled", (_, reply) => {
|
||||
const oculusService = OculusService.getInstance();
|
||||
reply(from(oculusService.isSideLoadedAppsEnabled()));
|
||||
});
|
||||
|
||||
ipc.on("enable-oculus-sideloaded-apps", (_, reply) => {
|
||||
const oculusService = OculusService.getInstance();
|
||||
reply(from(oculusService.enableSideloadedApps()));
|
||||
});
|
||||
+134
-11
@@ -21,16 +21,20 @@ import { BSLauncherService } from "./services/bs-launcher/bs-launcher.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { LivShortcut } from "./services/liv/liv-shortcut.service";
|
||||
import { SteamLauncherService } from "./services/bs-launcher/steam-launcher.service";
|
||||
import { readdirSync, statSync, unlinkSync } from "fs-extra";
|
||||
|
||||
export const filterStrings = new Set<string>();
|
||||
export const filterPatterns = new Set<RegExp>();
|
||||
|
||||
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
|
||||
|
||||
log.transports.file.level = "info";
|
||||
log.transports.file.resolvePath = () => {
|
||||
const now = new Date();
|
||||
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}-v${app.getVersion()}.log`);
|
||||
};
|
||||
// Filter all occulus tokens
|
||||
filterPatterns.add(/FRL\S{10,}/g);
|
||||
|
||||
initLogger();
|
||||
deleteOlestLogs();
|
||||
deleteOldLogs();
|
||||
|
||||
log.catchErrors();
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
const sourceMapSupport = require("source-map-support");
|
||||
@@ -90,11 +94,11 @@ if (!gotTheLock) {
|
||||
})
|
||||
|
||||
app.whenReady().then(() => {
|
||||
|
||||
|
||||
app.setAppUserModelId(APP_NAME);
|
||||
|
||||
initServicesMustBeInitialized();
|
||||
|
||||
|
||||
const deepLink = process.argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
|
||||
|
||||
if (!deepLink) {
|
||||
@@ -102,13 +106,132 @@ if (!gotTheLock) {
|
||||
} else {
|
||||
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
|
||||
}
|
||||
|
||||
|
||||
SteamLauncherService.getInstance().restoreSteamVR();
|
||||
|
||||
|
||||
// Log renderer errors
|
||||
ipcMain.on("log-error", (_, args: IpcRequest<unknown>) => {
|
||||
log.error(args?.args);
|
||||
});
|
||||
|
||||
|
||||
ipcMain.on("add-filter-string", (_, args: IpcRequest<string>) => {
|
||||
filterStrings.add(args?.args);
|
||||
});
|
||||
|
||||
ipcMain.on("add-filter-pattern", (_, args: IpcRequest<string>) => {
|
||||
filterPatterns.add(new RegExp(args?.args));
|
||||
});
|
||||
|
||||
}).catch(log.error);
|
||||
}
|
||||
|
||||
function initLogger(){
|
||||
log.transports.file.level = "info";
|
||||
log.transports.file.resolvePath = () => {
|
||||
const now = new Date();
|
||||
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}-v${app.getVersion()}.log`);
|
||||
};
|
||||
|
||||
log.hooks.push((message) => {
|
||||
|
||||
const filterMessage = (filter: string|RegExp, ...param: unknown[]): unknown[] => {
|
||||
return param.map(data => {
|
||||
|
||||
if(typeof data === "string"){
|
||||
return data.replaceAll(filter, "****");
|
||||
}
|
||||
|
||||
if(data instanceof Error){
|
||||
data.message = data.message?.replaceAll(filter, "****");
|
||||
data.stack = data.stack?.replaceAll(filter, "****");
|
||||
}
|
||||
|
||||
if(data instanceof Array){
|
||||
return filterMessage(filter, ...data);
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
}
|
||||
|
||||
filterStrings.forEach(filter => {
|
||||
if(filter && message.data.length){
|
||||
message.data = filterMessage(filter, ...message.data);
|
||||
}
|
||||
});
|
||||
|
||||
filterPatterns.forEach(filter => {
|
||||
if(filter && message.data.length){
|
||||
message.data = filterMessage(filter, ...message.data);
|
||||
}
|
||||
});
|
||||
|
||||
return message;
|
||||
});
|
||||
|
||||
log.catchErrors();
|
||||
}
|
||||
|
||||
function getLogFilesEntries() {
|
||||
try {
|
||||
const logsFolder = app.getPath("logs");
|
||||
let logs = readdirSync(logsFolder, { withFileTypes: true });
|
||||
|
||||
logs = logs.filter(file => file.isFile() && path.extname(file.name) === ".log");
|
||||
|
||||
logs.sort((a, b) => {
|
||||
const aStat = statSync(path.join(logsFolder, a.name));
|
||||
const bStat = statSync(path.join(logsFolder, b.name));
|
||||
return bStat.mtime.getTime() - aStat.mtime.getTime();
|
||||
});
|
||||
|
||||
return logs.map(file => {
|
||||
const filePath = path.join(logsFolder, file.name);
|
||||
const stat = statSync(filePath);
|
||||
return {
|
||||
path: filePath,
|
||||
name: file.name,
|
||||
stats: stat
|
||||
};
|
||||
});
|
||||
} catch (err) {
|
||||
log.error('Error while retrieving log files entries:', err);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
// keep only the last 5 logs
|
||||
function deleteOldLogs(): void{
|
||||
try {
|
||||
let logs = getLogFilesEntries();
|
||||
|
||||
logs = logs.slice(5);
|
||||
|
||||
logs.forEach(file => {
|
||||
try {
|
||||
unlinkSync(file.path);
|
||||
log.info(`Deleted log file: ${file.path}`);
|
||||
} catch (err) {
|
||||
log.error(`Error deleting file ${file.path}:`, err);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
log.error("Error while deleting old logs:", err);
|
||||
}
|
||||
}
|
||||
|
||||
// Temporary function to delete logs before 2024-07-31
|
||||
function deleteOlestLogs(): void{
|
||||
// delete all logs before 2024-07-31
|
||||
const date = new Date(2024, 6, 31); // month is 0-based
|
||||
const logs = getLogFilesEntries().filter(file => file.stats.mtime.getTime() < date.getTime());
|
||||
|
||||
logs.forEach(file => {
|
||||
try {
|
||||
unlinkSync(file.path);
|
||||
log.info(`Deleted log file: ${file.path}`);
|
||||
} catch (err) {
|
||||
log.error(`Error deleting file ${file.path}:`, err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
import { createWriteStream, ensureDir } from "fs-extra";
|
||||
import path from "path";
|
||||
import { Readable } from "stream";
|
||||
import yauzl, { ZipFile, Options, Entry } from "yauzl"
|
||||
|
||||
export class BsmZipExtractor {
|
||||
|
||||
private static readonly YAUZL_OPEN_OPTIONS: Options = {
|
||||
lazyEntries: true,
|
||||
decodeStrings: true,
|
||||
autoClose: false,
|
||||
};
|
||||
|
||||
public static fromPath(path: string): Promise<BsmZipExtractor> {
|
||||
return new Promise((resolve, reject) => {
|
||||
yauzl.open(path, BsmZipExtractor.YAUZL_OPEN_OPTIONS, (error: Error, zip: yauzl.ZipFile) => {
|
||||
if (error) return reject(error);
|
||||
resolve(new BsmZipExtractor(zip));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public static fromBuffer(buffer: Buffer): Promise<BsmZipExtractor> {
|
||||
return new Promise((resolve, reject) => {
|
||||
yauzl.fromBuffer(buffer, BsmZipExtractor.YAUZL_OPEN_OPTIONS, (error: Error, zip: yauzl.ZipFile) => {
|
||||
if (error) return reject(error);
|
||||
resolve(new BsmZipExtractor(zip));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private readonly zip: ZipFile;
|
||||
private readonly entriesMap = new Map<string, BsmZipExtractorEntry>();
|
||||
|
||||
private constructor(zip: ZipFile) {
|
||||
this.zip = zip;
|
||||
}
|
||||
|
||||
private async readEntry(): Promise<BsmZipExtractorEntry> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const onEntry = (entry: Entry) => {
|
||||
cleanup();
|
||||
resolve(new BsmZipExtractorEntry({ entry, zip: this.zip }));
|
||||
};
|
||||
|
||||
const onEnd = () => {
|
||||
cleanup();
|
||||
resolve(null);
|
||||
};
|
||||
|
||||
const onError = (err: Error) => {
|
||||
cleanup();
|
||||
reject(err);
|
||||
};
|
||||
|
||||
const cleanup = () => {
|
||||
this.zip.removeListener("entry", onEntry);
|
||||
this.zip.removeListener("end", onEnd);
|
||||
this.zip.removeListener("error", onError);
|
||||
};
|
||||
|
||||
this.zip.once("entry", onEntry);
|
||||
this.zip.once("end", onEnd);
|
||||
this.zip.once("error", onError);
|
||||
this.zip.readEntry();
|
||||
});
|
||||
}
|
||||
|
||||
// The first time this method is called, it will read all the entries and store them in a map
|
||||
// The next times it will return the entries from the map to avoid reopening the zip file again
|
||||
public async *entries(): AsyncGenerator<BsmZipExtractorEntry> {
|
||||
|
||||
for (const entry of Array.from(this.entriesMap.values())) {
|
||||
yield entry;
|
||||
}
|
||||
|
||||
let entry: BsmZipExtractorEntry = await this.readEntry();
|
||||
while (entry) {
|
||||
this.entriesMap.set(entry.fileName, entry);
|
||||
yield entry;
|
||||
entry = await this.readEntry();
|
||||
}
|
||||
}
|
||||
|
||||
public async findEntry(func: (entry: BsmZipExtractorEntry) => boolean): Promise<BsmZipExtractorEntry|null> {
|
||||
for await (const entry of this.entries()) {
|
||||
if (func(entry)) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public async filterEntries(func: (entry: BsmZipExtractorEntry) => boolean): Promise<BsmZipExtractorEntry[]> {
|
||||
const filtered: BsmZipExtractorEntry[] = [];
|
||||
for await (const entry of this.entries()) {
|
||||
if (func(entry)) {
|
||||
filtered.push(entry);
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
|
||||
public async getEntry(fileName: string): Promise<BsmZipExtractorEntry> {
|
||||
return this.entriesMap.get(fileName) ?? this.findEntry(entry => entry.fileName === fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts all entries from the zip file to the destination folder
|
||||
* @param destination
|
||||
* @param opt - { entriesNames?: string[], abortToken: AbortController }
|
||||
* @returns {Promise<string[]>} The list of extracted files (relative paths in the destination folder)
|
||||
*
|
||||
* `opt` object:
|
||||
* - `entriesNames` - The list of entries to extract (can be regexs or glob pattern). If not provided, all entries will be extracted
|
||||
* - `abortToken` - The AbortController instance to abort the extraction
|
||||
*
|
||||
*/
|
||||
public async extract(destination: string, opt?: { entriesNames?: (string|RegExp)[], abortToken?: AbortController }): Promise<string[]> {
|
||||
const entriesNames = opt?.entriesNames;
|
||||
const abortToken = opt?.abortToken;
|
||||
|
||||
if (abortToken?.signal?.aborted) {
|
||||
return [];
|
||||
}
|
||||
|
||||
await ensureDir(destination);
|
||||
|
||||
const extracted = new Set<string>()
|
||||
for await (const entry of this.entries()) {
|
||||
|
||||
if (abortToken?.signal?.aborted) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (entriesNames && !entriesNames.some(name => typeof name === "string" ? entry.fileName === name : name.test(entry.fileName))){
|
||||
continue;
|
||||
}
|
||||
|
||||
const extractedFile = await entry.extract(destination);
|
||||
const dirname = path.dirname(extractedFile);
|
||||
|
||||
// Make zip that use backslash as separator have the same behavior as zip that use forward slash
|
||||
if(dirname !== "."){
|
||||
const split = dirname.split(path.posix.sep);
|
||||
for (let i = 1; i <= split.length; i++) {
|
||||
const folder = split.slice(0, i).join(path.posix.sep);
|
||||
extracted.add(folder + path.posix.sep);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extracted.add(extractedFile);
|
||||
}
|
||||
|
||||
return Array.from(extracted);
|
||||
}
|
||||
|
||||
|
||||
public close(): void {
|
||||
this.zip.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class BsmZipExtractorEntry {
|
||||
|
||||
private readonly entry: Entry;
|
||||
private readonly zip: ZipFile;
|
||||
|
||||
constructor(opt: { entry: Entry, zip: ZipFile }) {
|
||||
this.entry = opt.entry;
|
||||
this.zip = opt.zip;
|
||||
}
|
||||
|
||||
public async read(): Promise<Buffer> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.zip.openReadStream(this.entry, (error: Error, stream: Readable) => {
|
||||
if (error) return reject(error);
|
||||
const buffers: Buffer[] = [];
|
||||
stream.on("data", (data) => buffers.push(data as Buffer));
|
||||
stream.on("end", () => resolve(Buffer.concat(buffers)));
|
||||
stream.on("error", reject);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public async extract(destination: string): Promise<string> {
|
||||
|
||||
const destPath = path.join(destination, this.entry.fileName);
|
||||
|
||||
if (this.isDirectory) {
|
||||
return ensureDir(destPath).then(() => this.entry.fileName);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.zip.openReadStream(this.entry, async (error: Error, stream: Readable) => {
|
||||
if (error) return reject(error);
|
||||
|
||||
await ensureDir(path.dirname(destPath));
|
||||
|
||||
const writeStream = createWriteStream(destPath);
|
||||
stream.pipe(writeStream);
|
||||
writeStream.on("finish", () => resolve(this.entry.fileName));
|
||||
writeStream.on("error", reject);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public get isDirectory(): boolean {
|
||||
return this.entry.fileName.endsWith("/");
|
||||
}
|
||||
|
||||
public get fileName(): string {
|
||||
return this.entry.fileName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import JSZip from "jszip";
|
||||
import fetch from "node-fetch";
|
||||
import { CustomError } from "../../shared/models/exceptions/custom-error.class";
|
||||
import { mkdirs, createWriteStream, pathExists, WriteStream } from "fs-extra";
|
||||
@@ -7,6 +6,8 @@ import { inflate } from "pako"
|
||||
import { EMPTY, Observable, ReplaySubject, Subscriber, catchError, filter, from, lastValueFrom, mergeMap, scan, share, tap } from "rxjs";
|
||||
import { Progression, hashFile } from "../helpers/fs.helpers";
|
||||
import { OculusDownloaderErrorCodes } from "../../shared/models/bs-version-download/oculus-download.model";
|
||||
import { BsmZipExtractor } from "./bsm-zip-extractor.class";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
|
||||
export class OculusDownloader {
|
||||
|
||||
@@ -23,26 +24,38 @@ export class OculusDownloader {
|
||||
return `https://securecdn.oculus.com/binaries/segment/?access_token=${token}&binary_id=${binaryId}&segment_sha256=${segmentSha256}`;
|
||||
}
|
||||
|
||||
private async downloadManifestZip(manifestUrl: string): Promise<JSZip> {
|
||||
private async downloadManifestZip(manifestUrl: string): Promise<Buffer> {
|
||||
const response = await fetch(manifestUrl);
|
||||
const arrBuffer = await response.arrayBuffer();
|
||||
return JSZip.loadAsync(arrBuffer);
|
||||
return Buffer.from(arrBuffer);
|
||||
}
|
||||
|
||||
private async getManifest(): Promise<OculusManifest> {
|
||||
const downloadUrl = this.getDownloadManifestUrl(this.options.accessToken, this.options.binaryId);
|
||||
const manifestZip = await this.downloadManifestZip(downloadUrl).catch(err => CustomError.throw(err, "DOWNLOAD_MANIFEST_FAILED"));
|
||||
const manifestFile = manifestZip.file("manifest.json");
|
||||
const buffer = await this.downloadManifestZip(downloadUrl)
|
||||
.catch(err => CustomError.throw(err, "DOWNLOAD_MANIFEST_FAILED"));
|
||||
|
||||
if(!manifestFile){
|
||||
const zip = await BsmZipExtractor.fromBuffer(buffer);
|
||||
const entry = await zip.getEntry("manifest.json");
|
||||
|
||||
if(!entry) {
|
||||
throw new CustomError("Manifest file not found", "MANIFEST_FILE_NOT_FOUND");
|
||||
}
|
||||
|
||||
return manifestFile.async("text").then(JSON.parse).catch(err => CustomError.throw(err, "PARSE_MANIFEST_FILE_FAILED"));
|
||||
const manifest = await entry.read();
|
||||
zip.close();
|
||||
|
||||
const { result, error } = tryit(() => JSON.parse(manifest.toString()) as OculusManifest);
|
||||
|
||||
if(error){
|
||||
throw CustomError.throw(error, "PARSE_MANIFEST_FILE_FAILED")
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private downloadManifestFile(file: OculusManifestFile, destination: string): Observable<Progression<OculusManifestFile>> {
|
||||
|
||||
|
||||
const downloadSegment = async (segment: OculusManifestFileSegment): Promise<ArrayBuffer> => {
|
||||
const segmentUrl = this.getDownloadSegmentUrl(this.options.accessToken, this.options.binaryId, segment[1]);
|
||||
const response = await fetch(segmentUrl);
|
||||
@@ -66,11 +79,11 @@ export class OculusDownloader {
|
||||
|
||||
const arrBuffer = await downloadSegment(segment);
|
||||
const inflated = inflate(arrBuffer);
|
||||
await writeStream.write(inflated);
|
||||
writeStream.write(inflated);
|
||||
|
||||
progress.current += inflated.byteLength;
|
||||
progress.diff = inflated.byteLength;
|
||||
|
||||
|
||||
sub.next(progress);
|
||||
}
|
||||
|
||||
@@ -86,7 +99,7 @@ export class OculusDownloader {
|
||||
});
|
||||
}
|
||||
|
||||
private isFileIntegrityValid(file: OculusFileWithName, folder: string): Promise<boolean> {
|
||||
private async isFileIntegrityValid(file: OculusFileWithName, folder: string): Promise<boolean> {
|
||||
const [fileName, fileData] = file;
|
||||
const destination = path.join(folder, fileName);
|
||||
|
||||
@@ -138,7 +151,7 @@ export class OculusDownloader {
|
||||
if(this.isDownloading){
|
||||
throw new CustomError("Already downloading", "ALREADY_DOWNLOADING");
|
||||
}
|
||||
|
||||
|
||||
this.options = options;
|
||||
this.isDownloading = true;
|
||||
|
||||
@@ -182,7 +195,7 @@ export class OculusDownloader {
|
||||
})));
|
||||
|
||||
const integrity = await lastValueFrom(this.verifyIntegrity(manifest, options.destination)).catch(err => CustomError.throw(err, "VERIFY_INTEGRITY_FAILED"));
|
||||
|
||||
|
||||
if(integrity.data.length > 0){
|
||||
throw new CustomError("Some files failed to download", "SOME_FILES_FAILED_TO_DOWNLOAD", integrity.data);
|
||||
}
|
||||
@@ -242,4 +255,4 @@ interface Logger {
|
||||
info: (...args: unknown[]) => void;
|
||||
warn: (...args: unknown[]) => void;
|
||||
error: (...args: unknown[]) => void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from "path";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { BsvMapDetail, RawMapInfoData } from "shared/models/maps";
|
||||
import { BsvMapDetail } from "shared/models/maps";
|
||||
import { BsmLocalMap, BsmLocalMapsProgress, DeleteMapsProgress } from "shared/models/maps/bsm-local-map.interface";
|
||||
import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import { InstallationLocationService } from "../installation-location.service";
|
||||
@@ -8,7 +8,6 @@ import { UtilsService } from "../utils.service";
|
||||
import crypto from "crypto";
|
||||
import { lstatSync } from "fs";
|
||||
import { copy, createReadStream, ensureDir, pathExists, realpath, unlink } from "fs-extra";
|
||||
import StreamZip from "node-stream-zip";
|
||||
import { RequestService } from "../request.service";
|
||||
import sanitize from "sanitize-filename";
|
||||
import { DeepLinkService } from "../deep-link.service";
|
||||
@@ -22,6 +21,8 @@ import { FolderLinkerService } from "../folder-linker.service";
|
||||
import { allSettled } from "../../../shared/helpers/promise.helpers";
|
||||
import { splitIntoChunk } from "../../../shared/helpers/array.helpers";
|
||||
import { IpcService } from "../ipc.service";
|
||||
import { parseMapInfoDat } from "../../../shared/parsers/maps/map-info.parser";
|
||||
import { BsmZipExtractor } from "../../models/bsm-zip-extractor.class";
|
||||
|
||||
export class LocalMapsManagerService {
|
||||
private static instance: LocalMapsManagerService;
|
||||
@@ -84,27 +85,37 @@ export class LocalMapsManagerService {
|
||||
}
|
||||
|
||||
private async computeMapHash(mapPath: string, rawInfoString: string): Promise<string> {
|
||||
const mapRawInfo: RawMapInfoData = JSON.parse(rawInfoString);
|
||||
const mapInfo = parseMapInfoDat(JSON.parse(rawInfoString));
|
||||
const shasum = crypto.createHash("sha1");
|
||||
shasum.update(rawInfoString);
|
||||
|
||||
|
||||
const hashFile = (filePath: string): Promise<void> => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
const stream = createReadStream(filePath);
|
||||
stream.on("data", data => shasum.update(data));
|
||||
stream.on("data", (data: Buffer) => shasum.update(data as unknown as Uint8Array));
|
||||
stream.on("error", reject);
|
||||
stream.on("close", resolve);
|
||||
});
|
||||
};
|
||||
|
||||
for (const set of mapRawInfo._difficultyBeatmapSets) {
|
||||
for (const diff of set._difficultyBeatmaps) {
|
||||
const diffFilePath = path.join(mapPath, diff._beatmapFilename);
|
||||
|
||||
for (const diff of mapInfo.difficulties) {
|
||||
if(diff.beatmapFilename){
|
||||
const diffFilePath = path.join(mapPath, diff.beatmapFilename);
|
||||
await hashFile(diffFilePath);
|
||||
}
|
||||
|
||||
if(diff.lightshowDataFilename) {
|
||||
const lightshowFilePath = path.join(mapPath, diff.lightshowDataFilename);
|
||||
await hashFile(lightshowFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
return shasum.digest("hex");
|
||||
|
||||
const hash = shasum.digest("hex");
|
||||
|
||||
console.log(mapPath, hash);
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
private async loadMapInfoFromPath(mapPath: string): Promise<BsmLocalMap> {
|
||||
@@ -116,26 +127,25 @@ export class LocalMapsManagerService {
|
||||
}
|
||||
|
||||
const rawInfoString = await readFile(infoFile, { encoding: "utf-8" });
|
||||
const mapInfo = parseMapInfoDat(JSON.parse(rawInfoString));
|
||||
|
||||
const rawInfo: RawMapInfoData = JSON.parse(rawInfoString);
|
||||
const coverUrl = new URL(`file:///${path.join(mapPath, rawInfo._coverImageFilename)}`).href;
|
||||
const songUrl = new URL(`file:///${path.join(mapPath, rawInfo._songFilename)}`).href;
|
||||
const coverUrl = new URL(`file:///${path.join(mapPath, mapInfo.coverImageFilename)}`).href;
|
||||
const songUrl = new URL(`file:///${path.join(mapPath, mapInfo.songFilename)}`).href;
|
||||
|
||||
const hash = await this.computeMapHash(mapPath, rawInfoString);
|
||||
|
||||
return { rawInfo, coverUrl, songUrl, hash, path: mapPath };
|
||||
return { mapInfo, coverUrl, songUrl, hash, path: mapPath };
|
||||
}
|
||||
|
||||
private async downloadMapZip(zipUrl: string): Promise<{ zip: StreamZip.StreamZipAsync; zipPath: string }> {
|
||||
private async downloadMapZip(zipUrl: string): Promise<string> {
|
||||
const fileName = `${path.basename(zipUrl, ".zip")}-${crypto.randomUUID()}.zip`;
|
||||
const tempPath = this.utils.getTempPath();
|
||||
await ensureFolderExist(this.utils.getTempPath());
|
||||
const dest = path.join(tempPath, fileName);
|
||||
|
||||
const zipPath = (await lastValueFrom(this.reqService.downloadFile(zipUrl, dest))).data;
|
||||
const zip = new StreamZip.async({ file: zipPath });
|
||||
|
||||
return { zip, zipPath };
|
||||
return (await lastValueFrom(this.reqService.downloadFile(zipUrl, {
|
||||
destFolder: tempPath,
|
||||
filename: fileName
|
||||
}))).data;
|
||||
}
|
||||
|
||||
private openOneClickDownloadMapWindow(mapId: string, isHash = false): void {
|
||||
@@ -147,7 +157,7 @@ export class LocalMapsManagerService {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public getMaps(version?: BSVersion): Observable<BsmLocalMapsProgress> {
|
||||
@@ -252,7 +262,7 @@ export class LocalMapsManagerService {
|
||||
}
|
||||
|
||||
const zipUrl = map.versions.at(0).downloadURL;
|
||||
const mapFolderName = sanitize(`${map.id}-${map.name}`);
|
||||
const mapFolderName = sanitize(`${map.id} (${map.metadata.songName} - ${map.metadata.levelAuthorName})`);
|
||||
const mapsFolder = await this.getMapsFolderPath(version);
|
||||
|
||||
const mapPath = path.join(mapsFolder, mapFolderName);
|
||||
@@ -261,21 +271,20 @@ export class LocalMapsManagerService {
|
||||
if(!exists){ return null; }
|
||||
return this.loadMapInfoFromPath(mapPath);
|
||||
}).catch(() => null);
|
||||
|
||||
|
||||
if(map.versions.every(version => version.hash === installedMap?.hash)) {
|
||||
return installedMap;
|
||||
}
|
||||
|
||||
const { zip, zipPath } = await this.downloadMapZip(zipUrl);
|
||||
const zipPath = await this.downloadMapZip(zipUrl);
|
||||
const zip = await BsmZipExtractor.fromPath(zipPath);
|
||||
|
||||
if (!zip) {
|
||||
throw `Cannot download ${zipUrl}`;
|
||||
}
|
||||
|
||||
await ensureFolderExist(mapPath);
|
||||
|
||||
await zip.extract(null, mapPath);
|
||||
await zip.close();
|
||||
await zip.extract(mapPath);
|
||||
zip.close();
|
||||
await unlink(zipPath);
|
||||
|
||||
const localMap = await this.loadMapInfoFromPath(mapPath);
|
||||
|
||||
@@ -87,12 +87,14 @@ export class LocalModelsManagerService {
|
||||
|
||||
(async () => {
|
||||
const modelFolder = await this.getModelFolderPath(model.type, version);
|
||||
const modelDest = path.join(modelFolder, sanitize(path.basename(model.download)));
|
||||
|
||||
const url = model.download.split("/");
|
||||
url[url.length - 1] = encodeURIComponent(url[url.length - 1]);
|
||||
|
||||
const download$ = this.request.downloadFile(url.join("/"), modelDest);
|
||||
const download$ = this.request.downloadFile(url.join("/"), {
|
||||
destFolder: modelFolder,
|
||||
filename: sanitize(path.basename(model.download))
|
||||
});
|
||||
|
||||
subs.push(download$.subscribe({ next: value => subscriber.next({ ...value, data: undefined }), error: e => subscriber.error(e) }));
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { readFileSync } from "fs";
|
||||
import { BeatSaverService } from "../thrid-party/beat-saver/beat-saver.service";
|
||||
import { copy, copyFile, pathExists, realpath } from "fs-extra";
|
||||
import { Progression, ensureFolderExist, pathExist } from "../../helpers/fs.helpers";
|
||||
import { IpcService } from "../ipc.service";
|
||||
import sanitize from "sanitize-filename";
|
||||
|
||||
export class LocalPlaylistsManagerService {
|
||||
private static instance: LocalPlaylistsManagerService;
|
||||
@@ -35,7 +35,6 @@ export class LocalPlaylistsManagerService {
|
||||
private readonly deepLink: DeepLinkService;
|
||||
private readonly windows: WindowManagerService;
|
||||
private readonly bsaver: BeatSaverService;
|
||||
private readonly ipc: IpcService;
|
||||
|
||||
private constructor() {
|
||||
this.maps = LocalMapsManagerService.getInstance();
|
||||
@@ -44,13 +43,12 @@ export class LocalPlaylistsManagerService {
|
||||
this.deepLink = DeepLinkService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
this.bsaver = BeatSaverService.getInstance();
|
||||
this.ipc = IpcService.getInstance();
|
||||
|
||||
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.BeatSaver, link => {
|
||||
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.BeatSaver, link);
|
||||
const url = new URL(link);
|
||||
const bplistUrl = url.host === "playlist" ? url.pathname.replace("/", "") : "";
|
||||
this.openOneClickDownloadPlaylistWindow(bplistUrl);
|
||||
const bplistUrl = url.host === "playlist" ? url.pathname.replace("/", "") + url.search : "";
|
||||
this.windows.openWindow(`oneclick-download-playlist.html?playlistUrl=${encodeURIComponent(bplistUrl)}`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -71,15 +69,20 @@ export class LocalPlaylistsManagerService {
|
||||
private async installBPListFile(bslistSource: string, version: BSVersion): Promise<string> {
|
||||
const playlistFolder = await this.getPlaylistsFolder(version);
|
||||
const isLocalFile = await pathExists(bslistSource).catch(e => { log.error(e); return false; });
|
||||
const filename = isLocalFile ? path.basename(bslistSource) : new URL(bslistSource).pathname.split('/').pop()
|
||||
const filename = isLocalFile ? path.basename(bslistSource) : sanitize(new URL(bslistSource).pathname.split('/').pop())
|
||||
const destFile = path.join(playlistFolder, filename);
|
||||
|
||||
if (isLocalFile) {
|
||||
return copyFile(bslistSource, destFile).then(() => destFile);
|
||||
}
|
||||
return lastValueFrom(this.request.downloadFile(bslistSource, destFile)).then(res => res.data);
|
||||
|
||||
return lastValueFrom(this.request.downloadFile(bslistSource, {
|
||||
destFolder: playlistFolder,
|
||||
filename,
|
||||
preferContentDisposition: true,
|
||||
})).then(res => res.data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private async readPlaylistFile(path: string): Promise<BPList> {
|
||||
if (!(await pathExist(path))) {
|
||||
@@ -91,10 +94,6 @@ export class LocalPlaylistsManagerService {
|
||||
return JSON.parse(rawContent);
|
||||
}
|
||||
|
||||
private openOneClickDownloadPlaylistWindow(downloadUrl: string): void {
|
||||
this.windows.openWindow(`oneclick-download-playlist.html?playlistUrl=${downloadUrl}`);
|
||||
}
|
||||
|
||||
public downloadPlaylist(bpListUrl: string, version: BSVersion): Observable<Progression<DownloadPlaylistProgressionData>> {
|
||||
|
||||
return new Observable<Progression<DownloadPlaylistProgressionData>>(obs => {
|
||||
@@ -102,8 +101,8 @@ export class LocalPlaylistsManagerService {
|
||||
|
||||
const bpListFilePath = await this.installBPListFile(bpListUrl, version);
|
||||
const bpList = await this.readPlaylistFile(bpListFilePath);
|
||||
|
||||
const progress: Progression<DownloadPlaylistProgressionData> = {
|
||||
|
||||
const progress: Progression<DownloadPlaylistProgressionData> = {
|
||||
total: bpList.songs.length,
|
||||
current: 0,
|
||||
data: {
|
||||
|
||||
@@ -5,16 +5,19 @@ import path from "path";
|
||||
import log from "electron-log";
|
||||
|
||||
export abstract class AbstractLauncherService {
|
||||
|
||||
|
||||
protected readonly localVersions = BSLocalVersionService.getInstance();
|
||||
|
||||
|
||||
constructor(){
|
||||
this.localVersions = BSLocalVersionService.getInstance();
|
||||
}
|
||||
|
||||
protected buildBsLaunchArgs(launchOptions: LaunchOption): string[]{
|
||||
const launchArgs = ["--no-yeet"];
|
||||
const launchArgs = [];
|
||||
|
||||
if(!launchOptions.version.steam && !launchOptions.version.oculus){
|
||||
launchArgs.push("--no-yeet")
|
||||
}
|
||||
if (launchOptions.oculus) {
|
||||
launchArgs.push("-vrmode");
|
||||
launchArgs.push("oculus");
|
||||
@@ -46,18 +49,20 @@ export abstract class AbstractLauncherService {
|
||||
|
||||
}
|
||||
|
||||
protected launchBs(bsExePath: string, args: string[], options?: SpawnOptionsWithoutStdio): Promise<number> {
|
||||
return new Promise<number>((resolve, reject) => {
|
||||
const bsProcess = this.launchBSProcess(bsExePath, args, options);
|
||||
protected launchBs(bsExePath: string, args: string[], options?: SpawnOptionsWithoutStdio): {process: ChildProcessWithoutNullStreams, exit: Promise<number>} {
|
||||
const process = this.launchBSProcess(bsExePath, args, options);
|
||||
|
||||
bsProcess.on("error", reject);
|
||||
bsProcess.on("exit", resolve);
|
||||
|
||||
setTimeout(() => {
|
||||
bsProcess.removeAllListeners("error");
|
||||
bsProcess.removeAllListeners("exit");
|
||||
resolve(-1);
|
||||
}, 30_000);
|
||||
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);
|
||||
});
|
||||
});
|
||||
|
||||
return { process, exit };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import { Observable, ReplaySubject, catchError, lastValueFrom, of, take, timeout } from "rxjs";
|
||||
import { Observable, ReplaySubject } from "rxjs";
|
||||
import { StoreLauncherInterface } from "./store-launcher.interface";
|
||||
import { BSLaunchError, BSLaunchEvent, BSLaunchEventData, LaunchOption } from "../../../shared/models/bs-launch";
|
||||
import { OculusService } from "../oculus.service";
|
||||
import { BS_EXECUTABLE, OCULUS_BS_BACKUP_DIR, OCULUS_BS_DIR } from "../../constants";
|
||||
import { BS_EXECUTABLE } from "../../constants";
|
||||
import path from "path";
|
||||
import log from "electron-log";
|
||||
import { sToMs } from "../../../shared/helpers/time.helpers";
|
||||
import { lstat, pathExists, readdir, readlink, rename, symlink, unlink } from "fs-extra";
|
||||
import { pathExists } from "fs-extra";
|
||||
import { AbstractLauncherService } from "./abstract-launcher.service";
|
||||
import { taskRunning } from "../../helpers/os.helpers";
|
||||
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
|
||||
import { InstallationLocationService } from "../installation-location.service";
|
||||
import { ensurePathNotAlreadyExist } from "../../helpers/fs.helpers";
|
||||
import { UtilsService } from "../utils.service";
|
||||
|
||||
export class OculusLauncherService extends AbstractLauncherService implements StoreLauncherInterface {
|
||||
|
||||
@@ -25,112 +23,18 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
}
|
||||
|
||||
private readonly oculus: OculusService;
|
||||
private readonly pathsService: InstallationLocationService;
|
||||
private readonly util: UtilsService;
|
||||
|
||||
private readonly oculusLib$ = new ReplaySubject<string>();
|
||||
|
||||
private constructor() {
|
||||
super();
|
||||
this.oculus = OculusService.getInstance();
|
||||
this.pathsService = InstallationLocationService.getInstance();
|
||||
|
||||
this.oculus.tryGetGameFolder([OCULUS_BS_DIR, OCULUS_BS_BACKUP_DIR]).then(async dirPath => {
|
||||
if(dirPath){
|
||||
return this.oculusLib$.next( path.join(dirPath, "..") );
|
||||
}
|
||||
const defaultLib = ((await this.oculus.getOculusLibs()) || []).find(lib => lib.isDefault);
|
||||
if(defaultLib?.path){ return this.oculusLib$.next(path.join(defaultLib.path, "Software")); }
|
||||
this.oculusLib$.next(null);
|
||||
}).catch(err => {
|
||||
log.error("Error while getting Oculus libs", err);
|
||||
this.oculusLib$.next(null);
|
||||
});
|
||||
}
|
||||
|
||||
public async deleteBsSymlinks(): Promise<void> {
|
||||
const oculusLibPath = await lastValueFrom(this.oculusLib$.pipe(take(1), timeout(sToMs(30)), catchError(() => of(null))));
|
||||
|
||||
if(!oculusLibPath || !(await pathExists(oculusLibPath))){
|
||||
throw new Error("Oculus library not found, deleteBsSymlinks");
|
||||
}
|
||||
|
||||
const libContents = await readdir(oculusLibPath);
|
||||
const symlinks = (await Promise.all(libContents.map(async dir => {
|
||||
return (await lstat(path.join(oculusLibPath, dir))).isSymbolicLink() ? dir : null;
|
||||
}))).filter(Boolean);
|
||||
|
||||
log.info("Symlinks found in Oculus library", symlinks);
|
||||
|
||||
const bsSymlinks = symlinks.filter(dirent => dirent.startsWith(OCULUS_BS_DIR));
|
||||
|
||||
const bsmSymlinks = (await Promise.all(bsSymlinks.map(async symlink => {
|
||||
const symlinkPath = path.join(oculusLibPath, symlink);
|
||||
const targetPath = await readlink(symlinkPath).catch(err => log.error(err));
|
||||
|
||||
log.info("Oculus Symlink", symlink, "target", targetPath);
|
||||
|
||||
if(!targetPath){ return null; }
|
||||
|
||||
const bsmVersionsDir = path.join(this.pathsService.INSTALLATION_FOLDER, this.pathsService.VERSIONS_FOLDER);
|
||||
|
||||
if(!targetPath.includes(bsmVersionsDir)){ return null; }
|
||||
|
||||
return symlink;
|
||||
}))).filter(Boolean);
|
||||
|
||||
await Promise.all(bsmSymlinks.map(symlink => {
|
||||
log.info("Delete symlink", symlink);
|
||||
return unlink(path.join(oculusLibPath, symlink));
|
||||
}));
|
||||
}
|
||||
|
||||
private async backupOriginalBeatSaber(): Promise<void>{
|
||||
const bsFolder = await this.oculus.getGameFolder(OCULUS_BS_DIR);
|
||||
if(!bsFolder){ return; }
|
||||
const backupPath = await ensurePathNotAlreadyExist(path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR));
|
||||
log.info("Backing up original Beat Saber", bsFolder, backupPath);
|
||||
return rename(bsFolder, backupPath);
|
||||
}
|
||||
|
||||
public async restoreOriginalBeatSaber(): Promise<void>{
|
||||
const bsFolderBackupPath = await this.oculus.getGameFolder(OCULUS_BS_BACKUP_DIR);
|
||||
if(!(await pathExists(bsFolderBackupPath))){ return; }
|
||||
const originalPath = path.join(bsFolderBackupPath, "..", OCULUS_BS_DIR);
|
||||
log.info("Restoring original Beat Saber", bsFolderBackupPath, originalPath);
|
||||
return rename(bsFolderBackupPath, originalPath);
|
||||
this.util = UtilsService.getInstance();
|
||||
}
|
||||
|
||||
public launch(launchOptions: LaunchOption): Observable<BSLaunchEventData> {
|
||||
|
||||
const prepareOriginalVersion: () => Promise<string> = async () => {
|
||||
await this.restoreOriginalBeatSaber();
|
||||
const bsPath = await this.oculus.getGameFolder(OCULUS_BS_DIR);
|
||||
if(!bsPath){
|
||||
throw new Error("Oculus Beat Saber path not found");
|
||||
}
|
||||
return bsPath;
|
||||
}
|
||||
|
||||
const prepareDowngradedVersion: () => Promise<string> = async () => {
|
||||
|
||||
const oculusLib = await lastValueFrom(this.oculusLib$.pipe(take(1), timeout(sToMs(30)), catchError(() => of(null))));
|
||||
|
||||
if(!oculusLib){
|
||||
throw CustomError.fromError(new Error("No Oculus library found"), BSLaunchError.OCULUS_LIB_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Backup original Beat Saber folder
|
||||
await this.backupOriginalBeatSaber();
|
||||
|
||||
// Create symlink in the oculus library from the BSM BS version
|
||||
const symlinkTarget = await this.localVersions.getInstalledVersionPath(launchOptions.version);
|
||||
const symlinkPath = path.join(oculusLib, OCULUS_BS_DIR);
|
||||
log.info("Creating symlink", symlinkTarget, symlinkPath);
|
||||
await symlink(symlinkTarget, symlinkPath, "junction");
|
||||
|
||||
return symlinkPath;
|
||||
}
|
||||
|
||||
return new Observable<BSLaunchEventData>(obs => {
|
||||
(async () => {
|
||||
|
||||
@@ -140,11 +44,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
throw CustomError.fromError(new Error("Cannot start two instance of Beat Saber for Oculus"), BSLaunchError.BS_ALREADY_RUNNING);
|
||||
}
|
||||
|
||||
// Remove previously symlinks created by BSM
|
||||
await this.deleteBsSymlinks().catch(err => log.error("Error while deleting BSM symlinks", err));
|
||||
|
||||
const bsPath = await (launchOptions.version.oculus ? prepareOriginalVersion() : prepareDowngradedVersion());
|
||||
|
||||
const bsPath = await this.localVersions.getInstalledVersionPath(launchOptions.version);
|
||||
const exePath = path.join(bsPath, BS_EXECUTABLE);
|
||||
|
||||
if(!(await pathExists(exePath))){
|
||||
@@ -157,7 +57,9 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
|
||||
|
||||
// Launch Beat Saber
|
||||
return this.launchBs(exePath, this.buildBsLaunchArgs(launchOptions)).catch(err => {
|
||||
const process = this.launchBs(exePath, this.buildBsLaunchArgs(launchOptions));
|
||||
|
||||
return process.exit.catch(err => {
|
||||
throw CustomError.fromError(err, BSLaunchError.BS_EXIT_ERROR);
|
||||
});
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
|
||||
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
|
||||
|
||||
const launchPromise = !launchOptions.admin ? (
|
||||
this.launchBs(exePath, launchArgs, { env: {...process.env, "SteamAppId": BS_APP_ID} })
|
||||
this.launchBs(exePath, launchArgs, { env: {...process.env, "SteamAppId": BS_APP_ID} }).exit
|
||||
) : (
|
||||
new Promise<number>(resolve => {
|
||||
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${exePath}" ${launchArgs.join(" ")}`, { env: {...process.env, "SteamAppId": BS_APP_ID} });
|
||||
|
||||
@@ -44,7 +44,7 @@ export class BsSteamDownloaderService {
|
||||
return path.join(this.utils.getAssetsScriptsPath(), "depot-downloader", `DepotDownloader.${process.platform === 'linux' ? 'dll' : 'exe'}`);
|
||||
}
|
||||
|
||||
public async isDotNet6Installed(): Promise<boolean> {
|
||||
public async isDotNetInstalled(): Promise<boolean> {
|
||||
try {
|
||||
const proc = process.platform === 'linux'
|
||||
? spawnSync('dotnet', [this.getDepotDownloaderExePath()])
|
||||
@@ -55,7 +55,7 @@ export class BsSteamDownloaderService {
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
log.error("Error while checking .NET 6", e);
|
||||
log.error("Error while checking .NET 8", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import { deleteFolder, ensureFolderExist, moveFolderContent, pathExist, unlinkPa
|
||||
import { lstat, symlink } from "fs/promises";
|
||||
import path from "path";
|
||||
import { copy, readlink } from "fs-extra";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { noop } from "../../shared/helpers/function.helpers";
|
||||
|
||||
export class FolderLinkerService {
|
||||
private static instance: FolderLinkerService;
|
||||
@@ -72,7 +74,7 @@ export class FolderLinkerService {
|
||||
await ensureFolderExist(folderPath);
|
||||
|
||||
if (options?.keepContents !== false) {
|
||||
await moveFolderContent(folderPath, sharedPath).toPromise();
|
||||
await lastValueFrom(moveFolderContent(folderPath, sharedPath, { overwrite: true }));
|
||||
}
|
||||
|
||||
await deleteFolder(folderPath);
|
||||
@@ -95,9 +97,7 @@ export class FolderLinkerService {
|
||||
}
|
||||
|
||||
if (options.moveContents === true) {
|
||||
return moveFolderContent(sharedPath, folderPath)
|
||||
.toPromise()
|
||||
.then(() => {});
|
||||
return lastValueFrom(moveFolderContent(sharedPath, folderPath, { overwrite: true })).then(noop);
|
||||
}
|
||||
|
||||
if (options?.keepContents === false) {
|
||||
|
||||
@@ -2,6 +2,8 @@ import path from "path";
|
||||
import { app } from "electron";
|
||||
import ElectronStore from "electron-store";
|
||||
import { copyDirectoryWithJunctions, deleteFolder, ensureFolderExist, pathExist } from "../helpers/fs.helpers";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
import { pathExistsSync } from "fs-extra";
|
||||
|
||||
export class InstallationLocationService {
|
||||
private static instance: InstallationLocationService;
|
||||
@@ -67,8 +69,8 @@ export class InstallationLocationService {
|
||||
return this.installPathConfig.get(this.STORE_INSTALLATION_PATH_KEY) as string;
|
||||
}
|
||||
|
||||
const oldPath = path.join(app.getPath("documents"), this.INSTALLATION_FOLDER);
|
||||
if(await pathExist(oldPath)){
|
||||
const { result: oldPath } = tryit(() => path.join(app.getPath("documents"), this.INSTALLATION_FOLDER));
|
||||
if(oldPath && pathExistsSync(oldPath)){
|
||||
return app.getPath("documents");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { BbmFullMod, BbmMod, BbmModVersion, BbmPlatform } from "../../../shared/models/mods/mod.interface";
|
||||
import { RequestService } from "../request.service";
|
||||
import { BsStore } from "../../../shared/models/bs-store.enum";
|
||||
|
||||
export class BeatModsApiService {
|
||||
private static instance: BeatModsApiService;
|
||||
|
||||
private readonly requestService: RequestService;
|
||||
|
||||
private readonly BEAT_MODS_VERSIONS = "https://versions.beatmods.com/versions.json";
|
||||
private readonly BEAT_MODS_ALIAS = "https://alias.beatmods.com/aliases.json";
|
||||
public readonly MODS_REPO_URL = "https://beatmods.com";
|
||||
private readonly MODS_REPO_API_URL = `${this.MODS_REPO_URL}/api`;
|
||||
|
||||
private readonly BEAT_MODS_API_URL = "https://beatmods.com/api/v1/";
|
||||
public readonly BEAT_MODS_URL = "https://beatmods.com";
|
||||
|
||||
private readonly aliasesCache = new Map<string, BSVersion[]>();
|
||||
private readonly versionModsCache = new Map<string, Mod[]>();
|
||||
|
||||
private allModsCache: Mod[];
|
||||
private readonly versionModsCache = new Map<string, BbmFullMod[]>();
|
||||
private readonly modsHashCache = new Map<string, BbmModVersion>();
|
||||
|
||||
public static getInstance(): BeatModsApiService {
|
||||
if (!BeatModsApiService.instance) {
|
||||
@@ -30,64 +26,46 @@ export class BeatModsApiService {
|
||||
}
|
||||
|
||||
private getVersionModsUrl(version: BSVersion): string {
|
||||
return `${this.BEAT_MODS_API_URL}mod?status=approved&gameVersion=${version.BSVersion}&sort=&sortDirection=1`;
|
||||
const platform: BbmPlatform = version.oculus || version.metadata.store === BsStore.OCULUS ? BbmPlatform.OculusPC : BbmPlatform.SteamPC;
|
||||
return `${this.MODS_REPO_API_URL}/mods?status=verified&gameVersion=${version.BSVersion}&gameName=BeatSaber&platform=${platform}`;
|
||||
}
|
||||
|
||||
private getAllModsUrl(): string {
|
||||
return `${this.BEAT_MODS_API_URL}mod`;
|
||||
}
|
||||
private updateModsHashCache(mods: BbmModVersion[]): void {
|
||||
|
||||
private async getVersionAlias(): Promise<Map<string, BSVersion[]>> {
|
||||
if (this.aliasesCache.size) {
|
||||
return this.aliasesCache;
|
||||
if(!Array.isArray(mods)){
|
||||
return;
|
||||
}
|
||||
return this.requestService.getJSON<Record<string, string[]>>(this.BEAT_MODS_ALIAS).then(rawAliases => {
|
||||
Object.entries(rawAliases).forEach(([key, value]) => {
|
||||
this.aliasesCache.set(
|
||||
key,
|
||||
value.map(s => ({ BSVersion: s } as BSVersion))
|
||||
);
|
||||
});
|
||||
return this.aliasesCache;
|
||||
});
|
||||
}
|
||||
|
||||
private async getAliasOfVersion(version: BSVersion): Promise<BSVersion> {
|
||||
return this.getVersionAlias().then(aliases => {
|
||||
if (Array.from(aliases.keys()).some(k => k === version.BSVersion)) {
|
||||
return version;
|
||||
for (const mod of mods) {
|
||||
for (const content of (mod.contentHashes ?? [])) {
|
||||
this.modsHashCache.set(content.hash, mod);
|
||||
}
|
||||
const alias = Array.from(aliases.entries()).find(([key, value]) => value.find(v => v.BSVersion === version.BSVersion))?.[0];
|
||||
return { BSVersion: alias } as BSVersion;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private asignDependencies(mod: Mod, mods: Mod[]): Mod {
|
||||
mod.dependencies = mod.dependencies.map(dep => mods.find(mod => mod.name === dep.name));
|
||||
return mod;
|
||||
}
|
||||
|
||||
public async getVersionMods(version: BSVersion): Promise<Mod[]> {
|
||||
public async getVersionMods(version: BSVersion): Promise<BbmFullMod[]> {
|
||||
if (this.versionModsCache.has(version.BSVersion)) {
|
||||
return this.versionModsCache.get(version.BSVersion);
|
||||
}
|
||||
|
||||
const alias = await this.getAliasOfVersion(version);
|
||||
return this.requestService.getJSON<{ mods: {mod: BbmMod, latest: BbmModVersion}[] }>(this.getVersionModsUrl(version)).then(res => {
|
||||
const fullMods: BbmFullMod[] = res?.mods?.map(mod => ({ mod: mod.mod, version: mod.latest })) ?? [];
|
||||
this.versionModsCache.set(version.BSVersion, fullMods);
|
||||
|
||||
return this.requestService.getJSON<Mod[]>(this.getVersionModsUrl(alias)).then(mods => {
|
||||
mods = mods.map(mod => this.asignDependencies(mod, mods));
|
||||
this.versionModsCache.set(version.BSVersion, mods);
|
||||
return mods;
|
||||
this.updateModsHashCache(fullMods.map(mod => mod.version));
|
||||
|
||||
return fullMods;
|
||||
});
|
||||
}
|
||||
|
||||
public async getAllMods(): Promise<Mod[]> {
|
||||
if (this.allModsCache) {
|
||||
return this.allModsCache;
|
||||
public getModByHash(hash: string): Promise<BbmModVersion> {
|
||||
if (this.modsHashCache.has(hash)) {
|
||||
return Promise.resolve(this.modsHashCache.get(hash));
|
||||
}
|
||||
return this.requestService.getJSON<Mod[]>(this.getAllModsUrl()).then(mods => {
|
||||
this.allModsCache = mods;
|
||||
return this.allModsCache;
|
||||
|
||||
return this.requestService.getJSON<{ modVersions: BbmModVersion[] }>(`${this.MODS_REPO_API_URL}/hashlookup?hash=${hash}`).then(res => {
|
||||
this.updateModsHashCache(res?.modVersions ?? []);
|
||||
return res?.modVersions?.at(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { DownloadLink, InstallModsResult, Mod, ModInstallProgression, UninstallModsResult } from "shared/models/mods";
|
||||
import { InstallModsResult, ModInstallProgression, UninstallModsResult } from "shared/models/mods";
|
||||
import { BeatModsApiService } from "./beat-mods-api.service";
|
||||
import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import path from "path";
|
||||
@@ -11,11 +11,12 @@ import { BS_EXECUTABLE } from "../../constants";
|
||||
import log from "electron-log";
|
||||
import { deleteFolder, pathExist, unlinkPath } from "../../helpers/fs.helpers";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import JSZip from "jszip";
|
||||
import { extractZip } from "../../helpers/zip.helpers";
|
||||
import recursiveReadDir from "recursive-readdir";
|
||||
import { minToMs } from "../../../shared/helpers/time.helpers";
|
||||
import { ensureDir } from "fs-extra";
|
||||
import { sToMs } from "../../../shared/helpers/time.helpers";
|
||||
import { pathExistsSync } from "fs-extra";
|
||||
import { BsmZipExtractor } from "../../models/bsm-zip-extractor.class";
|
||||
import crypto from "crypto";
|
||||
import { BbmCategories, BbmFullMod, BbmModVersion } from "../../../shared/models/mods/mod.interface";
|
||||
|
||||
export class BsModsManagerService {
|
||||
private static instance: BsModsManagerService;
|
||||
@@ -25,7 +26,7 @@ export class BsModsManagerService {
|
||||
private readonly utilsService: UtilsService;
|
||||
private readonly requestService: RequestService;
|
||||
|
||||
private manifestMatches: Mod[];
|
||||
private manifestMatches: BbmModVersion[];
|
||||
|
||||
private nbModsToInstall = 0;
|
||||
private nbInstalledMods = 0;
|
||||
@@ -45,33 +46,29 @@ export class BsModsManagerService {
|
||||
this.bsLocalService = BSLocalVersionService.getInstance();
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
this.requestService = RequestService.getInstance();
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
}
|
||||
|
||||
private async getModFromHash(hash: string): Promise<Mod> {
|
||||
const allMods = await this.beatModsApi.getAllMods();
|
||||
return allMods.find(mod => {
|
||||
if (mod.name.toLowerCase() === "bsipa") {
|
||||
return false;
|
||||
private async getModFromHash(hash: string): Promise<BbmModVersion | null> {
|
||||
try {
|
||||
const mod = await this.beatModsApi.getModByHash(hash);
|
||||
|
||||
if(mod?.contentHashes?.some(content => content.path.includes("IPA.exe"))){
|
||||
return null;
|
||||
}
|
||||
return mod.downloads.some(download => download.hashMd5.some(md5 => md5.hash === hash));
|
||||
});
|
||||
|
||||
return mod;
|
||||
} catch (error) {
|
||||
log.error("Could not get mod from hash", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private async getIpaFromHash(hash: string): Promise<Mod> {
|
||||
const allMods = await this.beatModsApi.getAllMods();
|
||||
return allMods.find(mod => {
|
||||
if (mod.name.toLowerCase() !== "bsipa") {
|
||||
return false;
|
||||
}
|
||||
return mod.downloads.some(download => download.hashMd5.some(md5 => md5.hash === hash));
|
||||
});
|
||||
}
|
||||
|
||||
private async getModsInDir(version: BSVersion, modsDir: ModsInstallFolder): Promise<Mod[]> {
|
||||
private async getModsInDir(version: BSVersion, modsDir: ModsInstallFolder): Promise<BbmModVersion[]> {
|
||||
const bsPath = await this.bsLocalService.getVersionPath(version);
|
||||
const modsPath = path.join(bsPath, modsDir);
|
||||
|
||||
if (!(await pathExist(modsPath))) {
|
||||
if (!pathExistsSync(modsPath)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -84,62 +81,60 @@ export class BsModsManagerService {
|
||||
return undefined;
|
||||
}
|
||||
const hash = await md5File(filePath);
|
||||
|
||||
const mod = await this.getModFromHash(hash);
|
||||
|
||||
if (!mod) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (ext === ".manifest") {
|
||||
this.manifestMatches.push(mod);
|
||||
return undefined;
|
||||
}
|
||||
if (filePath.includes("Libs")) {
|
||||
if (!this.manifestMatches.some(m => m.name === mod.name)) {
|
||||
|
||||
if (filePath.toLowerCase().includes("libs")) {
|
||||
const manifestIndex = this.manifestMatches.findIndex(m => m.id === mod.id);
|
||||
|
||||
if (manifestIndex < 0) {
|
||||
return undefined;
|
||||
}
|
||||
const modIndex = this.manifestMatches.indexOf(mod);
|
||||
if (modIndex > -1) {
|
||||
this.manifestMatches.splice(modIndex, 1);
|
||||
}
|
||||
|
||||
this.manifestMatches.splice(manifestIndex, 1);
|
||||
}
|
||||
|
||||
return mod;
|
||||
});
|
||||
|
||||
const mods = await Promise.all(promises);
|
||||
return mods.filter(Boolean);
|
||||
return mods.filter(Boolean);
|
||||
}
|
||||
|
||||
private async getBsipaInstalled(version: BSVersion): Promise<Mod> {
|
||||
private async getBsipaInstalled(version: BSVersion): Promise<BbmModVersion> {
|
||||
const bsPath = await this.bsLocalService.getVersionPath(version);
|
||||
const injectorPath = path.join(bsPath, "Beat Saber_Data", "Managed", "IPA.Injector.dll");
|
||||
if (!(await pathExist(injectorPath))) {
|
||||
return undefined;
|
||||
}
|
||||
const injectorMd5 = await md5File(injectorPath);
|
||||
return this.getIpaFromHash(injectorMd5);
|
||||
return this.beatModsApi.getModByHash(injectorMd5);
|
||||
}
|
||||
|
||||
private async downloadZip(zipUrl: string): Promise<JSZip> {
|
||||
zipUrl = path.join(this.beatModsApi.BEAT_MODS_URL, zipUrl);
|
||||
private async downloadZip(zipUrl: string): Promise<BsmZipExtractor> {
|
||||
zipUrl = path.join(this.beatModsApi.MODS_REPO_URL, zipUrl);
|
||||
|
||||
log.info("Download mod zip", zipUrl);
|
||||
|
||||
const buffer = await lastValueFrom(this.requestService.downloadBuffer(zipUrl))
|
||||
.then(progress => progress.data)
|
||||
.catch(e => {
|
||||
.catch((e: Error) => {
|
||||
log.error("ZIP", "Error while downloading zip", e);
|
||||
return undefined;
|
||||
});
|
||||
|
||||
if (!buffer) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return JSZip.loadAsync(buffer).catch(e => {
|
||||
log.error("ZIP", "Error while loading zip", e);
|
||||
return null;
|
||||
});
|
||||
return BsmZipExtractor.fromBuffer(buffer);
|
||||
}
|
||||
|
||||
private async executeBSIPA(version: BSVersion, args: string[]): Promise<boolean> {
|
||||
@@ -155,9 +150,26 @@ export class BsModsManagerService {
|
||||
}
|
||||
|
||||
return new Promise<boolean>(resolve => {
|
||||
log.info("START IPA PROCESS", `start /wait /min "" "${ipaPath}" ${args.join(" ")}`);
|
||||
const processIPA = spawn(`start /wait /min "" "${ipaPath}" ${args.join(" ")}`, { cwd: versionPath, detached: true, shell: true });
|
||||
|
||||
log.info("START IPA PROCESS", `"${ipaPath}"`, args);
|
||||
const processIPA = spawn(`"${ipaPath}"`, args, { cwd: versionPath, detached: true, shell: true });
|
||||
|
||||
const timemout = setTimeout(() => {
|
||||
log.info("Ipa process timeout");
|
||||
resolve(false)
|
||||
}, sToMs(30));
|
||||
|
||||
processIPA.on("error", e => {
|
||||
log.error("Ipa process error", e);
|
||||
resolve(false);
|
||||
})
|
||||
|
||||
processIPA.stderr.on("data", data => {
|
||||
log.error("Ipa process stderr", data.toString());
|
||||
});
|
||||
|
||||
processIPA.once("exit", code => {
|
||||
clearTimeout(timemout);
|
||||
if (code === 0) {
|
||||
log.info("Ipa process exist with code 0");
|
||||
return resolve(true);
|
||||
@@ -166,72 +178,61 @@ export class BsModsManagerService {
|
||||
resolve(false);
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
log.info("Ipa process timeout");
|
||||
resolve(false)
|
||||
}, minToMs(1));
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private getModDownload(mod: Mod, version: BSVersion): DownloadLink {
|
||||
return mod.downloads.find(download => {
|
||||
const type = download.type.toLowerCase();
|
||||
return type === "universal" || type === this.bsLocalService.getVersionType(version);
|
||||
});
|
||||
private getModDownload(modVersion: BbmModVersion): string {
|
||||
return `/cdn/mod/${modVersion.zipHash}.zip`
|
||||
}
|
||||
|
||||
private async installMod(mod: Mod, version: BSVersion): Promise<boolean> {
|
||||
log.info("INSTALL MOD", mod.name, "for version", `${version.BSVersion} - ${version.name}`);
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-installed", { success: true, data: { name: mod.name, progression: ((this.nbInstalledMods + 1) / this.nbModsToInstall) * 100 } });
|
||||
private async installMod(mod: BbmFullMod, version: BSVersion): Promise<boolean> {
|
||||
log.info("INSTALL MOD", mod.mod.name, "for version", `${version.BSVersion} - ${version.name}`);
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-installed", { success: true, data: { name: mod.mod.name, progression: ((this.nbInstalledMods + 1) / this.nbModsToInstall) * 100 } });
|
||||
|
||||
const download = this.getModDownload(mod, version);
|
||||
const downloadUrl = this.getModDownload(mod.version);
|
||||
|
||||
if (!download) {
|
||||
if (!downloadUrl) {
|
||||
return false;
|
||||
}
|
||||
|
||||
log.info("Start download mod zip", mod.name, download.url);
|
||||
const zip = await this.downloadZip(download.url);
|
||||
log.info("Mod zip download end", mod.name, download.url, !!zip);
|
||||
log.info("Start download mod zip", mod.mod.name, downloadUrl);
|
||||
const zip = await this.downloadZip(downloadUrl);
|
||||
log.info("Mod zip download end", mod.mod.name, downloadUrl);
|
||||
|
||||
if (!zip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const crypto = require("crypto");
|
||||
const files = await zip.files;
|
||||
let hashCount = 0;
|
||||
for await (const entry of zip.entries()) {
|
||||
const buffer = await entry.read();
|
||||
const md5Hash = crypto.createHash("md5")
|
||||
.update(buffer)
|
||||
.digest("hex");
|
||||
hashCount += +mod.version.contentHashes.some(content => content.hash === md5Hash);
|
||||
}
|
||||
|
||||
const checkedEntries = (
|
||||
await Promise.all(
|
||||
Object.values(files).map(async entry => {
|
||||
const data = await entry.async("nodebuffer");
|
||||
const entryMd5 = crypto.createHash("md5").update(data).digest("hex");
|
||||
return download.hashMd5.some(md5 => md5.hash === entryMd5) ? entry : undefined;
|
||||
})
|
||||
).catch(e => {
|
||||
log.error("Error while checking mod zip entries", mod.name, e);
|
||||
throw e;
|
||||
})
|
||||
).filter(entry => !!entry);
|
||||
|
||||
if (checkedEntries.length !== download.hashMd5.length) {
|
||||
if (hashCount !== mod.version.contentHashes.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const verionPath = await this.bsLocalService.getVersionPath(version);
|
||||
const isBSIPA = mod.name.toLowerCase() === "bsipa";
|
||||
const destDir = isBSIPA ? verionPath : path.join(verionPath, ModsInstallFolder.PENDING);
|
||||
const versionPath = await this.bsLocalService.getVersionPath(version);
|
||||
const isBSIPA = mod.mod.name.toLowerCase() === "bsipa";
|
||||
const destDir = isBSIPA ? versionPath : path.join(versionPath, ModsInstallFolder.PENDING);
|
||||
|
||||
await ensureDir(destDir);
|
||||
log.info("Start extracting mod zip", mod.name, "to", destDir);
|
||||
const extracted = await extractZip(zip, destDir)
|
||||
log.info("Start extracting mod zip", mod.mod.name, "to", destDir);
|
||||
const extracted = await zip.extract(destDir)
|
||||
.then(() => true)
|
||||
.catch(e => {
|
||||
log.error("Error while extracting mod zip", e);
|
||||
return false;
|
||||
})
|
||||
.finally(() => {
|
||||
zip.close();
|
||||
});
|
||||
|
||||
log.info("Mod zip extraction end", mod.name, "to", destDir, "success:", extracted);
|
||||
|
||||
log.info("Mod zip extraction end", mod.mod.name, "to", destDir, "success:", extracted);
|
||||
|
||||
const res = isBSIPA
|
||||
? extracted &&
|
||||
@@ -246,23 +247,20 @@ export class BsModsManagerService {
|
||||
return res;
|
||||
}
|
||||
|
||||
private isDependency(mod: Mod, selectedMods: Mod[], availableMods: Mod[]) {
|
||||
return selectedMods.some(m => {
|
||||
const deps = m.dependencies.map(dep => Array.from(availableMods.values()).find(m => dep.name === m.name));
|
||||
if (deps.some(depMod => depMod.name === mod.name)) {
|
||||
return true;
|
||||
}
|
||||
return deps.some(depMod => depMod.dependencies.some(depModDep => depModDep.name === mod.name));
|
||||
});
|
||||
private isDependency(mod: BbmFullMod, selectedMods: BbmFullMod[], availableMods: BbmFullMod[]): boolean {
|
||||
const selectedDepsIds = selectedMods.flatMap(mod => mod.version.dependencies);
|
||||
const modsDeps = availableMods.filter(m => selectedDepsIds.includes(m.version.id));
|
||||
const modsDepsDepsIds = modsDeps.flatMap(m => m.version.dependencies);
|
||||
return selectedDepsIds.includes(mod.version.id) || modsDepsDepsIds.includes(mod.version.id);
|
||||
}
|
||||
|
||||
private async resolveDependencies(mods: Mod[], version: BSVersion): Promise<Mod[]> {
|
||||
private async resolveDependencies(mods: BbmFullMod[], version: BSVersion): Promise<BbmFullMod[]> {
|
||||
const availableMods = await this.beatModsApi.getVersionMods(version);
|
||||
return Array.from(
|
||||
new Map<string, Mod>(
|
||||
new Map<number, BbmFullMod>(
|
||||
availableMods.reduce((res, mod) => {
|
||||
if (this.isDependency(mod, mods, availableMods)) {
|
||||
res.push([mod.name, mod]);
|
||||
if (mod.mod.category === BbmCategories.Core || this.isDependency(mod, mods, availableMods)) {
|
||||
res.push([mod.mod.id, mod]);
|
||||
}
|
||||
return res;
|
||||
}, [])
|
||||
@@ -270,9 +268,7 @@ export class BsModsManagerService {
|
||||
);
|
||||
}
|
||||
|
||||
private async uninstallBSIPA(mod: Mod, version: BSVersion): Promise<void> {
|
||||
const download = this.getModDownload(mod, version);
|
||||
|
||||
private async uninstallBSIPA(mod: BbmFullMod, version: BSVersion): Promise<void> {
|
||||
const verionPath = await this.bsLocalService.getVersionPath(version);
|
||||
const hasIPAExe = await pathExist(path.join(verionPath, "IPA.exe"));
|
||||
const hasIPADir = await pathExist(path.join(verionPath, "IPA"));
|
||||
@@ -283,69 +279,74 @@ export class BsModsManagerService {
|
||||
|
||||
await this.executeBSIPA(version, ["--revert", "-n"]);
|
||||
|
||||
const promises = download.hashMd5.map(files => {
|
||||
const file = files.file.replaceAll("IPA/", "").replaceAll("Data", "Beat Saber_Data");
|
||||
const promises = mod.version.contentHashes.map(content => {
|
||||
const file = content.path.replaceAll("IPA/", "").replaceAll("Data", "Beat Saber_Data");
|
||||
return unlinkPath(path.join(verionPath, file));
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
private async uninstallMod(mod: Mod, version: BSVersion): Promise<void> {
|
||||
private async uninstallMod(mod: BbmFullMod, version: BSVersion): Promise<void> {
|
||||
this.nbUninstalledMods++;
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-uninstalled", { success: true, data: { name: mod.name, progression: (this.nbUninstalledMods / this.nbModsToUninstall) * 100 } });
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-uninstalled", { success: true, data: { name: mod.mod.name, progression: (this.nbUninstalledMods / this.nbModsToUninstall) * 100 } });
|
||||
|
||||
if (mod.name.toLowerCase() === "bsipa") {
|
||||
if (mod.mod.name.toLowerCase() === "bsipa") {
|
||||
return this.uninstallBSIPA(mod, version);
|
||||
}
|
||||
|
||||
const download = this.getModDownload(mod, version);
|
||||
const versionPath = await this.bsLocalService.getVersionPath(version);
|
||||
|
||||
const promises = download.hashMd5.map(async files => {
|
||||
return Promise.all([unlinkPath(path.join(versionPath, files.file)), unlinkPath(path.join(versionPath, "IPA", "Pending", files.file))]);
|
||||
const promises = mod.version.contentHashes.map(async content => {
|
||||
return Promise.all([unlinkPath(path.join(versionPath, content.path)), unlinkPath(path.join(versionPath, "IPA", "Pending", content.path))]);
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
public getAvailableMods(version: BSVersion): Promise<Mod[]> {
|
||||
return this.beatModsApi.getVersionMods(version);
|
||||
}
|
||||
|
||||
public async getInstalledMods(version: BSVersion): Promise<Mod[]> {
|
||||
this.manifestMatches = [];
|
||||
await this.beatModsApi.getAllMods();
|
||||
const bsipa = await this.getBsipaInstalled(version);
|
||||
return Promise.all([this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING), this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING), this.getModsInDir(version, ModsInstallFolder.PLUGINS), this.getModsInDir(version, ModsInstallFolder.LIBS)]).then(dirMods => {
|
||||
const modsDict = new Map<string, Mod>();
|
||||
|
||||
if (bsipa) {
|
||||
modsDict.set(bsipa.name, bsipa);
|
||||
}
|
||||
|
||||
for (const mod of dirMods.flat()) {
|
||||
if (modsDict.has(mod.name)) {
|
||||
continue;
|
||||
}
|
||||
modsDict.set(mod.name, mod);
|
||||
}
|
||||
|
||||
return Array.from(modsDict.values());
|
||||
public async getAvailableMods(version: BSVersion): Promise<BbmFullMod[]> {
|
||||
return this.beatModsApi.getVersionMods(version).catch(() => {
|
||||
return [] as BbmFullMod[];
|
||||
});
|
||||
}
|
||||
|
||||
public async installMods(mods: Mod[], version: BSVersion): Promise<InstallModsResult> {
|
||||
public async getInstalledMods(version: BSVersion): Promise<BbmModVersion[]> {
|
||||
this.manifestMatches = [];
|
||||
|
||||
const bsipa = await this.getBsipaInstalled(version);
|
||||
|
||||
const pluginsMods = await Promise.all([this.getModsInDir(version, ModsInstallFolder.PLUGINS), this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING)]);
|
||||
const libsMods = await Promise.all([this.getModsInDir(version, ModsInstallFolder.LIBS), this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING)]);
|
||||
|
||||
const dirMods = pluginsMods.flat().concat(libsMods.flat());
|
||||
|
||||
const modsDict = new Map<number, BbmModVersion>();
|
||||
|
||||
if (bsipa) {
|
||||
modsDict.set(bsipa.id, bsipa);
|
||||
}
|
||||
|
||||
for (const mod of dirMods.flat()) {
|
||||
if (modsDict.has(mod.id)) {
|
||||
continue;
|
||||
}
|
||||
modsDict.set(mod.id, mod);
|
||||
}
|
||||
|
||||
return Array.from(modsDict.values());
|
||||
}
|
||||
|
||||
public async installMods(mods: BbmFullMod[], version: BSVersion): Promise<InstallModsResult> {
|
||||
const deps = await this.resolveDependencies(mods, version);
|
||||
mods.push(...deps);
|
||||
|
||||
if (!mods?.length) {
|
||||
throw "no-mods";
|
||||
}
|
||||
|
||||
const deps = await this.resolveDependencies(mods, version);
|
||||
mods.push(...deps);
|
||||
|
||||
const bsipa = mods.find(mod => mod.name.toLowerCase() === "bsipa");
|
||||
const bsipa = mods.find(mod => mod.mod.name.toLowerCase() === "bsipa");
|
||||
if (bsipa) {
|
||||
mods = mods.filter(mod => mod.name.toLowerCase() !== "bsipa");
|
||||
mods = mods.filter(mod => mod.mod.name.toLowerCase() !== "bsipa");
|
||||
}
|
||||
|
||||
this.nbModsToInstall = mods.length + (bsipa && 1);
|
||||
@@ -371,7 +372,7 @@ export class BsModsManagerService {
|
||||
};
|
||||
}
|
||||
|
||||
public async uninstallMods(mods: Mod[], version: BSVersion): Promise<UninstallModsResult> {
|
||||
public async uninstallMods(mods: BbmFullMod[], version: BSVersion): Promise<UninstallModsResult> {
|
||||
if (!mods?.length) {
|
||||
throw "no-mods";
|
||||
}
|
||||
@@ -390,16 +391,21 @@ export class BsModsManagerService {
|
||||
}
|
||||
|
||||
public async uninstallAllMods(version: BSVersion): Promise<UninstallModsResult> {
|
||||
const mods = await this.getInstalledMods(version);
|
||||
const versionMods = await this.getAvailableMods(version);
|
||||
const installedMods = await this.getInstalledMods(version);
|
||||
|
||||
if (!mods?.length) {
|
||||
const fullInstalledMods: BbmFullMod[] = installedMods?.map(version => {
|
||||
return { version, mod: versionMods.find(mod => version.modId === mod.mod.id)?.mod };
|
||||
}) ?? [];
|
||||
|
||||
if (!fullInstalledMods?.length) {
|
||||
throw "no-mods";
|
||||
}
|
||||
|
||||
this.nbModsToUninstall = mods.length;
|
||||
this.nbModsToUninstall = fullInstalledMods.length;
|
||||
this.nbUninstalledMods = 0;
|
||||
|
||||
for (const mod of mods) {
|
||||
for (const mod of fullInstalledMods) {
|
||||
await this.uninstallMod(mod, version);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ import { shell } from "electron";
|
||||
import { taskRunning } from "../helpers/os.helpers";
|
||||
import { sToMs } from "../../shared/helpers/time.helpers";
|
||||
import { execOnOs } from "../helpers/env.helpers";
|
||||
import { UtilsService } from "./utils.service";
|
||||
import { exec } from "child_process";
|
||||
|
||||
const { list } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
|
||||
|
||||
export class OculusService {
|
||||
private static instance: OculusService;
|
||||
|
||||
private oculusLibraries: OculusLibrary[];
|
||||
|
||||
public static getInstance(): OculusService {
|
||||
if (!OculusService.instance) {
|
||||
OculusService.instance = new OculusService();
|
||||
@@ -22,7 +22,14 @@ export class OculusService {
|
||||
return OculusService.instance;
|
||||
}
|
||||
|
||||
private constructor() {}
|
||||
|
||||
private readonly utils: UtilsService;
|
||||
|
||||
private oculusLibraries: OculusLibrary[];
|
||||
|
||||
private constructor() {
|
||||
this.utils = UtilsService.getInstance();
|
||||
}
|
||||
|
||||
public async getOculusLibs(): Promise<OculusLibrary[]> {
|
||||
if (process.platform !== "win32") {
|
||||
@@ -120,6 +127,67 @@ export class OculusService {
|
||||
}, sToMs(30));
|
||||
});
|
||||
}
|
||||
|
||||
public async isSideLoadedAppsEnabled(): Promise<boolean> {
|
||||
if(process.platform !== "win32"){
|
||||
log.info("Cannot check sideloaded apps on non-windows platforms");
|
||||
throw new Error("Cannot check sideloaded apps on non-windows platforms");
|
||||
}
|
||||
|
||||
const regPath = "HKLM\\SOFTWARE\\Wow6432Node\\Oculus VR, LLC\\Oculus";
|
||||
const res = await list(regPath).then(res => res[regPath]);
|
||||
|
||||
if(!res.exists){
|
||||
log.info("Registry key not found", regPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
const value = res.values?.AllowDevSideloaded;
|
||||
|
||||
if(!value){
|
||||
log.info("Registry value not found", "AllowDevSideloaded");
|
||||
return false;
|
||||
}
|
||||
|
||||
return value.value === 1;
|
||||
}
|
||||
|
||||
public async enableSideloadedApps(): Promise<void> {
|
||||
if(process.platform !== "win32"){
|
||||
log.info("Cannot enable sideloaded apps on non-windows platforms");
|
||||
return;
|
||||
}
|
||||
|
||||
const enabled = await this.isSideLoadedAppsEnabled();
|
||||
|
||||
if(enabled){
|
||||
log.info("Sideloaded apps already enabled");
|
||||
return;
|
||||
}
|
||||
|
||||
const exePath = path.join(this.utils.getAssetsScriptsPath(), "oculus-allow-dev-sideloaded.exe");
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
log.info("Enabling sideloaded apps");
|
||||
const process = exec(exePath);
|
||||
process.on("exit", code => {
|
||||
if(code === 0){
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`Failed to enable sideloaded apps, exit code: ${code}`));
|
||||
}
|
||||
});
|
||||
|
||||
process.on("error", err => {
|
||||
log.error("Error while enabling sideloaded apps", err);
|
||||
reject(err);
|
||||
});
|
||||
|
||||
process.stdout.on("data", data => {
|
||||
log.info(data.toString?.() ?? data);
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export interface OculusLibrary {
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { Agent, get } from "https";
|
||||
import { createWriteStream, unlink } from "fs";
|
||||
import { Progression } from "main/helpers/fs.helpers";
|
||||
import { Agent, RequestOptions, get } from "https";
|
||||
import { createWriteStream } from "fs";
|
||||
import { Progression, unlinkPath } from "../helpers/fs.helpers";
|
||||
import { Observable, shareReplay, tap } from "rxjs";
|
||||
import log from "electron-log";
|
||||
import fetch, { RequestInfo, RequestInit } from "node-fetch";
|
||||
import { app } from "electron";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
import sanitize from "sanitize-filename";
|
||||
|
||||
export class RequestService {
|
||||
private static instance: RequestService;
|
||||
@@ -15,19 +20,36 @@ export class RequestService {
|
||||
return RequestService.instance;
|
||||
}
|
||||
|
||||
private constructor() {}
|
||||
private readonly defaultRequestInit: RequestInit;
|
||||
|
||||
private get ipv4Agent(){
|
||||
return new Agent({ family: 4 });
|
||||
private constructor() {
|
||||
|
||||
this.defaultRequestInit = {
|
||||
headers: {
|
||||
"User-Agent": `BSManager/${app.getVersion()} (${os.type()} ${os.release()})`
|
||||
},
|
||||
agent: new Agent({ family: 4 }),
|
||||
};
|
||||
}
|
||||
|
||||
private getInitWithOptions(options?: RequestInit): RequestInit {
|
||||
return { ...this.defaultRequestInit, ...(options || {}) };
|
||||
}
|
||||
|
||||
private requestOptionsFromDefaultInit(): RequestOptions {
|
||||
return {
|
||||
headers: this.defaultRequestInit.headers as Record<string, string>,
|
||||
agent: this.defaultRequestInit.agent as Agent,
|
||||
};
|
||||
}
|
||||
|
||||
public async getJSON<T = unknown>(url: RequestInfo, options?: RequestInit): Promise<T> {
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {...options, agent: this.ipv4Agent});
|
||||
const response = await fetch(url, this.getInitWithOptions(options));
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status} ${url}`);
|
||||
throw new Error(`HTTP error! status: ${response.status} response: ${await response.text().catch(() => "No response")} url: ${url}`);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
@@ -37,22 +59,65 @@ export class RequestService {
|
||||
}
|
||||
}
|
||||
|
||||
public downloadFile(url: string, dest: string): Observable<Progression<string>> {
|
||||
private getFilenameFromContentDisposition(disposition: string): string | null {
|
||||
|
||||
if(!disposition) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const utf8FilenameRegex = /filename\*=UTF-8''([\w%\-\.]+)(?:; ?|$)/i;
|
||||
const asciiFilenameRegex = /^filename=(["']?)(.*?[^\\])\1(?:; ?|$)/i;
|
||||
|
||||
const utf8Match = utf8FilenameRegex.exec(disposition);
|
||||
if (utf8Match) {
|
||||
return decodeURIComponent(utf8Match[1]);
|
||||
}
|
||||
|
||||
const filenameStart = disposition.toLowerCase().indexOf('filename=');
|
||||
if (filenameStart >= 0) {
|
||||
const partialDisposition = disposition.slice(filenameStart);
|
||||
const asciiMatch = asciiFilenameRegex.exec(partialDisposition);
|
||||
if (asciiMatch && asciiMatch[2]) {
|
||||
return asciiMatch[2];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public downloadFile(url: string, opt: { destFolder: string, filename: string, preferContentDisposition?: boolean }): Observable<Progression<string>> {
|
||||
return new Observable<Progression<string>>(subscriber => {
|
||||
const progress: Progression<string> = { current: 0, total: 0 };
|
||||
|
||||
const file = createWriteStream(dest);
|
||||
const req = get(url, this.requestOptionsFromDefaultInit(), res => {
|
||||
|
||||
file.on("close", () => {
|
||||
progress.data = dest;
|
||||
subscriber.next(progress);
|
||||
subscriber.complete();
|
||||
});
|
||||
file.on("error", err => unlink(dest, () => subscriber.error(err)));
|
||||
const filePath = (() => {
|
||||
if(opt.preferContentDisposition && res.headers["content-disposition"]) {
|
||||
const filename = this.getFilenameFromContentDisposition(res.headers["content-disposition"]);
|
||||
return path.join(opt.destFolder, sanitize(filename || opt.filename));
|
||||
}
|
||||
return path.join(opt.destFolder, opt.filename);
|
||||
})();
|
||||
|
||||
const req = get(url, { agent: this.ipv4Agent }, res => {
|
||||
const file = createWriteStream(filePath);
|
||||
|
||||
file.on("close", () => {
|
||||
subscriber.next(progress);
|
||||
subscriber.complete();
|
||||
});
|
||||
file.on("error", async err => {
|
||||
log.error(err);
|
||||
const res = await tryit(() => unlinkPath(filePath));
|
||||
if(res.error) {
|
||||
log.error(res.error);
|
||||
}
|
||||
});
|
||||
|
||||
progress.data = filePath;
|
||||
progress.total = parseInt(res.headers?.["content-length"] || "0", 10);
|
||||
|
||||
subscriber.next(progress);
|
||||
|
||||
res.on("data", chunk => {
|
||||
progress.current += chunk.length;
|
||||
subscriber.next(progress);
|
||||
@@ -64,7 +129,7 @@ export class RequestService {
|
||||
req.on("error", err => {
|
||||
subscriber.error(err);
|
||||
});
|
||||
}).pipe(tap({ error: e => log.error(e, url, dest) }), shareReplay(1));
|
||||
}).pipe(tap({ error: e => log.error(e, url) }), shareReplay(1));
|
||||
}
|
||||
|
||||
public downloadBuffer(url: string): Observable<Progression<Buffer>> {
|
||||
@@ -77,7 +142,7 @@ export class RequestService {
|
||||
|
||||
const allChunks: Buffer[] = [];
|
||||
|
||||
const req = get(url, { agent: this.ipv4Agent }, res => {
|
||||
const req = get(url, this.requestOptionsFromDefaultInit(), res => {
|
||||
progress.total = parseInt(res.headers?.["content-length"] || "0", 10);
|
||||
|
||||
res.on("data", chunk => {
|
||||
|
||||
@@ -14,7 +14,7 @@ export class BeatSaverApiService {
|
||||
|
||||
private readonly request: RequestService;
|
||||
|
||||
private readonly bsaverApiUrl = "https://beatsaver.com/api";
|
||||
private readonly bsaverApiUrl = "https://api.beatsaver.com";
|
||||
|
||||
private constructor() {
|
||||
this.request = RequestService.getInstance();
|
||||
@@ -49,6 +49,9 @@ export class BeatSaverApiService {
|
||||
...(filter.maxNps && { maxNps: String(filter.maxNps) }),
|
||||
};
|
||||
|
||||
delete params.enabledTags;
|
||||
delete params.excludedTags;
|
||||
|
||||
return new URLSearchParams(params);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getFoldersInFolder } from "../helpers/fs.helpers";
|
||||
import path from "path";
|
||||
import { VersionLinkerAction, VersionLinkFolderAction, VersionUnlinkFolderAction } from "renderer/services/version-folder-linker.service";
|
||||
import { VersionLinkerAction, VersionUnlinkFolderAction } from "renderer/services/version-folder-linker.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { LocalMapsManagerService } from "./additional-content/local-maps-manager.service";
|
||||
import { BSLocalVersionService } from "./bs-local-version.service";
|
||||
@@ -58,17 +58,14 @@ export class VersionFolderLinkerService {
|
||||
return path.join(parentPath, relativePath);
|
||||
}
|
||||
|
||||
public async linkVersionFolder(action: VersionLinkerAction): Promise<boolean> {
|
||||
public async linkVersionFolder(action: VersionLinkerAction): Promise<void> {
|
||||
action.options = this.specialFolderOption(action.relativeFolder, action.options);
|
||||
const versionPath = await this.localVersion.getVersionPath(action.version);
|
||||
const folderPath = this.relativeToFullPath(versionPath, action.relativeFolder);
|
||||
return this.folderLinker
|
||||
.linkFolder(folderPath, action.options)
|
||||
.catch(() => false)
|
||||
.then(() => true);
|
||||
return this.folderLinker.linkFolder(folderPath, action.options)
|
||||
}
|
||||
|
||||
public async unlinkVersionFolder(action: VersionUnlinkFolderAction): Promise<boolean> {
|
||||
public async unlinkVersionFolder(action: VersionUnlinkFolderAction): Promise<void> {
|
||||
action.options = this.specialFolderOption(action.relativeFolder, action.options);
|
||||
|
||||
const versionPath = await this.localVersion.getVersionPath(action.version);
|
||||
@@ -76,13 +73,10 @@ export class VersionFolderLinkerService {
|
||||
|
||||
action.options.moveContents = !(await this.isOtherVersionHaveFolderLinked(action.relativeFolder, folderPath));
|
||||
|
||||
return this.folderLinker
|
||||
.unlinkFolder(folderPath, action.options)
|
||||
.catch(() => false)
|
||||
.then(() => true);
|
||||
return this.folderLinker.unlinkFolder(folderPath, action.options);
|
||||
}
|
||||
|
||||
public async doAction(action: VersionLinkerAction): Promise<boolean> {
|
||||
public doAction(action: VersionLinkerAction): Promise<void> {
|
||||
if (action.type === "link") {
|
||||
return this.linkVersionFolder(action);
|
||||
}
|
||||
@@ -123,7 +117,7 @@ export class VersionFolderLinkerService {
|
||||
|
||||
for (const version of versions) {
|
||||
const linkedFolders = await this.getLinkedFolders(version, { relative: true, ignoreSymlinkTargetError: true });
|
||||
const actions = linkedFolders.map(folder => ({ type: "link", version, relativeFolder: folder } as VersionLinkFolderAction));
|
||||
const actions = linkedFolders.map(folder => ({ type: "link", version, relativeFolder: folder } as VersionLinkerAction));
|
||||
await Promise.all(actions.map(action => this.doAction(action)));
|
||||
}
|
||||
}
|
||||
|
||||
+11
-12
@@ -1,17 +1,16 @@
|
||||
/* eslint import/prefer-default-export: off, import/no-mutable-exports: off */
|
||||
import { URL } from "url";
|
||||
import { pathToFileURL, URL } from "url";
|
||||
import path from "path";
|
||||
|
||||
export let resolveHtmlPath: (htmlFileName: string) => string;
|
||||
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
const port = process.env.PORT || 1212;
|
||||
resolveHtmlPath = (htmlFileName: string) => {
|
||||
export function resolveHtmlPath (htmlFileName: string) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
const port = process.env.PORT || 1212;
|
||||
const url = new URL(`http://localhost:${port}/${htmlFileName}`);
|
||||
return url.toString();
|
||||
};
|
||||
} else {
|
||||
resolveHtmlPath = (htmlFileName: string) => {
|
||||
return `file://${path.resolve(__dirname, "../renderer/", htmlFileName)}`;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const filePath = path.resolve(__dirname, "..", "renderer");
|
||||
return pathToFileURL(filePath).toString().concat("/", htmlFileName);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
import { MapFilter, MapSpecificity, MapStyle, MapTag, MapType } from "shared/models/maps/beat-saver.model";
|
||||
import { MapFilter, MapRequirement, MapSpecificity, MapStyle, MapTag, MapType } from "shared/models/maps/beat-saver.model";
|
||||
import { motion } from "framer-motion";
|
||||
import { MutableRefObject, useEffect, useRef, useState } from "react";
|
||||
import { MAP_TYPES } from "renderer/partials/maps/map-tags/map-types";
|
||||
import { MAP_STYLES } from "renderer/partials/maps/map-tags/map-styles";
|
||||
import { BsmCheckbox } from "../shared/bsm-checkbox.component";
|
||||
import { minToS } from "../../../shared/helpers/time.helpers";
|
||||
import dateFormat from "dateformat";
|
||||
import { BsmRange } from "../shared/bsm-range.component";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { MAP_SPECIFICITIES } from "renderer/partials/maps/map-general/map-specificity";
|
||||
import { MAP_REQUIREMENTS } from "renderer/partials/maps/map-requirements/map-requirements";
|
||||
import { MAP_DIFFICULTIES_COLORS } from "renderer/partials/maps/map-difficulties/map-difficulties-colors";
|
||||
import { BsmButton } from "../shared/bsm-button.component";
|
||||
import equal from "fast-deep-equal/es6";
|
||||
@@ -21,12 +17,13 @@ export type Props = {
|
||||
ref?: MutableRefObject<undefined>;
|
||||
playlist?: boolean;
|
||||
filter: MapFilter;
|
||||
localData?: boolean;
|
||||
onChange?: (filter: MapFilter) => void;
|
||||
onApply?: (filter: MapFilter) => void;
|
||||
onClose?: (filter: MapFilter) => void;
|
||||
};
|
||||
|
||||
export function FilterPanel({ className, ref, playlist = false, filter, onChange, onApply, onClose }: Props) {
|
||||
export function FilterPanel({ className, ref, playlist = false, filter, localData = true, onChange, onApply, onClose }: Props) {
|
||||
const t = useTranslation();
|
||||
|
||||
const [haveChanged, setHaveChanged] = useState(false);
|
||||
@@ -176,31 +173,40 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
|
||||
<div className="w-full h-full flex gap-x-2">
|
||||
<section className="shrink-0">
|
||||
<h2 className="mb-1 uppercase text-sm">{t("maps.map-filter-panel.specificities")}</h2>
|
||||
{MAP_SPECIFICITIES.map(specificity => (
|
||||
{Object.values(MapSpecificity).map(specificity => (
|
||||
<div key={specificity} className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox(specificity)}>
|
||||
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.[specificity]} onChange={() => handleCheckbox(specificity)} />
|
||||
<span className="grow capitalize">{translateMapSpecificity(specificity)}</span>
|
||||
</div>
|
||||
))}
|
||||
<h2 className="my-1 uppercase text-sm">{t("maps.map-filter-panel.requirements")}</h2>
|
||||
{MAP_REQUIREMENTS.map(requirement => (
|
||||
{Object.values(MapRequirement).map(requirement => (
|
||||
<div key={requirement} className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox(requirement)}>
|
||||
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.[requirement]} onChange={() => handleCheckbox(requirement)} />
|
||||
<span className="grow capitalize">{requirement}</span>
|
||||
</div>
|
||||
))}
|
||||
{ !localData && (
|
||||
<>
|
||||
<h2 className="my-1 uppercase text-sm">{t("maps.map-filter-panel.exclude")}</h2>
|
||||
<div className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox("installed")}>
|
||||
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.installed} onChange={() => handleCheckbox("installed")} />
|
||||
<span className="grow capitalize">{t("maps.map-excludes.installed")}</span>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</section>
|
||||
<section className="grow capitalize">
|
||||
<h2 className="uppercase text-sm mb-1">{t("maps.map-filter-panel.tags")}</h2>
|
||||
<div className="w-full flex flex-row flex-wrap items-start justify-start content-start gap-1 mb-2">
|
||||
{MAP_TYPES.map(tag => (
|
||||
{Object.values(MapType).map(tag => (
|
||||
<span key={tag} onClick={() => handleTagClick(tag)} className={`text-[12.5px] text-black rounded-md px-1 font-bold cursor-pointer ${!isTagActivated(tag) && "opacity-40 hover:opacity-90"}`} style={{ backgroundColor: isTagExcluded(tag) ? MAP_DIFFICULTIES_COLORS.Expert : MAP_DIFFICULTIES_COLORS.Normal }}>
|
||||
{translateMapType(tag)}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<div className="w-full flex flex-row flex-wrap items-start justify-start content-start gap-1">
|
||||
{MAP_STYLES.map(tag => (
|
||||
{Object.values(MapStyle).map(tag => (
|
||||
<span key={tag} onClick={() => handleTagClick(tag)} className={`text-[12.5px] text-black rounded-md px-1 font-bold cursor-pointer ${!isTagActivated(tag) && "opacity-40 hover:opacity-90"}`} style={{ backgroundColor: isTagExcluded(tag) ? MAP_DIFFICULTIES_COLORS.Expert : MAP_DIFFICULTIES_COLORS.Easy }}>
|
||||
{translateMapStyle(tag)}
|
||||
</span>
|
||||
|
||||
+1
-1
@@ -358,7 +358,7 @@ export const LocalMapsListPanel = forwardRef(({ version, className, filter, sear
|
||||
}
|
||||
|
||||
const searchCheck = (() => {
|
||||
return ((map.rawInfo?._songName ?? map.bsaverInfo?.name) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.rawInfo?._songAuthorName ?? map.bsaverInfo?.metadata?.songAuthorName) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.rawInfo?._levelAuthorName ?? map.bsaverInfo?.metadata?.levelAuthorName) || "")?.toLowerCase().includes(search.toLowerCase());
|
||||
return ((map.mapInfo?.songName ?? map.bsaverInfo?.name) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.mapInfo?.songAuthorName ?? map.bsaverInfo?.metadata?.songAuthorName) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.mapInfo?.levelMappers.at(0) ?? map.bsaverInfo?.metadata?.levelAuthorName) || "")?.toLowerCase().includes(search.toLowerCase());
|
||||
})();
|
||||
|
||||
if (!searchCheck) {
|
||||
|
||||
@@ -26,43 +26,40 @@ export const MapsRow = memo(({ maps, style, selectedMaps$, onMapSelect, onMapDel
|
||||
if (map.bsaverInfo?.versions[0]?.diffs) {
|
||||
map.bsaverInfo.versions[0].diffs.forEach(diff => {
|
||||
const arr = res.get(diff.characteristic) || [];
|
||||
const diffName = map.rawInfo._difficultyBeatmapSets.find(set => set._beatmapCharacteristicName === diff.characteristic)._difficultyBeatmaps.find(rawDiff => rawDiff._difficulty === diff.difficulty)?._customData?._difficultyLabel || diff.difficulty;
|
||||
const diffName = map.mapInfo.difficulties.find(set => set.characteristic === diff.characteristic && set.difficulty === diff.difficulty)?.difficultyLabel || diff.difficulty;
|
||||
arr.push({ name: diffName, type: diff.difficulty, stars: diff.stars });
|
||||
res.set(diff.characteristic, arr);
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
map.rawInfo._difficultyBeatmapSets.forEach(set => {
|
||||
set._difficultyBeatmaps.forEach(diff => {
|
||||
const arr = res.get(set._beatmapCharacteristicName) || [];
|
||||
arr.push({ name: diff._customData?._difficultyLabel || diff._difficulty, type: diff._difficulty, stars: null });
|
||||
res.set(set._beatmapCharacteristicName, arr);
|
||||
});
|
||||
map.mapInfo.difficulties.forEach(diff => {
|
||||
const arr = res.get(diff.characteristic) || [];
|
||||
arr.push({ name: diff?.difficultyLabel || diff.difficulty, type: diff.difficulty, stars: null });
|
||||
});
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
const renderMapItem = (map: BsmLocalMap) => {
|
||||
return <MapItem
|
||||
key={map.hash}
|
||||
hash={map.hash}
|
||||
title={map.rawInfo._songName}
|
||||
coverUrl={map.coverUrl}
|
||||
songUrl={map.songUrl}
|
||||
autor={map.rawInfo._levelAuthorName}
|
||||
songAutor={map.rawInfo._songAuthorName}
|
||||
bpm={map.rawInfo._beatsPerMinute}
|
||||
duration={map.bsaverInfo?.metadata?.duration}
|
||||
selected={selectedMaps.some(selected => selected.hash === map.hash)}
|
||||
diffs={extractMapDiffs(map)} mapId={map.bsaverInfo?.id}
|
||||
ranked={map.bsaverInfo?.ranked}
|
||||
autorId={map.bsaverInfo?.uploader?.id}
|
||||
likes={map.bsaverInfo?.stats?.upvotes}
|
||||
createdAt={map.bsaverInfo?.createdAt}
|
||||
onDelete={onMapDelete}
|
||||
onSelected={onMapSelect}
|
||||
return <MapItem
|
||||
key={map.hash}
|
||||
hash={map.hash}
|
||||
title={map.mapInfo.songName}
|
||||
coverUrl={map.coverUrl}
|
||||
songUrl={map.songUrl}
|
||||
autor={map.mapInfo.levelMappers.at(0)}
|
||||
songAutor={map.mapInfo.songAuthorName}
|
||||
bpm={map.mapInfo.beatsPerMinute}
|
||||
duration={map.bsaverInfo?.metadata?.duration}
|
||||
selected={selectedMaps.some(selected => selected.hash === map.hash)}
|
||||
diffs={extractMapDiffs(map)} mapId={map.bsaverInfo?.id}
|
||||
ranked={map.bsaverInfo?.ranked}
|
||||
autorId={map.bsaverInfo?.uploader?.id}
|
||||
likes={map.bsaverInfo?.stats?.upvotes}
|
||||
createdAt={map.bsaverInfo?.createdAt}
|
||||
onDelete={onMapDelete}
|
||||
onSelected={onMapSelect}
|
||||
callBackParam={map}
|
||||
/>;
|
||||
};
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ export const EnterMetaTokenModal: ModalComponent<string> = ({resolver}) => {
|
||||
const cancel = () => {
|
||||
resolver({exitCode: ModalExitCode.CANCELED});
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<form className="flex flex-col w-80 gap-4">
|
||||
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t("modals.enter-meta-token.title")}</h1>
|
||||
@@ -205,7 +205,7 @@ const PasswordInput = ({onChange, value}: {onChange: (value : {password: string,
|
||||
<input className="grow px-1 py-[2px] outline-none bg-transparent" onChange={e => onChange({password: e.target.value, valid: isPasswordValid(e.target.value)})} value={value} type={showPassword ? "text" : "password"} name="password" id="password" placeholder={t("modals.enter-meta-token.body.password")} />
|
||||
<BsmButton className="shrink-0 m-1 rounded-md p-0.5 !bg-light-main-color-3 dark:!bg-main-color-3" icon={showPassword ? "eye-cross" : "eye"} withBar={false} onClick={() => setShowPassword(prev => !prev)} />
|
||||
</div>
|
||||
</>
|
||||
</>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import { BsmImage } from "renderer/components/shared/bsm-image.component";
|
||||
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service";
|
||||
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
|
||||
import { useTranslationV2 } from "renderer/hooks/use-translation.hook";
|
||||
import { useState } from "react";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
|
||||
export const BSVersionOutdatedModal: ModalComponent<void, { outdated: BSVersion, recommended: BSVersion }> = ({ resolver, data : { outdated, recommended }}) => {
|
||||
|
||||
const t = useTranslationV2();
|
||||
const config = useService(ConfigurationService);
|
||||
|
||||
const [remember, setRemember] = useState(false);
|
||||
|
||||
const handleContinue = () => {
|
||||
if (remember) {
|
||||
config.set("not-show-bs-version-outdated-modal", true);
|
||||
}
|
||||
|
||||
resolver({ exitCode: ModalExitCode.COMPLETED });
|
||||
};
|
||||
|
||||
return (
|
||||
<form className="text-gray-800 dark:text-gray-200 max-w-sm">
|
||||
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t.text("misc.warning")}</h1>
|
||||
<BsmImage className="mx-auto h-24" image={BeatConflict} />
|
||||
<p>{t.element("modals.bs-version-outdated.body", { outdatedVersion: <b>{outdated.BSVersion}</b>, recommendedVersion: <b>{recommended.BSVersion}</b> })}</p>
|
||||
<div className="flex items-center relative py-2 gap-1 mt-1">
|
||||
<BsmCheckbox className="h-5 relative z-[1]" checked={remember} onChange={val => setRemember(() => val)} />
|
||||
<span className="italic">{t.text("modals.misc.remember-my-choice")}</span>
|
||||
</div>
|
||||
<div className="grid grid-flow-col grid-cols-2 gap-4 mt-4 h-8">
|
||||
<BsmButton typeColor="cancel" className="rounded-md flex justify-center items-center transition-all" onClick={() => resolver({ exitCode: ModalExitCode.CANCELED })} withBar={false} text="misc.cancel" />
|
||||
<BsmButton typeColor="primary" className="rounded-md flex justify-center items-center transition-all" onClick={handleContinue} withBar={false} text="misc.continue" />
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
};
|
||||
@@ -11,7 +11,7 @@ import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
|
||||
export const DeleteMapsModal: ModalComponent<void, { linked: boolean; maps: BsmLocalMap[] }> = ({ resolver, data: { linked, maps } }) => {
|
||||
|
||||
|
||||
const config = useService(ConfigurationService);
|
||||
|
||||
const t = useTranslation();
|
||||
@@ -34,7 +34,7 @@ export const DeleteMapsModal: ModalComponent<void, { linked: boolean; maps: BsmL
|
||||
<form className="text-gray-800 dark:text-gray-200">
|
||||
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t(titleText)}</h1>
|
||||
<BsmImage className="mx-auto h-24" image={BeatConflict} />
|
||||
<p className="max-w-sm w-full">{t(descText, multiple ? { nb: maps.length.toString() } : { name: maps.at(0).rawInfo._songName })}</p>
|
||||
<p className="max-w-sm w-full">{t(descText, multiple ? { nb: maps.length.toString() } : { name: maps.at(0).mapInfo.songName })}</p>
|
||||
{linked && (
|
||||
<p className="text-sm italic mt-2 cursor-help w-fit" title={t(infoTitleText)}>
|
||||
{t(infoText)}
|
||||
|
||||
@@ -34,7 +34,7 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
|
||||
const [filter, setFilter] = useState<MapFilter>({});
|
||||
const [query, setQuery] = useState("");
|
||||
const [maps, setMaps] = useState<BsvMapDetail[]>([]);
|
||||
const [sortOrder, setSortOrder] = useState<SearchOrder>(BSV_SORT_ORDER.at(0));
|
||||
const [sortOrder, setSortOrder] = useState<SearchOrder>("Relevance");
|
||||
const [ownedMapHashs, setOwnedMapHashs] = useState<string[]>(ownedMaps?.map(map => map.hash) ?? []);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const isOnline = useObservable(() => os.isOnline$);
|
||||
@@ -76,12 +76,48 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
|
||||
};
|
||||
}, []);
|
||||
|
||||
const loadMaps = (params: SearchParams) => {
|
||||
const applyInstalledFilter = (maps: BsvMapDetail[]): BsvMapDetail[] => {
|
||||
return maps.filter(map => {
|
||||
if (!filter.installed) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !map.versions.some(version => ownedMapHashs.includes(version.hash));
|
||||
});
|
||||
}
|
||||
|
||||
const loadMaps = (params: SearchParams, tryToLoad = 5) => {
|
||||
setLoading(() => true);
|
||||
beatSaver
|
||||
.searchMaps(params)
|
||||
.then(maps => setMaps(prev => [...prev, ...maps]))
|
||||
.finally(() => setLoading(() => false));
|
||||
|
||||
const searchResult = beatSaver.searchMaps(params);
|
||||
|
||||
if (!filter.installed) {
|
||||
searchResult
|
||||
.then(maps => setMaps(prev => [...prev, ...maps]))
|
||||
.finally(() => setLoading(() => false));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
searchResult
|
||||
.then(maps => {
|
||||
if (!maps.length) {
|
||||
setLoading(() => false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
maps = applyInstalledFilter(maps);
|
||||
setMaps(prev => [...prev, ...maps])
|
||||
|
||||
if (maps.length < tryToLoad) {
|
||||
handleLoadMore();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(() => false);
|
||||
})
|
||||
};
|
||||
|
||||
const extractMapDiffs = (map: BsvMapDetail): Map<BsvMapCharacteristic, ParsedMapDiff[]> => {
|
||||
@@ -146,7 +182,7 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
|
||||
>
|
||||
<div className="flex h-9 gap-2 shrink-0">
|
||||
<BsmDropdownButton ref={filterContainerRef} className="shrink-0 h-full relative z-[1] flex justify-start" buttonClassName="flex items-center justify-center h-full rounded-full px-2 py-1 !bg-light-main-color-1 dark:!bg-main-color-1" icon="filter" text="pages.version-viewer.maps.search-bar.filters-btn" withBar={false}>
|
||||
<FilterPanel className="absolute top-[calc(100%+3px)] origin-top w-[450px] h-fit p-2 rounded-md shadow-md shadow-black" filter={filter} onChange={setFilter} onApply={handleSearch} onClose={() => filterContainerRef.current.close()} />
|
||||
<FilterPanel className="absolute top-[calc(100%+3px)] origin-top w-[450px] h-fit p-2 rounded-md shadow-md shadow-black" localData={false} filter={filter} onChange={setFilter} onApply={handleSearch} onClose={() => filterContainerRef.current.close()} />
|
||||
</BsmDropdownButton>
|
||||
<input className="h-full bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-2 grow pb-0.5" type="text" name="" id="" placeholder={t("pages.version-viewer.maps.search-bar.search-placeholder")} value={query} onChange={e => setQuery(e.target.value)} />
|
||||
<BsmButton
|
||||
@@ -159,7 +195,7 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
|
||||
handleSearch();
|
||||
}}
|
||||
/>
|
||||
<BsmSelect className="bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-1 pb-0.5 text-center" options={sortOptions} onChange={sort => handleSortChange(sort)} />
|
||||
<BsmSelect className="bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-1 pb-0.5 text-center" options={sortOptions} onChange={sort => handleSortChange(sort)} selected={sortOrder}/>
|
||||
</div>
|
||||
<ul className="w-full grow flex content-start flex-wrap gap-2 pt-1.5 px-2 overflow-y-scroll overflow-x-hidden scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900 z-0">
|
||||
{maps.length === 0 ? (
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service"
|
||||
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import { BsmImage } from "renderer/components/shared/bsm-image.component";
|
||||
import { useTranslationV2 } from "renderer/hooks/use-translation.hook";
|
||||
|
||||
export const EnableOculusSideloadedApps: ModalComponent<void, void> = ({ resolver }) => {
|
||||
|
||||
const { text: t } = useTranslationV2();
|
||||
|
||||
const submit = () => {
|
||||
resolver({ exitCode: ModalExitCode.COMPLETED });
|
||||
}
|
||||
|
||||
return (
|
||||
<form className="max-w-[450px] text-gray-800 dark:text-gray-200">
|
||||
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.enable-oculus-sideloaded-apps.title")}</h1>
|
||||
<BsmImage className="mx-auto h-24" image={BeatConflict} />
|
||||
|
||||
<p className="mb-4">{t("modals.enable-oculus-sideloaded-apps.info-1")}</p>
|
||||
<p className="mb-4">{t("modals.enable-oculus-sideloaded-apps.info-2")}</p>
|
||||
<p className="mb-4">{t("modals.enable-oculus-sideloaded-apps.info-3")}</p>
|
||||
|
||||
<a className="underline mb-5 block" href="https://github.com/Zagrios/bs-manager/wiki/Activate-Oculus-sideloading" target="_blank">{t("modals.enable-oculus-sideloaded-apps.i-want-to-do-it-myself")}</a>
|
||||
|
||||
<div className="grid grid-flow-col grid-cols-2 gap-4">
|
||||
<BsmButton
|
||||
typeColor="cancel"
|
||||
className="rounded-md transition-all h-10 flex items-center justify-center"
|
||||
onClick={() => {
|
||||
resolver({ exitCode: ModalExitCode.CANCELED });
|
||||
}}
|
||||
withBar={false}
|
||||
text="misc.cancel"
|
||||
/>
|
||||
<BsmButton
|
||||
typeColor="primary"
|
||||
className="rounded-md transition-all h-10 flex items-center justify-center"
|
||||
onClick={submit}
|
||||
withBar={false}
|
||||
text="modals.enable-oculus-sideloaded-apps.understood"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service"
|
||||
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import { BsmImage } from "renderer/components/shared/bsm-image.component";
|
||||
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
|
||||
export const OriginalOculusVersionBackupModal: ModalComponent<boolean, void> = ({ resolver }) => {
|
||||
|
||||
const t = useTranslation();
|
||||
const [dontShowAgain, setDontShowAgain] = useState(false);
|
||||
|
||||
const submit = () => {
|
||||
resolver({ exitCode: ModalExitCode.COMPLETED, data: dontShowAgain });
|
||||
}
|
||||
|
||||
return (
|
||||
<form className="max-w-[450px] text-gray-800 dark:text-gray-200">
|
||||
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.original-version-backup-oculus.title")}</h1>
|
||||
<BsmImage className="mx-auto h-20" image={BeatConflict} />
|
||||
|
||||
<p className="text-sm italic mb-4 font-bold">{t("modals.original-version-backup-oculus.body.must-be-installed-once")}</p>
|
||||
<p className="mb-4">{t("modals.original-version-backup-oculus.body.need-backup")}</p>
|
||||
<p className="mb-4">{t("modals.original-version-backup-oculus.body.can-restore-later")}</p>
|
||||
<p className="text-sm italic mb-4">{t("modals.original-version-backup-oculus.body.tips-launch-oculus")}</p>
|
||||
|
||||
<div className="flex flex-row justify-start items-center gap-1.5 my-4" >
|
||||
<BsmCheckbox className="relative z-[1] w-6 aspect-square" checked={dontShowAgain} onChange={setDontShowAgain} />
|
||||
<span>{t("modals.original-version-backup-oculus.not-remind-me")}</span>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-flow-col grid-cols-2 gap-4">
|
||||
<BsmButton
|
||||
typeColor="cancel"
|
||||
className="rounded-md transition-all h-10 flex items-center justify-center"
|
||||
onClick={() => {
|
||||
resolver({ exitCode: ModalExitCode.CANCELED });
|
||||
}}
|
||||
withBar={false}
|
||||
text="misc.cancel"
|
||||
/>
|
||||
<BsmButton
|
||||
typeColor="primary"
|
||||
className="rounded-md transition-all h-10 flex items-center justify-center"
|
||||
onClick={submit}
|
||||
withBar={false}
|
||||
text="modals.original-version-backup-oculus.understood"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
@@ -3,9 +3,9 @@ import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import { BsmImage } from "renderer/components/shared/bsm-image.component";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { BbmMod } from "shared/models/mods/mod.interface";
|
||||
|
||||
export const UninstallModModal: ModalComponent<void, Mod> = ({ resolver, data }) => {
|
||||
export const UninstallModModal: ModalComponent<void, BbmMod> = ({ resolver, data }) => {
|
||||
const mod = data;
|
||||
const t = useTranslation();
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import { useOnUpdate } from "renderer/hooks/use-on-update.hook";
|
||||
import { NotificationService } from "renderer/services/notification.service";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { lt } from "semver";
|
||||
import { lastValueFrom, of, take } from "rxjs";
|
||||
import { FolderLinkState } from "renderer/services/version-folder-linker.service";
|
||||
import { BsContentTabItemProps } from "../shared/bs-content-tab-panel/bs-content-tab-item.component";
|
||||
@@ -74,20 +73,6 @@ export function ModelsPanel({ version, isActive, goToMods }: { version?: BSVersi
|
||||
});
|
||||
}, [isActive]);
|
||||
|
||||
useOnUpdate(() => {
|
||||
if (!isActive || !version || lt(version.BSVersion, "1.29.4")) {
|
||||
return;
|
||||
}
|
||||
if (config.get("not-remind-models-breaks")) {
|
||||
return;
|
||||
}
|
||||
notification.notifyInfo({ title: "models.notifications.prevent-for-models-breaks.title", desc: "models.notifications.prevent-for-models-breaks.desc", actions: [{ id: "0", title: "models.notifications.prevent-for-mods.not-remind", cancel: true }], duration: 12_000 }).then(res => {
|
||||
if (res === "0") {
|
||||
config.set("not-remind-models-breaks", true);
|
||||
}
|
||||
});
|
||||
}, [isActive, version]);
|
||||
|
||||
const exportModels = () => {
|
||||
const selectedModels = modelsGridRefs.map(ref => ref.current?.getSelectedModels() as BsmLocalModel[]).flat();
|
||||
modelsManager.exportModels(selectedModels, version);
|
||||
|
||||
@@ -35,7 +35,7 @@ export function SupportersView({ isVisible, setVisible }: Props) {
|
||||
(
|
||||
{isVisible && (
|
||||
<motion.div className="fixed top-0 left-0 w-full h-full bg-black bg-opacity-90 z-40 text-gray-200" transition={{ duration: 0.3 }} initial={{ opacity: 0, y: "-100%" }} animate={{ opacity: 1, y: "0%" }} exit={{ opacity: 0, y: "-100%" }}>
|
||||
<BsmButton className="absolute right-10 top-10 !bg-transparent w-7 h-7" icon="cross" withBar={false} onClick={() => setVisible(false)} />
|
||||
<BsmButton className="absolute right-10 top-10 !bg-transparent w-7 h-7" iconClassName="text-white size-full" icon="cross" withBar={false} onClick={() => setVisible(false)} />
|
||||
{(!!sponsors.length || !!supporters.length) && <img className="absolute bottom-5 right-5 rotate-45 w-32 h-32" src={ManheraChanGif} />}
|
||||
<div className="w-full h-full overflow-y-scroll">
|
||||
{!!sponsors.length && <SupportersBlock className="mt-12" title="pages.settings.patreon.view.sponsors" supporters={sponsors} />}
|
||||
|
||||
@@ -60,8 +60,10 @@ import { ChevronTopIcon } from "./icons/chevron-top-icon.component";
|
||||
import { EyeCrossIcon } from "./icons/eye-cross-icon.component";
|
||||
import { ShortcutIcon } from "./icons/shortcut-icon.component";
|
||||
import { BackupRestoreIcon } from "./icons/backup-restore-icon.component";
|
||||
import { CancelIcon } from "./icons/cancel-icon.component";
|
||||
import { WarningIcon } from "./icons/warning-icon.component";
|
||||
|
||||
export type BsmIconType = BsvMapCharacteristic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag");
|
||||
export type BsmIconType = BsvMapCharacteristic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "cancel" | "warning" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag");
|
||||
|
||||
export const BsmIcon = memo(({ className, icon, style }: { className?: string; icon: BsmIconType; style?: CSSProperties }) => {
|
||||
// TODO : Very ugly very messy, need to find a better way to do this
|
||||
@@ -250,6 +252,15 @@ export const BsmIcon = memo(({ className, icon, style }: { className?: string; i
|
||||
if (icon === "backup-restore") {
|
||||
return <BackupRestoreIcon className={className} style={style} />;
|
||||
}
|
||||
|
||||
if(icon === "cancel"){
|
||||
return <CancelIcon className={className} style={style} />;
|
||||
}
|
||||
|
||||
if(icon === "warning"){
|
||||
return <WarningIcon className={className} style={style} />;
|
||||
}
|
||||
|
||||
return <TrashIcon className={className} style={style} />;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export const CancelIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor">
|
||||
<path d="M480-421.37 592.17-309.2q11.72 11.72 29.32 11.6 17.6-.12 29.31-11.83 11.72-11.72 11.72-29.32t-11.72-29.32L538.63-480 650.8-592.17q11.72-11.72 11.72-29.32T650.8-650.8q-11.71-11.72-29.31-11.72-17.6 0-29.32 11.72L480-538.63 367.83-650.8q-11.72-11.72-29.2-11.72-17.48 0-29.2 11.72-11.71 11.71-11.71 29.31 0 17.6 11.71 29.32L421.37-480 309.2-367.83q-11.72 11.72-11.6 29.2.12 17.48 11.83 29.2 11.72 11.71 29.32 11.71t29.32-11.71L480-421.37Zm0 349.5q-84.91 0-159.35-32.1-74.43-32.1-129.51-87.17-55.07-55.08-87.17-129.51-32.1-74.44-32.1-159.35t32.1-159.35q32.1-74.43 87.17-129.51 55.08-55.07 129.51-87.17 74.44-32.1 159.35-32.1t159.35 32.1q74.43 32.1 129.51 87.17 55.07 55.08 87.17 129.51 32.1 74.44 32.1 159.35t-32.1 159.35q-32.1 74.43-87.17 129.51-55.08 55.07-129.51 87.17-74.44 32.1-159.35 32.1Zm0-91q133.04 0 225.09-92.04 92.04-92.05 92.04-225.09 0-133.04-92.04-225.09-92.05-92.04-225.09-92.04-133.04 0-225.09 92.04-92.04 92.05-92.04 225.09 0 133.04 92.04 225.09 92.05 92.04 225.09 92.04ZM480-480Z"/>
|
||||
</svg>
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export const WarningIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor">
|
||||
<path d="M80-78q-15 0-27-8t-19-19q-7-11-7.5-25t7.5-28l400-689q8-14 20-20t26-6q14 0 26 6t20 20l400 689q8 14 7.5 28t-7.5 25q-7 11-19 19t-27 8H80Zm401-135q22 0 37.5-15.5T534-266q0-22-15.5-37.5T481-319q-22 0-37.5 15.5T428-266q0 22 15.5 37.5T481-213Zm0-143q22 0 37.5-15.5T534-409v-98q0-22-15.5-37.5T481-560q-22 0-37.5 15.5T428-507v98q0 22 15.5 37.5T481-356Z"/>
|
||||
</svg>
|
||||
);
|
||||
})
|
||||
@@ -1,8 +1,7 @@
|
||||
import { motion } from "framer-motion";
|
||||
import { ChangeEvent, useEffect, useState } from "react";
|
||||
import { ChangeEvent, useEffect, useMemo, useState } from "react";
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import { useObservable } from "renderer/hooks/use-observable.hook";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { useTranslationV2 } from "renderer/hooks/use-translation.hook";
|
||||
import { BSLauncherService, LaunchMods } from "renderer/services/bs-launcher.service";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
@@ -14,15 +13,21 @@ import { BsStore } from "shared/models/bs-store.enum";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { BsDownloaderService } from "renderer/services/bs-version-download/bs-downloader.service";
|
||||
import equal from "fast-deep-equal";
|
||||
import { BSVersionManagerService } from "renderer/services/bs-version-manager.service";
|
||||
import { safeLt } from "shared/helpers/semver.helpers";
|
||||
import { WarningIcon } from "renderer/components/svgs/icons/warning-icon.component";
|
||||
import Tippy from "@tippyjs/react";
|
||||
import { motion } from "framer-motion"
|
||||
|
||||
type Props = { version: BSVersion };
|
||||
|
||||
export function LaunchSlide({ version }: Props) {
|
||||
const t = useTranslation();
|
||||
const { text: t, element: te } = useTranslationV2();
|
||||
|
||||
const configService = useService(ConfigurationService);
|
||||
const bsLauncherService = useService(BSLauncherService);
|
||||
const bsDownloader = useService(BsDownloaderService);
|
||||
const versions = useService(BSVersionManagerService);
|
||||
|
||||
const [oculusMode, setOculusMode] = useState(!!configService.get<boolean>(LaunchMods.OCULUS_MOD));
|
||||
const [desktopMode, setDesktopMode] = useState(!!configService.get<boolean>(LaunchMods.DESKTOP_MOD));
|
||||
@@ -62,7 +67,7 @@ export function LaunchSlide({ version }: Props) {
|
||||
.map(arg => arg.trim())
|
||||
.filter(arg => arg.length > 0)
|
||||
: undefined;
|
||||
|
||||
|
||||
const launch$ = bsLauncherService.launch({
|
||||
version,
|
||||
oculus: version.oculus ? false : oculusMode,
|
||||
@@ -70,15 +75,28 @@ export function LaunchSlide({ version }: Props) {
|
||||
debug: debugMode,
|
||||
additionalArgs
|
||||
});
|
||||
|
||||
|
||||
return lastValueFrom(launch$).catch(() => {});
|
||||
};
|
||||
|
||||
const isOutdated = useMemo(() => {
|
||||
return safeLt(version?.BSVersion, versions.getRecommendedVersion()?.BSVersion);
|
||||
}, [version]);
|
||||
|
||||
return (
|
||||
<div className="w-full shrink-0 items-center relative flex flex-col justify-start">
|
||||
<div className="flex flex-col gap-3 justify-center items-center mb-5">
|
||||
<BsmImage className="relative object-cover h-28" image={BSLogo} />
|
||||
<h1 className="relative text-4xl font-bold italic -top-3">{version.name ? `${version.BSVersion} - ${version.name}` : version.BSVersion}</h1>
|
||||
<h1 className="relative text-4xl font-bold italic -top-3">
|
||||
{version.name ? `${version.BSVersion} - ${version.name}` : version.BSVersion}
|
||||
{isOutdated && (
|
||||
<Tippy theme="default" content={te("pages.version-viewer.launch-mods.outdated-tippy", { recommendedVersion: <b>{versions.getRecommendedVersion().BSVersion}</b> })}>
|
||||
<span className="absolute bg-theme-1 size-7 rounded-full p-1.5 flex justify-center items-center -right-2 top-2 translate-x-full translate-y-px cursor-help">
|
||||
<WarningIcon className="text-warning-400 animate-pulse"/>
|
||||
</span>
|
||||
</Tippy>
|
||||
)}
|
||||
</h1>
|
||||
</div>
|
||||
<div className="grid grid-flow-col gap-6">
|
||||
{!(version.oculus || version.metadata?.store === BsStore.OCULUS) && <LaunchModToogle infoText="pages.version-viewer.launch-mods.oculus-description" icon="oculus" onClick={() => setMode(LaunchMods.OCULUS_MOD, !oculusMode)} active={oculusMode} text="pages.version-viewer.launch-mods.oculus" />}
|
||||
@@ -100,10 +118,10 @@ export function LaunchSlide({ version }: Props) {
|
||||
</motion.div>
|
||||
</div>
|
||||
<div className='grow flex justify-center items-center'>
|
||||
<BsmButton
|
||||
onClick={launch}
|
||||
<BsmButton
|
||||
onClick={launch}
|
||||
active={JSON.stringify(version) === JSON.stringify(versionRunning)}
|
||||
className='relative -translate-y-1/2 text-5xl text-gray-800 dark:text-gray-200 font-bold tracking-wide pt-1 pb-3 px-7 rounded-lg shadow-md italic shadow-black active:scale-90 transition-transform'
|
||||
className='relative -translate-y-1/2 text-5xl text-gray-800 dark:text-gray-200 font-bold tracking-wide pt-1 pb-3 px-7 rounded-lg shadow-md italic shadow-black active:scale-90 transition-transform'
|
||||
text="misc.launch"
|
||||
disabled={equal(version, versionDownloading)}
|
||||
/>
|
||||
@@ -111,3 +129,5 @@ export function LaunchSlide({ version }: Props) {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { CSSProperties, useRef } from "react";
|
||||
import { useThemeColor } from "renderer/hooks/use-theme-color.hook";
|
||||
import { BsModsManagerService } from "renderer/services/bs-mods-manager.service";
|
||||
@@ -9,8 +8,9 @@ import { PageStateService } from "renderer/services/page-state.service";
|
||||
import useDoubleClick from "use-double-click";
|
||||
import { gt } from "semver";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
import { BbmCategories, BbmFullMod } from "shared/models/mods/mod.interface";
|
||||
|
||||
type Props = { className?: string; mod: Mod; installedVersion: string; isDependency?: boolean; isSelected?: boolean; onChange?: (val: boolean) => void; wantInfo?: boolean; onWantInfo?: (mod: Mod) => void };
|
||||
type Props = { className?: string; mod: BbmFullMod; installedVersion: string; isDependency?: boolean; isSelected?: boolean; onChange?: (val: boolean) => void; wantInfo?: boolean; onWantInfo?: (mod: BbmFullMod) => void };
|
||||
|
||||
export function ModItem({ className, mod, installedVersion, isDependency, isSelected, onChange, wantInfo, onWantInfo }: Props) {
|
||||
const modsManager = useService(BsModsManagerService);
|
||||
@@ -28,7 +28,7 @@ export function ModItem({ className, mod, installedVersion, isDependency, isSele
|
||||
});
|
||||
|
||||
const wantInfoStyle: CSSProperties = wantInfo ? { borderColor: themeColor } : { borderColor: "transparent" };
|
||||
const isOutDated = installedVersion ? gt(mod.version, installedVersion) : false;
|
||||
const isOutDated = installedVersion ? gt(mod.version.modVersion, installedVersion) : false;
|
||||
|
||||
const uninstall = () => {
|
||||
modsManager.uninstallMod(mod, pageState.getState());
|
||||
@@ -43,24 +43,24 @@ export function ModItem({ className, mod, installedVersion, isDependency, isSele
|
||||
onChange(!isChecked);
|
||||
};
|
||||
|
||||
const isChecked = isDependency || isSelected || mod.required;
|
||||
const isChecked = isDependency || isSelected || mod.mod.category === BbmCategories.Core;
|
||||
|
||||
return (
|
||||
<li ref={clickRef} className={`${className} group`}>
|
||||
<div className="h-full aspect-square flex items-center justify-center p-[7px] rounded-l-md bg-inherit ml-3 border-2 border-r-0 z-[1] group-hover:brightness-90" style={wantInfoStyle}>
|
||||
<BsmCheckbox className="h-full aspect-square z-[1] relative bg-inherit" onChange={onChange} disabled={mod.required || isDependency} checked={isChecked} />
|
||||
<BsmCheckbox className="h-full aspect-square z-[1] relative bg-inherit" onChange={onChange} disabled={mod.mod.category === BbmCategories.Core || isDependency} checked={isChecked} />
|
||||
</div>
|
||||
<span className="bg-inherit py-2 pl-3 font-bold text-sm whitespace-nowrap border-t-2 border-b-2 blur-none group-hover:brightness-90" style={wantInfoStyle}>
|
||||
{mod.name}
|
||||
{mod.mod.name}
|
||||
</span>
|
||||
<span className={`min-w-0 text-center bg-inherit py-2 px-1 text-sm border-t-2 border-b-2 group-hover:brightness-90 ${installedVersion && isOutDated && "text-red-400 line-through"} ${installedVersion && !isOutDated && "text-green-400"}`} style={wantInfoStyle}>
|
||||
{installedVersion || "-"}
|
||||
</span>
|
||||
<span className="min-w-0 text-center bg-inherit py-2 px-1 text-sm border-t-2 border-b-2 group-hover:brightness-90" style={wantInfoStyle}>
|
||||
{mod.version}
|
||||
{mod.version.modVersion}
|
||||
</span>
|
||||
<span title={mod.description} className="px-3 bg-inherit whitespace-nowrap text-ellipsis overflow-hidden py-2 text-sm border-t-2 border-b-2 group-hover:brightness-90" style={wantInfoStyle}>
|
||||
{mod.description}
|
||||
<span title={mod.mod.description} className="px-3 bg-inherit whitespace-nowrap text-ellipsis overflow-hidden py-2 text-sm border-t-2 border-b-2 group-hover:brightness-90" style={wantInfoStyle}>
|
||||
{mod.mod.summary}
|
||||
</span>
|
||||
<div className="h-full bg-inherit flex items-center justify-center mr-3 rounded-r-md pr-2 border-t-2 border-b-2 border-r-2 group-hover:brightness-90" style={wantInfoStyle}>
|
||||
{installedVersion && (
|
||||
|
||||
@@ -5,14 +5,22 @@ import { BsmDropdownButton } from "renderer/components/shared/bsm-dropdown-butto
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { BsModsManagerService } from "renderer/services/bs-mods-manager.service";
|
||||
import { PageStateService } from "renderer/services/page-state.service";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { BbmCategories, BbmFullMod } from "shared/models/mods/mod.interface";
|
||||
import { ModItem } from "./mod-item.component";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
|
||||
type Props = { modsMap: Map<string, Mod[]>; installed: Map<string, Mod[]>; modsSelected: Mod[]; onModChange: (selected: boolean, mod: Mod) => void; moreInfoMod?: Mod; onWantInfos: (mod: Mod) => void };
|
||||
type Props = {
|
||||
modsMap: Map<BbmCategories, BbmFullMod[]>;
|
||||
installed: Map<BbmCategories, BbmFullMod[]>;
|
||||
modsSelected: BbmFullMod[];
|
||||
onModChange: (selected: boolean, mod: BbmFullMod) => void;
|
||||
moreInfoMod?: BbmFullMod;
|
||||
onWantInfos: (mod: BbmFullMod) => void
|
||||
unselectAllMods?: () => void;
|
||||
};
|
||||
|
||||
export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreInfoMod, onWantInfos, unselectAllMods }: Props) {
|
||||
|
||||
export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreInfoMod, onWantInfos }: Props) {
|
||||
|
||||
const pageState = useService(PageStateService);
|
||||
const modsManager = useService(BsModsManagerService);
|
||||
|
||||
@@ -20,32 +28,29 @@ export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreIn
|
||||
const [filterEnabled, setFilterEnabled] = useState(false);
|
||||
const t = useTranslation();
|
||||
|
||||
const installedModVersion = (key: string, mod: Mod): string => {
|
||||
const installedModVersion = (key: BbmCategories, mod: BbmFullMod): string => {
|
||||
if (!installed?.get(key)) {
|
||||
return undefined;
|
||||
}
|
||||
const installedMod = installed.get(key).find(m => m.name === mod.name);
|
||||
const installedMod = installed.get(key).find(m => m.mod.id === mod.mod.id);
|
||||
if (!installedMod) {
|
||||
return undefined;
|
||||
}
|
||||
return installedMod.version;
|
||||
return installedMod.version.modVersion;
|
||||
};
|
||||
|
||||
const isDependency = (mod: Mod): boolean => {
|
||||
return modsSelected.some(m => {
|
||||
const deps = m.dependencies.map(dep =>
|
||||
Array.from(modsMap.values())
|
||||
.flat()
|
||||
.find(m => dep.name === m.name)
|
||||
);
|
||||
if (deps.some(depMod => depMod.name === mod.name)) {
|
||||
return true;
|
||||
}
|
||||
return deps.some(depMod => depMod.dependencies.some(depModDep => depModDep.name === mod.name));
|
||||
});
|
||||
const getAvailableMods = (): BbmFullMod[] => {
|
||||
return Array.from(modsMap.values()).flat();
|
||||
}
|
||||
|
||||
const isDependency = (mod: BbmFullMod): boolean => {
|
||||
const selectedModsDepsIds = modsSelected.flatMap(m => m.version.dependencies);
|
||||
const modsDeps = getAvailableMods().filter(m => selectedModsDepsIds.includes(m.version.id));
|
||||
const modsDepsDepsIds = modsDeps.flatMap(m => m.version.dependencies);
|
||||
return selectedModsDepsIds.includes(mod.version.id) || modsDepsDepsIds.includes(mod.version.id);
|
||||
};
|
||||
|
||||
const isSelected = (mod: Mod): boolean => modsSelected.some(m => m.name === mod.name);
|
||||
const isSelected = (mod: BbmFullMod): boolean => modsSelected.some(m => m.mod.id === mod.mod.id);
|
||||
|
||||
const handleInput = (val: string) => setFilter(val.toLowerCase());
|
||||
|
||||
@@ -65,20 +70,23 @@ export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreIn
|
||||
<span className="z-10 sticky flex items-center justify-end top-0 bg-inherit border-b-2 border-main-color-1">
|
||||
<BsmButton className="rounded-full h-6 w-6 p-[2px]" withBar={false} icon="search" onClick={handleToogleFilter} />
|
||||
</span>
|
||||
<span className="z-10 sticky top-0 flex items-center bg-inherit border-main-color-1 border-b-2 h-8 px-1 whitespace-nowrap">{filterEnabled ? <motion.input autoFocus className="bg-main-color-1 rounded-md h-6 px-2" initial={{ width: 0 }} animate={{ width: "250px" }} transition={{ ease: "easeInOut", duration: 0.15 }} onChange={e => handleInput(e.target.value)} /> : <span className="w-full text-center">{t("pages.version-viewer.mods.mods-grid.header-bar.name")}</span>}</span>
|
||||
<span className="z-10 sticky top-0 flex items-center bg-inherit border-main-color-1 border-b-2 h-8 px-1 whitespace-nowrap">{filterEnabled ? <motion.input autoFocus className="bg-light-main-color-1 dark:bg-main-color-1 rounded-md h-6 px-2" initial={{ width: 0 }} animate={{ width: "250px" }} transition={{ ease: "easeInOut", duration: 0.15 }} onChange={e => handleInput(e.target.value)} /> : <span className="w-full text-center">{t("pages.version-viewer.mods.mods-grid.header-bar.name")}</span>}</span>
|
||||
<span className="z-10 sticky flex items-center justify-center top-0 bg-inherit border-b-2 border-main-color-1 h-8 px-2 whitespace-nowrap">{t("pages.version-viewer.mods.mods-grid.header-bar.installed")}</span>
|
||||
<span className="z-10 sticky flex items-center justify-center top-0 bg-inherit border-b-2 border-main-color-1 h-8 px-2 whitespace-nowrap">{t("pages.version-viewer.mods.mods-grid.header-bar.latest")}</span>
|
||||
<span className="z-10 sticky flex items-center justify-center top-0 bg-inherit border-b-2 border-main-color-1 h-8 whitespace-nowrap">{t("pages.version-viewer.mods.mods-grid.header-bar.description")}</span>
|
||||
<span className="z-10 sticky top-0 bg-inherit border-b-2 border-main-color-1 h-8 flex justify-start items-center py-1 pl-[3px] min-w-[50px]">
|
||||
<BsmDropdownButton className="h-full aspect-square relative rounded-full bg-light-main-color-1 dark:bg-main-color-3" withBar={false} icon="three-dots" buttonClassName="!rounded-full !p-[2px] !bg-light-main-color-2 dark:!bg-main-color-2 hover:!bg-light-main-color-1 dark:hover:!bg-main-color-3" menuTranslationY="5px" items={[{ text: "pages.version-viewer.mods.mods-grid.header-bar.dropdown.uninstall-all", icon: "trash", onClick: handleUninstallAll }]} />
|
||||
<BsmDropdownButton className="h-full aspect-square relative rounded-full bg-light-main-color-1 dark:bg-main-color-3" withBar={false} icon="three-dots" buttonClassName="!rounded-full !p-[2px] !bg-light-main-color-2 dark:!bg-main-color-2 hover:!bg-light-main-color-1 dark:hover:!bg-main-color-3" menuTranslationY="5px" items={[
|
||||
{ text: "pages.version-viewer.mods.mods-grid.header-bar.dropdown.unselect-all", icon: "cancel", onClick: () => unselectAllMods?.() },
|
||||
{ text: "pages.version-viewer.mods.mods-grid.header-bar.dropdown.uninstall-all", icon: "trash", onClick: () => handleUninstallAll?.() }
|
||||
]} />
|
||||
</span>
|
||||
|
||||
{Array.from(modsMap.keys()).map(
|
||||
key =>
|
||||
modsMap.get(key).some(mod => mod.name.toLowerCase().includes(filter)) && (
|
||||
modsMap.get(key).some(mod => mod.mod.name.toLowerCase().includes(filter)) && (
|
||||
<ul key={key} className="contents">
|
||||
<h2 className="col-span-full py-1 font-bold pl-3">{key}</h2>
|
||||
{modsMap.get(key).map(mod => mod.name.toLowerCase().includes(filter) && <ModItem key={mod.name} className="contents bg-light-main-color-3 dark:bg-main-color-1 text-main-color-1 dark:text-light-main-color-1 hover:cursor-pointer" mod={mod} installedVersion={installedModVersion(key, mod)} isDependency={isDependency(mod)} isSelected={isSelected(mod)} onChange={val => onModChange(val, mod)} onWantInfo={onWantInfos} wantInfo={mod.name === moreInfoMod?.name} />)}
|
||||
<h2 className="col-span-full py-1 font-bold pl-3 capitalize">{key}</h2>
|
||||
{modsMap.get(key).map(mod => mod.mod.name.toLowerCase().includes(filter) && <ModItem key={mod.mod.id} className="contents bg-light-main-color-3 dark:bg-main-color-1 text-main-color-1 dark:text-light-main-color-1 hover:cursor-pointer" mod={mod} installedVersion={installedModVersion(key, mod)} isDependency={isDependency(mod)} isSelected={isSelected(mod)} onChange={val => onModChange(val, mod)} onWantInfo={onWantInfos} wantInfo={mod.mod.id === moreInfoMod?.mod.id} />)}
|
||||
</ul>
|
||||
)
|
||||
)}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
||||
import { BsModsManagerService } from "renderer/services/bs-mods-manager.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { BbmCategories, BbmFullMod } from "shared/models/mods/mod.interface";
|
||||
import { ModsGrid } from "./mods-grid.component";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { DefaultConfigKey } from "renderer/config/default-configuration.config";
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component";
|
||||
import BeatWaitingImg from "../../../../../../assets/images/apngs/beat-waiting.png";
|
||||
import BeatConflictImg from "../../../../../../assets/images/apngs/beat-conflict.png";
|
||||
@@ -31,49 +30,46 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
|
||||
|
||||
const ref = useRef(null);
|
||||
const isVisible = useInView(ref, { amount: 0.5 });
|
||||
const [modsAvailable, setModsAvailable] = useState(null as Map<string, Mod[]>);
|
||||
const [modsInstalled, setModsInstalled] = useState(null as Map<string, Mod[]>);
|
||||
const [modsSelected, setModsSelected] = useState([] as Mod[]);
|
||||
const [moreInfoMod, setMoreInfoMod] = useState(null as Mod);
|
||||
const [modsAvailable, setModsAvailable] = useState(null as Map<BbmCategories, BbmFullMod[]>);
|
||||
const [modsInstalled, setModsInstalled] = useState(null as Map<BbmCategories, BbmFullMod[]>);
|
||||
const [modsSelected, setModsSelected] = useState([] as BbmFullMod[]);
|
||||
const [moreInfoMod, setMoreInfoMod] = useState(null as BbmFullMod);
|
||||
const isOnline = useObservable(() => os.isOnline$);
|
||||
const installing = useObservable(() => modsManager.isInstalling$);
|
||||
|
||||
const downloadRef = useRef(null);
|
||||
const [downloadWith, setDownloadWidth] = useState(0);
|
||||
|
||||
const modsToCategoryMap = (mods: Mod[]): Map<string, Mod[]> => {
|
||||
const modsToCategoryMap = (mods: BbmFullMod[]): Map<BbmCategories, BbmFullMod[]> => {
|
||||
if (!mods) {
|
||||
return new Map<string, Mod[]>();
|
||||
return new Map<BbmCategories, BbmFullMod[]>();
|
||||
}
|
||||
const map = new Map<string, Mod[]>();
|
||||
mods.forEach(mod => map.set(mod.category, [...(map.get(mod.category) ?? []), mod]));
|
||||
const map = new Map<BbmCategories, BbmFullMod[]>();
|
||||
mods.forEach(mod => map.set(mod.mod.category, [...(map.get(mod.mod.category) ?? []), mod]));
|
||||
return map;
|
||||
};
|
||||
|
||||
const handleModChange = (selected: boolean, mod: Mod) => {
|
||||
const handleModChange = (selected: boolean, mod: BbmFullMod) => {
|
||||
if (selected) {
|
||||
return setModsSelected([...modsSelected, mod]);
|
||||
}
|
||||
const mods = [...modsSelected];
|
||||
mods.splice(
|
||||
mods.findIndex(m => m.name === mod.name),
|
||||
1
|
||||
);
|
||||
mods.splice(mods.findIndex(m => m.mod.id === mod.mod.id), 1);
|
||||
setModsSelected(mods);
|
||||
};
|
||||
|
||||
const handleMoreInfo = (mod: Mod) => {
|
||||
if (mod.name === moreInfoMod?.name) {
|
||||
const handleMoreInfo = (mod: BbmFullMod) => {
|
||||
if (mod.mod.id === moreInfoMod?.mod.id) {
|
||||
return setMoreInfoMod(null);
|
||||
}
|
||||
setMoreInfoMod(mod);
|
||||
};
|
||||
|
||||
const handleOpenMoreInfo = () => {
|
||||
if (!moreInfoMod?.link) {
|
||||
if (!moreInfoMod?.mod?.gitUrl) {
|
||||
return;
|
||||
}
|
||||
linkOpener.open(moreInfoMod.link);
|
||||
linkOpener.open(moreInfoMod.mod.gitUrl);
|
||||
};
|
||||
|
||||
const installMods = () => {
|
||||
@@ -81,14 +77,14 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
|
||||
return;
|
||||
}
|
||||
const modsToInstall = modsSelected.filter(mod => {
|
||||
const corespondingMod = modsAvailable.get(mod.category).find(availabeMod => availabeMod._id === mod._id);
|
||||
const installedMod = modsInstalled.get(mod.category)?.find(installedMod => installedMod.name === mod.name);
|
||||
const corespondingMod = modsAvailable.get(mod.mod.category).find(availabeMod => availabeMod.mod.id === mod.mod.id);
|
||||
const installedMod = modsInstalled.get(mod.mod.category)?.find(installedMod => installedMod.mod.id === mod.mod.id);
|
||||
|
||||
if (corespondingMod?.version && lt(corespondingMod.version, mod.version)) {
|
||||
if (corespondingMod?.version && lt(corespondingMod.version.modVersion, mod.version.modVersion)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(installedMod?.version && lt(mod.version, installedMod?.version)){
|
||||
if(installedMod?.version && lt(mod.version.modVersion, installedMod?.version.modVersion)){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -109,18 +105,26 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
|
||||
lastValueFrom(modsManager.getAvailableMods(version)),
|
||||
lastValueFrom(modsManager.getInstalledMods(version))
|
||||
]).then(([available, installed]) => {
|
||||
const defaultMods = configService.get<string[]>("default_mods" as DefaultConfigKey);
|
||||
const defaultMods = installed?.length ? [] : available.filter(m => m.mod.category === BbmCategories.Core || m.mod.category === BbmCategories.Essential);
|
||||
setModsAvailable(modsToCategoryMap(available));
|
||||
setModsSelected(available.filter(m => m.required || defaultMods.some(d => m.name.toLowerCase() === d.toLowerCase()) || installed.some(i => m.name === i.name)));
|
||||
setModsInstalled(modsToCategoryMap(installed));
|
||||
const installedMods: BbmFullMod[] = installed.map(version => {
|
||||
const mod = available.find(m => m.mod.id === version.modId);
|
||||
return mod ? { ...mod, version } : null;
|
||||
});
|
||||
setModsSelected(available.filter(m => m.mod.category === BbmCategories.Core || defaultMods.some(d => m.mod.name.toLowerCase() === d.mod.name.toLowerCase()) || installedMods.some(i => m.mod.id === i.mod.id)));
|
||||
setModsInstalled(modsToCategoryMap(installedMods));
|
||||
});
|
||||
};
|
||||
|
||||
const unselectAllMods = () => {
|
||||
setModsSelected(() => []);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const subs: Subscription[] = [];
|
||||
|
||||
if (isVisible && isOnline) {
|
||||
|
||||
|
||||
(async () => {
|
||||
if (configService.get<boolean>(ACCEPTED_DISCLAIMER_KEY)) {
|
||||
return true;
|
||||
@@ -138,7 +142,7 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
|
||||
if (!canLoad) {
|
||||
return onDisclamerDecline?.();
|
||||
}
|
||||
|
||||
|
||||
loadMods();
|
||||
|
||||
subs.push(
|
||||
@@ -181,7 +185,7 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
|
||||
return (
|
||||
<>
|
||||
<div className="grow overflow-scroll w-full min-h-0 scrollbar-thin scrollbar-thumb-neutral-900 scrollbar-thumb-rounded-full">
|
||||
<ModsGrid modsMap={modsAvailable} installed={modsInstalled} modsSelected={modsSelected} onModChange={handleModChange} moreInfoMod={moreInfoMod} onWantInfos={handleMoreInfo} />
|
||||
<ModsGrid modsMap={modsAvailable} installed={modsInstalled} modsSelected={modsSelected} onModChange={handleModChange} moreInfoMod={moreInfoMod} onWantInfos={handleMoreInfo} unselectAllMods={unselectAllMods} />
|
||||
</div>
|
||||
<div className="h-10 shrink-0 flex items-center justify-between px-3">
|
||||
<BsmButton className="text-center rounded-md px-2 py-[2px]" text="pages.version-viewer.mods.buttons.more-infos" typeColor="cancel" withBar={false} disabled={!moreInfoMod} onClick={handleOpenMoreInfo} style={{ width: downloadWith }} />
|
||||
|
||||
@@ -4,14 +4,12 @@ export const defaultConfiguration: { [key in DefaultConfigKey]: any } = {
|
||||
theme: "os",
|
||||
language: window.navigator.language.length <= 2 ? `${window.navigator.language}-${window.navigator.language.toLocaleUpperCase()}` : window.navigator.language,
|
||||
supported_languages: ["en-US", "en-EN", "fr-FR", "es-ES", "de-DE", "ru-RU", "zh-CN", "zh-TW", "ja-JP"],
|
||||
default_mods: ["SongCore", "WhyIsThereNoLeaderboard", "BeatSaverDownloader", "BeatSaverVoting", "PlaylistManager"],
|
||||
"default-shared-folders": [
|
||||
window.electron.path.join("Beat Saber_Data", "CustomLevels"),
|
||||
window.electron.path.join("Beat Saber_Data", "CustomWIPLevels"),
|
||||
"DLC"
|
||||
],
|
||||
]
|
||||
};
|
||||
|
||||
export type DefaultConfigKey = "first-color" | "second-color" | "theme" | "language" | "supported_languages" | "default_mods" | "default-shared-folders";
|
||||
export type DefaultConfigKey = "first-color" | "second-color" | "theme" | "language" | "supported_languages" | "default-shared-folders";
|
||||
|
||||
export type ThemeConfig = "dark" | "light" | "os";
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { I18nService } from "renderer/services/i18n.service";
|
||||
import { useService } from "./use-service.hook";
|
||||
import { useObservable } from "./use-observable.hook";
|
||||
import { useConstant } from "./use-constant.hook";
|
||||
import { createElement, Fragment } from "react";
|
||||
|
||||
/**
|
||||
* @deprecated Use useTranslationV2 instead
|
||||
*/
|
||||
export function useTranslation(): (translationKey: string, args?: Record<string, string>) => string {
|
||||
|
||||
const i18nService = useService(I18nService);
|
||||
@@ -16,3 +21,35 @@ export function useTranslation(): (translationKey: string, args?: Record<string,
|
||||
return tranlatables.map(key => i18nService.translate(key, args)).join(" ");
|
||||
};
|
||||
}
|
||||
|
||||
type TranslateFunctions = {
|
||||
text: (translationKey: string, args?: Record<string, string>) => string;
|
||||
element: (translationKey: string, args?: Record<string, JSX.Element>) => JSX.Element;
|
||||
}
|
||||
|
||||
export function useTranslationV2(): TranslateFunctions {
|
||||
|
||||
const i18nService = useService(I18nService);
|
||||
|
||||
useObservable(() => i18nService.currentLanguage$);
|
||||
|
||||
const text = useConstant(() => {
|
||||
return (key: string, args?: Record<string, string>) => {
|
||||
if (!key) {
|
||||
return key;
|
||||
}
|
||||
return i18nService.translate(key, args);
|
||||
};
|
||||
});
|
||||
|
||||
const element = useConstant(() => {
|
||||
return (key: string, args?: Record<string, JSX.Element>) => {
|
||||
if (!key) {
|
||||
return createElement(Fragment, null, key);
|
||||
}
|
||||
return i18nService.translateElement(key, args);
|
||||
};
|
||||
});
|
||||
|
||||
return { text, element };
|
||||
}
|
||||
|
||||
@@ -96,6 +96,13 @@
|
||||
@apply border-r-neutral-900
|
||||
}
|
||||
|
||||
.bg-theme-1 { @apply bg-light-main-color-1 dark:bg-main-color-1; }
|
||||
.bg-theme-2 { @apply bg-light-main-color-2 dark:bg-main-color-2; }
|
||||
.bg-theme-3 { @apply bg-light-main-color-3 dark:bg-main-color-3; }
|
||||
.\!bg-theme-1 { @apply !bg-light-main-color-1 dark:!bg-main-color-1; }
|
||||
.\!bg-theme-2 { @apply !bg-light-main-color-2 dark:!bg-main-color-2; }
|
||||
.\!bg-theme-3 { @apply !bg-light-main-color-3 dark:!bg-main-color-3; }
|
||||
|
||||
@keyframes glowing {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
|
||||
@@ -62,4 +62,12 @@ export function logRenderError(...params: unknown[]){
|
||||
ipc.sendLazy("log-error", { args: params });
|
||||
}
|
||||
|
||||
export function addFilterStringLog(str: string){
|
||||
ipc.sendLazy("add-filter-string", { args: str });
|
||||
}
|
||||
|
||||
export function addFilterPatternLog(pattern: string){
|
||||
ipc.sendLazy("add-filter-pattern", { args: pattern });
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ import { useService } from "renderer/hooks/use-service.hook";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { useObservable } from "renderer/hooks/use-observable.hook";
|
||||
import { BsDownloaderService } from "renderer/services/bs-version-download/bs-downloader.service";
|
||||
import { logRenderError } from "renderer";
|
||||
import { ModalExitCode, ModalService } from "renderer/services/modale.service";
|
||||
import { BSVersionOutdatedModal } from "renderer/components/modal/modal-types/bs-version-outdated-modal.component";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { safeLt } from "shared/helpers/semver.helpers";
|
||||
|
||||
export const AvailableVersionsContext = createContext<{ selectedVersion: BSVersion; setSelectedVersion: (version: BSVersion) => void }>(null);
|
||||
|
||||
@@ -18,6 +23,8 @@ export function AvailableVersionsList() {
|
||||
|
||||
const bsDownloader = useService(BsDownloaderService);
|
||||
const versionManager = useService(BSVersionManagerService);
|
||||
const modals = useService(ModalService);
|
||||
const config = useService(ConfigurationService);
|
||||
|
||||
const [selectedVersion, setSelectedVersion] = useState<BSVersion>(null);
|
||||
const contextValue = useMemo(() => ({ selectedVersion, setSelectedVersion }), [selectedVersion]);
|
||||
@@ -25,10 +32,23 @@ export function AvailableVersionsList() {
|
||||
const downloading = useObservable(() => bsDownloader.downloadingVersion$.pipe(map(v => !!v)));
|
||||
const t = useTranslation();
|
||||
|
||||
const startDownload = async () => {
|
||||
const startDownload = async (version: BSVersion) => {
|
||||
const showOutdated = !config.get("not-show-bs-version-outdated-modal");
|
||||
const recommendedVersion = versionManager.getRecommendedVersion();
|
||||
|
||||
return bsDownloader.downloadVersion(selectedVersion)
|
||||
.catch(console.log)
|
||||
const isVersionOutdated = safeLt(version.BSVersion, recommendedVersion?.BSVersion);
|
||||
|
||||
if (showOutdated && isVersionOutdated) {
|
||||
|
||||
const res = await modals.openModal(BSVersionOutdatedModal, { outdated: version, recommended: recommendedVersion });
|
||||
|
||||
if (res.exitCode !== ModalExitCode.COMPLETED) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return bsDownloader.downloadVersion(version)
|
||||
.catch(logRenderError)
|
||||
.finally(() => setSelectedVersion(null));
|
||||
};
|
||||
|
||||
@@ -45,17 +65,17 @@ export function AvailableVersionsList() {
|
||||
|
||||
return (
|
||||
<div className="relative h-full w-full flex items-center flex-col pt-2">
|
||||
|
||||
|
||||
<Slideshow className="absolute w-full h-full top-0" />
|
||||
<h1 className="text-gray-100 text-2xl mb-4 z-[1]">{t("pages.available-versions.title")}</h1>
|
||||
|
||||
<AvailableVersionsContext.Provider value={contextValue}>
|
||||
<AvailableVersionsSlider />
|
||||
</AvailableVersionsContext.Provider>
|
||||
|
||||
|
||||
<AnimatePresence>
|
||||
{selectedVersion && !downloading && (
|
||||
<motion.div initial={{ y: "150%" }} animate={{ y: "0%" }} exit={{ y: "150%" }} className="absolute bottom-5" onClick={startDownload}>
|
||||
<motion.div initial={{ y: "150%" }} animate={{ y: "0%" }} exit={{ y: "150%" }} className="absolute bottom-5" onClick={() => startDownload(selectedVersion)}>
|
||||
<BsmButton text="misc.download" className="relative text-gray-800 dark:text-gray-100 rounded-md text-3xl font-bold italic tracking-wide px-3 pb-2 pt-1 shadow-md shadow-black" />
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user