Compare commits

..

358 Commits

Author SHA1 Message Date
MathieuG-P 17e96996bb update to 1.5.0-alpha.6 2024-12-08 18:27:31 +01:00
MathieuG-P cfae1d9516 Merge pull request #569 from silentrald/feat/76
[feat-76] support drag and drop of mod files (zip/dll files only)
2024-12-08 18:22:46 +01:00
MathieuG-P c3a1a613ff [feat-76] use "findEntry" instead of a for await loop 2024-12-08 18:17:49 +01:00
silentrald aec9dd0628 [feat-76] fixed issue where copying dll files to non-existent folder path 2024-12-08 23:58:44 +08:00
silentrald c978d4689e [feat-76] added drag n drop in mods slide dropdown 2024-12-08 23:33:44 +08:00
silentrald 431494da94 [feat-76] added translations 2024-12-08 21:44:07 +08:00
silentrald a9cc281d27 [feat-76] support drag and drop for mod files 2024-12-08 21:44:06 +08:00
MathieuG-P f73b1cd855 Merge pull request #681 from silentrald/bugfix/nixos
[bugfix] fixed issues with NixOS
2024-12-08 14:29:54 +01:00
MathieuG-P 8e9eccd7c5 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2024-12-06 22:16:08 +01:00
MathieuG-P 8dc7d89057 Add patreon 2024-12-06 22:16:06 +01:00
MathieuG-P 40a537b967 Merge pull request #682 from silentrald/wiki/linux-alpha
[wiki] updated linux guide to say latest alpha until 1.5.0 is released
2024-12-06 22:05:38 +01:00
MathieuG-P 291cb0c254 No need to scroll down 2024-12-06 21:56:44 +01:00
MathieuG-P b42a944293 fix broken image 2024-12-06 21:55:11 +01:00
MathieuG-P 0e25184764 update oculus token guide 2024-12-06 21:52:16 +01:00
silentrald 0c53679f2c [wiki] updated linux guide to say latest alpha until 1.5.0 is released 2024-12-06 08:32:21 +08:00
silentrald 8771ac2adc [bugfix-681] addressed linting and sonarqube issues 2024-12-05 21:29:25 +08:00
silentrald c2e77f2520 [bugfix] use static config when install files are readonly like NixOS & flatpak 2024-12-05 21:04:11 +08:00
silentrald b32d07d2d6 [bugfix] added special handling for NixOS 2024-12-05 20:51:32 +08:00
silentrald 78fb06fc63 [bugfix] fix issue with reading processes in os.helpers.ts in linux 2024-12-05 20:51:22 +08:00
MathieuG-P 127a538509 Merge pull request #679 from beatmaps-io/signed-playlists
Pass query parameters to playlist downloader
2024-12-02 19:57:52 +01:00
Thomas Cheyney 043e300f42 Pass query parameters to playlist downloader 2024-12-02 18:17:56 +00:00
MathieuG-P 6e3d8852de update certificate sha 2024-12-01 19:59:12 +01:00
MathieuG-P e2c2aa7a84 update to 1.5.0-alpha.5 2024-12-01 19:53:33 +01:00
MathieuG-P 2a0de5f2ad update to 1.5.0-alpha.5 2024-12-01 19:52:55 +01:00
MathieuG-P 214f0494c1 Merge pull request #677 from Zagrios/bugfix/error-when-verifying-bs-files
[bugfix] Fix DepotDownloader error when verifying bs files
2024-12-01 19:48:58 +01:00
MathieuG-P 19f2a57c37 [bugfix] Fix DepotDownloader error when verifying bs files 2024-12-01 19:43:14 +01:00
MathieuG-P 922bcf30b4 Build flatpak in the build action 2024-12-01 14:54:09 +01:00
MathieuG-P f31ade5754 Change the app id 2024-12-01 13:09:58 +01:00
MathieuG-P c8e4d8c359 Merge pull request #676 from Zagrios/bugfix/mod-dependencies-are-not-always-installed
[bugfix] Mod dependencies are not always installed
2024-12-01 12:38:37 +01:00
MathieuG-P fc44dcba65 [bugfix] Mod dependencies are not always installed 2024-12-01 12:33:09 +01:00
MathieuG-P b02311456f Add "--publish never" for the package script 2024-12-01 10:22:54 +01:00
MathieuG-P 5462c8821e Merge pull request #629 from silentrald/bugfix/627
[bugfix-627] build BSM with deb and flatpak for linux
2024-11-30 20:02:27 +01:00
silentrald 4afad63753 [chore-627] added electron-builder.config.js to release-linux.yaml 2024-11-29 05:23:19 +08:00
silentrald 438611f4ca [bugfix-627] added original Beat Saber location in flatpak permissions 2024-11-29 05:23:19 +08:00
silentrald 1fdf1f0247 [bugfix-627] fix bsmSpawn for launching game on windows 2024-11-29 05:23:12 +08:00
MathieuG-P 877879f335 Merge pull request #673 from Zagrios/chore/add-bs-version-outated-alert-in-version-view
[chore] added a beat saber version outdated warning in the version view
2024-11-24 21:33:15 +01:00
MathieuG-P 7b658de727 [chore] added a beat saber version outdated warning in the version view 2024-11-24 21:26:47 +01:00
MathieuG-P 229a149f00 Merge pull request #671 from Zagrios/bugfix/close-btn-supporters-view-wrong-color
[bugfix] Close button in the supporters view had the wrong color in the white theme
2024-11-22 22:57:53 +01:00
MathieuG-P be2597fc85 [bugfix] Close button in the supporters view had the wrong color in the white theme 2024-11-22 22:50:23 +01:00
MathieuG-P c8d888ee1a Merge pull request #669 from AltyFox/patch-2
That was a quick recommendation change.
2024-11-22 08:04:08 +01:00
Alteran 9033b1ef8f That was a quick recommendation change. 2024-11-21 23:08:35 -06:00
MathieuG-P 4a9f79c561 1.39.0 is the recommended version 2024-11-21 21:07:19 +01:00
silentrald 5721891e28 [chore-627] fixed actions with electron-builder 2024-11-22 00:57:31 +08:00
silentrald cba001dc97 [test-627] added test cases for os.helpers.ts 2024-11-22 00:57:31 +08:00
silentrald 38ea360ee6 [bugfix-627] support host calls for flatpak with spawn/exec
* created wrapper calls for spawn and exec for all os support
* refactored names for isProcessRunning, getProcessId, and isSteamRunning
2024-11-22 00:57:31 +08:00
silentrald 8096b3ec76 [chore-627] fix issue with chrome-sandbox permissions 2024-11-22 00:57:31 +08:00
MathieuG-P 8844e7cec3 [bugfix-627] Fix couldn't package and/or publish on windows 2024-11-22 00:57:31 +08:00
silentrald 403995612c [chore] added silentrald and Insprill in credits and linux installation in README file 2024-11-22 00:57:31 +08:00
silentrald 58656294df [bugfix-627] added finer permissions for flatpak
handled issue with write only directory with bs-versions.json
2024-11-22 00:57:31 +08:00
silentrald 84ea7a26b6 [bugfix-627] fixed issue with running the BS exe in flatpak
moved all launching logic to the LinuxService
2024-11-22 00:57:31 +08:00
silentrald 82a19c0c8b [docs-627] updated docs on review
- updated flatpak installation
- moved deb and AUR above flatpak so users with appropriate distros will install those first
- idiot-proofing on how to install flatpak on different distros
2024-11-22 00:57:31 +08:00
silentrald 15f8d83c8d [chore-627] drop rpm and pacman in favor of flatpak 2024-11-22 00:57:31 +08:00
silentrald 196bdc04f5 [docs-627] removed wine installation and updated proton setup 2024-11-22 00:57:31 +08:00
silentrald e6bdf56c6d [chore] move build config to electron-builder.ts for better typing 2024-11-22 00:57:31 +08:00
silentrald 7a85171cd3 [docs] added linux documentation 2024-11-22 00:57:31 +08:00
silentrald 38e0cc56d0 [chore] add write permissions to bs-versions.json after install 2024-11-22 00:57:31 +08:00
silentrald a345a3ee7c [bugfix-627] reverted #577 PR 2024-11-22 00:57:31 +08:00
silentrald cb121a9442 [chore] change target builds to deb, rpm, and pacman 2024-11-22 00:57:31 +08:00
MathieuG-P fd30709af9 Merge pull request #667 from Zagrios/bugfix/do-no-apply-no-yeet-on-original-copies-of-bs
[bugfix] Do not launch BS with the --no-yeet arg when launching original copies of BS (Steam/Oculus)
2024-11-20 20:54:02 +01:00
MathieuG-P c73bde2cd9 Merge pull request #666 from Zagrios/feature/add-unselect-all-mods-button
[feature] add "unselect all" action in mods panel
2024-11-20 20:49:50 +01:00
MathieuG-P 3027331924 [bugfix] Do not apply --no-yeet on original copies of BS (Steam/Oculus) 2024-11-20 20:49:23 +01:00
MathieuG-P 66bab1176b [feature] add unselect all action in mods panel 2024-11-20 20:11:31 +01:00
Iluhadesu 6c6d47333d Add v1.39.1 to bs-versions.json 2024-11-20 18:48:14 +00:00
MathieuG-P c9286c5419 Merge pull request #661 from beatmaps-io/master
Use correct beatsaver api url
2024-11-18 19:38:11 +01:00
MathieuG-P 39739dfb49 Merge pull request #662 from beatmaps-io/default-bsv-map-sort
Set default beat saver map sort order to Relevance
2024-11-18 19:32:56 +01:00
Thomas Cheyney 5d4f12f72f Set default sort order to Relevance 2024-11-18 16:31:51 +00:00
Thomas Cheyney 7b1defcb76 Use correct beatsaver api url 2024-11-18 16:13:42 +00:00
MathieuG-P f7f5f768fc Merge pull request #649 from silentrald/bugfix/non-standard-zip-extraction
[bugfix] handle extracting non-conformant zip files
2024-11-17 13:10:15 +01:00
MathieuG-P 9340f4635d [bugfix] renormalize 2024-11-17 12:57:07 +01:00
MathieuG-P 5aacb34ef4 [bugfix] all zips as binary 2024-11-17 12:54:21 +01:00
MathieuG-P 4ee3f472ec [bugfix] remove matchesGlob 2024-11-17 12:32:45 +01:00
MathieuG-P 59b7b9aedb [bugfix] some adjutments + some fixes + add zip tests 2024-11-17 12:20:50 +01:00
MathieuG-P e1f421831b Merge pull request #657 from LiamillionSS/bugfix/527
[bugfix/527] Prevents oculus version from launching if the original oculus version is not present
2024-11-17 09:14:53 +01:00
LiamillionSS 4f42b3ffcf [bugfix/527] better wording for user messages 2024-11-17 18:18:35 +11:00
MathieuG-P a4192ef411 Merge branch 'master' into bugfix/527 2024-11-16 20:17:28 +01:00
MathieuG-P 2744df6803 fix json error 2024-11-16 20:04:05 +01:00
MathieuG-P c4ee9ba155 Add patreon 2024-11-16 20:02:46 +01:00
MathieuG-P 5e981e5a20 Merge pull request #659 from izunya/master
[Transation] Correction of awkward Korean :D
2024-11-16 19:52:04 +01:00
MathieuG-P 578e79edac Merge pull request #660 from chk1/bugfix/658
[bugfix-658] Change background color of Mods search box for light mode
2024-11-16 19:48:54 +01:00
silentrald 07d94962c4 [chore] fixed sonarqube issues 2024-11-16 09:42:58 +08:00
Christoph Kisfeld 57cd955780 [bugfix-658] Change background color of Mods search box for light mode 2024-11-15 20:07:31 +01:00
izunya 1b33b29847 Fix korean 2024-11-16 03:42:26 +09:00
izunya f523e34867 Fix korean 2024-11-16 03:32:37 +09:00
LiamillionSS 5de1b7c3fb Updated Oculus must-be-installed-once msg 2024-11-15 09:43:25 +11:00
LiamillionSS 2f4bca108b [bugfix/527] Prevents a downloaded oculus version from launching the original oculus version is not present 2024-11-15 07:18:29 +11:00
silentrald bfb6d28a34 [bugfix] use YauzlZip class wrapper for extracting files
* fixed issue where yauzl just closes after reading all files
2024-11-14 14:24:45 +08:00
MathieuG-P 8c6f3b0aa8 [bugfix] Create YauzlZip class to manager zip extraction (not finished) 2024-11-14 00:52:52 +01:00
Iluhadesu 6bb90c580d Add v1.39.0 to bs-versions.json 2024-11-12 16:58:16 +00:00
MathieuG-P 4bf2da1065 Merge pull request #652 from LiamillionSS/bugfix/452
[bugfix-452] fix to "launch game when steam is not running" on linux
2024-11-12 15:40:29 +01:00
MathieuG-P e17b7f70fd Merge pull request #654 from Zagrios/chore/add-outdate-bs-version-warn-modal
[chore] Added a pre-download warning modal for outdated BS versions
2024-11-12 15:25:40 +01:00
MathieuG-P 99b5dcd527 [chore] Added a pre-download warning modal for outdated BS versions 2024-11-12 15:20:48 +01:00
MathieuG-P 6c39e5f43d Merge pull request #653 from Zagrios/chore/add-beatleader-icon-to-playlist-oneclickt-setting
[chore] Added beatleader icon to playlist oneclick setting + change tippys color
2024-11-11 14:06:38 +01:00
MathieuG-P 58788b0ebc Added beatleader icon to playlist oneclick setting + change tippys color 2024-11-11 13:58:42 +01:00
LiamillionSS db616c6bd7 [bugfix-452] PROCESS_NAME now uses steam-runtime-launcher-service on linux to avoid steamProcessRunning false positives 2024-11-10 19:20:46 +11:00
silentrald 0fd4d51898 [bugfix] fixed logic with folder extraction events 2024-11-10 15:36:03 +08:00
silentrald d0831f2e44 [bugfix] created a get files' buffer from zip helper 2024-11-10 11:23:13 +08:00
LiamillionSS c54d1491e6 [bugfix-452] fix to launch game when steam is not running on linux 2024-11-10 00:57:28 +11:00
silentrald dd08f418d5 [chore] removed jszip and node-stream-zip packages 2024-11-09 01:28:43 +08:00
silentrald 2b37972dd4 [bugfix] use yauzl for extracting map files for importing maps 2024-11-09 00:55:52 +08:00
silentrald 68559add5d [bugfix] use yauzl for extracting zips 2024-11-09 00:55:52 +08:00
MathieuG-P 7c6c6147a6 Merge pull request #647 from Zagrios/bugfix/fix-ip-family-issues
[bugfix] Fix ipv4/ipv6 issues
2024-11-07 20:32:36 +01:00
MathieuG-P 0a1b1752f0 [bugfix] implement rety strategie for ip families 2024-11-07 20:24:48 +01:00
MathieuG-P f594b0900f [bugfix] try fix ip family issues with dnslookup 2024-11-06 16:47:26 +01:00
MathieuG-P 5cbc480e24 Merge pull request #646 from Zagrios/revert/changelogs-modal
[revert] revert changelogs modal feature
2024-11-06 15:40:33 +01:00
MathieuG-P 8208874527 [revert] delete changelogs.json 2024-11-06 15:28:59 +01:00
MathieuG-P 2d2fbec858 [revert] revert changelogs modal | was too buggy + It was too much work to create a changelog; we wouldn't have done it more than once 2024-11-06 15:26:49 +01:00
MathieuG-P d5f2ba3b21 Merge pull request #645 from Zagrios/bugfix/fix-oneclick-download-playlist-broken
[bugfix] Fix broken oneclick playlist download + issue with specials chars in playlists filenames
2024-11-05 20:42:23 +01:00
MathieuG-P 9e60dc4e0e [bugfix] prevent bug with special chars when using "preferContentDisposition" 2024-11-05 20:34:26 +01:00
MathieuG-P 57e1029b75 [bugfix] Unable to download playlist if its filename was containing special chars 2024-11-05 20:33:18 +01:00
MathieuG-P 0d913641d7 [bugfix] do not encode url query params 2024-11-05 20:32:23 +01:00
MathieuG-P b7eb136395 Merge pull request #644 from izunya/master
[Bugfix&Add-#641] Added kr translations | Text wrap bug and incorrect translation of "Curated"
2024-11-05 20:03:08 +01:00
izunya a79a6c2c13 Added kr translations | Text wrap bug and incorrect translation of "Curated" 2024-11-06 03:40:11 +09:00
izunya d01edbe2a8 Text wrap bug and incorrect translation of "Curated" 2024-11-06 03:18:24 +09:00
MathieuG-P 893b244eb1 Merge pull request #586 from silentrald/feat/578
[feat-578] remove dotnet and screen dependency on linux
2024-11-05 14:39:11 +01:00
MathieuG-P b45c37d774 Merge pull request #641 from izunya/master
[Transation] Add Korean Languages
2024-11-05 14:04:30 +01:00
MathieuG-P c18acb5fed Update korea-icon.component.tsx 2024-11-05 13:42:48 +01:00
izunya 7211798c74 some update pls 2024-11-05 07:30:27 +09:00
izunya 589904f813 korean locale add 2024-11-05 07:19:23 +09:00
MathieuG-P 8181cb3eec Merge pull request #640 from Zagrios/chore/remove-broken-models-notification
[chore] remove the "Broken models" notification
2024-11-04 20:13:50 +01:00
MathieuG-P ec09ee257c [chore-640] remove unused import 2024-11-04 20:09:31 +01:00
MathieuG-P d378aea1e7 [chore] remove "models broken" notification 2024-11-04 20:07:13 +01:00
silentrald b04f199fff [feat-578] simplified getting the wine binary 2024-11-02 10:48:13 +08:00
MathieuG-P 83f23c5c16 [chore] Add support for mapinfo v3 (which is essentially the same thing as version 2) 2024-11-02 00:25:38 +01:00
MathieuG-P 6666685c43 Merge pull request #636 from Zagrios/bugfix/unable-to-load-bsm-files-if-path-to-bsm-contains-url-special-chars
[bugfix] Unable to load bsm's files if path to bsm contain url special chars
2024-11-01 17:35:11 +01:00
MathieuG-P e07aacc9e8 [bugfix] Unable to load bsm's files if path to bsm contains url special chars 2024-11-01 17:20:23 +01:00
MathieuG-P 681ddc6b0b Merge pull request #635 from Zagrios/bugfix/updating-naming-sheme-of-downloaded-maps-and-playlists
[bugfix] updating naming sheme of downloaded maps and playlists
2024-11-01 16:30:44 +01:00
MathieuG-P aa69b3c683 [bugfix] updating naming sheme of downloaded maps and playlists 2024-11-01 16:25:50 +01:00
MathieuG-P 599161b7b2 [578] Some adjustments 2024-10-29 21:24:56 +01:00
MathieuG-P ed1960c469 Merge pull request #628 from Zagrios/chore/remove-dlc-folder-from-default-shared-folders
[chore] remove DLC folder from default shared folders
2024-10-23 21:10:03 +02:00
MathieuG-P dc9e181c54 [chore] remove DLC folder from default shared folders 2024-10-23 20:52:57 +02:00
silentrald 77987181de [feat-578] open steam common folder for selecting a proton folder 2024-10-23 10:49:46 +08:00
silentrald 3812ea18e4 [feat-578] use installed wine first then fallback to proton's wine bin
* explicitly tell BSIPA where `Beat Saber.exe` is located
2024-10-23 09:34:11 +08:00
silentrald 3797c1b156 [refactor] unified choose folder text translation 2024-10-23 07:51:25 +08:00
silentrald a1082edcde [feat-578] added translations 2024-10-23 07:51:25 +08:00
silentrald de7a054f89 [feat-578] setup protonFolder on startup 2024-10-23 07:51:25 +08:00
silentrald 0398a957ad [feat-578] store protonFolder in static config
* changed protonPath to protonFolder
* log stdout for running bsipa executable
2024-10-23 07:51:21 +08:00
MathieuG-P 4a91fa04e7 Merge pull request #626 from Zagrios/bugfix/download-from-steam-all-errors-are-unknown-errors
[bugfix] Fixed all errors from depotdownloader was unknown errors
2024-10-22 22:09:28 +02:00
MathieuG-P af3e5d1a56 [bugfix] Fixed all errors from depotdownloader was unknown errors 2024-10-22 21:55:34 +02:00
MathieuG-P 7b4e6340ca Merge pull request #600 from silentrald/bugfix/remember-playlist-sort
[bugfix] remember option for map and playlist sorting
2024-10-22 20:00:58 +02:00
MathieuG-P 2e3febf66a [bugfix] added missing translations 2024-10-22 14:11:53 +02:00
MathieuG-P a5ff3482e5 [bugfix] added missing bl-ranked indicator on maps items 2024-10-22 14:08:04 +02:00
MathieuG-P 8de279ac90 Merge pull request #625 from Zagrios/chore/feat-move-create-playlist-button/521
[chore-521] Move create playlist action
2024-10-22 13:57:37 +02:00
MathieuG-P 0efc56f8d6 [chore-521] Move create playlist action 2024-10-22 13:45:10 +02:00
MathieuG-P b59c37ebbd add patreon 2024-10-19 09:06:35 +02:00
MathieuG-P ff194e724b [bugfix] fix potential issue when adding a map to a playlist 2024-10-18 15:59:07 +02:00
MathieuG-P ca636c86e6 Merge pull request #622 from Zagrios/bugfix/bug-advanced-launch-unable-to-be-deactivated/620
[bugfix-620] fix weird UX with advanced launch args
2024-10-18 15:54:46 +02:00
MathieuG-P 8b1117543e Merge pull request #621 from silentrald/bugfix/618
[bugfix-618] support json files for playlists
2024-10-18 15:54:07 +02:00
silentrald ef123d8513 [bugfix-618] support json files for playlists
* fixed some issues from #616
2024-10-18 21:39:48 +08:00
MathieuG-P 5aac3ba47e [bugfix-620] fix weird UX with advanced launch args 2024-10-18 15:01:10 +02:00
MathieuG-P d2f3bdf29a Merge pull request #619 from silentrald/bugfix/song-filters
[bugfix] updated tags to the correct names
2024-10-18 11:13:15 +02:00
MathieuG-P e70313f66a [bugfix-619] update translations 2024-10-17 20:13:37 +02:00
silentrald 70926283ff [bugfix] updated tags to the correct names
* fixed issue where enabledTags and excludedTags are appended to the query string
2024-10-18 00:45:57 +08:00
MathieuG-P 8357c09e9f Merge pull request #575 from silentrald/feat/75
[feat-75] support drag and drop for map zip files
2024-10-17 15:16:01 +02:00
MathieuG-P 21f97df788 [feature-75] fix regex 2024-10-17 14:00:06 +02:00
MathieuG-P 00d6d7de30 [feature-75] fix some sonarcloud issues + other potentials issues + add logs 2024-10-17 13:31:41 +02:00
MathieuG-P b10900618a [feature-75] update translations + fix error notification translations 2024-10-17 12:52:36 +02:00
MathieuG-P 9b8d6ddda0 [feature-75] rework fontend functions to import maps 2024-10-16 20:35:34 +02:00
MathieuG-P 4e6948693d [feature-75] update drop zone UI 2024-10-16 19:11:57 +02:00
MathieuG-P 6e3c65cced Merge pull request #616 from silentrald/bugfix/614
[bugfix-614] handle bplist source string within readPlaylistFromSource
2024-10-16 09:49:40 +02:00
silentrald c499fb83e7 [bugfix-614] handle bplist source string within readPlaylistFromSource
* refactored to just use bplistSource each time it gets passed into another function
* removed unused songCache variable
2024-10-16 13:38:20 +08:00
silentrald be347dc6ba [feat-75] removed unused variable 2024-10-16 08:33:57 +08:00
MathieuG-P 716f068adf [feat-75] way to much RAM was used + some indirect fixes 2024-10-16 08:12:04 +08:00
MathieuG-P e9d2cb1482 [feat-75] fix paths of dropped zips are undefined 2024-10-16 08:11:15 +08:00
silentrald 132394524e [feat-75] added fix on rebasing 1 2024-10-16 08:11:15 +08:00
silentrald 20499b821e [feat-75] fix issue with Windows pathing on jsZip pattern 2024-10-16 08:11:15 +08:00
silentrald 803842d579 [feat-75] use map hash for comparing 2024-10-16 08:11:15 +08:00
silentrald eb119a31f0 [feat-75] support import for maps exported by BSM 2024-10-16 08:11:13 +08:00
silentrald 9d4acea654 [feat-75] applied PR comments 1 2024-10-16 08:10:24 +08:00
silentrald 6a2f982292 [feat-75] add translations 2024-10-16 08:10:24 +08:00
silentrald 7c88ea46e0 [feat-75] support multiple drag and drop zip files for maps
fixed issue in map downloads where download listener in MapsDownloaderService was not being removed
2024-10-16 08:10:24 +08:00
silentrald 0f3de55e9e [feat-75] support drag and drop for map zip files 2024-10-16 08:10:21 +08:00
MathieuG-P d5b7dff7a9 Merge pull request #615 from Zagrios/feat/feat-schema-v4-support-for-mapssongs/607
[feat-607] add support for map info v4
2024-10-15 20:36:04 +02:00
MathieuG-P 7468554ea0 [feat-607] add support for map info v4 2024-10-15 20:29:56 +02:00
MathieuG-P 0d93c984be Add patreon 2024-10-15 16:20:44 +02:00
MathieuG-P 87f134ebb5 Merge pull request #609 from Zagrios/bugfix/update-depot-downloader
[bugfix] update DepotDownloader to fix connection to steam errors
2024-10-14 13:04:50 +02:00
MathieuG-P 8fe346b1a7 [bugfix] update depotdownloader to fix connection to steam errors 2024-10-13 19:57:43 +02:00
MathieuG-P e9ca4bb7ac For certificate verification 2024-10-13 11:19:27 +02:00
MathieuG-P eac6192afb nothing 2024-10-12 02:04:04 +02:00
MathieuG-P 679b28e44f [chore] new code sign certificate 2024-10-12 02:02:29 +02:00
MathieuG-P 36e95d0d96 1.38.0 as recommended 2024-10-11 20:33:53 +02:00
Iluhadesu 59bd480445 Add v1.38.0 to bs-versions.json 2024-10-08 15:24:05 +00:00
MathieuG-P d38a3b5720 Merge pull request #605 from Zagrios/feature/593/feat-cleanup-duplicate-songs
[feature-593] We can now delete duplicates maps
2024-10-06 18:42:28 +02:00
MathieuG-P 9d59bfb956 [feature-593] We can now delete duplicates maps 2024-10-06 18:22:28 +02:00
silentrald 50322b69cc [refactor] refactored DefaultConfig on client side to resemble typing in StaticConfig 2024-10-06 00:33:50 +08:00
silentrald fc212cecb4 [bugfix] remember option for map sorting 2024-10-06 00:13:57 +08:00
silentrald 3d6a9b59bf [bugfix] remember option for playlist sorting 2024-10-06 00:13:57 +08:00
MathieuG-P b97a58c278 Merge pull request #604 from Zagrios/bugfix/602/bug-error-linking-playlist-folder
[bugfix-602] fix link playlists error
2024-10-05 17:38:36 +02:00
MathieuG-P 6f55f4283d Merge pull request #598 from silentrald/chore/improve-feature-request
[chore] improved user experience for creating feature request
2024-10-05 17:38:23 +02:00
MathieuG-P 9ee33f2c7d Merge pull request #599 from silentrald/chore/linux-labeler
[chore] properly add correct label for linux
2024-10-05 17:37:47 +02:00
MathieuG-P 55f45e438c [bugfix-602] fix link playlists error 2024-10-05 17:29:34 +02:00
silentrald cce6b71993 [chore] improved user experience for creating feature request 2024-10-05 08:52:25 +08:00
silentrald 3d24e97abd [chore] properly add correct label for linux 2024-10-02 08:50:18 +08:00
MathieuG-P 1eea031438 Merge pull request #596 from silentrald/chore/improve-bug-reporting
[chore] improved user experience for bug reporting
2024-10-01 21:10:44 +02:00
MathieuG-P dcb45927a1 Merge pull request #597 from Zagrios/chore/remove-unnecessary-code-from-progress-bar-service
[chore] remove unnecessary code from progress bar service
2024-10-01 21:01:37 +02:00
MathieuG-P d234a504b5 Merge pull request #595 from silentrald/chore/discord-support-link
[chore] added discord link in issue template
2024-10-01 20:57:39 +02:00
MathieuG-P cac09cf032 [chore] remove unnecessary code from progress bar service 2024-10-01 20:51:53 +02:00
silentrald 6d6f7d492e [chore] improved user experience for bug reporting 2024-09-30 09:13:08 +08:00
silentrald 01bae7c59b [chore] added discord link in issue template 2024-09-30 08:25:48 +08:00
MathieuG-P db5af48250 [chore] remove unused functions 2024-09-29 19:46:53 +02:00
MathieuG-P 0576ea0159 Merge pull request #594 from Zagrios/chore/some-reworks-to-remove-watch-functions
[chore] Some reworks to remove watch functions
2024-09-29 19:41:59 +02:00
MathieuG-P f73ab4a6a4 [chore-594] remove unused import 2024-09-29 18:37:54 +02:00
MathieuG-P 501c0d9ae1 [chore] Some reworks to remove watch functions 2024-09-29 18:29:59 +02:00
MathieuG-P cc810ae84e Merge pull request #590 from silentrald/bugfix/585
[bugfix-585] fixed unicode song titles not showing in game
2024-09-28 13:09:26 +02:00
MathieuG-P 3533402197 Merge pull request #589 from silentrald/bugfix/broken-app-icon
[bugfix] show bsm icon properly
2024-09-28 12:22:53 +02:00
silentrald 03a8377773 [bugfix-585] fixed unicode song titles not showing in game
Added SteamEnv=1 in environment variable when launching the "Beat
Saber.exe" file
2024-09-25 21:46:09 +08:00
silentrald 138002d7a0 [bugfix] show bsm icon properly 2024-09-23 20:58:20 +08:00
MathieuG-P 18854650ab Merge pull request #588 from kevin-wijnen/master
[feature] Automating the wiki via GitHub Actions
2024-09-22 15:50:36 +02:00
MathieuG-P e51d47ac73 Merge pull request #587 from silentrald/feat/543
[feat-543] added notification when logging out
2024-09-22 15:42:27 +02:00
MathieuG-P 32bf20a55f [feature-543] add translations 2024-09-22 15:36:23 +02:00
Kevin Wijnen b702b33def Merge branch 'Zagrios:master' into master 2024-09-22 14:55:02 +02:00
MathieuG-P d74a730a04 [chore] update deps 2024-09-22 14:54:02 +02:00
Kevin Wijnen 793af822ce [docs] Specify how to contribute to the wiki 2024-09-22 14:33:42 +02:00
silentrald c05b9a4b8e [feat-543] added notification when logging out 2024-09-22 20:32:58 +08:00
Kevin Wijnen 883f7594b0 [bugfix] Trigger path for wiki automation 2024-09-22 14:32:23 +02:00
Kevin Wijnen 7161f0861e [bugfix] Target path for wiki automation 2024-09-22 14:30:28 +02:00
Kevin Wijnen 5f35a43098 [chore] Trigger wiki automation 2024-09-22 14:22:48 +02:00
Kevin Wijnen 63ef3acc72 [bugfix] Fix target branch wiki automation 2024-09-22 14:21:28 +02:00
Kevin Wijnen 3ff3c5af67 [docs] Add explainer for wiki automation 2024-09-22 14:19:23 +02:00
Kevin Wijnen 50ebef30fb Merge pull request #1 from kevin-wijnen/github-actions-docs
GitHub actions docs
2024-09-22 14:16:54 +02:00
Kevin Wijnen 6d6da765a6 [chore] wiki article migration 2024-09-22 14:14:44 +02:00
Kevin Wijnen 031312e90e Merge branch 'Zagrios:master' into github-actions-docs 2024-09-22 14:07:16 +02:00
Kevin Wijnen f0e32bdae1 [chore] Fix spelling 2024-09-22 14:06:00 +02:00
Kevin Wijnen 81071d920e [feature] GitHub Actions wiki automation
Initial concept for automating the BSManager Wiki via PR's to the docs/wiki folder.

Requires locking the Wiki's writing to none of the public, to prevent vandalism, desyncs and losing wiki-only information, with what is on the repository.
2024-09-22 14:05:03 +02:00
MathieuG-P ea320c0e08 remove lowerCase 2024-09-22 14:02:47 +02:00
MathieuG-P 8335494a9f Merge branch 'master' of https://github.com/Zagrios/bs-manager 2024-09-22 13:59:31 +02:00
MathieuG-P 96fc2b4efb Add labeler workflow for Linux issues 2024-09-22 13:59:28 +02:00
MathieuG-P 3280ca1984 Merge pull request #584 from silentrald/bugfix/modal-options-undefined
[bugfix] handle undefined modal options properly
2024-09-21 21:07:24 +02:00
silentrald aae23c18d6 [bugfix] handle undefined modal options properly 2024-09-21 22:46:54 +08:00
MathieuG-P 7a8eee9266 Merge pull request #582 from Zagrios/bugfix/playlist-download-status-not-updating
[bugfix] Downloading a playlist from its details modal was not updati…
2024-09-20 11:01:16 +02:00
MathieuG-P 757069d657 [bugfix] Downloading a playlist from its details modal was not updating the playlist's download status in the playlists list 2024-09-20 10:48:49 +02:00
MathieuG-P 15178f0e60 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2024-09-19 21:42:52 +02:00
MathieuG-P 02d0aef497 [bugfix] fix overflow hidden causing weird blury issue 2024-09-19 21:42:50 +02:00
MathieuG-P ee6b49f028 Merge pull request #580 from Zagrios/feature/fix-version-issue
Feature/fix version issue
2024-09-19 13:56:48 +02:00
MathieuG-P 5c383b66a7 Merge pull request #581 from Zagrios/bugfix/487/bug-when-i-clone-the-version-weird-stuff-happens
[bugfix-487] Cloning a version was changing its color even if an error was occuring
2024-09-18 16:38:36 +02:00
MathieuG-P 50cef104f0 [bugfix-487] Cloning a version was changing its color even if an error was occurring 2024-09-18 14:56:34 +02:00
Shidorien 37a44b54f3 Skip showing changelog for alpha versions 2024-09-17 15:31:28 +02:00
Shidorien 0027832bdb Remove posibility to store alpha version in LastAppVersion and clear this var when user already stored an alpha version 2024-09-17 15:20:44 +02:00
MathieuG-P ad4da530eb bumb to 1.5.0-alpha.4 2024-09-16 22:07:15 +02:00
MathieuG-P e4a894f75a [bugfix] Choose content folder was asked after each restart of BSM + add a log 2024-09-16 22:06:59 +02:00
MathieuG-P 1a62ae67c9 add patreon 2024-09-12 21:11:06 +02:00
MathieuG-P 78951f0de1 [chore] temporary add my name in readme for code signing certificate verification 2024-09-11 20:45:58 +02:00
MathieuG-P fd52fb8d78 Merge pull request #566 from silentrald/feat/560
[feat-560] ask user for installation folder/path
2024-09-11 12:45:37 +02:00
MathieuG-P e14ba2727b [feature-560] translations 2024-09-10 21:18:46 +02:00
MathieuG-P f6cd2fc316 Merge pull request #577 from silentrald/bugfix/linux-bs-version-readonly
[bugfix] use static config for version list in linux
2024-09-10 20:25:18 +02:00
silentrald 57f0679f57 [bugfix] use static config for version list in linux 2024-09-10 00:47:25 +08:00
Iluhadesu d407b396cf Add v1.37.5 to bs-versions.json 2024-09-07 01:35:36 +00:00
Iluhadesu 4bfc00d698 Add v1.37.4 to bs-versions.json 2024-09-05 16:02:25 +00:00
silentrald bd371b56e1 [bugfix-560] don't move old installation path if it doesn't exist 2024-09-05 09:37:32 +08:00
MathieuG-P 7ae097b990 [feature-560] some adjustments 2024-09-04 20:45:28 +02:00
silentrald 9734d714d7 [refactor] created installation-location.service.ts on client side 2024-09-04 08:57:19 +08:00
silentrald 9c86adf2d4 [feat-560] applied PR comments 2024-09-04 08:52:43 +08:00
silentrald 6258de5b06 [feat-560] added description text and default button tooltip
added tooltip support in BsmButton component
2024-09-04 08:52:43 +08:00
silentrald d3c797041f [feat-560] delay song details cache loading after user setup is done
added check if ElectronStore is null
2024-09-04 08:52:40 +08:00
silentrald 5e6837b8cd [feat-560] ask user for installation folder/path 2024-09-04 08:21:26 +08:00
MathieuG-P eba2b6fb03 Add patreon 2024-09-02 23:17:03 +02:00
MathieuG-P 1b2b8baa48 Merge pull request #572 from Zagrios/feature/add-advanced-settings
[feature] add advanced settings
2024-09-01 22:58:40 +02:00
MathieuG-P 846945b75a [feature] fix sonarlint issues 2024-09-01 22:55:21 +02:00
MathieuG-P f84758c42d [feature] translate + simplify code 2024-09-01 22:46:08 +02:00
MathieuG-P 55aeab896c [feature] disable hardware acceleration and use symlinks work, just still need to translate 2024-09-01 18:08:03 +02:00
MathieuG-P ac62926f8d [feature] create toogle gid for advanced settings 2024-08-29 22:30:29 +02:00
MathieuG-P 98bfbfa868 remove console log 2024-08-29 19:37:16 +02:00
MathieuG-P 150efb1a5c nothing 2024-08-29 19:34:56 +02:00
Iluhadesu b68c84dd6a Bump Beat Saber recommended version to 1.37.1 2024-08-26 17:05:22 +00:00
MathieuG-P 3145d2fdfa Merge pull request #568 from Zagrios/bugfix/improve-folder-linking-reliability
[bugfix] Improve folder linking reliability
2024-08-25 16:32:22 +02:00
MathieuG-P dac67ebe4e [bugfix] dont move the folder if all subitem in the folder already exist in the destination 2024-08-25 16:21:04 +02:00
MathieuG-P aea325a254 [bugfix] Improve folder linking reliability 2024-08-25 15:03:08 +02:00
MathieuG-P 462499fe81 Merge pull request #567 from silentrald/bugfix/bsipa-linux
[bugfix] wrap dotnet cmdlet's path argument with double quotes for installing bsipa
2024-08-24 15:57:56 +02:00
silentrald f6f69e2f13 [bugfix] wrap dotnet cmdlet's path argument with double quotes for installing bsipa 2024-08-24 21:41:10 +08:00
MathieuG-P c7ac3f2d9c Merge pull request #564 from Zagrios/bugfix/mods-using-manifests-sometimes-was-not-recognised-as-installed
[bugfix] Sometime mods using manifests were not recognised as installed + remove dead code
2024-08-20 21:16:11 +02:00
MathieuG-P cb95d5d88d [bugfix] Sometime mods using manifests were not recognised as installed + remove dead code 2024-08-20 21:06:37 +02:00
MathieuG-P 388ad76780 Merge pull request #563 from Zagrios/bugfix/translate-all-mods-already-notification
[bugfix] translate all mods already notification
2024-08-19 21:12:23 +02:00
MathieuG-P be4afb71e3 Merge pull request #562 from joriskleiber/window-restore-icon
Add window restore icon
2024-08-19 20:35:35 +02:00
MathieuG-P 11ddfc29b5 [bugfix] translate all mods already notification 2024-08-19 20:30:06 +02:00
joriskleiber b1eaad8df0 add window restore icon 2024-08-19 20:20:15 +02:00
Iluhadesu 36fc7cb9e2 Remove the . in the version name once again... 2024-08-19 10:28:48 +00:00
Iluhadesu 8df9516c11 Add v.1.37.3 to bs-versions.json 2024-08-19 10:27:39 +00:00
MathieuG-P 6bd8727067 Merge pull request #559 from kgabriel-dev/chore/improved-german-language/544
Improving the German language file
2024-08-17 21:51:56 +02:00
GabiKleebi02 b620b11eb5 improve German language file 2024-08-12 22:23:09 +02:00
MathieuG-P 3ff3ec7410 Merge pull request #558 from Zagrios/bugfix/466/bsmanager-does-not-handle-mods-with-missing-dependencies-on-beatmods
[bugfix-466] fix potential crashs when beatmods mod has invalid dependencies
2024-08-12 21:02:57 +02:00
MathieuG-P 8f9b3405bc Merge pull request #557 from Zagrios/bugfix/520/bug-unselect-item-when-you-switch-tab
[bugfix-520] clear selected items when switching BS version tab
2024-08-12 20:54:53 +02:00
MathieuG-P 698058710f [bugfix-466] fix potential crashs when beatmods mod has invalid dependencies 2024-08-12 20:53:51 +02:00
MathieuG-P 5fbc69e772 [bugfix-520] clear selected items when switching BS version tab + remove a console log 2024-08-12 20:22:33 +02:00
MathieuG-P daa2f864cc Merge pull request #555 from Insprill/fix/linux-admin
Fix Steam elevated check on Linux
2024-08-12 19:10:34 +02:00
Pierce Thompson f073f66533 Fix Steam elevated check on Linux 2024-08-10 18:00:07 -04:00
MathieuG-P ff9bede111 Merge pull request #554 from Zagrios/bugfix/542/exclude-tag-result-in-javascript-error
[bugfix-542] Fix crash when exclude map tag when browsing for new maps
2024-08-10 15:37:55 +02:00
MathieuG-P 650338d25b [bugfix-542] Fix crash when exclude map tag when browsing for new maps 2024-08-10 15:34:07 +02:00
MathieuG-P be32418b93 nothing 2024-08-10 15:19:02 +02:00
MathieuG-P 3bb9250269 Merge pull request #553 from Zagrios/feature/550/feat-show-any-number-stats-for-unranked-maps-difficulty
[feature-550] When its possible display the NPS ou NJS of the map instead of just the difficulty
2024-08-10 15:16:37 +02:00
MathieuG-P 13da659c0d [feature-550] When its possible display the NPS ou NJS of the map instead of just the difficulty 2024-08-10 15:10:49 +02:00
MathieuG-P 9f4a133b74 Update package-lock.json and release/app/package-lock.json to version 1.5.0-alpha.3 2024-08-07 10:53:24 +02:00
MathieuG-P 25b647630f [chore] add step to install correct Node version in the contributing guide 2024-08-07 10:53:12 +02:00
Iluhadesu 373c6b979d Correct version typo because they can't type 2024-08-06 12:56:57 +00:00
Iluhadesu ded5b58020 Add v.1.37.2 to bs-versions.json 2024-08-06 12:55:33 +00:00
Zagrios 763b3c65f5 fix depotdownload on linux again 2024-08-04 15:20:12 +02:00
Zagrios ef69e64ad7 all file in script is binary 2024-08-04 15:13:56 +02:00
Zagrios d82b7bab54 fix depotdownloader on linux 2024-08-04 14:59:11 +02:00
Zagrios 095ceccc19 should fix depotdownload on linux 2024-08-04 14:36:06 +02:00
MathieuG-P 32e5ee98ad Merge pull request #547 from silentrald/fix/issue-546
[bugfix] exclude regedit-rs on externals when webpack bundles it in linux
2024-08-04 11:19:34 +02:00
silentrald b2a57ea307 [bugfix] exclude regedit-rs on externals when webpack bundles it in linux 2024-08-03 12:00:03 +08:00
MathieuG-P eb30400b7c update to 1.5.0-alpha.3 2024-08-01 01:06:38 +02:00
MathieuG-P 0fd1e211ba Merge pull request #541 from Zagrios/chore/filter-sensitive-data-in-logs
[chore] filter sensitive data in logs
2024-08-01 00:55:39 +02:00
MathieuG-P 64484bfd4e Merge branch 'master' into chore/filter-sensitive-data-in-logs 2024-08-01 00:51:27 +02:00
MathieuG-P 499956d3b3 update to 1.4.8 2024-08-01 00:23:32 +02:00
MathieuG-P c313685f6f [chore] filter potential oculus token in logs 2024-08-01 00:20:02 +02:00
MathieuG-P 2e750f3d5a chore : use name instead of "_id" beacause BeatMods is broken 2024-07-30 22:29:58 +02:00
MathieuG-P e1c3115668 Merge pull request #540 from Zagrios/qol/dont-reinstall-all-mods-by-default
[qol] dont reinstall all mods by default
2024-07-29 21:32:57 +02:00
MathieuG-P a6462530bb [qol] reinstall all translations + fix buttons sizing 2024-07-29 21:11:14 +02:00
MathieuG-P 8316a9ef80 [qol] fix transform style not working 2024-07-29 20:31:06 +02:00
MathieuG-P 152313289c [qol] install only mods not already installed (not finished) 2024-07-28 21:40:09 +02:00
MathieuG-P c96ad6f7cd Merge branch 'master' into qol/dont-reinstall-all-mods-by-default 2024-07-28 19:46:43 +02:00
MathieuG-P b7cf3c5d20 Merge pull request #539 from Zagrios/chore/update-to-electron-31
[chore] update to electron 31 + update deps
2024-07-28 16:51:24 +02:00
MathieuG-P 97d3c2a3ae [chore] update to electron 31 + update deps 2024-07-28 16:41:16 +02:00
MathieuG-P a20ebe2075 Merge pull request #537 from Zagrios/bugfix/536/bug-no-maps-found-for-tag-dance
[bugfix-536] Fix dance-style filter
2024-07-27 16:12:00 +02:00
MathieuG-P 2f5a74b155 [bugfix-536] Fix dance-style filter 2024-07-27 16:06:07 +02:00
MathieuG-P a20c73d0e9 [qol] dont reinstall all mods by default (not finnished) 2024-07-27 15:51:06 +02:00
MathieuG-P aeca1c1e9e Merge pull request #535 from Zagrios/qol/dont-select-default-mods-when-mods-are-installed
[QOL] Do not reselect default mods when mods are already installed
2024-07-25 20:50:12 +02:00
MathieuG-P b9ce95968c Merge pull request #530 from Zagrios/feature/feature/small-addition-to-the-version-list
[bugfix] fix incorrect active state in shared nav bar item
2024-07-25 20:39:38 +02:00
MathieuG-P 490ccfdc1e [qol] Do not reselect default mods when mods are already installed 2024-07-24 15:45:35 +02:00
Shidorien 6d0c6b4f64 remove useless console.log 2024-07-23 21:13:22 +02:00
Shidorien 89c3b0906b fix little issue 2024-07-23 21:06:22 +02:00
Shidorien 8cd74c3b0b fix incorrect active state in shared nav bar item 2024-07-23 20:31:33 +02:00
MathieuG-P 769dab2896 Add changelog for 1.5.0-alpha.2 2024-07-22 18:26:13 +02:00
MathieuG-P 8f1f998c5a Update to 1.5.0-alpha.2 2024-07-22 17:59:22 +02:00
MathieuG-P 48d03cccbb Merge pull request #524 from Zagrios/bugfix/fix-timeout-when-downloading-maps-from-bsv
[bugfix] Downloading maps sometimes times out
2024-07-21 15:44:30 +02:00
MathieuG-P 7d54ae79f7 Merge pull request #523 from Zagrios/bugfix/unable-to-install-bsipa-when-its-path-contain-spaces
[bugfix] unable to install BSIPA if BSIPA path was containing spaces
2024-07-21 15:41:23 +02:00
MathieuG-P c46fdd56f6 Merge pull request #522 from Zagrios/bugfix/495/bug-custom-map-runtime-not-displaying-correctly-in-bsmanager
[bugfix] fix sometimes maps duration were wrong
2024-07-21 15:41:10 +02:00
MathieuG-P 22dc1ca511 [bugfix] fix timeout when downloading maps 2024-07-21 15:36:33 +02:00
MathieuG-P 709105b9f4 [bugfix] fixed : unable to install BSIPA if BSIPA path was containing spaces + wrong translation when bsipa was throwing errors 2024-07-21 14:53:49 +02:00
MathieuG-P 1c0cfb6b89 [bugfix] playlist duraction was always NaN 2024-07-21 14:10:30 +02:00
MathieuG-P 7ebc1bff16 [bugfix] fix sometimes maps duration were wrong 2024-07-21 14:09:14 +02:00
MathieuG-P 0e1cda5050 Merge pull request #517 from Zagrios/bugfix/playlist-maps-with-malformed-hash-doesnt-get-loaded
[bugfix] fix playlist maps with malformed hash doesnt get loaded + improve playlist maps reading reliability
2024-07-17 20:42:12 +02:00
MathieuG-P 331626bd1e Merge pull request #518 from Zagrios/bugfix/crash-when-changing-audio-volume
[bugfix] fix crash when changing audio volume
2024-07-17 20:41:31 +02:00
MathieuG-P ea62f2443f [bugfix-517] use regex.exec instead of .match 2024-07-17 20:35:31 +02:00
MathieuG-P 532ab08e46 [bugfix] fix crash when changing audio volume 2024-07-17 20:32:53 +02:00
MathieuG-P a6fa55719d [bugfix] fix playlist maps with malformed hash doesnt get loaded + improve playlist maps reading reliability 2024-07-17 20:26:54 +02:00
MathieuG-P 163857a14f Merge pull request #513 from Zagrios/bugfix/bsm-crashs-when-loading-playlists-with-an-invalid-playlist-file
[bugfix] Bsm crashs when loading playlists with an invalid playlist file
2024-07-15 21:54:53 +02:00
MathieuG-P 854e0e2761 Merge branch 'master' into bugfix/bsm-crashs-when-loading-playlists-with-an-invalid-playlist-file 2024-07-15 21:50:13 +02:00
MathieuG-P eba6f916a3 Merge pull request #514 from Zagrios/bugfix/read-playlists-in-sub-folders
[bugfix] Playlists in sub folders doesn't get loaded
2024-07-15 21:43:03 +02:00
MathieuG-P 9790f35749 [bugfix] Playlists in sub folders doesn't get loaded 2024-07-15 21:35:26 +02:00
MathieuG-P 93d3cbc8bf [bugfix] Bsm crashs when loading playlists with an invalid playlist file 2024-07-15 20:59:26 +02:00
MathieuG-P 51ea1b130b Merge pull request #512 from Zagrios/chore/update-changelog
Chore/update changelog
2024-07-15 15:58:10 +02:00
shidorien d020b72f20 Add web site button to ChangelogModal component 2024-07-15 15:51:19 +02:00
shidorien f2ac952cd9 Update changelogs.json with new features, fixes, and improvements 2024-07-15 15:23:38 +02:00
shidorien 189d2388fb add missing scrollbar 2024-07-15 15:16:42 +02:00
shidorien 1c989a2402 Update changelog for BSManager 1.5.0-alpha.1 release 2024-07-15 15:11:17 +02:00
shidorien 959e60127d Update changelog for BSManager 1.5.0-alpha.1 2024-07-15 15:08:22 +02:00
shidorien 0faa0f1288 Update changelog for BSManager 1.5.0-alpha.1 2024-07-15 15:00:53 +02:00
shidorien 5ad25f58d5 Update changelogs.json with BSManager 1.5.0-alpha.1 release 2024-07-15 14:57:39 +02:00
shidorien 8ace5e6a7a Add changelog fort 1.5.0-alpha.1 2024-07-15 14:46:14 +02:00
MathieuG-P 185d01e7b4 version to 1.5.0-alpha.1 2024-07-14 22:34:29 +02:00
MathieuG-P 755e407372 Merge pull request #511 from Zagrios/bugfix/bsipa-installation-never-throw-error-even-if-bsipa-process-errors
[bugfix] During the BSIPA installation, no errors are displayed, even if BSIPA generates errors
2024-07-14 21:27:01 +02:00
MathieuG-P 4f123b69ef [bugfix] bsipa installation never show error even if bsipa throw errors 2024-07-14 21:22:25 +02:00
MathieuG-P 7e2334f8fc Merge pull request #509 from Insprill/fix/linux-build
Fix Linux build & crash on startup
2024-07-14 17:46:13 +02:00
MathieuG-P 5be533ccfb chore: Update Linux publishing command in package.json 2024-07-14 17:32:45 +02:00
MathieuG-P b8eafd5f9b chore: Update Linux publishing command in package.json 2024-07-14 17:23:19 +02:00
MathieuG-P 3f3bb959c4 Merge branch 'github-action/build-linux' 2024-07-14 17:17:21 +02:00
MathieuG-P c4d5db809b build for linux 2024-07-14 15:52:51 +02:00
Pierce Thompson 8ecc9d30b3 Fix Linux build 2024-07-13 15:13:15 -04:00
211 changed files with 9959 additions and 2981 deletions
+13 -1
View File
@@ -6,8 +6,20 @@ import webpack from "webpack";
import webpackPaths from "./webpack.paths";
import { dependencies as externals } from "../../release/app/package.json";
function createExternals(): string[] {
const webpackExternals: string[] = [...Object.keys(externals || {})];
const excludedExternals: string[] = [];
if (process.platform === "linux") {
// Linux only uses regedit-rs types
excludedExternals.push("regedit-rs");
}
return webpackExternals.filter(external => !excludedExternals.includes(external));
}
const configuration: webpack.Configuration = {
externals: [...Object.keys(externals || {})],
externals: createExternals(),
stats: "errors-only",
+64
View File
@@ -0,0 +1,64 @@
/**
* Webpack config for development electron main process
*/
import path from 'path';
import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import { merge } from 'webpack-merge';
import checkNodeEnv from '../scripts/check-node-env';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
// at the dev webpack config is not accidentally run in a production environment
if (process.env.NODE_ENV === 'production') {
checkNodeEnv('development');
}
const configuration: webpack.Configuration = {
devtool: 'inline-source-map',
mode: 'development',
target: 'electron-main',
entry: {
main: path.join(webpackPaths.srcMainPath, 'main.ts'),
preload: path.join(webpackPaths.srcMainPath, 'preload.ts'),
},
output: {
path: webpackPaths.dllPath,
filename: '[name].bundle.dev.js',
library: {
type: 'umd',
},
},
plugins: [
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
analyzerPort: 8888,
}),
new webpack.DefinePlugin({
'process.type': '"browser"',
}),
],
/**
* Disables webpack processing of __dirname and __filename.
* If you run the bundle in node.js it falls back to these values of node.js.
* https://github.com/webpack/webpack/issues/2010
*/
node: {
__dirname: false,
__filename: false,
},
};
export default merge(baseConfig, configuration);
+4
View File
@@ -2,6 +2,9 @@ const path = require("path");
const rootPath = path.join(__dirname, "../..");
const erbPath = path.join(__dirname, '..');
const erbNodeModulesPath = path.join(erbPath, 'node_modules');
const dllPath = path.join(__dirname, "../dll");
const srcPath = path.join(rootPath, "src");
@@ -22,6 +25,7 @@ const buildPath = path.join(releasePath, "build");
export default {
rootPath,
erbNodeModulesPath,
dllPath,
srcPath,
srcMainPath,
+8 -5
View File
@@ -1,9 +1,12 @@
import fs from "fs";
import webpackPaths from "../configs/webpack.paths";
import fs from 'fs';
import webpackPaths from '../configs/webpack.paths';
const { srcNodeModulesPath } = webpackPaths;
const { appNodeModulesPath } = webpackPaths;
const { srcNodeModulesPath, appNodeModulesPath, erbNodeModulesPath } = webpackPaths;
if (!fs.existsSync(srcNodeModulesPath) && fs.existsSync(appNodeModulesPath)) {
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, "junction");
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction');
}
if (!fs.existsSync(erbNodeModulesPath) && fs.existsSync(appNodeModulesPath)) {
fs.symlinkSync(appNodeModulesPath, erbNodeModulesPath, 'junction');
}
+2
View File
@@ -59,6 +59,8 @@ module.exports = {
"react/function-component-definition": "off",
"jsx-a11y/control-has-associated-label": "off",
"react/button-has-type": "off",
"max-classes-per-file": "off",
"jest/no-standalone-expect": "off",
},
parserOptions: {
ecmaVersion: 2020,
+2
View File
@@ -15,3 +15,5 @@
*.ttf binary
*.woff binary
*.woff2 binary
assets/scripts/* binary
*.zip binary
@@ -1,35 +0,0 @@
---
name: "[BUG] Bug report"
about: Create a report to help us improve
title: "[BUG] : "
labels: bug
assignees: Zagrios
---
## Bug Description
<!-- A clear and concise description of what the bug is. -->
## Reproduction Steps
<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->
## Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->
## Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
## System Specs
<!-- **Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]
-->
## Additional context
<!-- Add any other context about the problem here. -->
@@ -1,22 +0,0 @@
---
name: "[FEAT.] Feature request"
about: Suggest an idea for this project
title: "[FEAT.] : "
labels: enhancement
assignees: Zagrios
---
## Problem
<!-- **Is your feature request related to a problem? Please describe.** -->
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
## Solution
<!-- **Describe the solution you'd like** -->
<!-- A clear and concise description of what you want to happen. -->
## Alternative solutions (if any)
<!-- **Describe alternatives you've considered** -->
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
## Additional context
<!-- Add any other context or screenshots about the feature request here. -->
+54
View File
@@ -0,0 +1,54 @@
name: "[BUG] Bug report"
description: Create a report to help us improve
title: "[BUG] : "
labels: bug
assignees: Zagrios
body:
- type: markdown
attributes:
value: |
## Thanks for taking the time to fill out this bug report! 😊
- type: textarea
id: description
attributes:
label: Issue encountered
description: Tell us what issue you've encountered.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: Tell us what should expected to happen.
- type: textarea
id: replication
attributes:
label: Steps to Reproduce
description: Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
- type: dropdown
id: os
attributes:
label: Operating System
options:
- Windows 10
- Windows 11
- Linux
- type: input
id: version
attributes:
label: Version
description: What version of BSManager are you running?
placeholder: eg. 1.4.8 or 1.5.0-alpha-4
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Any other context that you may share about the issue. You may add your log files here.
@@ -0,0 +1,45 @@
name: "[FEAT.] Feature request"
description: Suggest an idea for this project
title: "[FEAT.] : "
labels: enhancement
assignees: Zagrios
body:
- type: markdown
attributes:
value: |
## Thanks for taking the time to fill out this feature request! 😊
- type: textarea
id: problem
attributes:
label: Problem
description: Is your feature request related to a problem? Please describe.
placeholder: Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution
description: Describe the solution you'd like.
validations:
required: true
- type: textarea
id: alternative-solution
attributes:
label: Alternative Solution
description: Describe alternatives you've considered.
- type: dropdown
id: os
attributes:
label: Operating System
description: If the feature is only applicable to a specific OS. Leave it to `None` if it's applicable to all OS'es.
options:
- Windows
- Linux
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
+5
View File
@@ -0,0 +1,5 @@
lank_issues_enabled: true
contact_links:
- name: Discord Support
url: https://discord.gg/uSqbHVpKdV
about: You can join our Discord server for a quick and interactive support.
+21 -3
View File
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
os: [windows-latest, ubuntu-latest]
steps:
- name: Check out Git repository
@@ -22,13 +22,31 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.11.0
cache: "npm"
- run: npm ci
- run: npm run package
# Install and setup Flatpak for Ubuntu
- name: Install flatpak packages (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y flatpak flatpak-builder
- name: Setup flatpak repo (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
flatpak remote-add --if-not-exists --user \
flathub https://flathub.org/repo/flathub.flatpakrepo
# Build Flatpak package
- name: Build Flatpak (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
env DEBUG="@malept/flatpak-bundler" \
npx electron-builder --config electron-builder.config.js --publish never --linux flatpak
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: release
name: release-${{ matrix.os }}
path: release
+20
View File
@@ -0,0 +1,20 @@
name: Publish wiki
on:
push:
branches: [master]
paths:
- docs/wiki/**
- .github/workflows/docs.yml
concurrency:
group: publish-wiki
cancel-in-progress: true
permissions:
contents: write
jobs:
publish-wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Andrew-Chen-Wang/github-wiki-action@v4
with:
path: docs/wiki/
+26
View File
@@ -0,0 +1,26 @@
name: Labeler
on:
issues:
types: [opened, edited]
jobs:
label-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Search Linux Term
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.event.issue.body }}
regex: '\# Operating System(\s*)Linux'
flags: m
- name: Add Linux label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ steps.regex-match.outputs.match != '' }}
with:
github_token: ${{ secrets.GH_TOKEN }}
labels: linux
+3 -3
View File
@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.11.0
cache: "npm"
- run: npm ci
- run: npm run lint
+8 -7
View File
@@ -13,19 +13,20 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.11.0
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
+20 -3
View File
@@ -1,6 +1,9 @@
# This workflow will...
name: Realease Linux
name: Release Linux
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
on:
workflow_dispatch:
@@ -17,13 +20,27 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install flatpak packages
run: sudo apt-get install -y flatpak flatpak-builder
- name: Setup flatpak repo
run: |
flatpak remote-add --if-not-exists --user \
flathub https://flathub.org/repo/flathub.flatpakrepo
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.11.0
cache: "npm"
- run: npm ci
- run: npm run build && electron-builder --linux --x64 --publish always
- run: npm run build
- name: Build deb
run: npx electron-builder --config electron-builder.config.js --publish always --linux deb --x64
- name: Build flatpak
run: env DEBUG="@malept/flatpak-bundler" npx electron-builder --config electron-builder.config.js --publish always --linux flatpak
- name: Upload artifact
uses: actions/upload-artifact@v4
+1
View File
@@ -18,6 +18,7 @@ We'd also love PRs. If you're thinking of a large PR, we advise opening up an is
## Submitting a pull request
1. [Fork][fork] and clone the repository.
1. Install the correct NodeJS version (highly recommend installing [Volta](https://volta.sh/) for that).
1. Configure and install the dependencies: `npm install`.
1. Create a new branch following naming convention: `git checkout -b (feature|bugfix|hotfix|chore)/(short-description)(/issue-id)`.
1. Make your change, test, and make sure BSManager work fine.
+11 -1
View File
@@ -226,6 +226,10 @@
-->
<div>
<h2><b>How to install?</b></h2>
</div>
<div>
<h3><b>Windows Installation</b></h3>
<ul>
<li>Download the <a href="https://github.com/Zagrios/bs-manager/releases/latest">latest release</a> from <a
href="https://github.com/Zagrios/bs-manager/releases">Releases</a>.</li>
@@ -239,6 +243,10 @@
<video src="https://github.com/Zagrios/bs-manager/assets/40648115/4215384e-eb68-40da-884c-f21df491ef75" />
</div>
<div>
<h3><b>Linux installation</b></h3>
<p>Refer to <a href="https://github.com/Zagrios/bs-manager/wiki/Linux">Linux wiki</a></p>
</div>
<!--
----------------------------------------
@@ -546,10 +554,12 @@
<div>
<h2>Credits</h2>
<ul>
<li><a href="https://github.com/Zagrios">Zagrios</a> - Lead Developer & Founder.</li>
<li><a href="https://github.com/Zagrios">Zagrios - Mathieu Gries</a> - Lead Developer & Founder.</li>
<li><a href="https://github.com/Iluhadesu">Iluhadesu</a> - Co-Developer & Co-Founder, Discord Bot Developer.</li>
<li><a href="https://github.com/GaetanGrd">GaetanGrd</a> - Co-Developer & Co-Founder, Documentation Lead.</li>
<li><a href="https://github.com/cheddZy">cheddZy</a> - Icon Creator.</li>
<li><a href="https://github.com/Insprill">Insprill</a> - Co-Developer, Linux Developer, AUR Maintainer.</li>
<li><a href="https://github.com/silentrald">silentrald</a> - Co-Developer, Linux Developer, deb and flatpak Maintainer.</li>
</ul>
</div>
+63 -3
View File
@@ -733,8 +733,7 @@
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4161968170153497460",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images//32055887/f82d34c7582137a6748a28c5b02670ff4b235356.png",
"ReleaseDate": "1717513346",
"year": "2024",
"recommended": true
"year": "2024"
},
{
"BSVersion": "1.37.1",
@@ -744,5 +743,66 @@
"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
}
]
]
-1
View File
@@ -1 +0,0 @@
{}
+41 -19
View File
@@ -54,50 +54,72 @@
"type": "diamond",
"link": "https://www.youtube.com/@lumberjack462"
},
{
{
"username": "Xero"
},
{
{
"username": "Minescence"
},
{
{
"username": "mereknom"
},
{
{
"username": "Jascha"
},
{
{
"username": "Celldweller",
"type": "gold"
},
{
{
"username": "rhythmshade"
},
{
{
"username": "liborsaf"
},
{
{
"username": "aatame3",
"type": "gold"
},
{
{
"username": "Joshua"
},
{
{
"username": "Stuijvi",
"type": "gold"
},
{
"username": "_ monaka"
},
{
"username": "Better_Axel"
},
{
{
"username": "_ monaka"
},
{
"username": "Better_Axel"
},
{
"username": "Riley",
"type": "gold"
},
{
"username": "Austin"
},
{
"username": "Fatalution",
"type": "diamond",
"link": "https://x.com/fatalution"
},
{
"username": "Taurus Arcade",
"type": "gold"
},
{
"username": "Mozz_Zm"
},
{
"username": "clapxz"
},
{
"username": "Austin"
}
"username": "Reflected Chop",
"type": "gold"
},
{
"username": "Furiouspupa"
}
]
File diff suppressed because it is too large Load Diff
+255 -46
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "Filters",
"dropdown": {
"export-maps": "Export maps",
"delete-maps": "Delete maps"
"delete-maps": "Delete maps",
"delete-duplicate-maps": "Delete duplicates"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Add"
"drop-down": {
"browse-maps": "Browse maps",
"import-maps": "Import maps"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "No maps",
"button": "Download maps"
},
"drop-zone": {
"text": "Import your maps",
"subtext": "Drop your zip files here to import your maps"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "Browse playlists",
"create-a-playlist": "Create a playlist",
"import-playlists": "Import playlists"
},
"drop-zone": {
"text": "Import your playlists",
"subtext": "Drop your \".bplist\" or \".json\" files here to import them"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "No mods are available yet for this version of Beat Saber",
"buttons": {
"more-infos": "More info",
"install-or-update": "Install or update"
"install-or-update": "Install or update",
"reinstall-all": "Reinstall all"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "Latest",
"description": "Description",
"dropdown": {
"uninstall-all": "Uninstall all"
"import-mods": "Import mods",
"uninstall-all": "Uninstall all",
"unselect-all": "Unselect all"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "Mods already installed",
"description": "All selected mods are already installed"
}
},
"drop-zone": {
"text": "Import your mods",
"subtext": "Drop your \"zip\" or \"dll\" files here to import them"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "Logging out will allow you to switch accounts on the next Beat Saber download.",
"logout": "Log out",
"logout-success": "Logout Successful",
"download-platform": {
"title": "Default Platform",
"desc": "Choose the default platform that will be used to download versions of Beat Saber.",
@@ -131,13 +168,15 @@
},
"installation-folder": {
"title": "Installation folder",
"description": "Change the default folder for Beat Saber versions and other upcoming features.",
"choose-folder": "Choose folder"
"description": "Change the folder that will contain all the content downloaded by BSManager."
},
"proton-path": {
"title": "Proton path",
"description": "Change the path to the Proton binary",
"choose-file": "Choose file"
"proton-folder": {
"title": "Proton folder",
"description": "Change the folder to the Proton path. (eg. Proton - Experimental)",
"errors": {
"title": "Setting the Proton folder failed",
"invalid-folder": "Invalid Proton folder path"
}
},
"additional-content": {
"title": "Additional content",
@@ -159,6 +198,7 @@
"zh-CN": "简体中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "English, United Kingdom",
"en-US": "English, USA",
@@ -168,7 +208,8 @@
"ru-RU": "Russian",
"zh-CN": "Chinese (Simplified)",
"zh-TW": "Chinese (Traditional)",
"ja-JP": "Japanese"
"ja-JP": "Japanese",
"ko-KR": "Korean"
}
}
},
@@ -196,9 +237,33 @@
"open-logs": "Open logs"
}
},
"changelogs": {
"open" : "🚀 Check Out the Changelog!",
"not-founds": "😕 Oops, No Changelog Here!"
"advanced": {
"title": "Advanced",
"description": "Advanced settings for BSManager.",
"hardware-acceleration": {
"title": "Hardware Acceleration",
"description": "Enable Hardware Acceleration to use your GPU and improve BSManager's performance. Turn this off if you're experiencing frame drops.",
"modal": {
"title": "Restart Needed",
"body": "Changing hardware acceleration setting will quit and re-launch BSManager. Are you sure you want to do this?",
"confirm-btn": "Yes I'm sure"
},
"error-notification": {
"message": "An error occur, unable to disable hardware acceleration."
}
},
"use-symlinks": {
"title": "Use Symlinks",
"description": "Use Symlinks instead of Junctions to link folders. Turn this on only if you really need it.",
"modal": {
"title": "Symlink Permissions",
"body": "When creating symlinks, BSManager will require administrator privileges or developer mode enabled on your system. Are you sure you want to continue?",
"confirm-btn": "Yes I'm sure"
},
"error-notification": {
"message": "An error occur, unable to change symlinks settings."
}
}
}
}
},
@@ -217,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "Operation running",
"no-internet": "No internet"
"no-internet": "No internet",
"file-not-supported": "File not supported"
},
"msg": {
"operation-running": "Wait for the current operation to finish, then try again.",
"no-internet": "Check your connection and try again."
"no-internet": "Check your connection and try again.",
"file-not-supported": "Only {types} files are supported."
}
}
},
@@ -381,9 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculus is not running",
"BS_ALREADY_RUNNING": "Beat Saber already running",
"EXE_NOT_FINDED": "Missing files",
"PROTON_NOT_SET": "Proton path not set",
"PROTON_NOT_SET": "Proton folder not set",
"PROTON_NOT_FOUND": "Proton binary not found",
"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.",
@@ -393,7 +462,9 @@
"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.",
"PROTON_NOT_SET": "Set the Proton path in settings"
"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"
@@ -412,7 +483,8 @@
"CantEditSteam": "Unable to edit",
"CantRename": "Renaming impossible",
"VersionAlreadExist": "This version already exists",
"CantClone": "Cloning impossible"
"CantClone": "Cloning impossible",
"UnknownError": "An unknown error occurred"
},
"msg": {
"CantEditSteam": "You can't edit the Steam version. You can clone it though."
@@ -459,12 +531,44 @@
"no-mods": "No mods are installed in this version 😑"
}
}
},
"import-mod": {
"titles": {
"success": "Mods import completed",
"error": "An error occurred during the mods import"
},
"msgs": {
"success": "Mods successfully imported.",
"some-success": "Some mods were successfully imported.",
"no-dlls": "The file(s) do not contain any \"dll\" files."
}
}
},
"maps": {
"one-click-install": {
"success": "Map installation complete",
"error": "An error occurred while installing the map"
},
"no-duplicates-maps": {
"title": "No Duplicates",
"msg": "No maps were deleted"
},
"duplicates-maps-deleted": {
"title": "Duplicates Deleted",
"msg": "Duplicates were deleted"
},
"import-map": {
"titles": {
"success": "Maps import completed",
"error": "An error occurred during the maps import"
},
"msgs": {
"success": "Maps successfully imported.",
"some-success": "Some maps were successfully imported.",
"only-accept-zip": "Only zip files are supported.",
"invalid-zip": "The zip file(s) do not contain any maps.",
"unknown": "An unknown error occurred."
}
}
},
"playlists": {
@@ -485,6 +589,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": {
@@ -495,6 +608,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": {
@@ -650,6 +771,11 @@
"title": "Keeping maps will copy all maps from the shared folder to the current version after unlinking. Maps will not be lost if this is disabled."
},
"valid-btn": "Unlink maps"
},
"delete-duplicate-maps": {
"title": "Delete maps?",
"desc": "Only the map \"{map}\" is a duplicate. Are you sure you want to delete it?",
"desc-plural": "{nb} duplicate maps have been found. Are you sure you want to delete them?"
}
},
"download-maps": {
@@ -697,7 +823,7 @@
"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.",
"must-be-installed-once": "You must have Beat Saber installed from the Oculus Store on this device, otherwise Beat Saber might automatically close after launching.",
"will-backup": "To launch this version, the original installation folder of Beat Saber located in your Oculus library will be renamed and will be automatically restored when Beat Saber is closed."
},
"not-remind-me": "Do not remind me",
@@ -730,12 +856,28 @@
},
"launch-as-admin": "Launch as Administrator",
"not-remind-me": "Do not remind me"
},
"ask-install-path": {
"title": "Installation folder",
"choose-folder-description": "Choose the folder that will contain all the content downloaded by BSManager. (versions, mods, maps, playlists, etc.)",
"default": "Default",
"default-tooltip": "Defaults to your home folder"
},
"choose-proton-folder": {
"title": "Proton Folder",
"proton-folder-description": "On Linux, BSManager requires Proton to work. Choose the Proton installation folder to continue.",
"proton-folder-placeholder": "Proton installation folder",
"where-is-proton-installed": "Where is Proton installed?"
},
"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": {
"map-filter-panel": {
"duration": "Duration",
"nps" : "Notes Per Second",
"nps": "Notes Per Second",
"njs": "Note Jump Speed",
"tags": "tags",
"specificities": "general",
"requirements": "requirements",
@@ -745,7 +887,7 @@
"accuracy": "accuracy",
"balanced": "balanced",
"challenge": "challenge",
"dancestyle": "dance",
"dance-style": "dance",
"fitness": "fitness",
"speed": "speed",
"tech": "tech"
@@ -754,10 +896,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",
@@ -767,21 +909,21 @@
"vocaloid": "vocaloid",
"j-rock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedy",
"drum-and-bass": "drum & bass",
"comedy-meme": "comedy & meme",
"instrumental": "instrumental",
"hardcore": "hardcore",
"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",
"hip-hop-rap": "hip hop & rap",
"j-pop": "j-pop",
"rock": "rock",
"pop": "pop",
@@ -809,11 +951,12 @@
"by": "By {songAutor}",
"mapped-by": "mapped by",
"delete": "Delete",
"preview" : "Preview map",
"bsr-code" : "BSR code",
"download" : "Download map",
"downloading" :"Downloading map",
"cancel-download" : "Cancel download"
"preview": "Preview map",
"bsr-code": "BSR code",
"download": "Download map",
"downloading": "Downloading map",
"cancel-download": "Cancel download",
"hightlight-difficulty": "Highlight difficulty"
}
},
"models": {
@@ -970,10 +1113,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 🎉"
}
@@ -1005,6 +1144,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "Or browse files"
},
"playlist": {
"error-playlist-creation-title": "Error creating playlist",
"error-playlist-creation-desc": "An error occurred while creating the playlist.",
@@ -1119,11 +1261,78 @@
"last-week": "Last week",
"last-month": "Last month",
"3-last-month": "Last 3 months"
},
"playlists-imported": "Playlists imported",
"all-playlists-have-been-successfully-imported": "All playlists have been successfully imported",
"no-playlist-found": "No playlist found",
"no-playlist-found-in-selected-files": "No playlist found in the selected files",
"some-playlists-not-imported": "Some playlists not imported",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "Some playlists could not be found",
"INVALID_PLAYLIST_FILE": "Some playlists are invalid",
"CANNOT_PARSE_PLAYLIST": "Some playlists are unreadable",
"unknown": "Some playlists could not be imported"
},
"no-playlists-imported": "No playlists imported",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "Playlists could not be found",
"INVALID_PLAYLIST_FILE": "Playlists are invalid",
"CANNOT_PARSE_PLAYLIST": "Playlists are unreadable",
"unknown": "No playlist could be imported"
}
},
"dateformat": {
"dayNames": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"monthNames": ["Jan", "Feb", "Mar", "Apr", "May", "June", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
"dayNames": [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"monthNames": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"June",
"Jul",
"Aug",
"Sept",
"Oct",
"Nov",
"Dec",
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"timeNames": [
"a",
"p",
"am",
"pm",
"A",
"P",
"AM",
"PM"
]
}
}
+262 -46
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "Filtros",
"dropdown": {
"export-maps": "Exportar mapas",
"delete-maps": "Borrar mapas"
"delete-maps": "Borrar mapas",
"delete-duplicate-maps": "Borrar duplicados"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Añadir"
"drop-down": {
"browse-maps": "Explorar mapas",
"import-maps": "Importar mapas"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "No hay mapas",
"button": "Descargar mapas"
},
"drop-zone": {
"text": "Importar tus mapas",
"subtext": "Suelta tus archivos zip aquí para importar tus mapas"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "Explorar listas de reproducción",
"create-a-playlist": "Crear una lista de reproducción",
"import-playlists": "Importar listas de reproducción"
},
"drop-zone": {
"text": "Importa tus listas de reproducción",
"subtext": "Suelta tus archivos \".bplist\" o \".json\" aquí para importarlos"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "Aún no hay mods disponibles para esta versión de Beat Saber",
"buttons": {
"more-infos": "Más información",
"install-or-update": "Instalar o actualizar"
"install-or-update": "Instalar o actualizar",
"reinstall-all": "Reinstalar todo"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "Último",
"description": "Descripción",
"dropdown": {
"uninstall-all": "Desinstalar todos"
"import-mods": "Importar mods",
"uninstall-all": "Desinstalar todos",
"unselect-all": "Deseleccionar todo"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "Mods ya instalados",
"description": "Todos los mods seleccionados ya están instalados"
}
},
"drop-zone": {
"text": "Importa tus mods",
"subtext": "Coloca tus archivos \"zip\" o \"dll\" aquí para importarlos"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "Desconectarte te permitirá cambiar de cuenta en la próxima descarga de Beat Saber.",
"logout": "Cerrar sesión",
"logout-success": "Cierre de sesión exitoso",
"download-platform": {
"title": "Plataforma predeterminada",
"desc": "Elige la plataforma predeterminada que se utilizará para descargar las versiones de Beat Saber.",
@@ -131,8 +168,15 @@
},
"installation-folder": {
"title": "Carpeta de instalación",
"description": "Cambia la carpeta por defecto para las versiones de Beat Saber y próximas funciones.",
"choose-folder": "Elige la carpeta"
"description": "Cambiar la carpeta que contendrá todo el contenido descargado por BSManager."
},
"proton-folder": {
"title": "Carpeta de Proton",
"description": "Cambia la carpeta a la ruta de Proton. (por ejemplo, Proton - Experimental)",
"errors": {
"title": "Falló al configurar la carpeta de Proton",
"invalid-folder": "Ruta de carpeta de Proton no válida"
}
},
"additional-content": {
"title": "Contenido adicional",
@@ -154,6 +198,7 @@
"zh-CN": "简体中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "Inglés, Reino Unido",
"en-US": "Inglés, Estados Unidos",
@@ -163,7 +208,8 @@
"ru-RU": "Ruso",
"zh-CN": "Chino simplificado",
"zh-TW": "Chino tradicional",
"ja-JP": "Japonés"
"ja-JP": "Japonés",
"ko-KR": "Coreano"
}
}
},
@@ -191,9 +237,33 @@
"open-logs": "Abrir los registros"
}
},
"changelogs": {
"open" : "🚀 ¡Descubre lo nuevo en el Changelog!",
"not-founds": "😕 Uy, ¡Changelog no encontrado!"
"advanced": {
"title": "Avanzados",
"description": "Configuraciones avanzadas para BSManager.",
"hardware-acceleration": {
"title": "Aceleración de hardware",
"description": "Habilite la aceleración de hardware para usar su GPU y mejorar el rendimiento de BSManager. Desactive esta opción si experimenta caídas de fotogramas.",
"modal": {
"title": "Reinicio necesario",
"body": "Cambiar la configuración de aceleración de hardware cerrará y reiniciará BSManager. ¿Estás seguro de que quieres hacer esto?",
"confirm-btn": "Sí, estoy seguro"
},
"error-notification": {
"message": "Ocurrió un error, no se puede desactivar la aceleración de hardware."
}
},
"use-symlinks": {
"title": "Usar enlaces simbólicos",
"description": "Utilice enlaces simbólicos en lugar de uniones para enlazar carpetas. Actívelo solo si realmente lo necesita.",
"modal": {
"title": "Permisos de enlace simbólico",
"body": "Al crear enlaces simbólicos, BSManager requerirá privilegios de administrador o el modo desarrollador activado en su sistema. ¿Estás seguro de que quieres continuar?",
"confirm-btn": "Sí, estoy seguro"
},
"error-notification": {
"message": "Ocurrió un error, no se pueden cambiar los ajustes de los enlaces simbólicos."
}
}
}
}
},
@@ -212,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "Operación en curso",
"no-internet": "Sin internet"
"no-internet": "Sin internet",
"file-not-supported": "Archivo no compatible"
},
"msg": {
"operation-running": "Espera a que termine la operación actual y vuelve a empezar.",
"no-internet": "Comprueba tu conexión a Internet e inténtalo de nuevo."
"no-internet": "Comprueba tu conexión a Internet e inténtalo de nuevo.",
"file-not-supported": "Solo se admiten archivos {types}."
}
}
},
@@ -376,8 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculus no funciona",
"BS_ALREADY_RUNNING": "Beat Saber ya está en marcha",
"EXE_NOT_FINDED": "Archivos no encontrados",
"PROTON_NOT_SET": "Carpeta de Proton no establecida",
"PROTON_NOT_FOUND": "Binario de Proton no encontrado",
"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.",
@@ -386,7 +461,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"
@@ -405,7 +483,8 @@
"CantEditSteam": "Imposible editar",
"CantRename": "Cambio de nombre imposible",
"VersionAlreadExist": "Esta versión ya existe",
"CantClone": "Clonación imposible"
"CantClone": "Clonación imposible",
"UnknownError": "Ocurrió un error desconocido"
},
"msg": {
"CantEditSteam": "No puedes editar la versión de Steam. Sin embargo, puedes clonarla."
@@ -452,12 +531,44 @@
"no-mods": "No hay mods instalados en esta versión 😑"
}
}
},
"import-mod": {
"titles": {
"success": "Importación de mods completada",
"error": "Ocurrió un error durante la importación de mods"
},
"msgs": {
"success": "Mods importados con éxito.",
"some-success": "Algunos mods fueron importados con éxito.",
"no-dlls": "El(los) archivo(s) no contienen archivos \"dll\"."
}
}
},
"maps": {
"one-click-install": {
"success": "Instalación del mapa completada",
"error": "Se produjo un error durante la instalación del mapa"
},
"no-duplicates-maps": {
"title": "Sin duplicados",
"msg": "No se eliminó ninguna carta"
},
"duplicates-maps-deleted": {
"title": "Duplicados eliminados",
"msg": "Se eliminaron los duplicados"
},
"import-map": {
"titles": {
"success": "Importación de mapas completada",
"error": "Ocurrió un error durante la importación de mapas"
},
"msgs": {
"success": "Los mapas se han importado con éxito.",
"some-success": "Algunos mapas se han importado con éxito.",
"only-accept-zip": "Solo se admiten archivos zip.",
"invalid-zip": "El o los archivos zip no contienen mapas.",
"unknown": "Se produjo un error desconocido."
}
}
},
"playlists": {
@@ -478,6 +589,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": {
@@ -488,6 +608,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": {
@@ -643,6 +771,11 @@
"title": "Mantener los mapas creará una copia de los mapas compartidos para la versión actual. De lo contrario, no se mantendrá ningún mapa para esta versión."
},
"valid-btn": "Desvincular mapas"
},
"delete-duplicate-maps": {
"title": "¿Borrar mapas?",
"desc": "Solo el mapa \"{map}\" está duplicado. ¿Estás seguro de que quieres eliminarlo?",
"desc-plural": "Se han encontrado {nb} mapas duplicados. ¿Estás seguro de que quieres eliminarlos?"
}
},
"download-maps": {
@@ -690,7 +823,7 @@
"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.",
"must-be-installed-once": "Debes tener Beat Saber instalado desde la tienda de Oculus en este dispositivo, de lo contrario, Beat Saber se cerrará automáticamente después de iniciarse.",
"will-backup": "Para lanzar esta versión, la carpeta de instalación original de Beat Saber ubicada en tu biblioteca de Oculus será renombrada y se restaurará automáticamente al cerrar Beat Saber."
},
"not-remind-me": "No volver a recordármelo",
@@ -723,12 +856,28 @@
},
"launch-as-admin": "Iniciar como Administrador",
"not-remind-me": "No volver a recordármelo"
},
"ask-install-path": {
"title": "Carpeta de instalación",
"choose-folder-description": "Elija la carpeta que contendrá todo el contenido descargado por BSManager. (versiones, mods, mapas, listas de reproducción, etc.)",
"default": "Predeterminado",
"default-tooltip": "Por defecto, en su carpeta personal"
},
"choose-proton-folder": {
"title": "Carpeta de Proton",
"proton-folder-description": "En Linux, BSManager necesita Proton para funcionar. Elija la carpeta de instalación de Proton para continuar.",
"proton-folder-placeholder": "Carpeta de instalación de Proton",
"where-is-proton-installed": "¿Dónde está instalado Proton?"
},
"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": {
"map-filter-panel": {
"duration": "Duración",
"nps" : "Notas Por Segundo",
"nps": "Notas Por Segundo",
"njs": "Velocidad de salto de nota",
"tags": "tags",
"specificities": "general",
"requirements": "requisitos",
@@ -738,19 +887,19 @@
"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",
@@ -760,26 +909,26 @@
"vocaloid": "vocaloid",
"j-rock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedia",
"drum-and-bass": "drum & bass",
"comedy-meme": "comedia & meme",
"instrumental": "instrumental",
"hardcore": "hardcore",
"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",
"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",
@@ -802,11 +951,12 @@
"by": "Por {songAutor}",
"mapped-by": "mapeado por",
"delete": "Borrar",
"preview" : "Vista previa del mapa",
"bsr-code" : "Código BSR",
"download" : "Descargar mapa",
"downloading" :"Descargando mapa",
"cancel-download" : "Cancelar descarga"
"preview": "Vista previa del mapa",
"bsr-code": "Código BSR",
"download": "Descargar mapa",
"downloading": "Descargando mapa",
"cancel-download": "Cancelar descarga",
"hightlight-difficulty": "Resaltar la dificultad"
}
},
"models": {
@@ -963,10 +1113,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 🎉"
}
@@ -998,6 +1144,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "O navegar por los archivos"
},
"playlist": {
"error-playlist-creation-title": "Error al crear la lista de reproducción",
"error-playlist-creation-desc": "Ocurrió un error al crear la lista de reproducción.",
@@ -1112,11 +1261,78 @@
"last-week": "Última semana",
"last-month": "Último mes",
"3-last-month": "Últimos 3 meses"
},
"playlists-imported": "Listas de reproducción importadas",
"all-playlists-have-been-successfully-imported": "Todas las listas de reproducción se han importado con éxito",
"no-playlist-found": "No se encontró ninguna lista de reproducción",
"no-playlist-found-in-selected-files": "No se encontró ninguna lista de reproducción en los archivos seleccionados",
"some-playlists-not-imported": "Algunas listas de reproducción no se importaron",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "No se pudieron encontrar algunas listas de reproducción",
"INVALID_PLAYLIST_FILE": "Algunas listas de reproducción no son válidas",
"CANNOT_PARSE_PLAYLIST": "Algunas listas de reproducción no se pueden leer",
"unknown": "No se pudieron importar algunas listas de reproducción"
},
"no-playlists-imported": "No se importaron listas de reproducción",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "No se pudieron encontrar las listas de reproducción",
"INVALID_PLAYLIST_FILE": "Las listas de reproducción no son válidas",
"CANNOT_PARSE_PLAYLIST": "Las listas de reproducción no se pueden leer",
"unknown": "No se pudo importar ninguna lista de reproducción"
}
},
"dateformat": {
"dayNames": ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
"monthNames": ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
"dayNames": [
"Dom",
"Lun",
"Mar",
"Mié",
"Jue",
"Vie",
"Sáb",
"Domingo",
"Lunes",
"Martes",
"Miércoles",
"Jueves",
"Viernes",
"Sábado"
],
"monthNames": [
"Ene",
"Feb",
"Mar",
"Abr",
"May",
"Jun",
"Jul",
"Ago",
"Sep",
"Oct",
"Nov",
"Dic",
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"
],
"timeNames": [
"a",
"p",
"am",
"pm",
"A",
"P",
"AM",
"PM"
]
}
}
+207 -39
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "Filtres",
"dropdown": {
"export-maps": "Exporter les maps",
"delete-maps": "Supprimer les maps"
"delete-maps": "Supprimer les maps",
"delete-duplicate-maps": "Supprimer les doublons"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Ajouter"
"drop-down": {
"browse-maps": "Explorer les maps",
"import-maps": "Importer des maps"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "Aucune map",
"button": "Télécharger des maps"
},
"drop-zone": {
"text": "Importer vos maps",
"subtext": "Déposez vos fichiers zip ici pour importer vos maps"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "Explorer les playlists",
"create-a-playlist": "Créer une playlist",
"import-playlists": "Importer des playlists"
},
"drop-zone": {
"text": "Importer vos playlists",
"subtext": "Déposez vos fichiers \".bplist\" ou \".json\" ici pour les importer"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "Aucun mod n'est encore disponible pour cette version de Beat Saber",
"buttons": {
"more-infos": "Plus d'infos",
"install-or-update": "Installer ou mettre à jour"
"install-or-update": "Installer ou mettre à jour",
"reinstall-all": "Tout réinstaller"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "Récent",
"description": "Description",
"dropdown": {
"uninstall-all": "Tout désinstaller"
"import-mods": "Importer des mods",
"uninstall-all": "Tout désinstaller",
"unselect-all": "Tout désélectionner"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "Mods déjà installées",
"description": "Tous les mods séléctionnées sont déjà installées"
}
},
"drop-zone": {
"text": "Importez vos mods",
"subtext": "Déposez vos fichiers \"zip\" ou \"dll\" ici pour les importer"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "Te déconnecter te permettra de changer de compte au prochain téléchargement de Beat Saber.",
"logout": "Déconnexion",
"logout-success": "Déconnexion réussie",
"download-platform": {
"title": "Plateforme par défaut",
"desc": "Choisi la plateforme par défaut qui sera utilisée pour télécharger les versions de Beat Saber.",
@@ -131,8 +168,15 @@
},
"installation-folder": {
"title": "Dossier d'installation",
"description": "Change le dossier par défaut pour les versions de Beat Saber et d'autres fonctionnalités à venir.",
"choose-folder": "Choisir un dossier"
"description": "Changer le dossier qui contiendra tout le contenu téléchargé par BSManager."
},
"proton-folder": {
"title": "Dossier Proton",
"description": "Changez le dossier vers le chemin de Proton. (par exemple, Proton - Experimental)",
"errors": {
"title": "Le paramétrage du dossier Proton a échoué",
"invalid-folder": "Chemin du dossier Proton invalide"
}
},
"additional-content": {
"title": "Contenus additionnels",
@@ -154,6 +198,7 @@
"zh-CN": "简体中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "Anglais, Royaume-Uni",
"en-US": "Anglais, États-Unis",
@@ -163,7 +208,8 @@
"ru-RU": "Russe",
"zh-CN": "Chinois simplifié",
"zh-TW": "Chinois traditionnel",
"ja-JP": "Japonais"
"ja-JP": "Japonais",
"ko-KR": "Coréen"
}
}
},
@@ -191,9 +237,33 @@
"open-logs": "Ouvrir les logs"
}
},
"changelogs": {
"open" : "🚀 Jetez un œil au Changelog !",
"not-founds": "😕 Oups, Changelog introuvable !"
"advanced": {
"title": "Avancés",
"description": "Paramètres avancés pour BSManager.",
"hardware-acceleration": {
"title": "Accélération matérielle",
"description": "Activez l'accélération matérielle pour utiliser votre GPU et améliorer les performances de BSManager. Désactivez cette option si vous rencontrez des chutes d'IPS.",
"modal": {
"title": "Redémarrage nécessaire",
"body": "Changer le paramètre d'accélération matérielle va quitter et relancer BSManager. Êtes-vous sûr de vouloir continuer ?",
"confirm-btn": "Oui, je suis sûr"
},
"error-notification": {
"message": "Une erreur s'est produite, impossible de désactiver l'accélération matérielle."
}
},
"use-symlinks": {
"title": "Utiliser des liens symboliques",
"description": "Utilisez des liens symboliques au lieu de jonctions pour lier des dossiers. Activez cette option uniquement si vous en avez besoin.",
"modal": {
"title": "Permissions des liens symboliques",
"body": "Lors de la création de liens symboliques, BSManager nécessitera des privilèges administrateur ou le mode développeur activé sur votre système. Êtes-vous sûr de vouloir continuer ?",
"confirm-btn": "Oui, je suis sûr"
},
"error-notification": {
"message": "Une erreur s'est produite, impossible de changer les paramètres des liens symboliques."
}
}
}
}
},
@@ -212,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "Opération en cours",
"no-internet": "Pas d'accès Internet"
"no-internet": "Pas d'accès Internet",
"file-not-supported": "Fichier non supporté"
},
"msg": {
"operation-running": "Attends la fin de l'opération en cours puis recommence.",
"no-internet": "Vérifie ta connexion internet et ressaye."
"no-internet": "Vérifie ta connexion internet et ressaye.",
"file-not-supported": "Seuls les fichiers {types} sont pris en charge."
}
}
},
@@ -376,8 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculus n'est pas lancé",
"BS_ALREADY_RUNNING": "Beat Saber est déjà lancé",
"EXE_NOT_FINDED": "Fichiers manquants",
"PROTON_NOT_SET": "Dossier Proton non défini",
"PROTON_NOT_FOUND": "Binaire Proton non trouvé",
"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.",
@@ -386,7 +461,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"
@@ -405,7 +483,8 @@
"CantEditSteam": "Modification impossible",
"CantRename": "Renommage impossible",
"VersionAlreadExist": "Cette version existe déjà",
"CantClone": "Clonage impossible"
"CantClone": "Clonage impossible",
"UnknownError": "Une erreur inconnue s'est produite"
},
"msg": {
"CantEditSteam": "Tu ne peux pas modifier la version Steam, cependant tu peux la cloner."
@@ -452,12 +531,44 @@
"no-mods": "Aucun mod n'est installé dans dans cette version 😑"
}
}
},
"import-mod": {
"titles": {
"success": "Importation des mods terminée",
"error": "Une erreur est survenue lors de l'importation des mods"
},
"msgs": {
"success": "Mods importés avec succès.",
"some-success": "Certains mods ont été importés avec succès.",
"no-dlls": "Le(s) fichier(s) ne contient(ent) aucun fichier \"dll\"."
}
}
},
"maps": {
"one-click-install": {
"success": "Installation de la map terminée",
"error": "Une erreur s'est produite lors de l'installation de la map"
},
"no-duplicates-maps": {
"title": "Pas de doublons",
"msg": "Aucune carte n'a été supprimée"
},
"duplicates-maps-deleted": {
"title": "Doublons supprimés",
"msg": "Les doublons ont été supprimés"
},
"import-map": {
"titles": {
"success": "Importation des maps terminée",
"error": "Une erreur est survenue lors de l'importation des maps"
},
"msgs": {
"success": "Les maps ont été importées avec succès.",
"some-success": "Certaines maps ont été importées avec succès.",
"only-accept-zip": "Seules les fichiers zip sont pris en charge.",
"invalid-zip": "Le ou les fichiers zip ne contiennent aucune maps.",
"unknown": "Une erreur inconnue s'est produite."
}
}
},
"playlists": {
@@ -478,7 +589,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": {
@@ -488,6 +609,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": {
@@ -643,6 +772,11 @@
"title": "Conserver les maps créera une copie des maps partagées pour la version actuelle. Dans le cas contraire, aucune map ne sera conservée pour cette version."
},
"valid-btn": "Délier les maps"
},
"delete-duplicate-maps": {
"title": "Supprimer les maps ?",
"desc": "Seule la map \"{map}\" est en double. Es-tu sûr de vouloir la supprimer ?",
"desc-plural": "{nb} maps en double ont été trouvées. Es-tu sûr de vouloir les supprimer ?"
}
},
"download-maps": {
@@ -671,7 +805,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"
@@ -690,7 +824,7 @@
"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.",
"must-be-installed-once": "Vous devez avoir Beat Saber installé depuis le Oculus Store sur cet appareil, sinon Beat Saber se fermera automatiquement après le lancement.",
"will-backup": "Afin de lancer cette version, le dossier d'installation original de Beat Saber se trouvant dans votre bibliothèque Oculus va être renommé et sera automatiquement restauré à l'arrêt de Beat Saber."
},
"not-remind-me": "Ne plus me rappeler",
@@ -723,12 +857,28 @@
},
"launch-as-admin": "Lancer en administateur",
"not-remind-me": "Ne plus me rappeler"
},
"ask-install-path": {
"title": "Dossier d'installation",
"choose-folder-description": "Choisissez le dossier qui contiendra tout le contenu téléchargé par BSManager. (versions, mods, cartes, playlists, etc.)",
"default": "Par défaut",
"default-tooltip": "Par défaut, dans votre dossier personnel"
},
"choose-proton-folder": {
"title": "Dossier Proton",
"proton-folder-description": "Sous Linux, BSManager a besoin de Proton pour fonctionner. Choisissez le dossier d'installation de Proton pour continuer.",
"proton-folder-placeholder": "Dossier d'installation de Proton",
"where-is-proton-installed": "Où est installé Proton ?"
},
"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": {
"map-filter-panel": {
"duration": "Durée",
"nps" : "Notes Par Seconde",
"njs": "Vitesse de saut des notes",
"tags": "tags",
"specificities": "général",
"requirements": "requis",
@@ -738,48 +888,48 @@
"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",
"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",
"k-pop": "k-pop",
"indie": "indé",
"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",
"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",
@@ -964,10 +1114,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é 🎉"
}
@@ -999,6 +1145,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "Ou parcourir les fichiers"
},
"playlist": {
"error-playlist-creation-title": "Erreur lors de la création de la playlist",
"error-playlist-creation-desc": "Une erreur est survenue lors de la création de la playlist.",
@@ -1113,7 +1262,26 @@
"last-week": "Dernière semaine",
"last-month": "Dernier mois",
"3-last-month": "3 derniers mois"
},
"playlists-imported": "Playlists importées",
"all-playlists-have-been-successfully-imported": "Toutes les playlists ont été importées avec succès",
"no-playlist-found": "Aucune playlist trouvée",
"no-playlist-found-in-selected-files": "Aucune playlist trouvée dans les fichiers sélectionnés",
"some-playlists-not-imported": "Certaines playlists non importées",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "Certaines playlists n'ont pas pu être trouvées",
"INVALID_PLAYLIST_FILE": "Certaines playlists ne sont pas valides",
"CANNOT_PARSE_PLAYLIST": "Certaines playlists ne sont pas lisibles",
"unknown": "Certaines playlists n'ont pas pu être importées"
},
"no-playlists-imported": "Aucune playlist importée",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "Les playlists n'ont pas été trouvées",
"INVALID_PLAYLIST_FILE": "Les playlists ne sont pas valides",
"CANNOT_PARSE_PLAYLIST": "Les playlists ne sont pas lisibles",
"unknown": "Aucune playlist n'a pu être importée"
}
},
"dateformat": {
"dayNames": ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
+207 -40
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "絞り込み",
"dropdown": {
"export-maps": "マップをエクスポート",
"delete-maps": "マップを削除"
"delete-maps": "マップを削除",
"delete-duplicate-maps": " 重複を削除"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "追加"
"drop-down": {
"browse-maps": "マップを閲覧",
"import-maps": "マップをインポート"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "マップがありません",
"button": "マップをダウンロードする"
},
"drop-zone": {
"text": "マップをインポート",
"subtext": "ZIPファイルをここにドロップしてマップをインポート"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "プレイリストを閲覧",
"create-a-playlist": "プレイリストを作成",
"import-playlists": "プレイリストをインポート"
},
"drop-zone": {
"text": "プレイリストをインポート",
"subtext": "\".bplist\" または \".json\" ファイルをここにドロップしてインポート"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "このバージョンで使用できるMODはまだありません。",
"buttons": {
"more-infos": "詳細情報",
"install-or-update": "インストールとアップデート"
"install-or-update": "インストールとアップデート",
"reinstall-all": "すべて再インストール"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "最新",
"description": "說明",
"dropdown": {
"uninstall-all": "全てアンインストールする"
"import-mods": "モッドをインポート",
"uninstall-all": "全てアンインストールする",
"unselect-all": "すべて選択解除"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "すでにインストール済みのMOD",
"description": "選択したすべてのMODはすでにインストールされています"
}
},
"drop-zone": {
"text": "モッドをインポートする",
"subtext": "「zip」または「dll」ファイルをここにドロップしてインポートする"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "ログアウトすると、次のBeat Saberダウンロード時にアカウントを切り替えることができます。",
"logout": "ログアウト",
"logout-success": "ログアウト成功",
"download-platform": {
"title": "デフォルトプラットフォーム",
"desc": "Beat Saberのダウンロードに使用するデフォルトのプラットフォームを選択します。",
@@ -131,8 +168,15 @@
},
"installation-folder": {
"title": "インストールフォルダー",
"description": "BeatSaberのバージョンとその他の今後の機能を入れるフォルダを変更します。",
"choose-folder": "フォルダーを選択"
"description": "BSManager によってダウンロードされたすべてのコンテンツを含むフォルダを変更します。"
},
"proton-folder": {
"title": "Protonフォルダー",
"description": "フォルダーをProtonのパスに変更してください。(例:Proton - Experimental",
"errors": {
"title": "Protonフォルダーの設定に失敗しました",
"invalid-folder": "無効なProtonフォルダーのパスです"
}
},
"additional-content": {
"title": "追加コンテンツ",
@@ -154,6 +198,7 @@
"zh-CN": "简体中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "イギリス英語",
"en-US": "アメリカ英語",
@@ -163,7 +208,8 @@
"ru-RU": "ロシア語",
"zh-CN": "簡体字中国",
"zh-TW": "繁体字中国",
"ja-JP": "日本語"
"ja-JP": "日本語",
"ko-KR": "韓国語"
}
}
},
@@ -191,9 +237,33 @@
"open-logs": "ログを表示"
}
},
"changelogs": {
"open" : "🚀 チェンジログを覗いてみて!",
"not-founds": "😕 あれ、チェンジログが見当たらない!"
"advanced": {
"title": "高度な設定",
"description": "BSManagerの高度な設定。",
"hardware-acceleration": {
"title": "ハードウェアアクセラレーション",
"description": "ハードウェアアクセラレーションを有効にしてGPUを使用し、BSManagerのパフォーマンスを向上させます。フレームドロップが発生している場合は、これをオフにしてください。",
"modal": {
"title": "再起動が必要",
"body": "ハードウェアアクセラレーションの設定を変更すると、BSManagerが終了して再起動します。本当に続行しますか?",
"confirm-btn": "はい、確かです"
},
"error-notification": {
"message": "エラーが発生しました。ハードウェアアクセラレーションを無効にできません。"
}
},
"use-symlinks": {
"title": "シンボリックリンクを使用",
"description": "フォルダをリンクするためにジャンクションの代わりにシンボリックリンクを使用します。本当に必要な場合にのみこれをオンにしてください。",
"modal": {
"title": "シンボリックリンクの権限",
"body": "シンボリックリンクを作成する際、BSManagerは管理者権限またはシステムで有効になっている開発者モードを必要とします。本当に続行しますか?",
"confirm-btn": "はい、確かです"
},
"error-notification": {
"message": "エラーが発生しました。シンボリックリンク設定を変更できません。"
}
}
}
}
},
@@ -212,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "稼働中",
"no-internet": "インターネット接続がありません"
"no-internet": "インターネット接続がありません",
"file-not-supported": "ファイルはサポートされていません"
},
"msg": {
"operation-running": "現在の処理が終了するのを待ってから、もう一度試してください。",
"no-internet": "インターネット接続を確認し、もう一度お試しください。"
"no-internet": "インターネット接続を確認し、もう一度お試しください。",
"file-not-supported": "{types}ファイルのみがサポートされています。"
}
}
},
@@ -376,8 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculusが起動していません",
"BS_ALREADY_RUNNING": "Beat Saberはすでに起動しています",
"EXE_NOT_FINDED": "ファイルが見つかりません",
"PROTON_NOT_SET": "Protonフォルダーが設定されていません",
"PROTON_NOT_FOUND": "Protonのバイナリが見つかりません",
"EXIT": "緊急停止",
"OCULUS_LIB_NOT_FOUND": "Oculusライブラリが見つかりません"
"OCULUS_LIB_NOT_FOUND": "Oculusライブラリが見つかりません",
"ORIGINAL_OCULUS_NOT_INSTALLED": "オリジナルのOculusバージョンが見つかりませんでした"
},
"msg": {
"UNKNOWN_ERROR": "不明なエラーが発生しました。",
@@ -386,7 +461,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を起動"
@@ -405,7 +483,8 @@
"CantEditSteam": "編集不可",
"CantRename": "改名不可能",
"VersionAlreadExist": "このバージョンは既に存在しています!",
"CantClone": "クローン作成不可"
"CantClone": "クローン作成不可",
"UnknownError": "不明なエラーが発生しました"
},
"msg": {
"CantEditSteam": "Steam版は編集できませんがクローンを作ることは可能です。"
@@ -452,12 +531,44 @@
"no-mods": "このバージョンのModはインストールされていません 😑"
}
}
},
"import-mod": {
"titles": {
"success": "モッドのインポートが完了しました",
"error": "モッドのインポート中にエラーが発生しました"
},
"msgs": {
"success": "モッドが正常にインポートされました。",
"some-success": "一部のモッドが正常にインポートされました。",
"no-dlls": "ファイルに \"dll\" ファイルが含まれていません。"
}
}
},
"maps": {
"one-click-install": {
"success": "マップのインストール完了",
"error": "マップのインストール中にエラーが発生しました"
},
"no-duplicates-maps": {
"title": "重複なし",
"msg": "マップは削除されませんでした"
},
"duplicates-maps-deleted": {
"title": "重複削除",
"msg": "重複が削除されました"
},
"import-map": {
"titles": {
"success": "マップのインポートが完了しました",
"error": "マップのインポート中にエラーが発生しました"
},
"msgs": {
"success": "マップが正常にインポートされました。",
"some-success": "一部のマップが正常にインポートされました。",
"only-accept-zip": "zipファイルのみがサポートされています。",
"invalid-zip": "zipファイルにマップが含まれていません。",
"unknown": "不明なエラーが発生しました。"
}
}
},
"playlists": {
@@ -478,6 +589,15 @@
"title": "バックアップを作成しました",
"msg": "'UserData'フォルダを共有するとエラーが発生する可能性があります。問題が発生した場合は、フォルダをリンク解除してバックアップを復元してください。"
}
},
"linking-error": {
"title": "フォルダのリンク中にエラーが発生しました",
"msg": {
"EPERM": "BSManagerにはフォルダをリンクするための必要な権限がありません。",
"EACCES": "BSManagerにはフォルダをリンクするための必要な権限がありません。",
"ENOSPC": "ディスクがいっぱいです。空き容量を作ってもう一度試してください。",
"UNKNOWN_ERROR": "フォルダをリンク中に不明なエラーが発生しました。"
}
}
},
"create-launch-shortcut": {
@@ -488,6 +608,14 @@
"error": {
"msg": "ショートカットの作成中にエラーが発生しました。"
}
},
"bs-version-oudated": {
"title": "バージョンが古い",
"msg": "このBeat Saberのバージョンは古いため、推奨バージョンを使用して最新の機能やバグ修正をお楽しみください。",
"actions": {
"do-not-remind": "再度通知しない",
"ok": "OK"
}
}
},
"modals": {
@@ -643,6 +771,11 @@
"title": "マップを保持は、リンクを解除した後、共有フォルダから現在のバージョンにすべてのマップをコピーします。これを無効をしても共有マップは失われません。"
},
"valid-btn": "マップのリンクを解除"
},
"delete-duplicate-maps": {
"title": "マップを削除しますか?",
"desc": "マップ「{map}」のみが重複しています。削除してもよろしいですか?",
"desc-plural": "{nb}個の重複したマップが見つかりました。削除してもよろしいですか?"
}
},
"download-maps": {
@@ -690,7 +823,7 @@
"original-version-backup-oculus": {
"title": "注意",
"body": {
"must-be-installed-once": "少なくとも一度はOculus StoreからBeat Saberをインストールしている必要があります。そうしないとBeat Saberは起動後に自動的に終了する可能性があります。",
"must-be-installed-once": "このデバイスにOculusストアからBeat Saberをインストールしておく必要があります。そうしないとBeat Saberは起動後に自動的に閉じます。",
"will-backup": "このバージョンを起動するために、OculusライブラリにあるBeat Saberの元のインストールフォルダは名前が変更され、Beat Saberの終了時に自動的に復元されます。"
},
"not-remind-me": "二度と表示しないでください",
@@ -723,12 +856,28 @@
},
"launch-as-admin": "管理者として起動",
"not-remind-me": "Больше не напоминать"
},
"ask-install-path": {
"title": "インストールフォルダー",
"choose-folder-description": "BSManager によってダウンロードされたすべてのコンテンツ (バージョン、MOD、マップ、プレイリストなど) を含むフォルダを選択してください。",
"default": "デフォルト",
"default-tooltip": "デフォルトでは、ホームフォルダに設定されます"
},
"choose-proton-folder": {
"title": "Protonフォルダ",
"proton-folder-description": "Linuxでは、BSManagerを動作させるためにProtonが必要です。続行するには、Protonのインストールフォルダを選択してください。",
"proton-folder-placeholder": "Protonのインストールフォルダ",
"where-is-proton-installed": "Protonはどこにインストールされていますか?"
},
"bs-version-outdated": {
"body": "バージョン {outdatedVersion} は古いため、一部のモッドや機能が期待通りに動作しない場合があります。最新の機能やバグ修正を楽しむために、推奨される最新バージョンの Beat Saber ({recommendedVersion}) をダウンロードしてください。"
}
},
"maps": {
"map-filter-panel": {
"duration": "尺",
"nps" : "秒間ノート数",
"njs": "ノートジャンプ速度",
"tags": "タグ",
"specificities": "一般",
"requirements": "要Mod",
@@ -738,7 +887,7 @@
"accuracy": "正確",
"balanced": "バランス",
"challenge": "挑戦",
"dancestyle": "ダンス",
"dance-style": "ダンス",
"fitness": "フットネス",
"speed": "スピード",
"tech": "技術的"
@@ -747,39 +896,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": "ボーカロイド",
"j-rock": "j-rock",
"j-rock": "J-ロック",
"trance": "トランス",
"drumbass": "ドラムベース",
"comedy": "コメディ",
"instrumental": "器楽",
"drum-and-bass": "ドラム & ベース",
"comedy-meme": "コメディ & ミーム",
"instrumental": "インストゥルメンタル",
"hardcore": "ハードコア",
"k-pop": "k-pop",
"indie": "インディー",
"techno": "テクノ",
"house": "",
"game": "ビデオゲーム",
"film": "映画音楽",
"alt": "オルタナティ",
"house": "ハウス",
"video-game-soundtrack": "ゲーム音楽",
"tv-movie-soundtrack": "TV & 映画",
"alternative": "オルタナティ",
"dubstep": "ダブステップ",
"metal": "メタル",
"anime": "アニメ",
"hiphop": "ヒップップ",
"j-pop": "j-pop",
"hip-hop-rap": "ヒップホップ & ラップ",
"j-pop": "J-ポップ",
"rock": "ロック",
"pop": "ポップ",
"electronic": "エレクトロニック",
"classical-orchestral": "Classical & Orchestral"
"classical-orchestral": "クラシック & オーケストラ"
},
"map-specificities": {
"automapper": "AI",
@@ -806,7 +955,8 @@
"bsr-code" : "BSRコード",
"download" : "マップをダウンロード",
"downloading" :"マップをダウンロード中",
"cancel-download" : "ダウンロードをキャンセル"
"cancel-download" : "ダウンロードをキャンセル",
"hightlight-difficulty": "難易度をハイライト"
}
},
"models": {
@@ -963,10 +1113,6 @@
"go-to-mods": "Modインストーラーに移動",
"not-remind": "二度と表示しないで"
},
"prevent-for-models-breaks": {
"title": "モデルが壊れています!",
"desc": "Beat Saberのエンジンアップデート以来、すべてのカスタムモデルのMODが壊れており、更新が必要です。まだ更新されていません。"
},
"export-success": {
"title": "エクスポート完了🎉"
}
@@ -998,6 +1144,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "またはファイルを参照"
},
"playlist": {
"error-playlist-creation-title": "プレイリストの作成エラー",
"error-playlist-creation-desc": "プレイリストの作成中にエラーが発生しました。",
@@ -1112,6 +1261,24 @@
"last-week": "先週",
"last-month": "先月",
"3-last-month": "過去3ヶ月"
},
"playlists-imported": "プレイリストがインポートされました",
"all-playlists-have-been-successfully-imported": "すべてのプレイリストが正常にインポートされました",
"no-playlist-found": "プレイリストが見つかりません",
"no-playlist-found-in-selected-files": "選択されたファイルにプレイリストが見つかりません",
"some-playlists-not-imported": "一部のプレイリストはインポートされませんでした",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "一部のプレイリストが見つかりませんでした",
"INVALID_PLAYLIST_FILE": "一部のプレイリストは無効です",
"CANNOT_PARSE_PLAYLIST": "一部のプレイリストは読み取れません",
"unknown": "一部のプレイリストをインポートできませんでした"
},
"no-playlists-imported": "プレイリストはインポートされませんでした",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "プレイリストが見つかりませんでした",
"INVALID_PLAYLIST_FILE": "プレイリストは無効です",
"CANNOT_PARSE_PLAYLIST": "プレイリストは読み取れません",
"unknown": "プレイリストをインポートできませんでした"
}
},
"dateformat": {
File diff suppressed because it is too large Load Diff
+208 -41
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "Фильтр",
"dropdown": {
"export-maps": "Экспорт карт",
"delete-maps": "Удалить карты"
"delete-maps": "Удалить карты",
"delete-duplicate-maps": "Удалить дубликаты"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Добавить"
"drop-down": {
"browse-maps": "Просмотр карт",
"import-maps": "Импорт карт"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "Нет карт",
"button": "Скачать карты"
},
"drop-zone": {
"text": "Импортируйте свои карты",
"subtext": "Перетащите сюда файлы ZIP, чтобы импортировать свои карты"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "Просмотр плейлистов",
"create-a-playlist": "Создать плейлист",
"import-playlists": "Импорт плейлистов"
},
"drop-zone": {
"text": "Импортируйте ваши плейлисты",
"subtext": "Перетащите сюда файлы \".bplist\" или \".json\" для их импорта"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "Не найдены моды для этой версии Beat Saber",
"buttons": {
"more-infos": "Подробнее",
"install-or-update": "Установить или обновить"
"install-or-update": "Установить или обновить",
"reinstall-all": "Переустановить все"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "Latest",
"description": "Описание",
"dropdown": {
"uninstall-all": "Удалить всё"
"import-mods": "Импортировать моды",
"uninstall-all": "Удалить всё",
"unselect-all": "Снять все выделения"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "Моды уже установлены",
"description": "Все выбранные моды уже установлены"
}
},
"drop-zone": {
"text": "Импортируйте свои моды",
"subtext": "Перетащите ваши файлы \"zip\" или \"dll\" сюда для импорта"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "Выход позволит вам сменить учетную запись при следующей загрузке Beat Saber.",
"logout": "Выйти",
"logout-success": "Выход выполнен успешно",
"download-platform": {
"title": "Основная платформа",
"desc": "Выберите основную платформу, которая будет использоваться для скачивания версий Beat Saber.",
@@ -131,8 +168,15 @@
},
"installation-folder": {
"title": "Папка установок",
"description": "Измените стандартную папку, где будут версии Beat Saber и прочее.",
"choose-folder": "Изменить папку"
"description": "Изменить папку, которая будет содержать весь контент, загруженный BSManager."
},
"proton-folder": {
"title": "Папка Proton",
"description": "Измените папку на путь к Proton. (например, Proton - Experimental)",
"errors": {
"title": "Не удалось установить папку Proton",
"invalid-folder": "Недействительный путь к папке Proton"
}
},
"additional-content": {
"title": "Дополнительный контент",
@@ -154,6 +198,7 @@
"zh-CN": "简体中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "Английский, Великобритания",
"en-US": "Английский, США",
@@ -163,7 +208,8 @@
"ru-RU": "Русский",
"zh-CN": "Китайский (упрощенный)",
"zh-TW": "Китайский (традиционный)",
"ja-JP": "Японский"
"ja-JP": "Японский",
"ko-KR": "Корейский"
}
}
},
@@ -191,9 +237,33 @@
"open-logs": "Открыть логи"
}
},
"changelogs": {
"open" : "🚀 Изучаем Changelog!",
"not-founds": "😕 Ой, Changelog нигде не видно!"
"advanced": {
"title": "Дополнительные",
"description": "Дополнительные настройки для BSManager.",
"hardware-acceleration": {
"title": "Аппаратное ускорение",
"description": "Включите аппаратное ускорение, чтобы использовать ваш GPU и улучшить производительность BSManager. Отключите эту опцию, если у вас возникают пропуски кадров.",
"modal": {
"title": "Требуется перезагрузка",
"body": "Изменение настройки аппаратного ускорения приведет к завершению и перезапуску BSManager. Вы уверены, что хотите это сделать?",
"confirm-btn": "Да, я уверен"
},
"error-notification": {
"message": "Произошла ошибка, невозможно отключить аппаратное ускорение."
}
},
"use-symlinks": {
"title": "Использовать символические ссылки",
"description": "Используйте символические ссылки вместо соединений для связывания папок. Включайте эту опцию только если это действительно необходимо.",
"modal": {
"title": "Разрешения для символических ссылок",
"body": "При создании символических ссылок BSManager потребуется права администратора или включенный режим разработчика на вашем устройстве. Вы уверены, что хотите продолжить?",
"confirm-btn": "Да, я уверен"
},
"error-notification": {
"message": "Произошла ошибка, невозможно изменить настройки символических ссылок."
}
}
}
}
},
@@ -212,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "Операция в процессе",
"no-internet": "Нет интернета"
"no-internet": "Нет интернета",
"file-not-supported": "Файл не поддерживается"
},
"msg": {
"operation-running": "Дождитесь завершения операции, потом попробуйте снова.",
"no-internet": "Проверьте своё соединение и попробуйте снова."
"no-internet": "Проверьте своё соединение и попробуйте снова.",
"file-not-supported": "Поддерживаются только файлы {types}."
}
}
},
@@ -376,8 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculus не запущен",
"BS_ALREADY_RUNNING": "Beat Saber уде запущен",
"EXE_NOT_FINDED": "Отсутствуют файлы",
"PROTON_NOT_SET": "Папка Proton не установлена",
"PROTON_NOT_FOUND": "Бинарный файл Proton не найде",
"EXIT": "Вылет",
"OCULUS_LIB_NOT_FOUND": "Библиотека Oculus не найдена"
"OCULUS_LIB_NOT_FOUND": "Библиотека Oculus не найдена",
"ORIGINAL_OCULUS_NOT_INSTALLED": "Оригинальная версия Oculus не найдена"
},
"msg": {
"UNKNOWN_ERROR": "Возникла неизвестная ошибка.",
@@ -386,7 +461,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"
@@ -405,7 +483,8 @@
"CantEditSteam": "Не удалось изменить",
"CantRename": "Переименование невозможно",
"VersionAlreadExist": "Эта версия уже добавлена",
"CantClone": "Клонирование невозможно"
"CantClone": "Клонирование невозможно",
"UnknownError": "Произошла неизвестная ошибка"
},
"msg": {
"CantEditSteam": "Вы не можете изменить версию из Steam, но вы можете её клонировать."
@@ -452,12 +531,44 @@
"no-mods": "Для этой версии не было установлено модов 😑"
}
}
},
"import-mod": {
"titles": {
"success": "Импорт модов завершен",
"error": "Произошла ошибка при импорте модов"
},
"msgs": {
"success": "Моды успешно импортированы.",
"some-success": "Некоторые моды были успешно импортированы.",
"no-dlls": "Файл(ы) не содержат файлов \"dll\"."
}
}
},
"maps": {
"one-click-install": {
"success": "Карта установлена",
"error": "Ошибка установки карты"
},
"no-duplicates-maps": {
"title": "Нет дубликатов",
"msg": "Ни одна карта не была удалена"
},
"duplicates-maps-deleted": {
"title": "Дубликаты удалены",
"msg": "Дубликаты были удалены"
},
"import-map": {
"titles": {
"success": "Импорт карт завершен",
"error": "Произошла ошибка при импорте карт"
},
"msgs": {
"success": "Карты были успешно импортированы.",
"some-success": "Некоторые карты успешно импортированы.",
"only-accept-zip": "Поддерживаются только zip-файлы.",
"invalid-zip": "В zip-файле(ах) нет карт.",
"unknown": "Произошла неизвестная ошибка."
}
}
},
"playlists": {
@@ -478,6 +589,15 @@
"title": "Бэкап создан",
"msg": "Общая папка 'UserData' может создавать ошибки. В случае проблем отвяжите папку, чтобы восстановить бэкап."
}
},
"linking-error": {
"title": "Ошибка при связывании папки",
"msg": {
"EPERM": "BSManager не имеет необходимых прав для связывания папки.",
"EACCES": "BSManager не имеет необходимых прав для связывания папки.",
"ENOSPC": "Диск заполнен, освободите место и попробуйте снова.",
"UNKNOWN_ERROR": "Произошла неизвестная ошибка при связывании папки."
}
}
},
"create-launch-shortcut": {
@@ -488,6 +608,14 @@
"error": {
"msg": "Ошибка создания ярлыка."
}
},
"bs-version-oudated": {
"title": "Устаревшая версия",
"msg": "Эта версия Beat Saber устарела. Используйте рекомендуемую версию, чтобы воспользоваться последними функциями и исправлениями ошибок.",
"actions": {
"do-not-remind": "Больше не напоминать",
"ok": "Ок"
}
}
},
"modals": {
@@ -643,6 +771,11 @@
"title": "Общие карты будут скопированы в папку карт этой версии. Карты не будут потеряны, если это не выбрано."
},
"valid-btn": "Отвязать карты"
},
"delete-duplicate-maps": {
"title": "Удалить карту?",
"desc": "Только карта \"{map}\" является дубликатом. Вы уверены, что хотите ее удалить?",
"desc-plural": "Найдено {nb} дубликатов карт. Вы уверены, что хотите их удалить?"
}
},
"download-maps": {
@@ -690,7 +823,7 @@
"original-version-backup-oculus": {
"title": "Внимание",
"body": {
"must-be-installed-once": "Вы должны были установить Beat Saber хотя бы один раз из Oculus Store, иначе Beat Saber может автоматически закрыться после запуска.",
"must-be-installed-once": "Вы должны установить Beat Saber из магазина Oculus на этом устройстве, в противном случае Beat Saber автоматически закроется после запуска.",
"will-backup": "Для запуска этой версии исходная папка установки Beat Saber, находящаяся в вашей библиотеке Oculus, будет переименована и автоматически восстановлена при выходе из Beat Saber."
},
"not-remind-me": "Больше не напоминать",
@@ -722,12 +855,28 @@
"info-3": "Обратите внимание, что не рекомендуется предоставлять права администратора Steam, так как это также влияет на установленные игры и моды, представляя угрозу безопасности."
},
"launch-as-admin": "Запустить от имени администратора"
},
"ask-install-path": {
"title": "Папка установок",
"choose-folder-description": "Выберите папку, которая будет содержать весь контент, загруженный BSManager. (версии, моды, карты, плейлисты и т.д.)",
"default": "По умолчанию",
"default-tooltip": "По умолчанию в вашей домашней папке"
},
"choose-proton-folder": {
"title": "Папка Proton",
"proton-folder-description": "В Linux BSManager требует Proton для работы. Выберите папку установки Proton, чтобы продолжить.",
"proton-folder-placeholder": "Папка установки Proton",
"where-is-proton-installed": "Где установлен Proton?"
},
"bs-version-outdated": {
"body": "Версия {outdatedVersion} устарела, и некоторые моды или функции могут работать некорректно. Пожалуйста, скачайте последнюю рекомендуемую версию ({recommendedVersion}) Beat Saber, чтобы воспользоваться новейшими функциями и исправлениями ошибок."
}
},
"maps": {
"map-filter-panel": {
"duration": "Длительность",
"nps" : "Нот в Секунду",
"njs": "Скорость прыжка нот",
"tags": "тэги",
"specificities": "основное",
"requirements": "требуемые моды",
@@ -737,7 +886,7 @@
"accuracy": "точность",
"balanced": "баланс",
"challenge": "испытание",
"dancestyle": "танец",
"dance-style": "танец",
"fitness": "фитнес",
"speed": "скорость",
"tech": "техника"
@@ -746,36 +895,36 @@
"dance": "танец",
"swing": "свинг",
"nightcore": "найткор",
"folk": "народные",
"family": "семейные",
"folk-acoustic": "фолк и акустика",
"kids-family": "дети и семья",
"ambient": "эмбиент",
"funk": "фанк",
"funk-disco": "фанк и диско",
"jazz": "джаз",
"soul": "соул",
"speedcore": "спидкор",
"punk": "панк",
"rb": "ар-н-би",
"holiday": "праздник",
"vocaloid": "вокалоиды",
"rb": "r&b",
"holiday": "праздники",
"vocaloid": "вокалоид",
"j-rock": "джей-рок",
"trance": "транс",
"drumbass": "драм-н-бейс",
"comedy": "комедия",
"instrumental": "инструментальные",
"drum-and-bass": "драм-н-бейс",
"comedy-meme": "комедия и мемы",
"instrumental": "инструментал",
"hardcore": "хардкор",
"k-pop": "кей-поп",
"k-pop": "k-pop",
"indie": "инди",
"techno": "техно",
"house": "хаус",
"game": "видеоигры",
"film": "фильмы",
"alt": "альтернативные",
"dubstep": "дапстеп",
"video-game-soundtrack": "видеоигра",
"tv-movie-soundtrack": "ТВ и кино",
"alternative": "альтернатива",
"dubstep": "дабстеп",
"metal": "метал",
"anime": "аниме",
"hiphop": "хипхоп",
"j-pop": "джей-поп",
"rock": "прк",
"hip-hop-rap": "хип-хоп и рэп",
"j-pop": "j-pop",
"rock": "рок",
"pop": "поп",
"electronic": "электроника",
"classical-orchestral": "Классика и Оркестр"
@@ -805,7 +954,8 @@
"bsr-code" : "Код BSR",
"download" : "Скачать карту",
"downloading" :"Загрузка карты",
"cancel-download" : "Отменить загрузку"
"cancel-download" : "Отменить загрузку",
"hightlight-difficulty": "Выделить сложность"
}
},
"models": {
@@ -962,10 +1112,6 @@
"go-to-mods": "Перейти к модам",
"not-remind": "Больше не напоминать"
},
"prevent-for-models-breaks": {
"title": "Сломанные модели",
"desc": "С момента обновления движка Beat Saber, все пользовательские модификации моделей сломались и требуют обновления. Они еще не были обновлены."
},
"export-success": {
"title": "Экспорт завершен 🎉"
}
@@ -997,6 +1143,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "Или просмотреть файлы"
},
"playlist": {
"error-playlist-creation-title": "Ошибка при создании плейлиста",
"error-playlist-creation-desc": "Произошла ошибка при создании плейлиста.",
@@ -1111,6 +1260,24 @@
"last-week": "Последняя неделя",
"last-month": "Последний месяц",
"3-last-month": "Последние 3 месяца"
},
"playlists-imported": "Плейлисты импортированы",
"all-playlists-have-been-successfully-imported": "Все плейлисты успешно импортированы",
"no-playlist-found": "Плейлист не найден",
"no-playlist-found-in-selected-files": "Плейлист не найден в выбранных файлах",
"some-playlists-not-imported": "Некоторые плейлисты не импортированы",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "Некоторые плейлисты не найдены",
"INVALID_PLAYLIST_FILE": "Некоторые плейлисты недействительны",
"CANNOT_PARSE_PLAYLIST": "Некоторые плейлисты нечитаемы",
"unknown": "Некоторые плейлисты не удалось импортировать"
},
"no-playlists-imported": "Плейлисты не импортированы",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "Плейлисты не найдены",
"INVALID_PLAYLIST_FILE": "Плейлисты недействительны",
"CANNOT_PARSE_PLAYLIST": "Плейлисты нечитаемы",
"unknown": "Не удалось импортировать плейлисты"
}
},
"dateformat": {
+227 -60
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "篩選",
"dropdown": {
"export-maps": "導出譜面",
"delete-maps": "刪除譜面"
"delete-maps": "刪除譜面",
"delete-duplicate-maps": "刪除重複項"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "新增"
"drop-down": {
"browse-maps": "瀏覽地圖",
"import-maps": "匯入地圖"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "無譜面",
"button": "下載譜面"
},
"drop-zone": {
"text": "導入您的地圖",
"subtext": "將ZIP文件拖放到此處以導入您的地圖"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "瀏覽播放列表",
"create-a-playlist": "建立播放列表",
"import-playlists": "匯入播放列表"
},
"drop-zone": {
"text": "匯入您的播放列表",
"subtext": "將您的 \".bplist\" 或 \".json\" 檔案拖曳到這裡進行匯入"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "該版本 BeatSaber 暫無可用 Mod",
"buttons": {
"more-infos": "更多資訊",
"install-or-update": "安裝或更新"
"install-or-update": "安裝或更新",
"reinstall-all": "重新安裝全部"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "最新",
"description": "描述",
"dropdown": {
"uninstall-all": "全部移除"
"import-mods": "導入模組",
"uninstall-all": "全部移除",
"unselect-all": "取消全選"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "模組已安裝",
"description": "所有選中的模組已經安裝"
}
},
"drop-zone": {
"text": "匯入你的模組",
"subtext": "將你的 \"zip\" 或 \"dll\" 檔案拖放到這裡以進行匯入"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "登出後,您可以在下一次下載 Beat Saber 時切換帳戶。",
"logout": "登出",
"logout-success": "登出成功",
"download-platform": {
"title": ",預設平台",
"desc": "選擇要下載 BeatSaber 的預設平台。",
@@ -131,8 +168,15 @@
},
"installation-folder": {
"title": "安裝文件夾",
"description": "為 BeatSaber 不同版本及未來其他特性修改預設文件夾",
"choose-folder": "選擇文件夾"
"description": "更改將包含 BSManager 下載的所有內容的文件夾"
},
"proton-folder": {
"title": "Proton資料夾",
"description": "將資料夾更改為Proton路徑。(例如:Proton - Experimental",
"errors": {
"title": "設置Proton資料夾失敗",
"invalid-folder": "無效的Proton資料夾路徑"
}
},
"additional-content": {
"title": "附加內容",
@@ -154,6 +198,7 @@
"zh-CN": "簡體中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "英式英語",
"en-US": "美式英語",
@@ -163,7 +208,8 @@
"ru-RU": "俄語",
"zh-CN": "簡體中文",
"zh-TW": "正體中文",
"ja-JP": "日語"
"ja-JP": "日語",
"ko-KR": "韓語"
}
}
},
@@ -191,9 +237,33 @@
"open-logs": "打開日誌"
}
},
"changelogs": {
"open" : "🚀 探索更新日誌!",
"not-founds": "😕 噢,找不到更新日誌!"
"advanced": {
"title": "高级设置",
"description": "BSManager的高级设置。",
"hardware-acceleration": {
"title": "硬體加速",
"description": "啟用硬體加速以使用您的GPU並提高BSManager的性能。如果您遇到幀丟失,請關閉此功能。",
"modal": {
"title": "需要重啟",
"body": "更改硬體加速設置將退出並重新啟動BSManager。您確定要這樣做嗎?",
"confirm-btn": "是的,我確定"
},
"error-notification": {
"message": "發生錯誤,無法禁用硬體加速。"
}
},
"use-symlinks": {
"title": "使用符號鏈接",
"description": "使用符號鏈接而不是連接來鏈接文件夾。僅在確實需要時才啟用此功能。",
"modal": {
"title": "符號鏈接權限",
"body": "創建符號鏈接時,BSManager將需要管理員權限或啟用開發者模式。您確定要繼續嗎?",
"confirm-btn": "是的,我確定"
},
"error-notification": {
"message": "發生錯誤,無法更改符號鏈接設置。"
}
}
}
}
},
@@ -212,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "操作進行中",
"no-internet": "無網路"
"no-internet": "無網路",
"file-not-supported": "文件不受支持"
},
"msg": {
"operation-running": "等待當前操作完成,然後重試。",
"no-internet": "檢查你的連接並重試。"
"no-internet": "檢查你的連接並重試。",
"file-not-supported": "僅支援{types}檔案。"
}
}
},
@@ -376,8 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculus 未運行",
"BS_ALREADY_RUNNING": "Beat Saber 已在運行",
"EXE_NOT_FINDED": "缺少文件",
"PROTON_NOT_SET": "Proton資料夾未設置",
"PROTON_NOT_FOUND": "找不到Proton二進位檔",
"EXIT": "突然停止",
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 庫"
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 庫",
"ORIGINAL_OCULUS_NOT_INSTALLED": "找不到原始Oculus版本"
},
"msg": {
"UNKNOWN_ERROR": "發生未知錯誤。",
@@ -386,7 +461,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"
@@ -405,7 +483,8 @@
"CantEditSteam": "無法編輯",
"CantRename": "無法重命名",
"VersionAlreadExist": "該版本已存在",
"CantClone": "無法複製"
"CantClone": "無法複製",
"UnknownError": "發生了未知錯誤"
},
"msg": {
"CantEditSteam": "你不能編輯 Steam 版本。不過你可以複製它。"
@@ -452,12 +531,44 @@
"no-mods": "該版本中沒有安裝 Mod 😑"
}
}
},
"import-mod": {
"titles": {
"success": "模組匯入完成",
"error": "模組匯入過程中發生錯誤"
},
"msgs": {
"success": "模組成功匯入。",
"some-success": "一些模組已成功匯入。",
"no-dlls": "檔案中不包含任何 \"dll\" 檔案。"
}
}
},
"maps": {
"one-click-install": {
"success": "譜面安裝完成",
"error": "安裝譜面時發生錯誤"
},
"no-duplicates-maps": {
"title": "沒有重複",
"msg": "沒有刪除地圖"
},
"duplicates-maps-deleted": {
"title": "重複已刪除",
"msg": "重複已刪除"
},
"import-map": {
"titles": {
"success": "地圖匯入完成",
"error": "地圖匯入時發生錯誤"
},
"msgs": {
"success": "地圖已成功匯入。",
"some-success": "部分地圖已成功匯入。",
"only-accept-zip": "僅支援zip檔案。",
"invalid-zip": "zip檔案中沒有地圖。",
"unknown": "發生了未知錯誤。"
}
}
},
"playlists": {
@@ -478,6 +589,15 @@
"title": "備份已創建",
"msg": "共享 “UserData” 文件夾可能會產生錯誤,如果出現問題,請取消關聯該文件夾以恢復備份"
}
},
"linking-error": {
"title": "連結文件夾時出錯",
"msg": {
"EPERM": "BSManager沒有必要的權限來連結文件夾。",
"EACCES": "BSManager沒有必要的權限來連結文件夾。",
"ENOSPC": "磁碟已滿,請騰出空間後再試。",
"UNKNOWN_ERROR": "連結文件夾時發生未知錯誤。"
}
}
},
"create-launch-shortcut": {
@@ -488,6 +608,14 @@
"error": {
"msg": "創建捷徑時發生錯誤"
}
},
"bs-version-oudated": {
"title": "版本過時",
"msg": "此 Beat Saber 版本已過時,請使用推薦版本以享受最新功能和修復。",
"actions": {
"do-not-remind": "不要再提醒我",
"ok": "確定"
}
}
},
"modals": {
@@ -643,6 +771,11 @@
"title": "保留譜面將會在取消關聯後把共享文件夾的所有譜面複製到當前版本。如果此項被禁用,譜面也不會遺失。"
},
"valid-btn": "取消關聯譜面"
},
"delete-duplicate-maps": {
"title": "刪除地圖",
"desc": "只有地圖「{map}」是重複的。你確定要刪除它嗎?",
"desc-plural": "發現了 {nb} 個重複的地圖。你確定要刪除它們嗎?"
}
},
"download-maps": {
@@ -690,7 +823,7 @@
"original-version-backup-oculus": {
"title": "警告",
"body": {
"must-be-installed-once": "必須至少從 Oculus 商店安裝過一次 BeatSaber,否則 BeatSaber 可能會在啟動後自動關閉。",
"must-be-installed-once": "必須在此設備上從Oculus商店安裝Beat Saber,否則Beat Saber在啟動後自動關閉。",
"will-backup": "為了啟動這個版本,位於您的Oculus庫中的Beat Saber的原始安裝文件夾將被重新命名,並且在Beat Saber關閉時會自動恢復。"
},
"not-remind-me": "不再提醒我",
@@ -723,12 +856,28 @@
},
"launch-as-admin": "以管理員身份啟動",
"not-remind-me": "不再提醒我"
},
"ask-install-path": {
"title": "安裝文件夾",
"choose-folder-description": "選擇將包含 BSManager 下載的所有內容的文件夾。(版本、mod、地圖、播放列表等)",
"default": "預設",
"default-tooltip": "預設為您的主資料夾"
},
"choose-proton-folder": {
"title": "Proton資料夾",
"proton-folder-description": "在Linux上,BSManager需要Proton才能運行。請選擇Proton的安裝資料夾以繼續。",
"proton-folder-placeholder": "Proton安裝資料夾",
"where-is-proton-installed": "Proton安裝在哪裡?"
},
"bs-version-outdated": {
"body": "版本 {outdatedVersion} 已過時,某些模組或功能可能無法正常運作。請下載最新推薦的 Beat Saber 版本 ({recommendedVersion}),以享受最新功能和修正。"
}
},
"maps": {
"map-filter-panel": {
"duration": "時長",
"nps" : "每秒音符數",
"njs": "音符跳躍速度",
"tags": "標籤",
"specificities": "general",
"requirements": "要求",
@@ -738,48 +887,48 @@
"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",
"j-rock": "J-rock",
"trance": "Trance",
"drumbass": "Drum & Bass",
"comedy": "Comedy",
"instrumental": "Instrumental",
"hardcore": "Hardcore",
"k-pop": "K-pop",
"indie": "Indie",
"techno": "Techno",
"house": "House",
"game": "Video game",
"film": "Film",
"alt": "Alternative",
"dubstep": "Dubstep",
"metal": "Metal",
"anime": "Anime",
"hiphop": "Hiphop",
"j-pop": "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",
@@ -806,7 +955,8 @@
"bsr-code" : "BSR代碼",
"download" : "下載地圖",
"downloading" :"正在下載地圖",
"cancel-download" : "取消下載"
"cancel-download" : "取消下載",
"hightlight-difficulty": "突出顯示難度"
}
},
"models": {
@@ -963,10 +1113,6 @@
"go-to-mods": "前往 Mod 頁",
"not-remind": "不再提醒我"
},
"prevent-for-models-breaks": {
"title": "已損壞的模型",
"desc": "自從Beat Saber引擎更新以來,所有自定義模型的MOD都已損壞,需要更新。它們還沒有被更新。"
},
"export-success": {
"title": "導出成功 🎉"
}
@@ -998,6 +1144,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "或瀏覽檔案"
},
"playlist": {
"error-playlist-creation-title": "建立播放清單時發生錯誤",
"error-playlist-creation-desc": "建立播放清單時發生錯誤。",
@@ -1112,6 +1261,24 @@
"last-week": "上週",
"last-month": "上個月",
"3-last-month": "最近3個月"
},
"playlists-imported": "播放清單已匯入",
"all-playlists-have-been-successfully-imported": "所有播放清單已成功匯入",
"no-playlist-found": "未找到播放清單",
"no-playlist-found-in-selected-files": "在選定檔案中未找到播放清單",
"some-playlists-not-imported": "部分播放清單未匯入",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "某些播放清單未找到",
"INVALID_PLAYLIST_FILE": "某些播放清單無效",
"CANNOT_PARSE_PLAYLIST": "某些播放清單無法解析",
"unknown": "某些播放清單無法匯入"
},
"no-playlists-imported": "未匯入任何播放清單",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "播放清單未找到",
"INVALID_PLAYLIST_FILE": "播放清單無效",
"CANNOT_PARSE_PLAYLIST": "播放清單無法解析",
"unknown": "無法匯入任何播放清單"
}
},
"dateformat": {
+225 -58
View File
@@ -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"
@@ -44,14 +50,16 @@
"filters-btn": "筛选",
"dropdown": {
"export-maps": "导出谱面",
"delete-maps": "删除谱面"
"delete-maps": "删除谱面",
"delete-duplicate-maps": "删除重复项"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "添加"
"drop-down": {
"browse-maps": "浏览地图",
"import-maps": "导入地图"
},
"link-maps": {
"tooltips": {
@@ -63,6 +71,21 @@
"empty-maps": {
"text": "无谱面",
"button": "下载谱面"
},
"drop-zone": {
"text": "导入您的地图",
"subtext": "将ZIP文件拖放到此处以导入您的地图"
}
},
"playlists": {
"drop-down": {
"browse-playlists": "浏览播放列表",
"create-a-playlist": "创建播放列表",
"import-playlists": "导入播放列表"
},
"drop-zone": {
"text": "导入您的播放列表",
"subtext": "将您的 \".bplist\" 或 \".json\" 文件拖放到这里进行导入"
}
}
}
@@ -73,7 +96,8 @@
"mods-not-available": "该版本 BeatSaber 暂无可用 Mod",
"buttons": {
"more-infos": "更多信息",
"install-or-update": "安装或更新"
"install-or-update": "安装或更新",
"reinstall-all": "重新安装全部"
},
"mods-grid": {
"header-bar": {
@@ -82,9 +106,21 @@
"latest": "最新",
"description": "描述",
"dropdown": {
"uninstall-all": "全部卸载"
"import-mods": "导入模组",
"uninstall-all": "全部卸载",
"unselect-all": "取消全选"
}
}
},
"notifications": {
"all-mods-already-installed": {
"title": "模组已安装",
"description": "所有选中的模组已经安装"
}
},
"drop-zone": {
"text": "导入你的模组",
"subtext": "将你的 \"zip\" 或 \"dll\" 文件拖放到这里进行导入"
}
},
"dropdown": {
@@ -112,6 +148,7 @@
"title": "Steam & Oculus",
"description": "登出后,您可以在下一次下载 Beat Saber 时切换帐户。",
"logout": "登出",
"logout-success": "注销成功",
"download-platform": {
"title": ",默认平台",
"desc": "选择要下载 BeatSaber 的默认平台。",
@@ -131,8 +168,15 @@
},
"installation-folder": {
"title": "安装文件夹",
"description": "为 BeatSaber 不同版本及未来其他特性修改默认文件夹",
"choose-folder": "选择文件夹"
"description": "更改将包含 BSManager 下载的所有内容的文件夹"
},
"proton-folder": {
"title": "Proton文件夹",
"description": "将文件夹更改为Proton路径。(例如:Proton - Experimental",
"errors": {
"title": "设置Proton文件夹失败",
"invalid-folder": "无效的Proton文件夹路径"
}
},
"additional-content": {
"title": "附加内容",
@@ -154,6 +198,7 @@
"zh-CN": "简体中文",
"zh-TW": "正體中文",
"ja-JP": "日本語",
"ko-KR": "한국어",
"translated": {
"en-EN": "英式英语",
"en-US": "美式英语",
@@ -163,7 +208,8 @@
"ru-RU": "俄语",
"zh-CN": "简体中文",
"zh-TW": "正体中文",
"ja-JP": "日语"
"ja-JP": "日语",
"ko-KR": "韩语"
}
}
},
@@ -191,9 +237,33 @@
"open-logs": "打开日志"
}
},
"changelogs": {
"open" : "🚀 探索更新日志!",
"not-founds": "😕 哎呀,找不到更新日志!"
"advanced": {
"title": "高级设置",
"description": "BSManager的高级设置。",
"hardware-acceleration": {
"title": "硬件加速",
"description": "启用硬件加速以使用您的GPU并提高BSManager的性能。如果您遇到帧丢失,请关闭此功能。",
"modal": {
"title": "需要重启",
"body": "更改硬件加速设置将退出并重新启动BSManager。您确定要这样做吗?",
"confirm-btn": "是的,我确定"
},
"error-notification": {
"message": "发生错误,无法禁用硬件加速。"
}
},
"use-symlinks": {
"title": "使用符号链接",
"description": "使用符号链接而不是联接来链接文件夹。仅在确实需要时才启用此功能。",
"modal": {
"title": "符号链接权限",
"body": "创建符号链接时,BSManager将需要管理员权限或启用开发者模式。您确定要继续吗?",
"confirm-btn": "是的,我确定"
},
"error-notification": {
"message": "发生错误,无法更改符号链接设置。"
}
}
}
}
},
@@ -212,11 +282,13 @@
"errors": {
"titles": {
"operation-running": "操作进行中",
"no-internet": "无网络"
"no-internet": "无网络",
"file-not-supported": "文件不受支持"
},
"msg": {
"operation-running": "等待当前操作完成,然后重试。",
"no-internet": "检查你的连接并重试。"
"no-internet": "检查你的连接并重试。",
"file-not-supported": "仅支持{types}文件。"
}
}
},
@@ -376,8 +448,11 @@
"OCULUS_NOT_RUNNING": "Oculus 未运行",
"BS_ALREADY_RUNNING": "Beat Saber 已在运行",
"EXE_NOT_FINDED": "缺少文件",
"PROTON_NOT_SET": "Proton文件夹未设置",
"PROTON_NOT_FOUND": "未找到Proton二进制文件",
"EXIT": "突然停止",
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 库"
"OCULUS_LIB_NOT_FOUND": "未找到 Oculus 库",
"ORIGINAL_OCULUS_NOT_INSTALLED": "未找到原始Oculus版本"
},
"msg": {
"UNKNOWN_ERROR": "发生未知错误。",
@@ -386,7 +461,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"
@@ -405,7 +483,8 @@
"CantEditSteam": "无法编辑",
"CantRename": "无法重命名",
"VersionAlreadExist": "该版本已存在",
"CantClone": "无法克隆"
"CantClone": "无法克隆",
"UnknownError": "发生了未知错误"
},
"msg": {
"CantEditSteam": "你不能编辑 Steam 版本。不过你可以克隆它。"
@@ -452,12 +531,44 @@
"no-mods": "该版本中没有安装 Mod 😑"
}
}
},
"import-mod": {
"titles": {
"success": "模组导入完成",
"error": "模组导入过程中发生错误"
},
"msgs": {
"success": "模组成功导入。",
"some-success": "一些模组已成功导入。",
"no-dlls": "文件中不包含任何 \"dll\" 文件。"
}
}
},
"maps": {
"one-click-install": {
"success": "谱面安装完成",
"error": "安装谱面时发生错误"
},
"no-duplicates-maps": {
"title": "没有重复",
"msg": "没有删除地图"
},
"duplicates-maps-deleted": {
"title": "重复已删除",
"msg": "重复已删除"
},
"import-map": {
"titles": {
"success": "地图导入完成",
"error": "导入地图时发生错误"
},
"msgs": {
"success": "地图已成功导入。",
"some-success": "部分地图已成功导入。",
"only-accept-zip": "仅支持zip文件。",
"invalid-zip": "zip文件中没有地图。",
"unknown": "发生了未知错误。"
}
}
},
"playlists": {
@@ -478,6 +589,15 @@
"title": "备份已创建",
"msg": "共享 “UserData” 文件夹可能会产生错误,如果出现问题,请取消关联该文件夹以恢复备份"
}
},
"linking-error": {
"title": "链接文件夹时出错",
"msg": {
"EPERM": "BSManager没有必要的权限来链接文件夹。",
"EACCES": "BSManager没有必要的权限来链接文件夹。",
"ENOSPC": "磁盘已满,请腾出空间后再试。",
"UNKNOWN_ERROR": "链接文件夹时发生未知错误。"
}
}
},
"create-launch-shortcut": {
@@ -488,6 +608,14 @@
"error": {
"msg": "创建快捷方式时发生错误"
}
},
"bs-version-oudated": {
"title": "版本过时",
"msg": "此 Beat Saber 版本已过时,请使用推荐版本以享受最新功能和修复。",
"actions": {
"do-not-remind": "不再提醒",
"ok": "确定"
}
}
},
"modals": {
@@ -643,6 +771,11 @@
"title": "保留谱面将会在取消关联后把共享文件夹的所有谱面复制到当前版本。如果此项被禁用,谱面也不会丢失。"
},
"valid-btn": "取消关联谱面"
},
"delete-duplicate-maps": {
"title": "删除地图",
"desc": "只有地图 \"{map}\" 是重复的。你确定要删除它吗?",
"desc-plural": "发现了 {nb} 个重复的地图。你确定要删除它们吗?"
}
},
"download-maps": {
@@ -690,7 +823,7 @@
"original-version-backup-oculus": {
"title": "警告",
"body": {
"must-be-installed-once": "必须至少从 Oculus 商店安装过一次 BeatSaber,否则 BeatSaber 可能会在启动后自动关闭。",
"must-be-installed-once": "必须在此设备上从Oculus商店安装Beat Saber,否则Beat Saber在启动后自动关闭。",
"will-backup": "为了启动这个版本,位于您的Oculus库中的Beat Saber的原始安装文件夹将被重命名,并且在Beat Saber关闭时会自动恢复。"
},
"not-remind-me": "不再提醒我",
@@ -723,12 +856,28 @@
},
"launch-as-admin": "以管理员身份启动",
"not-remind-me": "不再提醒我"
},
"ask-install-path": {
"title": "安装文件夹",
"choose-folder-description": "选择将包含 BSManager 下载的所有内容的文件夹。(版本、mod、地图、播放列表等)",
"default": "默认",
"default-tooltip": "默认为您的主文件夹"
},
"choose-proton-folder": {
"title": "Proton文件夹",
"proton-folder-description": "在Linux上,BSManager需要Proton才能运行。请选择Proton的安装文件夹以继续。",
"proton-folder-placeholder": "Proton安装文件夹",
"where-is-proton-installed": "Proton安装在哪里?"
},
"bs-version-outdated": {
"body": "版本 {outdatedVersion} 已过时,某些模组或功能可能无法正常工作。请下载最新推荐的 Beat Saber 版本 ({recommendedVersion}),以享受最新功能和修复。"
}
},
"maps": {
"map-filter-panel": {
"duration": "时长",
"nps" : "每秒音符数",
"njs": "音符跳跃速度",
"tags": "标签",
"specificities": "general",
"requirements": "要求",
@@ -738,48 +887,48 @@
"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",
"j-rock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedy",
"instrumental": "instrumental",
"hardcore": "hardcore",
"holiday": "假日",
"vocaloid": "声库",
"j-rock": "日式摇滚",
"trance": "迷幻",
"drum-and-bass": "鼓 & 贝斯",
"comedy-meme": "喜剧 & 表情包",
"instrumental": "纯音乐",
"hardcore": "硬核",
"k-pop": "k-pop",
"indie": "indie",
"techno": "techno",
"house": "house",
"game": "video game",
"film": "film",
"alt": "alternative",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"j-pop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "electronic",
"classical-orchestral": "Classical & Orchestral"
"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",
@@ -806,7 +955,8 @@
"bsr-code" : "BSR代码",
"download" : "下载地图",
"downloading" :"正在下载地图",
"cancel-download" : "取消下载"
"cancel-download" : "取消下载",
"hightlight-difficulty": "突出显示难度"
}
},
"models": {
@@ -963,10 +1113,6 @@
"go-to-mods": "前往 Mod 页",
"not-remind": "不再提醒我"
},
"prevent-for-models-breaks": {
"title": "已损坏的模型",
"desc": "自从Beat Saber引擎更新以来,所有自定义模型的MOD都已损坏,需要更新。它们还没有被更新。"
},
"export-success": {
"title": "导出成功 🎉"
}
@@ -998,6 +1144,9 @@
}
}
},
"drop-zone": {
"or-browse-files": "或浏览文件"
},
"playlist": {
"error-playlist-creation-title": "创建播放列表时出错",
"error-playlist-creation-desc": "创建播放列表时发生错误。",
@@ -1112,6 +1261,24 @@
"last-week": "上周",
"last-month": "上个月",
"3-last-month": "最近3个月"
},
"playlists-imported": "播放列表已导入",
"all-playlists-have-been-successfully-imported": "所有播放列表已成功导入",
"no-playlist-found": "未找到播放列表",
"no-playlist-found-in-selected-files": "在选定文件中未找到播放列表",
"some-playlists-not-imported": "部分播放列表未导入",
"some-playlists-have-been-imported": {
"INVALID_SOURCE": "某些播放列表未找到",
"INVALID_PLAYLIST_FILE": "某些播放列表无效",
"CANNOT_PARSE_PLAYLIST": "某些播放列表无法解析",
"unknown": "某些播放列表无法导入"
},
"no-playlists-imported": "未导入任何播放列表",
"no-playlists-imported-errors": {
"INVALID_SOURCE": "播放列表未找到",
"INVALID_PLAYLIST_FILE": "播放列表无效",
"CANNOT_PARSE_PLAYLIST": "播放列表无法解析",
"unknown": "无法导入任何播放列表"
}
},
"dateformat": {
Binary file not shown.
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
# Add write permissions to anybody so that this can be sync with the
# github's bs-versions.json when starting bsmanager
/usr/bin/chmod +002 /opt/BSManager/resources/assets/jsons/bs-versions.json
# https://github.com/electron/electron/issues/42510
/usr/bin/chmod 4755 /opt/BSManager/chrome-sandbox
Binary file not shown.

After

Width:  |  Height:  |  Size: 687 KiB

@@ -0,0 +1,21 @@
If you encounter a keyboard shortcut conflict between AMD Software and Oculus Rift, you can either disable or modify the conflicting shortcut.
_Special thanks to_ `𝔽𝕪𝕟𝕟 (fynn07)` _for its contribution with information and screenshots_
### __Follow these steps to disable the shortcut in AMD Software:__
# Step 1 - Access Settings:
- Open AMD Software and click on the gear icon in the top right corner to go to settings.
![image](https://github.com/Zagrios/bs-manager/assets/40648115/2762f59c-f12a-46ba-80fa-9bf79beb64a9)
# Step 2 - Modify Keyboard Shortcuts:
- In the settings menu, select the "Hotkey" tab.
![image](https://github.com/Zagrios/bs-manager/assets/40648115/262d4fcc-529f-4c4c-9b87-e2da21df1b95)
# Step 3 -Disabling Shortcuts:
- Turn off the "Use Hotkeys" option to prevent any conflicts with Oculus Rift.
![image](https://github.com/Zagrios/bs-manager/assets/40648115/756018ad-7de3-469c-9f40-0082be007805)
# Step 3 alt - Modify the Shortcut:
- If you prefer to keep using keyboard shortcuts, consider changing the specific conflicting shortcut (e.g., "Ctrl + Shift + I") to another combination that is less likely to interfere.
️ _**Keep in mind you can't change the full keybind!**_
_**You can only Change the "i" to an different Button!**_
+14
View File
@@ -0,0 +1,14 @@
Welcome to the bs-manager wiki! (wip c:)
to get you oculus token check here : https://github.com/Zagrios/bs-manager/wiki/How-to-obtain-your-Oculus-Token
---
This Wiki accepts contributions!
To contribute to the wiki:
- Fork the project
- Add/Edit `.md` files in the `docs/wiki/` folder
- Create a Pull Request
- Once the PR is merged (after review), it will be present in the repository's wiki
@@ -0,0 +1,30 @@
### Important
Your token is a confidential piece of information. Possession of this token allows individuals to download applications, send messages, among other actions, under your identity.
However, you might wonder why it is necessary to provide this token to BSManager. The reason is that BSManager requires the token to continue the download with Oculus. Once you've input the token, it is used exclusively to communicate with Oculus servers to verify that you are the rightful owner of the game.
## Step 1 - Install and log into the Oculus Rift app
- Get the Oculus Rift app setup from the [Meta website](https://www.oculus.com/rift/setup/)
- Install the Oculus Rift app
**If you bought Beat Saber from the Quest store, it won't appear in your Rift library by default. To download it with BSManager, first claim it from its store page**
## Step 2 - Open developer tools
- Open Oculus app
- Open the developer tools by pressing <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>i</kbd>.
## Step 3 - Copy your Token
In the developer tools :
- Open the `Network` tab
- Filter for `graph`
- Click on the first request
- Open the `Payload` tab
- Locate your token, it should start with `FRL`
- Select the token using your mouse and press <kbd>Ctrl</kbd> + <kbd>c</kbd> to copy it
![image](https://raw.githubusercontent.com/Zagrios/bs-manager/refs/heads/master/docs/assets/oculus-token.png)
# Known bugs
- [Nothing opens when I press `Ctrl`+`Shift`+`i`.](https://github.com/Zagrios/bs-manager/wiki/Nothing-opens-when-I-press-%60Ctrl%60%E2%80%90%60Shift%60%E2%80%90%60i%60.)
+86
View File
@@ -0,0 +1,86 @@
# Linux Guide
## Installation
Go to [Releases](https://github.com/Zagrios/bs-manager/releases) page and go to the latest alpha release (version 1.5.0-alpha.5 or higher). Download the necessary build installer for your distro (see below).
### Ubuntu, Debian (deb)
Download the `.deb` file in the releases and run the following command:
```bash
dpkg -i ./bsmanager.deb
```
### Arch (AUR)
Refer to [bs-manager-git](https://aur.archlinux.org/packages/bs-manager-git).
To install AUR packages, you need to install [yay](https://github.com/Jguer/yay).
### Universal (flatpak)
This should work on any linux distribution. You are only required to have `flatpak` installed in your system. If it is not installed, then go to [flatpak](https://flatpak.org/setup/) to look for a guide on how to install it on your distro.
After installing, download the `.flatpak` file in the releases and run the following command:
```bash
flatpak install --user ./bsmanager.flatpak
```
If you are getting errors like packages not existing, run the command below so that it finds the correct packages.
```bash
sudo flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
# or
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
```
Flatpak also supports sandboxing which gives the minimal access to your machine. To configure this, you can download [Flatseal](https://flathub.org/apps/com.github.tchx84.Flatseal) which has a GUI to edit your permissions. You can also this with the `flatpak` executable but it will not be discussed here.
## Proton Setup
[Proton](https://github.com/ValveSoftware/Proton) is needed to run the Beat Saber executable under Linux. You need to download this from either from Steam or building it from their GitHub repo.
Once Proton is installed, when you open your BSManager application for the first time, it will ask you to link the _Proton Folder_. The _Proton Folder_ also verifies if the `proton` and `files/bin/wine64` binaries exists. Once set, you should be able to launch the Beat Saber (using `proton`) and install mods (using `files/bin/wine64`). You can still change the _Proton Folder_ in the **settings page** if any new version of Steam Proton is downloaded.
# Troubleshooting
## Permission denied on "bs-versions.json"
<pre>
Unhandled Exception UnhandledRejection Error: EACCES: permission denied, open '/opt/BSManager/resources/assets/jsons/bs-versions.json'
</pre>
To fix this issue, the current user must have write permissions to the "bs-versions.json". To correct the permissions do command below:
```bash
chmod +002 /opt/BSManager/resources/assets/jsons/bs-versions.json
# or
chown $(whoami) /opt/BSManager/resources/assets/jsons/bs-versions.json
```
## [deb] The SUID sandbox helper binary was found.
This is encountered when running the app file or executing the app in the terminal. This is due to a change to Ubuntu 24.04. In order to fix the issue, take a look into the path of "chrome-sandbox" described in the error log and give the correct permissions within the terminal, for example:
```bash
chmod 4755 /opt/BSManager/chrome-sandbox
```
ref: https://github.com/electron/electron/issues/42510
## [Flatpak] Steam Beat Saber version not showing / Proton not detected
Flatpak should have permissions with the steam games folder. By default, the minimum permissions are `~/.steam/steam/steamapps/common:ro` and `~/.steam/steam/steamapps/common:ro`. If you changed the steam installation path, add that path instead into the permissions.
## [Flatpak] Changing installation folder
To change the installation path of the **BSManager** folder, you have to edit the flatpak permissions to destination folder.
- In flatpak or Flatseal, add the destination folder with `:create` permissions.
- In BSM, move the folder to the destination folder.
- [Optional] In flatpak or Flatseal, remove the original folder permissions.
@@ -0,0 +1,4 @@
If nothing opens when you press `Ctrl` + `Shift` + `I`, it's possible that the keyboard shortcut to open the development tools is being used by another application.

Here's a non-exhaustive list of applications that have caused a problem and their suggested solutions:
- [AMD software](https://github.com/Zagrios/bs-manager/wiki/AMD-Sofware-%E2%80%90-Nothing-opens-when-I-press-%60Ctrl%60%E2%80%90%60Shift%60%E2%80%90%60I%60)
+94
View File
@@ -0,0 +1,94 @@
const config = {
extraResources: [
"./assets/jsons/bs-versions.json",
"./assets/jsons/patreons.json",
"./assets/proto/song_details_cache_v1.proto"
],
productName: "BSManager",
appId: "io.bsmanager.bsmanager",
asarUnpack: "**\\*.{node,dll}",
files: [
"dist/**/*",
"node_modules",
"package.json"
],
afterSign: ".erb/scripts/notarize.js",
afterPack: ".erb/scripts/after-pack.js",
win: {
signingHashAlgorithms: ["sha256"],
target: [
"nsis",
"nsis-web"
],
icon: "./build/icons/win/favicon.ico",
extraResources: [
"./build/icons/win",
"./assets/scripts/*.exe"
],
},
linux: {
target: [
"deb",
],
icon: "./build/icons/png",
category: "Utility;Game;",
extraResources: [
"./build/icons/png",
"./assets/scripts/DepotDownloader"
],
protocols: {
name: "BSManager",
schemes: [
"bsmanager",
"beatsaver",
"bsplaylist",
"modelsaber",
"web+bsmap",
],
},
},
deb: {
fpm: ["--after-install=build/after-install.sh"],
},
flatpak: {
finishArgs: [
// Wayland/X11 Rendering
"--socket=wayland",
"--socket=x11",
"--share=ipc",
// Open GL
"--device=dri",
// Audio output
"--socket=pulseaudio",
// Read/write home directory access
"--filesystem=~/BSManager:create", // Default BSManager installation folder
"--filesystem=~/.steam/steam/steamapps:ro", // for the libraryfolders.vdf
"--filesystem=~/.steam/steam/steamapps/common:create", // Steam game folder
"--filesystem=~/.steam/steam/steamapps/common/Beat Saber:create", // For installing mods/maps to original Beat Saber version
// Allow communication with network
"--share=network",
// System notifications with libnotify
"--talk-name=org.freedesktop.Notifications",
"--talk-name=org.freedesktop.Flatpak",
]
},
directories: {
app: "release/app",
buildResources: "assets",
output: "release/build",
},
publish: {
provider: "github",
owner: "Zagrios",
},
fileAssociations: [
{
ext: "bplist",
description: "Beat Saber Playlist (BSManager)",
icon: "./assets/bsm_file.ico",
role: "Viewer",
},
],
};
module.exports = config;
+19
View File
@@ -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;
+653 -649
View File
File diff suppressed because it is too large Load Diff
+33 -114
View File
@@ -1,24 +1,27 @@
{
"name": "bs-manager",
"description": "Manage maps, mods and more for Beat Saber",
"main": "./src/main/main.ts",
"version": "1.5.0",
"main": "./.erb/dll/main.bundle.dev.js",
"version": "1.5.0-alpha.6",
"scripts": {
"build-rust-scripts": "node -r esbuild-register ./.erb/scripts/build-rust-scripts.js",
"build-rust-scripts": "ts-node ./.erb/scripts/build-rust-scripts.js",
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
"build:dll": "cross-env NODE_ENV=development webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts",
"build:main": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.main.prod.ts",
"build:renderer": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
"postinstall": "node -r esbuild-register .erb/scripts/check-native-dep.js && electron-builder install-app-deps && npm run build:dll",
"postinstall": "ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && npm run build:dll",
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
"prestart": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.dev.ts",
"lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx",
"package": "node -r esbuild-register ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never && npm run build:dll",
"start": "node -r esbuild-register ./.erb/scripts/check-port-in-use.js && npm run start:renderer",
"start:main": "cross-env NODE_ENV=development NODE_OPTIONS=\"--loader esbuild-register/loader -r esbuild-register\" electronmon .",
"start:preload": "cross-env NODE_ENV=development webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
"start:renderer": "cross-env NODE_ENV=development webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
"package": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never --config electron-builder.config.js && npm run build:dll",
"start": "ts-node ./.erb/scripts/check-port-in-use.js && npm run prestart && npm run start:renderer",
"start:main": "concurrently -k \"cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --watch --config ./.erb/configs/webpack.config.main.dev.ts\" \"electronmon .\"",
"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 --config electron-builder.config.js --publish always --win --x64",
"publish:linux": "npm run build && electron-builder --config electron-builder.config.js --publish never --linux --x64"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
@@ -35,60 +38,11 @@
]
},
"build": {
"extraResources": [
"./assets/jsons/bs-versions.json",
"./assets/jsons/patreons.json",
"./assets/proto/song_details_cache_v1.proto"
],
"productName": "BSManager",
"appId": "org.erb.BSManager",
"asarUnpack": "**\\*.{node,dll}",
"files": [
"dist/**/*",
"node_modules",
"package.json"
],
"afterSign": ".erb/scripts/notarize.js",
"afterPack": ".erb/scripts/after-pack.js",
"win": {
"target": [
"nsis",
"nsis-web"
],
"icon": "./build/icons/win/favicon.ico",
"extraResources": [
"./build/icons/win",
"./assets/scripts/*.exe"
]
},
"linux": {
"target": [
"AppImage"
],
"icon": "./build/icons/png",
"category": "Utility;Game;",
"extraResources": [
"./build/icons/png",
"./assets/scripts/DepotDownloader"
]
},
"directories": {
"app": "release/app",
"buildResources": "assets",
"output": "release/build"
},
"publish": {
"provider": "github",
"owner": "Zagrios"
},
"fileAssociations": [
{
"ext": "bplist",
"description": "Beat Saber Playlist (BSManager)",
"icon": "./assets/bsm_file.ico",
"role": "Viewer"
}
]
}
},
"repository": {
"type": "git",
@@ -111,34 +65,6 @@
"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/fuses": "^1.7.0",
"@electron/notarize": "^2.3.0",
@@ -151,10 +77,9 @@
"@types/color": "^3.0.3",
"@types/crypto-js": "^4.2.1",
"@types/dateformat": "^5.0.0",
"@types/dompurify": "^3.0.5",
"@types/got": "^9.6.12",
"@types/jest": "^29.5.11",
"@types/node": "20.11.15",
"@types/node": "22.8.6",
"@types/node-fetch": "^2.6.3",
"@types/pako": "^2.0.1",
"@types/react": "^18.0.33",
@@ -181,12 +106,10 @@
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"detect-port": "^1.5.1",
"electron": "^28.2.4",
"electron": "^32.1.2",
"electron-builder": "^24.13.3",
"electron-devtools-installer": "^3.2.0",
"electronmon": "^2.0.2",
"esbuild": "^0.20.1",
"esbuild-register": "^3.5.0",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-erb": "^4.1.0",
@@ -209,15 +132,13 @@
"postcss": "^8.4.33",
"postcss-loader": "^8.1.0",
"prettier": "^3.2.4",
"ps-scrollbar-tailwind": "0.0.1",
"react-refresh": "^0.14.0",
"react-test-renderer": "^18.2.0",
"rimraf": "^5.0.5",
"sass": "^1.70.0",
"sass-loader": "^14.1.0",
"style-loader": "^3.3.4",
"tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.12",
"terser-webpack-plugin": "^5.3.10",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
@@ -235,54 +156,52 @@
"@nextui-org/react": "^2.3.6",
"@node-steam/vdf": "^2.2.0",
"@tippyjs/react": "^4.2.6",
"archiver": "^6.0.1",
"archiver": "^7.0.1",
"clsx": "^2.1.1",
"color": "^4.2.3",
"crypto-js": "^4.2.0",
"dateformat": "^5.0.3",
"dompurify": "^3.0.9",
"dot-prop": "^8.0.2",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.8",
"electron-store": "^8.1.0",
"electron-updater": "^6.2.1",
"electron-updater": "^6.3.4",
"fast-deep-equal": "^3.1.3",
"format-duration": "^3.0.2",
"framer-motion": "^11.2.6",
"fs-extra": "^11.2.0",
"got": "^14.4.1",
"got": "^14.4.4",
"history": "^5.3.0",
"is-elevated": "^4.0.0",
"jszip": "^3.10.1",
"md5-file": "^5.0.0",
"node-abi": "^3.65.0",
"node-fetch": "^3.3.2",
"node-stream-zip": "^1.15.0",
"pako": "^2.1.0",
"protobufjs": "^7.3.2",
"qrcode.react": "^3.1.0",
"protobufjs": "^7.4.0",
"qrcode.react": "^4.0.1",
"query-process": "^0.0.3",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-colorful": "^5.6.1",
"react-dom": "^18.2.0",
"react-range": "^1.8.14",
"react-range": "^1.10.0",
"react-router-dom": "^6.24.1",
"react-virtualized-auto-sizer": "^1.0.24",
"react-window": "^1.8.10",
"recursive-readdir": "^2.2.3",
"rfdc": "^1.3.1",
"rfdc": "^1.4.1",
"rxjs": "^7.8.1",
"sanitize-filename": "^1.6.3",
"semver": "^7.6.2",
"semver": "^7.6.3",
"serialize-error": "^11.0.3",
"striptags": "^4.0.0-alpha.4",
"tailwind-merge": "^2.4.0",
"tailwind-scrollbar-hide": "^1.1.7",
"tailwind-merge": "^2.5.2",
"tailwindcss-scoped-groups": "^2.0.0",
"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"
},
"engines": {
"node": ">=20.0.0"
@@ -315,13 +234,13 @@
},
"electronmon": {
"patterns": [
"!src/__tests__/**",
"!release/**",
"!assets/**"
"!**/**",
"src/main/**",
".erb/dll/**"
],
"logLevel": "quiet"
},
"volta": {
"node": "20.11.0"
"node": "22.11.0"
}
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "bs-manager",
"version": "1.5.0",
"version": "1.5.0-alpha.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bs-manager",
"version": "1.5.0",
"version": "1.5.0-alpha.6",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "bs-manager",
"version": "1.5.0",
"version": "1.5.0-alpha.6",
"description": "BSManager",
"main": "./dist/main/main.js",
"author": {
@@ -9,9 +9,9 @@
"url": "https://github.com/Zagrios/bs-manager"
},
"scripts": {
"electron-rebuild": "node -r esbuild-register ../../.erb/scripts/electron-rebuild.js",
"link-modules": "node -r esbuild-register ../../.erb/scripts/link-modules.ts",
"postinstall": "npm run electron-rebuild && npm run link-modules"
"rebuild": "node -r ts-node/register ../../.erb/scripts/electron-rebuild.js",
"link-modules": "node -r ts-node/register ../../.erb/scripts/link-modules.ts",
"postinstall": "npm run rebuild && npm run link-modules"
},
"dependencies": {
"@resvg/resvg-js": "2.6.2",
-9
View File
@@ -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.
+209
View File
@@ -0,0 +1,209 @@
import {
bsmSpawn,
// bsmExec,
isProcessRunning,
// getProcessId,
} from "main/helpers/os.helpers";
import cp from "child_process";
import crypto from "crypto";
import log from "electron-log";
import { ifDescribe, ifIt } from "__tests__/utils";
import { BS_APP_ID } from "main/constants";
Object.defineProperty(global, "crypto", {
value: {
randomUUID: () => crypto.webcrypto.randomUUID(),
}
});
jest.mock("electron", () => ({
app: { getPath: () => "" },
}));
jest.mock("electron-log", () => ({
info: jest.fn(),
error: jest.fn(),
}));
jest.mock("ps-list", () => () => []);
const IS_WINDOWS = process.platform === "win32";
const IS_LINUX = process.platform === "linux";
describe("Test os.helpers bsmSpawn", () => {
const spawnSpy: jest.SpyInstance = jest.spyOn(cp, "spawn")
.mockImplementation();
const logSpy: jest.SpyInstance = jest.spyOn(log, "info");
const originalContainer = process.env.container;
const BS_ENV = {
SteamAppId: BS_APP_ID,
SteamOverlayGameId: BS_APP_ID,
SteamGameId: BS_APP_ID,
};
beforeAll(() => {
if (IS_LINUX) {
Object.assign(BS_ENV, {
WINEDLLOVERRIDES: "winhttp=n,b",
STEAM_COMPAT_DATA_PATH: "/compatdata",
STEAM_COMPAT_INSTALL_PATH: "/BSInstance",
STEAM_COMPAT_CLIENT_INSTALL_PATH: "/steam",
STEAM_COMPAT_APP_ID: BS_APP_ID,
SteamEnv: "1",
});
}
});
afterAll(() => {
spawnSpy.mockRestore();
});
afterEach(() => {
spawnSpy.mockClear();
logSpy.mockClear();
process.env.container = originalContainer;
});
it("Simple spawn command", () => {
bsmSpawn("cd", {
args: ["folder1", "folder2"],
});
expect(spawnSpy).toHaveBeenCalledTimes(1);
expect(spawnSpy).toHaveBeenCalledWith("cd folder1 folder2", expect.anything());
expect(logSpy).toHaveBeenCalledTimes(0);
});
it("Simple spawn command with logging", () => {
bsmSpawn("mkdir", {
args: ["new_folder"],
log: true,
});
expect(spawnSpy).toHaveBeenCalledTimes(1);
expect(spawnSpy).toHaveBeenCalledWith("mkdir new_folder", expect.anything());
expect(logSpy).toHaveBeenCalledTimes(1);
});
it("Complex spawn command call (Mods install)", () => {
bsmSpawn(`"./BSIPA.exe" "./Beat Saber.exe" -n`, {
log: true,
linux: { prefix: `"./wine64"` },
});
expect(spawnSpy).toHaveBeenCalledTimes(1);
expect(spawnSpy).toHaveBeenCalledWith(
process.platform === "win32"
? `"./BSIPA.exe" "./Beat Saber.exe" -n`
: `"./wine64" "./BSIPA.exe" "./Beat Saber.exe" -n`,
expect.anything()
);
expect(logSpy).toHaveBeenCalledTimes(1);
});
it("Complex spawn command call (BS launch)", () => {
bsmSpawn(`"./Beat Saber.exe"`, {
args: ["--no-yeet", "fpfc"],
options: {
cwd: "/",
detached: true,
env: BS_ENV,
},
log: true,
linux: { prefix: `"./proton" run` },
});
expect(spawnSpy).toHaveBeenCalledTimes(1);
expect(spawnSpy).toHaveBeenCalledWith(
IS_WINDOWS
? `"./Beat Saber.exe" --no-yeet fpfc`
: `"./proton" run "./Beat Saber.exe" --no-yeet fpfc`,
expect.objectContaining({
cwd: "/",
detached: true,
env: BS_ENV,
})
);
expect(logSpy).toHaveBeenCalledTimes(1);
});
ifIt(IS_LINUX)("Complex spawn command call (BS launch flatpak)", () => {
const flatpakEnv = [
"SteamAppId",
"SteamOverlayGameId",
"SteamGameId",
"WINEDLLOVERRIDES",
"STEAM_COMPAT_DATA_PATH",
"STEAM_COMPAT_INSTALL_PATH",
"STEAM_COMPAT_CLIENT_INSTALL_PATH",
"STEAM_COMPAT_APP_ID",
"SteamEnv"
];
const newEnv = {
...BS_ENV,
something: "else",
more: "tests",
};
bsmSpawn(`"./Beat Saber.exe"`, {
args: ["--no-yeet", "fpfc"],
options: {
cwd: "/",
detached: true,
env: newEnv,
},
log: true,
linux: { prefix: `"./proton" run` },
flatpak: {
host: true,
env: flatpakEnv,
},
});
expect(spawnSpy).toHaveBeenCalledTimes(1);
const envArgs = flatpakEnv.map(argName =>
`--env=${argName}="${(BS_ENV as any)[argName]}"`
).join(" ");
expect(spawnSpy).toHaveBeenCalledWith(
`flatpak-spawn --host ${envArgs} "./proton" run "./Beat Saber.exe" --no-yeet fpfc`,
expect.objectContaining({
cwd: "/",
detached: true,
env: newEnv,
})
);
expect(logSpy).toHaveBeenCalledTimes(1);
});
});
ifDescribe(IS_LINUX)("Test os.helpers isProcessRunning", () => {
const logSpy: jest.SpyInstance = jest.spyOn(log, "error");
afterEach(() => {
logSpy.mockClear();
});
it("Process is running", async () => {
// There will always a node process running
const running = await isProcessRunning("node");
expect(running).toBe(true);
// No errors received
expect(logSpy).toHaveBeenCalledTimes(0);
});
it("Process is not running", async () => {
const running = await isProcessRunning(`bs-manager-${crypto.randomUUID()}`);
expect(running).toBe(false);
// Throws because grep couldn't find any process with that name
expect(logSpy).toHaveBeenCalledTimes(1);
});
it("Empty process name", async () => {
const running = await isProcessRunning("");
expect(running).toBe(false);
expect(logSpy).toHaveBeenCalledTimes(0);
})
});
+329
View File
@@ -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].*/)
});
});
+5
View File
@@ -0,0 +1,5 @@
export const ifDescribe = (condition: boolean) => condition ? describe : describe.skip;
export const ifIt = (condition: boolean) => condition ? it : it.skip;
+7
View File
@@ -16,3 +16,10 @@ export const CACHE_PATH = path.join(app.getPath("userData"), "CachedData");
export const IMAGE_CACHE_PATH = path.join(CACHE_PATH, "imagescache");
export const HTTP_STATUS_CODES = constants;
// Linux related stuff
export const PROTON_BINARY_PREFIX = "proton";
export const WINE_BINARY_PREFIX = path.join("files", "bin", "wine64");
export const IS_FLATPAK = process.env.container === "flatpak";
+21 -17
View File
@@ -1,4 +1,4 @@
import { CopyOptions, copy, createReadStream, ensureDir, move, pathExists, pathExistsSync, 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,8 @@ 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";
import { ErrorObject } from "serialize-error";
export async function pathExist(path: string): Promise<boolean> {
try {
@@ -78,36 +80,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());
});
}
@@ -151,7 +154,7 @@ export async function copyDirectoryWithJunctions(src: string, dest: string, opti
const symlinkTarget = await readlink(sourcePath);
const relativePath = path.relative(src, symlinkTarget);
const newTarget = path.join(dest, relativePath);
await symlink(newTarget, destinationPath, "junction");
await symlink(newTarget, destinationPath, "junction"); // Only junction to avoid right issues while copying content of BSManager folder
}
}
}
@@ -277,4 +280,5 @@ export interface Progression<T = unknown, D = unknown> {
diff?: number;
data?: T;
extra?: D;
lastError?: ErrorObject;
}
+167 -11
View File
@@ -1,25 +1,181 @@
import cp from "child_process";
import log from "electron-log";
import psList from "ps-list";
import { IS_FLATPAK } from "main/constants";
export async function taskRunning(task: string): Promise<boolean> {
type LinuxOptions = {
// Add the prefix to the command
// eg. command - "./Beat Saber.exe" --no-yeet, prefix - "path/to/proton" run
// = "path/to/proton" run "./Beat Saber.exe" --no-yeet
prefix: string;
};
// Only applied if package as flatpak
type FlatpakOptions = {
// Force to use "flatpak-spawn --host" to run commands outside of the sandbox
host: boolean;
// Only copy the keys from options.env from bsmSpawn/bsmExec
env?: string[];
};
export type BsmSpawnOptions = {
args?: string[];
options?: cp.SpawnOptions;
log?: boolean;
linux?: LinuxOptions;
flatpak?: FlatpakOptions;
};
export type BsmExecOptions = {
args?: string[];
options?: cp.ExecOptions;
log?: boolean;
linux?: LinuxOptions;
flatpak?: FlatpakOptions;
};
function updateCommand(command: string, options: BsmSpawnOptions) {
if (options?.args) {
command += ` ${options.args.join(" ")}`;
}
if (process.platform === "linux") {
// "/bin/sh" does not see flatpak-spawn
// Most Debian and Arch should also support "/bin/bash"
options.options.shell = "/bin/bash";
if (options.linux?.prefix) {
command = `${options.linux.prefix} ${command}`;
}
if (options?.flatpak?.host) {
const envArgs = (options?.flatpak?.env && options?.options?.env)
&& options.flatpak.env
.filter(envName => options.options.env[envName])
.map(envName =>
`--env=${envName}="${options.options.env[envName]}"`
)
.join(" ");
command = `flatpak-spawn --host ${envArgs || ""} ${command}`;
}
}
return command;
}
export function bsmSpawn(command: string, options?: BsmSpawnOptions) {
options = options || {};
options.options = options.options || {};
command = updateCommand(command, options);
if (options?.log) {
log.info(process.platform === "win32" ? "Windows" : "Linux", "spawn command\n>", command);
}
return cp.spawn(command, options.options);
}
export function bsmExec(command: string, options?: BsmExecOptions): Promise<{
stdout: string;
stderr: string;
}> {
options = options || {};
options.options = options.options || {};
command = updateCommand(command, options);
if (options?.log) {
log.info(
process.platform === "win32" ? "Windows" : "Linux",
"exec command\n>", command
);
}
return new Promise((resolve, reject) => {
cp.exec(command, options?.options || {}, (error: Error, stdout: string, stderr: string) => {
if (error) { return reject(error); }
resolve({ stdout, stderr });
});
});
}
// Transform command from "steam" to "[s]team"
// NOTE: Can add an option to isProcessRunning/getProcessId to ignore this transformation
// in the future if needed
const transformProcessNameForPS = (name: string) => `[${name.at(0)}]${name.substring(1)}`;
async function isProcessRunningLinux(name: string): Promise<boolean> {
if (!name) {
return false;
}
try {
const processName = transformProcessNameForPS(name);
const { stdout: count } = await bsmExec(`ps awwxo args | grep -c "${processName}"`, {
log: true,
flatpak: { host: IS_FLATPAK },
});
return +count.trim() > 0;
} catch(error) {
log.error(error);
return false;
};
}
async function getProcessIdWindows(name: string): Promise<number | null> {
try {
const processes = await psList();
return processes.some(process => process.name?.includes(task) || process.cmd?.includes(task));
const process = processes.find(process => process.name?.includes(name) || process.cmd?.includes(name));
return process?.pid;
} catch (error) {
log.error(error);
return null;
}
catch(error){
}
export const isProcessRunning = process.platform === "win32"
? isProcessRunningWindows
: isProcessRunningLinux;
async function isProcessRunningWindows(name: string): Promise<boolean> {
try {
const processes = await psList();
return processes.some(process =>
process.name?.includes(name) || process.cmd?.includes(name)
);
} catch (error) {
log.error(error);
return false;
}
}
export async function getProcessPid(task: string): Promise<number> {
try {
const processes = await psList();
const process = processes.find(process => process.name?.includes(task) || process.cmd?.includes(task));
return process?.pid;
}
catch(error){
log.error(error);
async function getProcessIdLinux(name: string): Promise<number | null> {
if (!name) {
return null;
}
try {
const processName = transformProcessNameForPS(name);
const { stdout } = await bsmExec(`ps awwxo pid,args | grep "${processName}"`, {
log: true,
flatpak: { host: IS_FLATPAK },
});
if (!stdout) {
return null;
}
const line = stdout.split("\n")
.map(line => line.trimStart())
.find(line => line.includes(name) && !line.includes("grep"));
return line ? +line.split(" ").at(0) : null;
} catch(error) {
log.error(error);
return null;
};
}
export const getProcessId = process.platform === "win32"
? getProcessIdWindows
: getProcessIdLinux;
-28
View File
@@ -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;
}
+27
View File
@@ -0,0 +1,27 @@
import { pathExistsSync } from "fs-extra";
import { from, of } from "rxjs";
import { InstallationLocationService } from "main/services/installation-location.service";
import { IpcService } from "main/services/ipc.service";
const ipc = IpcService.getInstance();
ipc.on("bs-installer.folder-exists", (_, reply) => {
const service = InstallationLocationService.getInstance();
reply(of(pathExistsSync(service.installationDirectory())));
});
ipc.on("bs-installer.default-install-path", (_, reply) => {
const service = InstallationLocationService.getInstance();
reply(of(service.defaultInstallationDirectory()));
});
ipc.on("bs-installer.install-path", (_, reply) => {
const service = InstallationLocationService.getInstance();
reply(of(service.installationDirectory()));
});
ipc.on("bs-installer.set-install-path", (args, reply) => {
const service = InstallationLocationService.getInstance();
reply(from(service.setInstallationDirectory(args.path, args.move)));
});
+11 -1
View File
@@ -22,11 +22,21 @@ ipc.on("export-maps", async (args, reply) => {
reply(await maps.exportMaps(args.version, args.maps, args.outPath));
});
ipc.on("download-map", async (args, reply) => {
ipc.on("bs-maps.import-maps", async (args, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(maps.importMaps(args.paths, args.version));
})
ipc.on("bs-maps.download-map", async (args, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(from(maps.downloadMap(args.map, args.version)));
});
ipc.on("last-downloaded-map", (_, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(maps.lastDownloadedMap$);
})
ipc.on("one-click-install-map", (args, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(from(maps.oneClickDownloadMap(args)))
+13 -8
View File
@@ -4,27 +4,32 @@ import { from } from "rxjs";
const ipc = IpcService.getInstance();
ipc.on("get-available-mods", (args, reply) => {
ipc.on("bs-mods.get-available-mods", (args, reply) => {
const modsManager = BsModsManagerService.getInstance();
reply(from(modsManager.getAvailableMods(args)));
});
ipc.on("get-installed-mods", (args, reply) => {
ipc.on("bs-mods.get-installed-mods", (args, reply) => {
const modsManager = BsModsManagerService.getInstance();
reply(from(modsManager.getInstalledMods(args)));
});
ipc.on("install-mods", (args, reply) => {
ipc.on("bs-mods.import-mods", (args, reply) => {
const modsManager = BsModsManagerService.getInstance();
reply(from(modsManager.installMods(args.mods, args.version)));
reply(modsManager.importMods(args.paths, args.version));
});
ipc.on("uninstall-mods", (args, reply) => {
ipc.on("bs-mods.install-mods", (args, reply) => {
const modsManager = BsModsManagerService.getInstance();
reply(from(modsManager.uninstallMods(args.mods, args.version)));
reply(modsManager.installMods(args.mods, args.version));
});
ipc.on("uninstall-all-mods", (args, reply) => {
ipc.on("bs-mods.uninstall-mods", (args, reply) => {
const modsManager = BsModsManagerService.getInstance();
reply(from(modsManager.uninstallAllMods(args)));
reply(modsManager.uninstallMods(args.mods, args.version));
});
ipc.on("bs-mods.uninstall-all-mods", (args, reply) => {
const modsManager = BsModsManagerService.getInstance();
reply(modsManager.uninstallAllMods(args));
});
+6 -5
View File
@@ -3,8 +3,6 @@ import { IpcService } from "../services/ipc.service";
import { from, lastValueFrom, mergeMap, of } from "rxjs";
import { LocalMapsManagerService } from "../services/additional-content/maps/local-maps-manager.service";
import { Progression } from "main/helpers/fs.helpers";
import { isValidUrl } from "shared/helpers/url.helpers";
import { pathToFileURL } from "url";
const ipc = IpcService.getInstance();
@@ -31,10 +29,8 @@ ipc.on("is-playlists-deep-links-enabled", (args, reply) => {
ipc.on("download-playlist", (args, reply) => {
const playlists = LocalPlaylistsManagerService.getInstance();
const downloadUrl = isValidUrl(args.downloadSource) ? args.downloadSource : pathToFileURL(args.downloadSource).href;
return reply(playlists.downloadPlaylist({
bpListUrl: downloadUrl,
bplistSource: args.downloadSource,
version: args.version,
ignoreSongsHashs: args.ignoreSongsHashs,
dest: args.dest
@@ -63,6 +59,11 @@ ipc.on("export-playlists", (args, reply) => {
reply(playlists.exportPlaylists(args));
});
ipc.on("import-playlists", (args, reply) => {
const playlists = LocalPlaylistsManagerService.getInstance();
reply(playlists.importPlaylists(args));
});
ipc.on("install-playlist-file", (args, reply) => {
const playlists = LocalPlaylistsManagerService.getInstance();
@@ -1,8 +1,7 @@
import { BsOculusDownloaderService } from "../../services/bs-version-download/bs-oculus-downloader.service";
import { BsSteamDownloaderService } from "../../services/bs-version-download/bs-steam-downloader.service";
import { InstallationLocationService } from "../../services/installation-location.service";
import { IpcService } from "../../services/ipc.service";
import { from, of } from "rxjs";
import { of } from "rxjs";
import { BSLocalVersionService } from "../../services/bs-local-version.service";
const ipc = IpcService.getInstance();
@@ -14,16 +13,6 @@ ipc.on("import-version", (args, reply) => {
// #region Steam
ipc.on("bs-download.installation-folder", (_, reply) => {
const installLocation = InstallationLocationService.getInstance();
reply(from(installLocation.installationDirectory()));
});
ipc.on("bs-download.set-installation-folder", (args, reply) => {
const installerService = InstallationLocationService.getInstance();
reply(from(installerService.setInstallationDirectory(args)));
});
ipc.on("auto-download-bs-version", (args, reply) => {
const bsInstaller = BsSteamDownloaderService.getInstance();
reply(bsInstaller.autoDownloadBsVersion(args));
+3
View File
@@ -1,4 +1,5 @@
import "./os-controls-ipcs";
import "./bs-installer-ipcs.ts";
import "./bs-launcher-ipcs";
import "./bs-version-ipcs";
import "./bs-uninstall-ipcs";
@@ -12,3 +13,5 @@ import "./bs-playlist-ipcs";
import "./model-saber.ipcs";
import "./bs-model-ipcs";
import "./bs-version-download/bs-download-ipcs";
import "./static-configuration.ipcs";
import "./linux.ipcs.ts";
+1 -1
View File
@@ -6,7 +6,7 @@ const ipc = IpcService.getInstance();
ipc.on("download-update", (_, reply) => {
const updaterService = AutoUpdaterService.getInstance();
reply(from(updaterService.downloadUpdate()));
reply(updaterService.downloadUpdate());
});
ipc.on("check-update", (_, reply) => {
+11
View File
@@ -0,0 +1,11 @@
import { LinuxService } from "main/services/linux.service";
import { IpcService } from "../services/ipc.service";
import { of } from "rxjs";
const ipc = IpcService.getInstance();
ipc.on("linux.verify-proton-folder", (_, reply) => {
const linuxService = LinuxService.getInstance();
reply(of(linuxService.verifyProtonPath()));
});
+32 -3
View File
@@ -1,8 +1,10 @@
import { shell, dialog, app, BrowserWindow } from "electron";
import { shell, dialog, app, BrowserWindow, OpenDialogOptions } from "electron";
import { NotificationService } from "../services/notification.service";
import { IpcService } from "../services/ipc.service";
import { from, of } from "rxjs";
import { readFileSync } from "fs-extra";
import log from "electron-log";
import path from "path";
// TODO IMPROVE WINDOW CONTROL BY USING WINDOW SERVICE
@@ -12,11 +14,29 @@ ipc.on("new-window", (args, reply) => {
reply(from(shell.openExternal(args)));
});
ipc.on("open-dialog", (args, reply) => {
// Use this ipc instead of "choose-folder" or "choose-file" to have more control over the dialog
reply(from(dialog.showOpenDialog(args)));
})
ipc.on("choose-folder", (args, reply) => {
reply(from(dialog.showOpenDialog({ properties: ["openDirectory"], defaultPath: args ?? "" })));
const options: OpenDialogOptions = {
properties: ["openDirectory"],
defaultPath: args?.defaultPath ?? ""
};
if (args?.showHidden) {
options.properties.push("showHiddenFiles");
}
if (args?.parent) {
options.defaultPath = path.join(app.getPath(args.parent), options.defaultPath);
}
reply(from(dialog.showOpenDialog(options)));
});
ipc.on<string>("choose-file", async (args, reply) => {
ipc.on("choose-file", async (args, reply) => {
reply(from(dialog.showOpenDialog({ properties: ["openFile"], defaultPath: args ?? "" })));
});
@@ -62,3 +82,12 @@ ipc.on("choose-image", (args, reply) => {
return res.filePaths;
})));
});
ipc.on("restart-app", (_, reply) => {
log.info("App was requested to restart");
reply(of()); // Reply before restarting to avoid any issue
app.relaunch();
app.quit();
});
@@ -0,0 +1,14 @@
import { from, of } from "rxjs";
import { IpcService } from "../services/ipc.service";
import { StaticConfigurationService } from "../services/static-configuration.service";
const ipc = IpcService.getInstance();
const staticConfig = StaticConfigurationService.getInstance();
ipc.on("static-configuration.get", (args, reply) => {
reply(of(staticConfig.get(args)));
});
ipc.on("static-configuration.set", (args, reply) => {
reply(from(staticConfig.set(args.key, args.value)));
});
+139 -7
View File
@@ -23,16 +23,29 @@ import { LivShortcut } from "./services/liv/liv-shortcut.service";
import { SteamLauncherService } from "./services/bs-launcher/steam-launcher.service";
import { FileAssociationService } from "./services/file-association.service";
import { SongDetailsCacheService } from "./services/additional-content/maps/song-details-cache.service";
import { readdirSync, statSync, unlinkSync } from "fs-extra";
import { StaticConfigurationService } from "./services/static-configuration.service";
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
const staticConfig = StaticConfigurationService.getInstance();
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`);
};
export const filterStrings = new Set<string>();
export const filterPatterns = new Set<RegExp>();
// Filter all occulus tokens
filterPatterns.add(/FRL\S{10,}/g);
initLogger();
deleteOlestLogs();
deleteOldLogs();
staticConfig.take("disable-hadware-acceleration", disabled => {
if(disabled === true){ // strictly check for true
log.info("Disabling hardware acceleration");
app.disableHardwareAcceleration();
}
});
log.catchErrors();
if (process.env.NODE_ENV === "production") {
const sourceMapSupport = require("source-map-support");
@@ -104,7 +117,7 @@ if (!gotTheLock) {
app.whenReady().then(() => {
// C:\\Users\\Mathieu\\Desktop\\BSManager\\BSInstances\\My Version\\UserData\\SongDetailsCache.proto
app.setAppUserModelId(APP_NAME);
@@ -128,5 +141,124 @@ if (!gotTheLock) {
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);
}
});
}
+218
View File
@@ -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;
}
}
+7 -3
View File
@@ -1,4 +1,4 @@
import { writeFileSync } from "fs-extra";
import { pathExistsSync, readFileSync, writeFileSync } from "fs-extra";
import { tryit } from "shared/helpers/error.helpers";
import log from "electron-log";
import { Subject, debounceTime } from "rxjs";
@@ -22,9 +22,13 @@ export class JsonCache<T = unknown> {
private load(): void {
try {
this._cache = require(this.jsonPath);
if(pathExistsSync(this.jsonPath)){
this._cache = JSON.parse(readFileSync(this.jsonPath).toString());
} else {
log.warn("File cache not exist yet", this.jsonPath);
}
} catch (error) {
log.warn("Failed to load cache or file cache not exist yet", this.jsonPath, error);
log.warn("Failed to load cache file", this.jsonPath, error);
} finally {
this._cache ??= {};
}
+27 -14
View File
@@ -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;
}
}
+7 -1
View File
@@ -1,4 +1,4 @@
import { contextBridge, ipcRenderer, IpcRendererEvent } from "electron";
import { contextBridge, ipcRenderer, IpcRendererEvent, webUtils } from "electron";
import { ProviderPlatform } from "shared/models/provider-platform.enum";
const sep = process.platform === ProviderPlatform.WINDOWS ? "\\" : "/";
@@ -24,8 +24,14 @@ contextBridge.exposeInMainWorld("electron", {
},
path: {
sep,
basename: (path: string): string => {
return !path ? "" : path.split(sep).at(-1);
},
join: (...args: string[]): string => {
return args.join(sep);
}
},
webUtils: {
getPathForFile: webUtils.getPathForFile
}
});
@@ -7,22 +7,26 @@ import { RequestService } from "../request.service";
import { LocalMapsManagerService } from "./maps/local-maps-manager.service";
import log from "electron-log";
import { WindowManagerService } from "../window-manager.service";
import { BPList, DownloadPlaylistProgressionData } from "shared/models/playlists/playlist.interface";
import { readFileSync } from "fs";
import { BPList, DownloadPlaylistProgressionData, PlaylistSong } from "shared/models/playlists/playlist.interface";
import { readFileSync, Stats } from "fs";
import { BeatSaverService } from "../thrid-party/beat-saver/beat-saver.service";
import { copy, ensureDir, pathExists, pathExistsSync, readdirSync, realpath, writeFileSync } from "fs-extra";
import { copy, ensureDir, pathExists, pathExistsSync, realpath, writeFileSync } from "fs-extra";
import { Progression, getUniqueFileNamePath, unlinkPath } from "../../helpers/fs.helpers";
import { FileAssociationService } from "../file-association.service";
import { SongDetailsCacheService } from "./maps/song-details-cache.service";
import { sToMs } from "shared/helpers/time.helpers";
import { LocalBPList, LocalBPListsDetails } from "shared/models/playlists/local-playlist.models";
import { SongCacheService } from "./maps/song-cache.service";
import { InstallationLocationService } from "../installation-location.service";
import sanitize from "sanitize-filename";
import { isValidUrl } from "shared/helpers/url.helpers";
import { Archive } from "main/models/archive.class";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { BsmLocalMap } from "shared/models/maps/bsm-local-map.interface";
import { tryit } from "shared/helpers/error.helpers";
import recursiveReadDir from "recursive-readdir";
import { BsvMapDetail, SongDetails } from "shared/models/maps";
import { findHashInString } from "shared/helpers/string.helpers";
import { serializeError } from "serialize-error";
export class LocalPlaylistsManagerService {
private static instance: LocalPlaylistsManagerService;
@@ -38,6 +42,7 @@ export class LocalPlaylistsManagerService {
private readonly DEEP_LINKS = {
BeatSaver: "bsplaylist",
};
private readonly PLAYLIST_FILETYPES = [".bplist", ".json"];
private readonly versions: BSLocalVersionService;
private readonly maps: LocalMapsManagerService;
@@ -47,7 +52,6 @@ export class LocalPlaylistsManagerService {
private readonly windows: WindowManagerService;
private readonly bsaver: BeatSaverService;
private readonly songDetails: SongDetailsCacheService;
private readonly songCache: SongCacheService;
private readonly bsmFs: InstallationLocationService;
private constructor() {
@@ -59,15 +63,14 @@ export class LocalPlaylistsManagerService {
this.windows = WindowManagerService.getInstance();
this.bsaver = BeatSaverService.getInstance();
this.songDetails = SongDetailsCacheService.getInstance();
this.songCache = SongCacheService.getInstance();
this.bsmFs = InstallationLocationService.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.windows.openWindow(`oneclick-download-playlist.html?playlistUrl=${bplistUrl}`);
const bplistUrl = url.host === "playlist" ? url.pathname.replace("/", "") + url.search : "";
this.windows.openWindow(`oneclick-download-playlist.html?playlistUrl=${encodeURIComponent(bplistUrl)}`);
});
this.fileAssociation.registerFileAssociation(".bplist", filePath => {
@@ -85,11 +88,15 @@ export class LocalPlaylistsManagerService {
return fullPath;
}
private acceptPlaylistFiletype(filename: string): boolean {
return this.PLAYLIST_FILETYPES.includes(path.extname(filename).toLowerCase());
}
public writeBPListFile(opt: { bpList: BPList, version?: BSVersion, dest?: string }): Observable<LocalBPList> {
return new Observable<LocalBPList>(obs => {
(async () => {
const dest = await (async () => {
if(opt.dest && path.isAbsolute(opt.dest) && path.extname(opt.dest) === ".bplist") { return opt.dest; }
if(opt.dest && path.isAbsolute(opt.dest) && this.acceptPlaylistFiletype(opt.dest)) { return opt.dest; }
const playlistFolder = await this.getPlaylistsFolder(opt.version);
const playlistPath = path.join(playlistFolder, `${sanitize(opt.bpList.playlistTitle)}.bplist`);
return getUniqueFileNamePath(playlistPath);
@@ -107,36 +114,56 @@ export class LocalPlaylistsManagerService {
}
private async installBPListFile(opt: {
bslistSource: string,
bplistSource: string,
version?: BSVersion,
dest?: string
}): Promise<{path: string, localBPList: LocalBPList}> {
const bplist = await this.readPlaylistFromSource(opt.bslistSource);
const { bpList, filename } = await this.readPlaylistFromSource(opt.bplistSource);
const dest = await (async () => {
if(opt.dest && path.isAbsolute(opt.dest) && path.extname(opt.dest) === ".bplist") { return opt.dest; }
if(opt.dest && path.isAbsolute(opt.dest) && this.acceptPlaylistFiletype(opt.dest)) { return opt.dest; }
const playlistFolder = await this.getPlaylistsFolder(opt.version);
return path.join(playlistFolder, `${sanitize(bplist.playlistTitle)}.bplist`);
return path.join(playlistFolder, sanitize(filename));
})();
writeFileSync(dest, JSON.stringify(bplist, null, 2));
writeFileSync(dest, JSON.stringify(bpList, null, 2));
const localBPList: LocalBPList = { ...bplist, path: dest };
const localBPList: LocalBPList = { ...bpList, path: dest };
return { path: dest, localBPList };
}
private async readPlaylistFromSource(source: string): Promise<BPList> {
private async readPlaylistFromSource(source: string): Promise<{ bpList: BPList, filename: string }> {
const isLocalFile = await pathExists(source).catch(e => { log.error(e); return false; });
if(!isLocalFile && !isValidUrl(source)) {
throw new Error(`Invalid source ${source}`);
throw new CustomError(`Invalid source (${source})`, "INVALID_SOURCE");
}
const bpList: BPList = isLocalFile ? JSON.parse(readFileSync(source).toString()) : await this.request.getJSON<BPList>(source);
const { bpList, filename }: { bpList: BPList, filename: string } = await (async () => {
if(isLocalFile){
const res = await tryit(async () => JSON.parse(readFileSync(source).toString()) as BPList);
if(res.error) {
throw CustomError.fromError(res.error, "CANNOT_PARSE_PLAYLIST");
}
return { bpList: res.result, filename: path.basename(source) };
}
return bpList;
const res = await this.request.getJSON<BPList>(source);
const filename = this.request.getFilenameFromContentDisposition(res.headers["content-disposition"]) ?? `${res.data.playlistTitle}.bplist`;
return { bpList: res.data, filename };
})();
if(!bpList?.playlistTitle) {
throw new CustomError(`Invalid playlist file (${source})`, "INVALID_PLAYLIST_FILE");
}
bpList.songs = (bpList.songs ?? []).map(s => s.hash ? (
{ ...s, hash: findHashInString(s.hash) ?? s.hash }
) : s).filter(Boolean);
return { bpList, filename };
}
private openOneClickDownloadPlaylistWindow(downloadUrl: string): void {
@@ -155,15 +182,24 @@ export class LocalPlaylistsManagerService {
throw new Error(`Playlists folder not found ${folerPath}`);
}
const playlists = readdirSync(folerPath).filter(file => path.extname(file) === ".bplist");
progress.total = playlists.length;
const ignoreFunc = (file: string, stats: Stats): boolean => {
if(stats.isFile() && !this.acceptPlaylistFiletype(file)) { return true; }
return false;
}
for (const playlist of playlists) {
const playlistPath = path.join(folerPath, playlist);
const bpList = await this.readPlaylistFromSource(playlistPath);
const playlistPaths = (await recursiveReadDir(folerPath, [ignoreFunc]));
progress.total = playlistPaths.length;
const localBpList: LocalBPList = { ...bpList, path: playlistPath };
for (const playlistPath of playlistPaths) {
const {result, error} = await tryit(() => this.readPlaylistFromSource(playlistPath));
if(error) {
log.error(error);
continue;
}
const localBpList: LocalBPList = { ...result.bpList, path: playlistPath };
bpLists.push(localBpList);
progress.current += 1;
obs.next(progress);
@@ -175,6 +211,25 @@ export class LocalPlaylistsManagerService {
});
}
private getSongDetailsFromPlaylistSong(song: PlaylistSong): SongDetails | undefined {
let songDetails: SongDetails;
const songHash = findHashInString(song.hash);
if(songHash){
songDetails = this.songDetails.getSongDetails(song.hash);
}
if(song.key && !songDetails){
songDetails = this.songDetails.getSongDetailsById(song.key);
}
const levelIdHash = findHashInString(song.levelid);
if(levelIdHash && !songDetails){
songDetails = this.songDetails.getSongDetails(levelIdHash);
}
return songDetails;
}
public getLocalBPListDetails(localBPList: LocalBPList): LocalBPListsDetails {
const tryExtractPlaylistId = (url: string) => {
@@ -185,27 +240,28 @@ export class LocalPlaylistsManagerService {
const bpListDetails: LocalBPListsDetails = {
...localBPList,
duration: 0,
nbMaps: localBPList.songs?.length ?? 0,
id: localBPList.customData?.syncURL ? tryExtractPlaylistId(localBPList.customData.syncURL) : undefined
}
const songsDetails = localBPList.songs?.map(s => {
if(s.hash){
return this.songDetails.getSongDetails(s.hash);
}
if(s.key){
return this.songDetails.getSongDetailsById(s.key);
}
return undefined;
}).filter(Boolean);
const mappers = new Set<number>();
if(songsDetails?.length){
bpListDetails.duration = songsDetails.reduce((acc, song) => acc + song.duration, 0);
bpListDetails.nbMappers = new Set(songsDetails.map(s => s.uploader.id)).size;
bpListDetails.minNps = Math.min(...songsDetails.map(s => Math.min(...s.difficulties.map(d => d.nps || 0))));
bpListDetails.maxNps = Math.max(...songsDetails.map(s => Math.max(...s.difficulties.map(d => d.nps || 0))));
for(const song of localBPList.songs){
const songDetails = this.getSongDetailsFromPlaylistSong(song);
if(!songDetails) { continue; }
bpListDetails.duration += songDetails?.duration ? +songDetails.duration : 0;
mappers.add(songDetails.uploader?.id);
bpListDetails.minNps = Math.min(bpListDetails?.minNps ?? 0, Math.min(...songDetails.difficulties?.map(d => d?.nps || 0) ?? [0]));
bpListDetails.maxNps = Math.max(bpListDetails?.maxNps ?? 0, Math.max(...songDetails.difficulties?.map(d => d?.nps || 0) ?? [0]));
song.songDetails = songDetails;
}
bpListDetails.nbMappers = mappers.size;
return bpListDetails;
}
@@ -261,7 +317,28 @@ export class LocalPlaylistsManagerService {
continue;
}
const [ mapDetail ] = await this.bsaver.getMapDetailsFromHashs([song.hash]);
const mapDetail = await (async () => {
let mapDetail: BsvMapDetail;
const mapHash = findHashInString(song?.hash);
if(mapHash) {
mapDetail = (await this.bsaver.getMapDetailsFromHashs([findHashInString(mapHash)])).at(0);
}
if(song.key && !mapDetail) {
mapDetail = await this.bsaver.getMapDetailsById(song.key);
}
const levelIdHash = findHashInString(song?.levelid);
if(levelIdHash && !mapDetail) {
mapDetail = (await this.bsaver.getMapDetailsFromHashs([levelIdHash])).at(0);
}
return mapDetail;
})().catch(e => {
log.error(e);
return undefined as BsvMapDetail;
});
if(!mapDetail) {
continue;
@@ -285,8 +362,8 @@ export class LocalPlaylistsManagerService {
});
}
public downloadPlaylist({ bpListUrl, version, ignoreSongsHashs = [], dest }: {
bpListUrl: string,
public downloadPlaylist({ bplistSource, version, ignoreSongsHashs = [], dest }: {
bplistSource: string,
version?: BSVersion
ignoreSongsHashs?: string[]
dest?: string
@@ -297,7 +374,7 @@ export class LocalPlaylistsManagerService {
return new Observable<Progression<DownloadPlaylistProgressionData>>(obs => {
(async () => {
const { localBPList } = await this.installBPListFile({ bslistSource: bpListUrl, version, dest });
const { localBPList } = await this.installBPListFile({ bplistSource, version, dest });
await lastValueFrom(this.downloadPlaylistSongs(localBPList, ignoreSongsHashs, version).pipe(
tap({ next: p => obs.next(p) }),
@@ -366,13 +443,56 @@ export class LocalPlaylistsManagerService {
return archive.finalize();
}
public oneClickInstallPlaylist(bpListUrl: string): Observable<Progression<DownloadPlaylistProgressionData>> {
public importPlaylists({ version, paths }: { version?: BSVersion, paths: string[] }): Observable<Progression<LocalBPListsDetails>> {
return new Observable<Progression<LocalBPListsDetails>>(obs => {
let canceled = false;
(async () => {
const bplistPaths = paths.filter(p => this.acceptPlaylistFiletype(p));
const progress: Progression<LocalBPListsDetails> = { current: 0, total: bplistPaths.length, data: null };
obs.next(progress);
for(const playlistPath of bplistPaths) {
if(canceled) {
log.info("Playlist import canceled");
return;
}
const { result: localBPList, error } = await tryit(() => this.installBPListFile({ bplistSource: playlistPath, version }));
if(error) {
progress.lastError = serializeError(CustomError.fromError(error));
obs.next(progress);
log.error(error);
continue;
}
const bpListDetails = this.getLocalBPListDetails(localBPList.localBPList);
progress.current += 1;
progress.data = bpListDetails;
obs.next(progress);
}
})()
.catch(err => obs.error(err))
.finally(() => obs.complete());
return () => {
canceled = true;
}
});
}
public oneClickInstallPlaylist(bplistUrl: string): Observable<Progression<DownloadPlaylistProgressionData>> {
return new Observable<Progression<DownloadPlaylistProgressionData>>(obs => {
(async () => {
const versions = await this.versions.getInstalledVersions();
const download$ = this.downloadPlaylist({ bpListUrl, version: versions.pop() }).pipe(tap({
const download$ = this.downloadPlaylist({ bplistSource: bplistUrl, version: versions.pop() }).pipe(tap({
next: progress => obs.next(progress),
error: err => obs.error(err),
}));
@@ -384,7 +504,7 @@ export class LocalPlaylistsManagerService {
const realSourceMapsFolder = await realpath(path.dirname(downloadedMaps[0].path));
for (const version of versions) {
await this.installBPListFile({ bslistSource: playlist.path, version});
await this.installBPListFile({ bplistSource: playlist.path, version});
const versionMapsFolder = await this.maps.getMapsFolderPath(version);
const realDestMapsFolder = await realpath(versionMapsFolder).catch(e => {
@@ -1,20 +1,19 @@
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";
import { UtilsService } from "../../utils.service";
import crypto from "crypto";
import crypto, { BinaryLike } from "crypto";
import { lstatSync } from "fs";
import { copy, createReadStream, ensureDir, pathExists, pathExistsSync, 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";
import log from "electron-log";
import { WindowManagerService } from "../../window-manager.service";
import { Observable, lastValueFrom } from "rxjs";
import { Observable, Subject, lastValueFrom } from "rxjs";
import { Archive } from "../../../models/archive.class";
import { Progression, deleteFolder, ensureFolderExist, getFilesInFolder, getFoldersInFolder, pathExist } from "../../../helpers/fs.helpers";
import { readFile } from "fs/promises";
@@ -23,10 +22,15 @@ import { allSettled } from "../../../../shared/helpers/promise.helpers";
import { splitIntoChunk } from "../../../../shared/helpers/array.helpers";
import { SongDetailsCacheService } from "./song-details-cache.service";
import { SongCacheService } from "./song-cache.service";
import { IpcService } from "../../ipc.service";
import { pathToFileURL } from "url";
import { sToMs } from "../../../../shared/helpers/time.helpers";
import { FieldRequired } from "shared/helpers/type.helpers";
import { MapInfo } from "shared/models/maps/info/map-info.model";
import { parseMapInfoDat } from "shared/parsers/maps/map-info.parser";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { tryit } from "shared/helpers/error.helpers";
import { BsmZipExtractor } from "main/models/bsm-zip-extractor.class";
import { escapeRegExp } from "../../../../shared/helpers/string.helpers";
export class LocalMapsManagerService {
private static instance: LocalMapsManagerService;
@@ -57,7 +61,8 @@ export class LocalMapsManagerService {
private readonly linker: FolderLinkerService;
private readonly songDetailsCache: SongDetailsCacheService;
private readonly songCache: SongCacheService;
private readonly ipc: IpcService;
private readonly _lastDownloadedMap = new Subject<{ map: BsmLocalMap, version?: BSVersion }>();
private constructor() {
this.localVersion = BSLocalVersionService.getInstance();
@@ -69,7 +74,6 @@ export class LocalMapsManagerService {
this.linker = FolderLinkerService.getInstance();
this.songDetailsCache = SongDetailsCacheService.getInstance();
this.songCache = SongCacheService.getInstance();
this.ipc = IpcService.getInstance();
const handleOneClick = (mapId: string, isHash = false) => {
this.windows.openWindow(`oneclick-download-map.html?mapId=${mapId}&isHash=${isHash}`);
@@ -98,24 +102,35 @@ export class LocalMapsManagerService {
}
private async computeMapHash(mapPath: string, rawInfoString: string): Promise<string> {
const mapRawInfo: RawMapInfoData = JSON.parse(rawInfoString);
const { result: mapInfo, error } = tryit(() => parseMapInfoDat(JSON.parse(rawInfoString)));
if(!mapInfo || error) {
log.error(`Unable to cumpute hash, cannot parse map info at ${mapPath}`, error);
throw CustomError.fromError(error, `Unable to cumpute hash, cannot parse map info at ${mapPath}`, "cannot-parse-map-info");
}
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 => shasum.update(data as BinaryLike));
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");
@@ -123,16 +138,16 @@ export class LocalMapsManagerService {
public async loadMapInfoFromPath(mapPath: string): Promise<BsmLocalMap> {
const getUrlsAndReturn = (rawInfo: RawMapInfoData, hash: string, mapPath: string) => {
const coverUrl = pathToFileURL(path.join(mapPath, rawInfo._coverImageFilename)).href;
const songUrl = pathToFileURL(path.join(mapPath, rawInfo._songFilename)).href;
return { rawInfo, coverUrl, songUrl, hash, path: mapPath, songDetails: this.songDetailsCache.getSongDetails(hash) } as BsmLocalMap;
const getUrlsAndReturn = (mapInfo: MapInfo, hash: string, mapPath: string): BsmLocalMap => {
const coverUrl = pathToFileURL(path.join(mapPath, mapInfo.coverImageFilename)).href;
const songUrl = pathToFileURL(path.join(mapPath, mapInfo.songFilename)).href;
return { mapInfo, coverUrl, songUrl, hash, path: mapPath, songDetails: this.songDetailsCache.getSongDetails(hash) };
};
const cachedInfos = this.songCache.getMapInfoFromDirname(path.basename(mapPath));
const cachedMapInfos = this.songCache.getMapInfoFromDirname(path.basename(mapPath));
if (cachedInfos) {
return getUrlsAndReturn(cachedInfos.rawInfo, cachedInfos.hash, mapPath);
if (cachedMapInfos) {
return getUrlsAndReturn(cachedMapInfos.mapInfo, cachedMapInfos.hash, mapPath);
}
const files = await getFilesInFolder(mapPath);
@@ -143,23 +158,25 @@ export class LocalMapsManagerService {
}
const rawInfoString = await readFile(infoFile, { encoding: "utf-8" });
const rawInfo: RawMapInfoData = JSON.parse(rawInfoString);
const { result: mapInfo, error } = tryit(() => parseMapInfoDat(JSON.parse(rawInfoString)));
if (error) {
log.error(`Cannot parse map info.dat. Map path: ${mapPath}`, error);
throw CustomError.fromError(error, `Cannot read map info.dat. Map path: ${mapPath}`, "cannot-parse-map-info");
}
const hash = await this.computeMapHash(mapPath, rawInfoString);
return getUrlsAndReturn(rawInfo, hash, mapPath);
return getUrlsAndReturn(mapInfo, hash, 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, dest))).data;
}
public getMaps(version?: BSVersion): Observable<BsmLocalMapsProgress> {
@@ -194,7 +211,7 @@ export class LocalMapsManagerService {
return null;
}
this.songCache.setMapInfoFromDirname(path.basename(mapPath), { rawInfo: mapInfo.rawInfo, hash: mapInfo.hash });
this.songCache.setMapInfoFromDirname(path.basename(mapPath), { mapInfo: mapInfo.mapInfo, hash: mapInfo.hash });
progression.loaded++;
observer.next(progression);
@@ -268,8 +285,8 @@ export class LocalMapsManagerService {
const mapsPaths = await getFoldersInFolder(versionMapsPath);
for (const mapPath of mapsPaths) {
const mapInfo = await this.loadMapInfoFromPath(mapPath);
if (hashs.includes(mapInfo.hash)) {
const { result: mapInfo } = await tryit(() => this.loadMapInfoFromPath(mapPath));
if (mapInfo && hashs.includes(mapInfo.hash)) {
await deleteFolder(mapPath);
this.songCache.deleteMapInfoFromDirname(path.basename(mapPath));
progress.current++;
@@ -297,8 +314,8 @@ export class LocalMapsManagerService {
const mapsPaths = await getFoldersInFolder(versionMapsPath);
for (const mapPath of mapsPaths) {
const mapInfo = await this.loadMapInfoFromPath(mapPath);
if (mapInfo.hash === hash) {
const { result: mapInfo } = await tryit(() => this.loadMapInfoFromPath(mapPath));
if (mapInfo?.hash === hash) {
return mapInfo;
}
}
@@ -306,6 +323,103 @@ export class LocalMapsManagerService {
return null;
}
public importMaps(zipPaths: string[], version?: BSVersion): Observable<Progression<BsmLocalMap>> {
return new Observable<Progression<BsmLocalMap>>(obs => {
let progress: Progression<BsmLocalMap> = { total: 0, current: 0 };
let nbImportedMaps = 0;
const abortController = new AbortController();
let zip: BsmZipExtractor;
(async () => {
const mapsPath = await this.getMapsFolderPath(version);
for(const zipPath of zipPaths) {
if(abortController.signal?.aborted) {
log.info("Maps import from zip has been cancelled");
return;
}
progress = { total: 0, current: 0 };
obs.next(progress); // reset progress for each zip
if(!pathExistsSync(zipPath)) { continue; }
zip = await BsmZipExtractor.fromPath(zipPath);
const mapsFolders = (await zip.filterEntries(entry => /(^|\/)[Ii]nfo\.dat$/.test(entry.fileName)))
.map(entry => path.dirname(entry.fileName));
if (mapsFolders.length === 0) {
log.warn("No maps \"info.dat\" found in zip", zipPath);
progress.total = 1;
progress.current = 1;
obs.next(progress);
continue;
}
progress.total = mapsFolders.length;
obs.next(progress);
const isRoot = mapsFolders.length === 1 && mapsFolders[0] === ".";
const destination = isRoot
? path.join(mapsPath, path.basename(zipPath, ".zip"))
: mapsPath;
log.info("Extracting", `"${zipPath}"`, "into", `"${mapsPath}"`);
for (const folder of mapsFolders) {
log.info(">", folder);
const regex = new RegExp(`^${escapeRegExp(folder)}\\/`);
const exported = await zip.extract(destination, {
entriesNames: [regex],
abortToken: abortController
});
if(exported.length === 0) {
log.warn("No files extracted from", folder);
continue;
}
if (abortController.signal?.aborted) {
break;
}
++nbImportedMaps;
++progress.current;
progress.data = await this.loadMapInfoFromPath(path.join(destination, folder));
obs.next(progress);
if (abortController.signal?.aborted) {
break;
}
}
zip.close();
if (abortController.signal?.aborted) {
log.info("Maps import from zip has been cancelled");
return;
}
}
})()
.then(() => {
if(!nbImportedMaps){
throw new CustomError("No \"Info.dat\" file located in any of the zip files", "invalid-zip");
}
return log.info("Successfully imported", nbImportedMaps, "maps from", zipPaths.length, "zips");
})
.catch(e => obs.error(e))
.finally(() => {
if (zip) {
zip.close();
}
obs.complete()
});
return () => {
abortController.abort();
};
});
}
public async downloadMap(map: BsvMapDetail, version?: BSVersion): Promise<BsmLocalMap> {
if (!map.versions.at(0).hash) {
@@ -315,7 +429,7 @@ export class LocalMapsManagerService {
log.info("Downloading map", map.name, map.id);
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);
@@ -329,22 +443,16 @@ export class LocalMapsManagerService {
return installedMap;
}
const { zip, zipPath } = await this.downloadMapZip(zipUrl);
if (!zip) {
throw new Error(`Cannot download ${zipUrl}`);
}
await ensureFolderExist(mapPath);
await zip.extract(null, mapPath);
await zip.close();
const zipPath = await this.downloadMapZip(zipUrl);
const zip = await BsmZipExtractor.fromPath(zipPath);
await zip.extract(mapPath);
zip.close();
await unlink(zipPath);
const localMap = await this.loadMapInfoFromPath(mapPath);
localMap.songDetails = this.songDetailsCache.getSongDetails(localMap.hash);
this.ipc.send<{map: BsmLocalMap, version?: BSVersion}>("map-downloaded", this.windows.getWindows("index.html").at(0), { map: localMap, version });
this._lastDownloadedMap.next({ map: localMap, version });
return localMap;
}
@@ -392,4 +500,8 @@ export class LocalMapsManagerService {
public isDeepLinksEnabled(): boolean {
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistered(link));
}
public get lastDownloadedMap$(): Observable<{ map: BsmLocalMap, version?: BSVersion }> {
return this._lastDownloadedMap.asObservable();
}
}
@@ -1,7 +1,7 @@
import { CACHE_PATH } from "main/constants";
import { JsonCache } from "main/models/json-cache.class";
import path from "path";
import { RawMapInfoData } from "shared/models/maps";
import { MapInfo } from "shared/models/maps/info/map-info.model";
export class SongCacheService {
@@ -14,34 +14,35 @@ export class SongCacheService {
return SongCacheService.instance;
}
private readonly RAW_INFOS_CACHE_PATH = path.join(CACHE_PATH, "song-raw-info-cache.json");
private readonly MAPS_INFO_CACHE_PATH = path.join(CACHE_PATH, "map-info-cache.json");
private readonly rawInfosCache: JsonCache<CachedRawInfoWithHash>;
private readonly mapsInfoCache: JsonCache<CachedMapInfoWithHash>;
private constructor(){
this.rawInfosCache = new JsonCache(this.RAW_INFOS_CACHE_PATH);
console.log(this.MAPS_INFO_CACHE_PATH);
this.mapsInfoCache = new JsonCache(this.MAPS_INFO_CACHE_PATH);
}
public getMapInfoFromDirname(dirname: string): CachedRawInfoWithHash {
return this.rawInfosCache.get(dirname);
public getMapInfoFromDirname(dirname: string): CachedMapInfoWithHash {
return this.mapsInfoCache.get(dirname);
}
public getMapInfoFromHash(hash: string): { dirname: string, info: CachedRawInfoWithHash } | undefined {
const res = Object.entries(this.rawInfosCache.cache).find(([, info]) => info.hash === hash);
public getMapInfoFromHash(hash: string): { dirname: string, info: CachedMapInfoWithHash } | undefined {
const res = Object.entries(this.mapsInfoCache.cache).find(([, info]) => info.hash === hash);
return res ? { dirname: res[0], info: res[1] } : undefined;
}
public setMapInfoFromDirname(dirname: string, info: CachedRawInfoWithHash): void {
this.rawInfosCache.set(dirname, info);
public setMapInfoFromDirname(dirname: string, info: CachedMapInfoWithHash): void {
this.mapsInfoCache.set(dirname, info);
}
public deleteMapInfoFromDirname(dirname: string): void {
this.rawInfosCache.delete(dirname);
this.mapsInfoCache.delete(dirname);
}
}
export type CachedRawInfoWithHash = {
export type CachedMapInfoWithHash = {
hash: string;
rawInfo: RawMapInfoData;
mapInfo: MapInfo;
};
@@ -1,7 +1,6 @@
import path from "path";
import { ensureDirSync, existsSync, readFile, writeFile } from "fs-extra";
import { BehaviorSubject, Observable, catchError, filter, lastValueFrom, of, take, timeout } from "rxjs";
import { ConfigurationService } from "../../configuration.service";
import { RequestService } from "../../request.service";
import { tryit } from "shared/helpers/error.helpers";
import { CACHE_PATH, HTTP_STATUS_CODES } from "main/constants";
@@ -12,6 +11,7 @@ import { SongDetails } from "shared/models/maps/song-details-cache/song-details-
import { inflate } from "pako";
import { RawSongDetailsCache } from "shared/models/maps/song-details-cache/raw-song-details-cache.model";
import { RawSongDetailsDeserializer } from "shared/models/maps/song-details-cache/raw-song-details-deserializer.class";
import { StaticConfigurationService } from "main/services/static-configuration.service";
export class SongDetailsCacheService {
@@ -32,7 +32,7 @@ export class SongDetailsCacheService {
private readonly PROTO_CACHE_PATH = path.join(CACHE_PATH, "song-details-cache");
private readonly etagKey = "song-details-cache-etag";
private readonly config: ConfigurationService;
private readonly staticConfig: StaticConfigurationService;
private readonly request: RequestService;
private readonly utils: UtilsService;
@@ -41,7 +41,7 @@ export class SongDetailsCacheService {
private readonly _loaded$ = new BehaviorSubject<boolean>(null);
private constructor(){
this.config = ConfigurationService.getInstance();
this.staticConfig = StaticConfigurationService.getInstance();
this.request = RequestService.getInstance();
this.utils = UtilsService.getInstance();
this.loadCache()
@@ -49,10 +49,10 @@ export class SongDetailsCacheService {
private async loadCache(): Promise<void> {
const protoCacheExists = existsSync(this.PROTO_CACHE_PATH);
const etag = protoCacheExists ? this.config.get<string>(this.etagKey) : null;
const etag = protoCacheExists ? this.staticConfig.get(this.etagKey) : null;
await this.downloadCacheFile(etag).then(etag => {
this.config.set(this.etagKey, etag);
this.staticConfig.set(this.etagKey, etag);
log.info("SongDetailsCache downloaded");
this.songDetailsIdIndex = this.createIdIndex(this.songDetailsCache);
log.info("SongDetailsIdIndex created");
@@ -141,6 +141,7 @@ export class SongDetailsCacheService {
if(error) {
lastError = error;
log.error("Failed to download SongDetailCache file", etag, error);
continue;
}
@@ -152,7 +153,6 @@ export class SongDetailsCacheService {
}
}
log.error("Failed to download SongDetailCache file", etag, lastError);
throw lastError;
}
+35 -27
View File
@@ -1,13 +1,12 @@
import { autoUpdater } from "electron-updater";
import { autoUpdater, CancellationToken, ProgressInfo } from "electron-updater";
import log from "electron-log";
import { UtilsService } from "./utils.service";
import { gt } from "semver";
import { Progression } from "main/helpers/fs.helpers";
import { Observable } from "rxjs";
export class AutoUpdaterService {
private static instance: AutoUpdaterService;
private readonly utilsService: UtilsService;
public static getInstance(): AutoUpdaterService {
if (!AutoUpdaterService.instance) {
AutoUpdaterService.instance = new AutoUpdaterService();
@@ -18,37 +17,46 @@ export class AutoUpdaterService {
constructor() {
autoUpdater.logger = log;
autoUpdater.autoDownload = false;
this.utilsService = UtilsService.getInstance();
}
public isUpdateAvailable(): Promise<boolean> {
return new Promise(resolve => {
autoUpdater
.checkForUpdates()
.then(info => {
const needUpdate = (() => {
if (!info?.updateInfo) {
return false;
}
return gt(info.updateInfo.version, autoUpdater.currentVersion.version);
})();
resolve(needUpdate);
})
.catch(() => resolve(false));
});
return autoUpdater.checkForUpdates().then(info => {
return !!info?.updateInfo && gt(info.updateInfo.version, autoUpdater.currentVersion.version);
}).catch(() => false);
}
public downloadUpdate(): Promise<boolean> {
autoUpdater.removeAllListeners("download-progress");
autoUpdater.addListener("download-progress", info => {
this.utilsService.ipcSend("update-download-progress", { success: true, data: info.percent });
});
public downloadUpdate(): Observable<Progression> {
return new Observable<Progression>(observer => {
return autoUpdater.downloadUpdate().then(res => !!res && !!res.length);
observer.next({ current: 0, total: 0 });
const progressListener = (progress: ProgressInfo) => {
observer.next({ current: progress.transferred, total: progress.total });
};
const downloadedListener = () => {
observer.next({ current: 100, total: 100 });
};
autoUpdater.addListener("download-progress", progressListener);
autoUpdater.addListener("update-downloaded", downloadedListener);
const cancelToken = new CancellationToken();
autoUpdater.downloadUpdate(cancelToken)
.catch(err => observer.error(err))
.finally(() => observer.complete());
return () => {
cancelToken.cancel();
autoUpdater.removeListener("download-progress", progressListener);
autoUpdater.removeListener("update-downloaded", downloadedListener);
}
});
}
public quitAndInstall() {
autoUpdater.quitAndInstall();
log.info("Quit and install");
return autoUpdater.quitAndInstall();
}
}
@@ -1,21 +1,29 @@
import { LaunchOption } from "shared/models/bs-launch";
import { BSLocalVersionService } from "../bs-local-version.service";
import { ChildProcessWithoutNullStreams, SpawnOptionsWithoutStdio, spawn } from "child_process";
import { ChildProcessWithoutNullStreams, SpawnOptionsWithoutStdio } from "child_process";
import path from "path";
import log from "electron-log";
import { sToMs } from "../../../shared/helpers/time.helpers";
import { LinuxService } from "../linux.service";
import { bsmSpawn } from "main/helpers/os.helpers";
import { IS_FLATPAK } from "main/constants";
export abstract class AbstractLauncherService {
protected readonly linux = LinuxService.getInstance();
protected readonly localVersions = BSLocalVersionService.getInstance();
constructor(){
this.linux = LinuxService.getInstance();
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");
@@ -41,10 +49,25 @@ export abstract class AbstractLauncherService {
spawnOptions.windowsVerbatimArguments = true;
}
log.info(`Launch BS exe at ${bsExePath} with args ${args?.join(" ")}`);
return spawn(bsExePath, args, spawnOptions);
spawnOptions.shell = true; // For windows to spawn properly
return bsmSpawn(`"${bsExePath}"`, {
args, options: spawnOptions, log: true,
linux: { prefix: this.linux.getProtonPrefix() },
flatpak: {
host: IS_FLATPAK,
env: [
"SteamAppId",
"SteamOverlayGameId",
"SteamGameId",
"WINEDLLOVERRIDES",
"STEAM_COMPAT_DATA_PATH",
"STEAM_COMPAT_INSTALL_PATH",
"STEAM_COMPAT_CLIENT_INSTALL_PATH",
"STEAM_COMPAT_APP_ID",
"SteamEnv",
],
},
});
}
protected launchBs(bsExePath: string, args: string[], options?: SpawnBsProcessOptions): {process: ChildProcessWithoutNullStreams, exit: Promise<number>} {
@@ -8,7 +8,7 @@ import log from "electron-log";
import { sToMs } from "../../../shared/helpers/time.helpers";
import { lstat, pathExists, readdir, readlink, rename, symlink, unlink } from "fs-extra";
import { AbstractLauncherService } from "./abstract-launcher.service";
import { taskRunning } from "../../helpers/os.helpers";
import { isProcessRunning } 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";
@@ -127,6 +127,11 @@ export class OculusLauncherService extends AbstractLauncherService implements St
const prepareDowngradedVersion: () => Promise<string> = async () => {
const originalVersionPath = await prepareOriginalVersion().catch(() => null);
if (!originalVersionPath) {
throw CustomError.fromError(new Error("Original Oculus Beat Saber not installed"), BSLaunchError.ORIGINAL_OCULUS_NOT_INSTALLED);
}
const oculusLib = await lastValueFrom(this.oculusLib$.pipe(take(1), timeout(sToMs(30)), catchError(() => of(null))));
if(!oculusLib){
@@ -149,7 +154,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
(async () => {
// Cannot start multiple instances of Beat Saber with Oculus
const bsRunning = await taskRunning(BS_EXECUTABLE).catch(() => false);
const bsRunning = await isProcessRunning(BS_EXECUTABLE).catch(() => false);
if(bsRunning){
throw CustomError.fromError(new Error("Cannot start two instance of Beat Saber for Oculus"), BSLaunchError.BS_ALREADY_RUNNING);
}
@@ -10,7 +10,6 @@ import { AbstractLauncherService } from "./abstract-launcher.service";
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
import { UtilsService } from "../utils.service";
import { exec } from "child_process";
import fs from 'fs';
export class SteamLauncherService extends AbstractLauncherService implements StoreLauncherInterface{
@@ -68,14 +67,14 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
return new Observable<BSLaunchEventData>(obs => {(async () => {
const bsFolderPath = await this.localVersions.getInstalledVersionPath(launchOptions.version);
let exePath = path.join(bsFolderPath, BS_EXECUTABLE);
const bsExePath = path.join(bsFolderPath, BS_EXECUTABLE);
if(!(await pathExists(exePath))){
throw CustomError.fromError(new Error(`Path not exist : ${exePath}`), BSLaunchError.BS_NOT_FOUND);
if(!(await pathExists(bsExePath))){
throw CustomError.fromError(new Error(`Path not exist : ${bsExePath}`), BSLaunchError.BS_NOT_FOUND);
}
// Open Steam if not running
if(!(await this.steam.steamRunning())){
if(!(await this.steam.isSteamRunning())){
obs.next({type: BSLaunchEvent.STEAM_LAUNCHING});
await this.steam.openSteam().then(() => {
@@ -95,7 +94,7 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
await this.restoreSteamVR().catch(log.error);
}
let launchArgs = this.buildBsLaunchArgs(launchOptions);
const launchArgs = this.buildBsLaunchArgs(launchOptions);
const steamPath = await this.steam.getSteamPath();
const env = {
@@ -107,43 +106,7 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
// Linux setup
if (process.platform === "linux") {
if (launchOptions.admin) {
log.warn("Launching as admin is not supported on Linux! Starting the game as a normal user.");
launchOptions.admin = false;
}
// Create the compat data path if it doesn't exist.
// If the user never ran Beat Saber through steam before
// using bsmanager, it won't exist, and proton will fail
// to launch the game.
const compatDataPath = `${steamPath}/steamapps/compatdata/${BS_APP_ID}`;
if (!fs.existsSync(compatDataPath)) {
log.info(`Proton compat data path not found at '${compatDataPath}', creating directory`);
fs.mkdirSync(compatDataPath);
}
// proton run BeatSaber.exe
launchArgs = [
"run",
`${exePath}`,
...launchArgs,
];
exePath = launchOptions.protonPath;
if (!exePath) {
throw CustomError.fromError(new Error("Proton path not set"), BSLaunchError.PROTON_NOT_SET);
}
// Setup Proton environment variables
Object.assign(env, {
"WINEDLLOVERRIDES": "winhttp=n,b", // Required for mods to work
"STEAM_COMPAT_DATA_PATH": compatDataPath,
"STEAM_COMPAT_INSTALL_PATH": bsFolderPath,
"STEAM_COMPAT_CLIENT_INSTALL_PATH": steamPath,
"STEAM_COMPAT_APP_ID": BS_APP_ID,
// Uncomment these to create a proton log file in the Beat Saber install directory.
// "PROTON_LOG": 1,
// "PROTON_LOG_DIR": bsFolderPath,
});
await this.linux.setupLaunch(launchOptions, steamPath, bsFolderPath, env);
}
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
@@ -151,10 +114,10 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
const spawnOpts = { env, cwd: bsFolderPath };
const launchPromise = !launchOptions.admin ? (
this.launchBs(exePath, launchArgs, spawnOpts).exit
this.launchBs(bsExePath, launchArgs, spawnOpts).exit
) : (
new Promise<number>(resolve => {
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${exePath}" ${launchArgs.join(" ")}`, spawnOpts);
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${bsExePath}" ${launchArgs.join(" ")}`, spawnOpts);
adminProcess.on("error", err => {
log.error("Error while starting BS as Admin", err);
resolve(-1)
+46 -43
View File
@@ -6,14 +6,13 @@ import { BS_APP_ID, OCULUS_BS_BACKUP_DIR, OCULUS_BS_DIR } from "../constants";
import path from "path";
import { ConfigurationService } from "./configuration.service";
import { lstat, rename } from "fs/promises";
import { BsmException } from "shared/models/bsm-exception.model";
import log from "electron-log";
import { OculusService } from "./oculus.service";
import { DownloadLinkType } from "shared/models/mods";
import sanitize from "sanitize-filename";
import { Progression, copyDirectoryWithJunctions, deleteFolder, ensurePathNotAlreadyExist, getFoldersInFolder, rxCopy } from "../helpers/fs.helpers";
import { FolderLinkerService } from "./folder-linker.service";
import { ReadStream, createReadStream, pathExists, readFile, writeFile } from "fs-extra";
import { ReadStream, createReadStream, pathExists, pathExistsSync, readFile, writeFile } from "fs-extra";
import readline from "readline";
import { Observable, Subject, catchError, finalize, from, map, switchMap, throwError } from "rxjs";
import { BsStore } from "../../shared/models/bs-store.enum";
@@ -306,54 +305,58 @@ export class BSLocalVersionService {
.catch(() => { return false; })
}
public async editVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
if(version.steam || version.oculus){ throw {title: "CantEditSteam", message: "CantEditSteam"} as BsmException; }
const oldPath = await this.getVersionPath(version);
const editedVersion: BSVersion = version.BSVersion === name
? {...version, name: undefined, color}
: {...version, name: sanitize(name), color};
const newPath = await this.getVersionPath(editedVersion);
public async editVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
if(version.steam || version.oculus){ throw new CustomError("Do not edit official Beat Saber versions", "CantEditSteam") }
const oldPath = await this.getVersionPath(version);
const editedVersion: BSVersion = version.BSVersion === name
? {...version, name: undefined, color}
: {...version, name: sanitize(name), color};
const newPath = await this.getVersionPath(editedVersion);
if(oldPath === newPath){
this.deleteCustomVersion(version);
this.addCustomVersion(editedVersion);
return editedVersion;
}
if(oldPath === newPath){
this.deleteCustomVersion(version);
this.addCustomVersion(editedVersion);
return editedVersion;
}
if((await pathExists(newPath)) && newPath === oldPath){ throw {title: "VersionAlreadExist"} as BsmException; }
if(pathExistsSync(newPath)){
throw new CustomError("Unable to edit the version, path already exist", "VersionAlreadExist");
}
return rename(oldPath, newPath).then(() => {
this.deleteCustomVersion(version);
this.addCustomVersion(editedVersion);
return editedVersion;
}).catch((err: Error) => {
log.error("edit version error", err, version, name, color);
throw {title: "CantRename", ...err} as BsmException;
});
}
return rename(oldPath, newPath).then(() => {
this.deleteCustomVersion(version);
this.addCustomVersion(editedVersion);
return editedVersion;
}).catch((err: Error) => {
log.error("edit version error", err, version, name, color);
throw CustomError.fromError(err, "CantRename");
});
}
public async cloneVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
const originPath = await this.getVersionPath(version);
const cloneVersion: BSVersion = version.BSVersion === name
? {...version, name: undefined, color, steam: false, oculus: false}
: {...version, name: sanitize(name), color, steam: false, oculus: false};
const newPath = await this.getVersionPath(cloneVersion);
public async cloneVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
const originPath = await this.getVersionPath(version);
const cloneVersion: BSVersion = version.BSVersion === name
? {...version, name: undefined, color, steam: false, oculus: false}
: {...version, name: sanitize(name), color, steam: false, oculus: false};
const newPath = await this.getVersionPath(cloneVersion);
if(originPath === newPath){
this.deleteCustomVersion(version);
this.addCustomVersion(cloneVersion);
}
if(pathExistsSync(newPath)){
throw new CustomError("Unable to clone the version, path already exist", "VersionAlreadExist");
}
if(await pathExists(newPath)){ throw {title: "VersionAlreadExist"} as BsmException; }
if(originPath === newPath){
this.deleteCustomVersion(version);
this.addCustomVersion(cloneVersion);
}
return copyDirectoryWithJunctions(originPath, newPath).then(() => {
this.addCustomVersion(cloneVersion);
return cloneVersion;
}).catch((err: Error) => {
log.error("clone version error", err, version, name, color);
throw {title: "CantClone", ...err} as BsmException
})
}
return copyDirectoryWithJunctions(originPath, newPath).then(() => {
this.addCustomVersion(cloneVersion);
return cloneVersion;
}).catch((err: Error) => {
log.error("Error occured while cloning the version", err, version, name, color);
throw CustomError.fromError(err, "CantClone");
})
}
public importVersion(opt: ImportVersionOptions): Observable<Progression<BSVersion>>{
const { fromPath, store } = opt;
@@ -12,6 +12,7 @@ import { DepotDownloaderArgsOptions, DepotDownloaderErrorEvent, DepotDownloaderE
import { DepotDownloader } from "../../models/depot-downloader.class";
import { app } from "electron";
import { BsStore } from "../../../shared/models/bs-store.enum";
import { CustomError } from "shared/models/exceptions/custom-error.class";
export class BsSteamDownloaderService {
private static instance: BsSteamDownloaderService;
@@ -96,7 +97,7 @@ export class BsSteamDownloaderService {
depotDownloader.$events().pipe(
map(event => {
if(event.type === DepotDownloaderEventType.Error){
throw event;
throw new CustomError(JSON.stringify(event.data) ?? "An error occur in the DepotDownloader process", event?.subType ?? DepotDownloaderErrorEvent.Unknown, event)
}
return event;
}),
+31 -5
View File
@@ -5,6 +5,9 @@ import { BSVersion } from "shared/bs-version.interface";
import { RequestService } from "./request.service";
import { readJSON } from "fs-extra";
import { allSettled } from "../../shared/helpers/promise.helpers";
import { LinuxService } from "./linux.service";
import { IS_FLATPAK } from "main/constants";
import { StaticConfigurationService } from "./static-configuration.service";
export class BSVersionLibService {
private readonly REMOTE_BS_VERSIONS_URL: string = "https://raw.githubusercontent.com/Zagrios/bs-manager/master/assets/jsons/bs-versions.json";
@@ -12,14 +15,18 @@ export class BSVersionLibService {
private static instance: BSVersionLibService;
private utilsService: UtilsService;
private requestService: RequestService;
private readonly linuxService: LinuxService;
private readonly utilsService: UtilsService;
private readonly requestService: RequestService;
private readonly configService: StaticConfigurationService;
private bsVersions: BSVersion[];
private constructor() {
this.linuxService = LinuxService.getInstance();
this.utilsService = UtilsService.getInstance();
this.requestService = RequestService.getInstance();
this.configService = StaticConfigurationService.getInstance();
}
public static getInstance(): BSVersionLibService {
@@ -29,16 +36,35 @@ export class BSVersionLibService {
return BSVersionLibService.instance;
}
private getRemoteVersions(): Promise<BSVersion[]> {
return this.requestService.getJSON<BSVersion[]>(this.REMOTE_BS_VERSIONS_URL);
private async getRemoteVersions(): Promise<BSVersion[]> {
return this.requestService.getJSON<BSVersion[]>(this.REMOTE_BS_VERSIONS_URL).then(res => res.data);
}
private async shouldLoadFromConfig(): Promise<boolean> {
// Some special cases of readonly memory installations
return IS_FLATPAK || this.linuxService.isNixOS();
}
private async getLocalVersions(): Promise<BSVersion[]> {
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
return readJSON(localVersionsPath);
if (!(await this.shouldLoadFromConfig())) {
return readJSON(localVersionsPath);
}
let versions = this.configService.get("versions");
if (!versions) {
versions = await readJSON(localVersionsPath)
}
return versions;
}
private async updateLocalVersions(versions: BSVersion[]): Promise<void> {
if (await this.shouldLoadFromConfig()) {
this.configService.set("versions", versions);
return;
}
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
writeFileSync(localVersionsPath, JSON.stringify(versions, null, "\t"), { encoding: "utf-8", flag: "w" });
}
+21 -3
View File
@@ -1,5 +1,7 @@
import ElectronStore from "electron-store";
import fs from "fs-extra";
import { InstallationLocationService } from "./installation-location.service";
import { CustomError } from "shared/models/exceptions/custom-error.class";
export class ConfigurationService {
private static instance: ConfigurationService;
@@ -13,17 +15,23 @@ export class ConfigurationService {
private readonly locations: InstallationLocationService;
private contentPath: string;
private store: ElectronStore;
private constructor() {
this.locations = InstallationLocationService.getInstance();
this.initStore();
this.initStore(false);
this.locations.onInstallLocationUpdate(() => { this.initStore() });
this.locations.onInstallLocationUpdate(() => this.initStore(true));
}
private async initStore() {
private async initStore(createFolder: boolean) {
const contentPath = this.locations.installationDirectory();
if (!createFolder && !fs.pathExistsSync(contentPath)) {
return;
}
this.contentPath = contentPath;
this.store = new ElectronStore({
cwd: contentPath,
name: "config",
@@ -32,15 +40,25 @@ export class ConfigurationService {
});
}
private checkStore(): void {
// Can be null if config.cfg does not exist or corrupted
if (!this.store) {
throw CustomError.fromError(new Error(`Can't read config.cfg on ${this.contentPath}`));
}
}
public set(key: string, value: unknown): void {
this.checkStore();
this.store.set(key, value);
}
public get<T>(key: string): T {
this.checkStore();
return this.store.get(key) as T;
}
public delete(key: string): void {
this.checkStore();
this.store.delete(key);
}
}
+26 -6
View File
@@ -4,6 +4,9 @@ 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";
import { StaticConfigurationService } from "./static-configuration.service";
export class FolderLinkerService {
private static instance: FolderLinkerService;
@@ -16,9 +19,21 @@ export class FolderLinkerService {
}
private readonly installLocationService = InstallationLocationService.getInstance();
private readonly staticConfig: StaticConfigurationService;
private linkingType: "junction" | "symlink" = "junction";
private constructor() {
this.installLocationService = InstallationLocationService.getInstance();
this.staticConfig = StaticConfigurationService.getInstance();
this.linkingType = this.staticConfig.get("use-symlinks") === true ? "symlink" : "junction";
log.info(`Linking type is set to ${this.linkingType}`);
this.staticConfig.$watch("use-symlinks").subscribe((useSymlink) => {
this.linkingType = useSymlink === true ? "symlink" : "junction";
log.info(`Linking type set to ${this.linkingType}`);
});
}
private async sharedFolder(): Promise<string> {
@@ -49,6 +64,10 @@ export class FolderLinkerService {
});
}
private getLinkingType(): "junction" | undefined {
return this.linkingType === "junction" ? "junction" : undefined;
}
public async linkFolder(folderPath: string, options?: LinkOptions): Promise<void> {
const sharedPath = await this.getSharedFolder(folderPath, options?.intermediateFolder);
@@ -60,7 +79,9 @@ export class FolderLinkerService {
return;
}
await unlinkPath(folderPath);
return symlink(sharedPath, folderPath, "junction");
log.info(`Linking ${folderPath} to ${sharedPath}; type: ${this.linkingType}`);
return symlink(sharedPath, folderPath, this.getLinkingType());
}
await ensureFolderExist(sharedPath);
@@ -72,12 +93,13 @@ 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);
return symlink(sharedPath, folderPath, "junction");
log.info(`Linking ${folderPath} to ${sharedPath}; type: ${this.linkingType}`);
return symlink(sharedPath, folderPath, this.getLinkingType());
}
public async unlinkFolder(folderPath: string, options?: UnlinkOptions): Promise<void> {
@@ -95,9 +117,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) {
@@ -1,9 +1,9 @@
import path from "path";
import { app } from "electron";
import ElectronStore from "electron-store";
import { copyDirectoryWithJunctions, deleteFolder, ensureFolderExist } from "../helpers/fs.helpers";
import { tryit } from "../../shared/helpers/error.helpers";
import { pathExistsSync } from "fs-extra";
import { StaticConfigurationService } from "./static-configuration.service";
export class InstallationLocationService {
private static instance: InstallationLocationService;
@@ -23,15 +23,15 @@ export class InstallationLocationService {
private readonly STORE_INSTALLATION_PATH_KEY = "installation-folder";
private readonly installPathConfig: ElectronStore;
private readonly staticConfig: StaticConfigurationService;
private readonly updateListeners: Set<Listener> = new Set();
private _installationDirectory: string;
private constructor() {
this.installPathConfig = new ElectronStore({ watch: true });
this.staticConfig = StaticConfigurationService.getInstance();
this.installPathConfig.onDidChange(this.STORE_INSTALLATION_PATH_KEY, () => {
this.staticConfig.$watch(this.STORE_INSTALLATION_PATH_KEY).subscribe(() => {
this.triggerListeners();
});
}
@@ -40,17 +40,21 @@ export class InstallationLocationService {
this.updateListeners.forEach(listener => listener());
}
public async setInstallationDirectory(newDir: string): Promise<string> {
/**
* @param move - if true, move the old installation path to the path param
*/
public async setInstallationDirectory(newDir: string, move: boolean): Promise<string> {
newDir = path.basename(newDir) === this.INSTALLATION_FOLDER ? path.join(newDir, "..") : newDir;
const oldDir = this.installationDirectory();
await ensureFolderExist(oldDir);
await copyDirectoryWithJunctions(oldDir, path.join(newDir, this.INSTALLATION_FOLDER), { overwrite: true });
if (move) {
const oldDir = this.installationDirectory();
await ensureFolderExist(oldDir);
await copyDirectoryWithJunctions(oldDir, path.join(newDir, this.INSTALLATION_FOLDER), { overwrite: true });
deleteFolder(oldDir);
}
this._installationDirectory = newDir;
this.installPathConfig.set(this.STORE_INSTALLATION_PATH_KEY, newDir);
deleteFolder(oldDir);
this.staticConfig.set(this.STORE_INSTALLATION_PATH_KEY, newDir);
return this.installationDirectory();
}
@@ -59,6 +63,12 @@ export class InstallationLocationService {
this.updateListeners.add(fn);
}
public defaultInstallationDirectory(): string {
const { result: oldPath } = tryit(() => path.join(app.getPath("documents"), this.INSTALLATION_FOLDER));
const installationDirectory = (oldPath && pathExistsSync(oldPath)) ? app.getPath("documents") : app.getPath("home");
return path.join(installationDirectory, this.INSTALLATION_FOLDER);
}
public installationDirectory(): string {
const installParentPath = () => {
@@ -66,8 +76,8 @@ export class InstallationLocationService {
return this._installationDirectory;
}
if(this.installPathConfig.has(this.STORE_INSTALLATION_PATH_KEY)) {
return this.installPathConfig.get(this.STORE_INSTALLATION_PATH_KEY) as string;
if(this.staticConfig.has(this.STORE_INSTALLATION_PATH_KEY)) {
return this.staticConfig.get(this.STORE_INSTALLATION_PATH_KEY);
}
const { result: oldPath } = tryit(() => path.join(app.getPath("documents"), this.INSTALLATION_FOLDER));
+1 -1
View File
@@ -49,7 +49,7 @@ export class IpcService {
const sub = observable.subscribe({
next: data => this.send(channel, window, data),
error: error => {
log.error(error, error?.code);
log.error(error, error?.code, error?.data);
this.send(this.getErrorChannel(channel), window, serializeError(error));
},
complete: () => this.send(this.getCompleteChannel(channel), window)
+143
View File
@@ -0,0 +1,143 @@
import fs from "fs-extra";
import log from "electron-log";
import path from "path";
import { BS_APP_ID, IS_FLATPAK, PROTON_BINARY_PREFIX, WINE_BINARY_PREFIX } from "main/constants";
import { StaticConfigurationService } from "./static-configuration.service";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { BSLaunchError, LaunchOption } from "shared/models/bs-launch";
import { bsmExec } from "main/helpers/os.helpers";
export class LinuxService {
private static instance: LinuxService;
public static getInstance(): LinuxService {
if (!LinuxService.instance) {
LinuxService.instance = new LinuxService();
}
return LinuxService.instance;
}
private readonly staticConfig: StaticConfigurationService;
private protonPrefix = "";
private nixOS: boolean | undefined;
private constructor() {
this.staticConfig = StaticConfigurationService.getInstance();
}
// === Launching === //
public async setupLaunch(
launchOptions: LaunchOption,
steamPath: string,
bsFolderPath: string,
env: Record<string, string>
) {
if (launchOptions.admin) {
log.warn("Launching as admin is not supported on Linux! Starting the game as a normal user.");
launchOptions.admin = false;
}
// Create the compat data path if it doesn't exist.
// If the user never ran Beat Saber through steam before
// using bsmanager, it won't exist, and proton will fail
// to launch the game.
const compatDataPath = `${steamPath}/steamapps/compatdata/${BS_APP_ID}`;
if (!fs.existsSync(compatDataPath)) {
log.info(`Proton compat data path not found at '${compatDataPath}', creating directory`);
fs.mkdirSync(compatDataPath);
}
if (!this.staticConfig.has("proton-folder")) {
throw CustomError.fromError(
new Error("Proton folder not set"),
BSLaunchError.PROTON_NOT_SET
);
}
const protonPath = path.join(
this.staticConfig.get("proton-folder"),
PROTON_BINARY_PREFIX
);
if (!fs.pathExistsSync(protonPath)) {
throw CustomError.fromError(
new Error("Could not locate proton binary"),
BSLaunchError.PROTON_NOT_FOUND
);
}
this.protonPrefix = await this.isNixOS()
? `steam-run "${protonPath}" run`
: `"${protonPath}" run`;
// Setup Proton environment variables
Object.assign(env, {
"WINEDLLOVERRIDES": "winhttp=n,b", // Required for mods to work
"STEAM_COMPAT_DATA_PATH": compatDataPath,
"STEAM_COMPAT_INSTALL_PATH": bsFolderPath,
"STEAM_COMPAT_CLIENT_INSTALL_PATH": steamPath,
"STEAM_COMPAT_APP_ID": BS_APP_ID,
// Run game in steam environment; fixes #585 for unicode song titles
"SteamEnv": "1",
// Uncomment these to create a proton log file in the Beat Saber install directory.
// "PROTON_LOG": 1,
// "PROTON_LOG_DIR": bsFolderPath,
});
}
public verifyProtonPath(protonFolder: string = ""): boolean {
if (protonFolder === "") {
if (!this.staticConfig.has("proton-folder")) {
return false;
}
protonFolder = this.staticConfig.get("proton-folder");
}
const protonPath = path.join(protonFolder, PROTON_BINARY_PREFIX);
const winePath = path.join(protonFolder, WINE_BINARY_PREFIX);
return fs.pathExistsSync(protonPath) && fs.pathExistsSync(winePath);
}
public getWinePath(): string {
if (!this.staticConfig.has("proton-folder")) {
throw new Error("proton-folder variable not set");
}
const winePath = path.join(
this.staticConfig.get("proton-folder"),
WINE_BINARY_PREFIX
);
if (!fs.pathExistsSync(winePath)) {
throw new Error(`"${winePath}" binary file not found`);
}
return winePath;
}
public getProtonPrefix(): string {
// Set in setupLaunch
return this.protonPrefix;
}
// === NixOS Specific === //
public async isNixOS(): Promise<boolean> {
if (this.nixOS !== undefined) {
return this.nixOS;
}
try {
await bsmExec("nixos-version", {
log: true,
flatpak: { host: IS_FLATPAK },
});
this.nixOS = true;
} catch (error) {
log.info("Not NixOS", error);
this.nixOS = false;
}
return this.nixOS;
}
}
@@ -41,7 +41,7 @@ export class BeatModsApiService {
if (this.aliasesCache.size) {
return this.aliasesCache;
}
return this.requestService.getJSON<Record<string, string[]>>(this.BEAT_MODS_ALIAS).then(rawAliases => {
return this.requestService.getJSON<Record<string, string[]>>(this.BEAT_MODS_ALIAS).then(({ data: rawAliases }) => {
Object.entries(rawAliases).forEach(([key, value]) => {
this.aliasesCache.set(
key,
@@ -97,7 +97,7 @@ export class BeatModsApiService {
const alias = await this.getAliasOfVersion(version);
return this.requestService.getJSON<Mod[]>(this.getVersionModsUrl(alias)).then(mods => {
return this.requestService.getJSON<Mod[]>(this.getVersionModsUrl(alias)).then(({ data: mods }) => {
mods = mods.map(mod => this.asignDependencies(mod, mods));
this.versionModsCache.set(version.BSVersion, mods);
@@ -111,7 +111,7 @@ export class BeatModsApiService {
if (this.allModsCache) {
return this.allModsCache;
}
return this.requestService.getJSON<Mod[]>(this.getAllModsUrl()).then(mods => {
return this.requestService.getJSON<Mod[]>(this.getAllModsUrl()).then(({ data: mods }) => {
this.allModsCache = mods;
return this.allModsCache;
});
@@ -122,7 +122,7 @@ export class BeatModsApiService {
return Promise.resolve(this.modsHashCache.get(hash));
}
return this.requestService.getJSON<Mod[]>(`${this.BEAT_MODS_API_URL}mod?hash=${hash}`).then(mods => {
return this.requestService.getJSON<Mod[]>(`${this.BEAT_MODS_API_URL}mod?hash=${hash}`).then(({ data: mods }) => {
this.updateModsHashCache(mods);
return mods.at(0);
});
+258 -161
View File
@@ -1,38 +1,36 @@
import { BSVersion } from "shared/bs-version.interface";
import { DownloadLink, InstallModsResult, Mod, ModInstallProgression, UninstallModsResult } from "shared/models/mods";
import { DownloadLink, Mod } from "shared/models/mods";
import { BeatModsApiService } from "./beat-mods-api.service";
import { BSLocalVersionService } from "../bs-local-version.service";
import path from "path";
import { UtilsService } from "../utils.service";
import md5File from "md5-file";
import { RequestService } from "../request.service";
import { spawn } from "child_process";
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 { deleteFolder, pathExist, Progression, unlinkPath } from "../../helpers/fs.helpers";
import { lastValueFrom, Observable } from "rxjs";
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 { copyFile, ensureDir, pathExistsSync } from "fs-extra";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { popElement } from "shared/helpers/array.helpers";
import { LinuxService } from "../linux.service";
import { tryit } from "shared/helpers/error.helpers";
import crypto from "crypto";
import { BsmZipExtractor } from "main/models/bsm-zip-extractor.class";
import { bsmSpawn } from "main/helpers/os.helpers";
import { ExternalMod } from "shared/models/mods/mod.interface";
export class BsModsManagerService {
private static instance: BsModsManagerService;
private readonly beatModsApi: BeatModsApiService;
private readonly bsLocalService: BSLocalVersionService;
private readonly utilsService: UtilsService;
private readonly linuxService: LinuxService;
private readonly requestService: RequestService;
private manifestMatches: Mod[];
private nbModsToInstall = 0;
private nbInstalledMods = 0;
private nbModsToUninstall = 0;
private nbUninstalledMods = 0;
public static getInstance(): BsModsManagerService {
if (!BsModsManagerService.instance) {
BsModsManagerService.instance = new BsModsManagerService();
@@ -43,7 +41,7 @@ export class BsModsManagerService {
private constructor() {
this.beatModsApi = BeatModsApiService.getInstance();
this.bsLocalService = BSLocalVersionService.getInstance();
this.utilsService = UtilsService.getInstance();
this.linuxService = LinuxService.getInstance();
this.requestService = RequestService.getInstance();
}
@@ -62,7 +60,7 @@ export class BsModsManagerService {
const bsPath = await this.bsLocalService.getVersionPath(version);
const modsPath = path.join(bsPath, modsDir);
if (!(await pathExist(modsPath))) {
if (!pathExistsSync(modsPath)) {
return [];
}
@@ -80,19 +78,22 @@ export class BsModsManagerService {
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.name === mod.name);
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;
});
@@ -110,7 +111,7 @@ export class BsModsManagerService {
return this.beatModsApi.getModByHash(injectorMd5);
}
private async downloadZip(zipUrl: string): Promise<JSZip> {
private async downloadZip(zipUrl: string): Promise<BsmZipExtractor> {
zipUrl = path.join(this.beatModsApi.BEAT_MODS_URL, zipUrl);
log.info("Download mod zip", zipUrl);
@@ -126,10 +127,7 @@ export class BsModsManagerService {
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> {
@@ -144,15 +142,43 @@ export class BsModsManagerService {
return false;
}
return new Promise<boolean>(resolve => {
const cmd = process.platform === 'linux'
? `screen -dmS "BSIPA" dotnet ${ipaPath} ${args.join(" ")}` // Must run through screen, otherwise BSIPA tries to move console cursor and crashes.
: `start /wait /min "" "${ipaPath}" ${args.join(" ")}`;
const cmd = `"${ipaPath}" "${bsExePath}" ${args.join(" ")}`;
let winePath: string = "";
if (process.platform === "linux") {
const { error, result } = tryit(() => this.linuxService.getWinePath());
if (error) {
log.error(error);
return false;
}
winePath = `"${result}"`;
}
return new Promise<boolean>(resolve => {
log.info("START IPA PROCESS", cmd);
const processIPA = spawn(cmd, { cwd: versionPath, detached: true, shell: true });
const processIPA = bsmSpawn(cmd, {
log: true,
options: {
cwd: versionPath,
detached: true,
shell: true
},
linux: { prefix: winePath },
});
const timeout = setTimeout(() => {
log.info("Ipa process timeout");
resolve(false)
}, sToMs(30));
processIPA.stdout.on("data", data => {
log.info("IPA process stdout", data.toString());
});
processIPA.stderr.on("data", data => {
log.error("IPA process stderr", data.toString());
})
processIPA.once("exit", code => {
clearTimeout(timeout);
if (code === 0) {
log.info("Ipa process exist with code 0");
return resolve(true);
@@ -161,10 +187,6 @@ export class BsModsManagerService {
resolve(false);
});
setTimeout(() => {
log.info("Ipa process timeout");
resolve(false)
}, minToMs(1));
});
}
@@ -177,7 +199,6 @@ export class BsModsManagerService {
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 } });
const download = this.getModDownload(mod, version);
@@ -187,43 +208,38 @@ export class BsModsManagerService {
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("Mod zip download end", mod.name, download.url);
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 += +download.hashMd5.some(md5 => md5.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 !== download.hashMd5.length) {
return false;
}
const verionPath = await this.bsLocalService.getVersionPath(version);
const versionPath = await this.bsLocalService.getVersionPath(version);
const isBSIPA = mod.name.toLowerCase() === "bsipa";
const destDir = isBSIPA ? verionPath : path.join(verionPath, ModsInstallFolder.PENDING);
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)
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);
@@ -236,37 +252,9 @@ export class BsModsManagerService {
}))
: extracted;
if(res){
this.nbInstalledMods++;
}
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 async resolveDependencies(mods: Mod[], version: BSVersion): Promise<Mod[]> {
const availableMods = await this.beatModsApi.getVersionMods(version);
return Array.from(
new Map<string, Mod>(
availableMods.reduce((res, mod) => {
if (this.isDependency(mod, mods, availableMods)) {
res.push([mod.name, mod]);
}
return res;
}, [])
).values()
);
}
private async uninstallBSIPA(mod: Mod, version: BSVersion): Promise<void> {
const download = this.getModDownload(mod, version);
@@ -289,9 +277,6 @@ export class BsModsManagerService {
}
private async uninstallMod(mod: Mod, version: BSVersion): Promise<void> {
this.nbUninstalledMods++;
this.utilsService.ipcSend<ModInstallProgression>("mod-uninstalled", { success: true, data: { name: mod.name, progression: (this.nbUninstalledMods / this.nbModsToUninstall) * 100 } });
if (mod.name.toLowerCase() === "bsipa") {
return this.uninstallBSIPA(mod, version);
}
@@ -315,103 +300,215 @@ export class BsModsManagerService {
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)]);
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>();
const dirMods = pluginsMods.flat().concat(libsMods.flat());
if (bsipa) {
modsDict.set(bsipa.name, bsipa);
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());
}
private async importMod(modPath: string, destination: string): Promise<string[]> {
const extensionName = path.extname(modPath).toLowerCase();
if (extensionName === ".dll") {
const filename = path.basename(modPath);
// Defaultly copy the ".dll" to the "IPA/Pending/Plugins" folder
const fileFolder = path.join(destination, ModsInstallFolder.PLUGINS);
log.info("Copying", `${modPath}`, "to", `"${fileFolder}"`);
await ensureDir(fileFolder);
const copied = await copyFile(modPath, path.join(fileFolder, filename))
.then(() => true)
.catch(error => {
log.warn("Could not copy", `"${modPath}"`, error);
return false;
});
return copied ? [ filename ] : [];
}
if (extensionName !== ".zip") {
log.warn("Mod file is not a dll or zip file");
return [];
}
log.info("Extracting", `"${modPath}"`, "to", `"${destination}"`);
const zip = await BsmZipExtractor.fromPath(modPath);
try {
const dll = await zip.findEntry(entry => entry.fileName.endsWith(".dll"));
if (!dll) {
log.warn("No \"dll\" found in zip", modPath);
return [];
}
for (const mod of dirMods.flat()) {
if (modsDict.has(mod.name)) {
continue;
return await zip.extract(destination);
} catch (error) {
log.warn("Could not extract", `"${modPath}"`, error);
return [];
} finally {
zip.close();
}
}
public importMods(paths: string[], version: BSVersion): Observable<Progression<ExternalMod>> {
return new Observable<Progression<ExternalMod>>(obs => {
const progress: Progression<ExternalMod> = { total: 0, current: 0 };
const externalMod: ExternalMod = {
name: "",
files: [],
};
let modsInstalledCount = 0;
let modFilesCount = 0;
const abortController = new AbortController();
(async () => {
const versionPath = await this.bsLocalService.getVersionPath(version);
const modsPendingFolder = path.join(versionPath, ModsInstallFolder.PENDING);
for (const modPath of paths) {
if (abortController.signal?.aborted) {
log.info("Mods import has been cancelled");
return;
}
progress.total = paths.length;
obs.next(progress);
if (!pathExistsSync(modPath)) { continue; }
const modFiles = await this.importMod(modPath, modsPendingFolder);
if (modFiles.length > 0) {
++modsInstalledCount;
modFilesCount += modFiles.length;
externalMod.name = path.basename(modPath, path.extname(modPath));
externalMod.files = modFiles;
progress.data = externalMod;
} else {
progress.data = undefined;
}
++progress.current;
obs.next(progress);
}
modsDict.set(mod.name, mod);
}
})()
.then(() => {
if (modsInstalledCount === 0) {
throw new CustomError("No \"dll\" found in any of the files dropped", "no-dlls");
}
log.info("Successfully imported", modsInstalledCount, "mods from", paths.length, "files paths. Total files/folders added", modFilesCount);
})
.catch(error => {
obs.error(error);
})
.finally(() => obs.complete());
return Array.from(modsDict.values());
return () => {
abortController.abort();
}
});
}
public async installMods(mods: Mod[], version: BSVersion): Promise<InstallModsResult> {
if (!mods?.length) {
throw "no-mods";
}
public installMods(mods: Mod[], version: BSVersion): Observable<Progression> {
const progress = { current: 0, total: mods.length };
const deps = await this.resolveDependencies(mods, version);
mods.push(...deps);
return new Observable<Progression>(obs => {
(async () => {
if (!mods?.length) {
throw CustomError.throw(new Error("No mods to install"), "no-mods", mods);
}
const bsipa = mods.find(mod => mod.name.toLowerCase() === "bsipa");
if (bsipa) {
mods = mods.filter(mod => mod.name.toLowerCase() !== "bsipa");
}
obs.next(progress);
this.nbModsToInstall = mods.length + (bsipa && 1);
this.nbInstalledMods = 0;
const bsipa = popElement(mod => mod.name.toLowerCase() === "bsipa", mods);
if (bsipa) {
const installed = await this.installMod(bsipa, version).catch(err => {
log.error("INSTALL BSIPA", err);
return false;
});
if (!installed) {
throw "cannot-install-bsipa";
}
}
if(bsipa){
const bsipaInstalled = await this.installMod(bsipa, version).catch(err => {
log.error("Error while installing BSIPA", err);
});
for (const mod of mods) {
await this.installMod(mod, version);
}
if(!bsipaInstalled){
throw CustomError.throw(new Error("BSIPA failed to install"), "cannot-install-bsipa");
}
return {
nbModsToInstall: this.nbModsToInstall,
nbInstalledMods: this.nbInstalledMods,
};
progress.current++;
obs.next(progress);
}
for (const mod of mods) {
await this.installMod(mod, version);
progress.current++;
obs.next(progress);
}
})()
.catch(err => obs.error(err))
.finally(() => obs.complete());
});
}
public async uninstallMods(mods: Mod[], version: BSVersion): Promise<UninstallModsResult> {
if (!mods?.length) {
throw "no-mods";
}
public uninstallMods(mods: Mod[], version: BSVersion): Observable<Progression> {
const progress = { current: 0, total: mods.length };
this.nbModsToUninstall = mods.length;
this.nbUninstalledMods = 0;
return new Observable<Progression>(obs => {
(async () => {
if (!mods?.length) {
throw CustomError.throw(new Error("No mods to uninstall"), "no-mods", mods);
}
for (const mod of mods) {
await this.uninstallMod(mod, version);
}
obs.next(progress);
return {
nbModsToUninstall: this.nbModsToUninstall,
nbUninstalledMods: this.nbUninstalledMods,
};
for (const mod of mods) {
await this.uninstallMod(mod, version);
progress.current++;
obs.next(progress);
}
})()
.catch(err => obs.error(err))
.finally(() => obs.complete());
});
}
public async uninstallAllMods(version: BSVersion): Promise<UninstallModsResult> {
const mods = await this.getInstalledMods(version);
public uninstallAllMods(version: BSVersion): Observable<Progression> {
return new Observable<Progression>(obs => {
(async () => {
const mods = await this.getInstalledMods(version).catch(err => {
log.error(err);
return [];
});
if (!mods?.length) {
throw "no-mods";
}
const progress = { current: 0, total: mods.length };
this.nbModsToUninstall = mods.length;
this.nbUninstalledMods = 0;
obs.next(progress);
for (const mod of mods) {
await this.uninstallMod(mod, version);
}
for (const mod of mods) {
await this.uninstallMod(mod, version);
progress.current++;
obs.next(progress);
}
const versionPath = await this.bsLocalService.getVersionPath(version);
const versionPath = await this.bsLocalService.getVersionPath(version);
await deleteFolder(path.join(versionPath, ModsInstallFolder.PLUGINS));
await deleteFolder(path.join(versionPath, ModsInstallFolder.LIBS));
await deleteFolder(path.join(versionPath, ModsInstallFolder.IPA));
return {
nbModsToUninstall: this.nbModsToUninstall,
nbUninstalledMods: this.nbUninstalledMods,
};
await deleteFolder(path.join(versionPath, ModsInstallFolder.PLUGINS));
await deleteFolder(path.join(versionPath, ModsInstallFolder.LIBS));
await deleteFolder(path.join(versionPath, ModsInstallFolder.IPA));
})()
.catch(err => obs.error(err))
.finally(() => obs.complete());
});
}
}
+2 -2
View File
@@ -4,7 +4,7 @@ import log from "electron-log";
import { lstat } from "fs-extra";
import { tryit } from "../../shared/helpers/error.helpers";
import { shell } from "electron";
import { taskRunning } from "../helpers/os.helpers";
import { isProcessRunning } from "../helpers/os.helpers";
import { sToMs } from "../../shared/helpers/time.helpers";
import { execOnOs } from "../helpers/env.helpers";
@@ -99,7 +99,7 @@ export class OculusService {
}
public oculusRunning(): Promise<boolean> {
return taskRunning("OculusClient");
return isProcessRunning("OculusClient");
}
public async startOculus(): Promise<void>{
+168 -89
View File
@@ -1,16 +1,20 @@
import { Agent, RequestOptions, get } from "https";
import { createWriteStream, unlink } from "fs";
import { Progression } from "main/helpers/fs.helpers";
import { Observable, shareReplay, tap } from "rxjs";
import log from "electron-log";
import fetch, { RequestInfo, RequestInit } from "node-fetch";
import got, { Options } from "got";
import { IncomingMessage } from "http";
import { app } from "electron";
import os from "os";
import { createWriteStream, WriteStream } from 'fs';
import { Progression } from 'main/helpers/fs.helpers';
import { Observable } from 'rxjs';
import { shareReplay, tap } from 'rxjs/operators';
import log from 'electron-log';
import got from 'got';
import { IncomingHttpHeaders, IncomingMessage } from 'http';
import { unlinkSync } from 'fs-extra';
import { tryit } from 'shared/helpers/error.helpers';
import path from 'path';
import { pipeline } from 'stream/promises';
import sanitize from 'sanitize-filename';
import internal from 'stream';
export class RequestService {
private static instance: RequestService;
private preferredFamily: number | undefined = undefined;
public static getInstance(): RequestService {
if (!RequestService.instance) {
@@ -19,119 +23,194 @@ export class RequestService {
return RequestService.instance;
}
private readonly defaultRequestInit: RequestInit;
private constructor() {}
private constructor() {
public async getJSON<T = unknown>(url: string): Promise<{ data: T; headers: IncomingHttpHeaders }> {
this.defaultRequestInit = {
headers: {
"User-Agent": `BSManager/${app.getVersion()} (${os.type()} ${os.release()})`
},
agent: new Agent({ family: 4 }),
};
}
const familiesToTry = this.preferredFamily ? [this.preferredFamily, this.preferredFamily === 4 ? 6 : 4] : [4, 6];
private getInitWithOptions(options?: RequestInit): RequestInit {
return { ...this.defaultRequestInit, ...(options || {}) };
}
for (const family of familiesToTry) {
try {
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, this.getInitWithOptions(options));
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status} ${url}`);
// @ts-ignore (ESM is not well supported in this project, We need to move out electron-react-boilerplate, and use Vite)
const res = await got(url, { dnsLookupIpVersion: family, responseType: 'json' });
this.preferredFamily = family;
return { data: res.body as T, headers: res.headers };
} catch (err) {
log.warn(`IPv${family} request failed, trying next one... URL: ${url}`, err);
}
return await response.json() as T;
} catch (err) {
log.error(err);
throw err;
}
log.error(`IPv4 and IPv6 requests failed for URL: ${url}`);
this.preferredFamily = undefined;
throw new Error(`IPv4 and IPv6 requests failed for URL: ${url}`);
}
public downloadFile(url: string, dest: string): Observable<Progression<string>> {
return new Observable<Progression<string>>(subscriber => {
public downloadFile(
url: string,
dest: string,
opt?: { preferContentDisposition?: boolean }
): Observable<Progression<string>> {
return new Observable<Progression<string>>((subscriber) => {
const progress: Progression<string> = { current: 0, total: 0 };
const familiesToTry = this.preferredFamily ? [this.preferredFamily, this.preferredFamily === 4 ? 6 : 4] : [4, 6];
const file = createWriteStream(dest);
let attempt = 0;
let stream: got.GotEmitter & internal.Duplex;
file.on("close", () => {
progress.data = dest;
subscriber.next(progress);
subscriber.complete();
});
file.on("error", err => unlink(dest, () => subscriber.error(err)));
const tryNextFamily = () => {
if (attempt >= familiesToTry.length) {
subscriber.error(new Error(`Download failed over IPv4 and IPv6 for URL: ${url}`));
return;
}
const req = get(url, this.requestOptionsFromDefaultInit(), res => {
progress.total = parseInt(res.headers?.["content-length"] || "0", 10);
const family = familiesToTry[attempt++];
let file: WriteStream | undefined;
res.on("data", chunk => {
progress.current += chunk.length;
// @ts-ignore (ESM is not well supported in this project, We need to move out electron-react-boilerplate, and use Vite)
stream = got.stream(url, { dnsLookupIpVersion: family });
stream.on('response', (response) => {
this.preferredFamily = family;
const filename = opt?.preferContentDisposition ? this.getFilenameFromContentDisposition(response.headers['content-disposition']) : null;
if (filename) {
dest = path.join(path.dirname(dest), sanitize(filename));
}
progress.data = dest;
file = createWriteStream(dest);
pipeline(stream, file).catch(err => {
file?.destroy();
tryit(() => unlinkSync(dest));
subscriber.error(err);
});
});
stream.on('downloadProgress', ({ transferred, total }) => {
progress.current = transferred;
progress.total = total;
subscriber.next(progress);
});
res.pipe(file);
});
stream.on('error', err => {
log.warn(`Download failed over IPv${family} for URL: ${url}`, err);
stream.destroy();
file?.destroy();
tryNextFamily();
});
req.on("error", err => {
subscriber.error(err);
});
}).pipe(tap({ error: e => log.error(e, url, dest) }), shareReplay(1));
stream.on('end', () => {
file?.end();
subscriber.next(progress);
subscriber.complete();
});
};
tryNextFamily();
return () => {
stream?.destroy();
};
}).pipe(
tap({ error: (e) => log.error(e, url, dest) }),
shareReplay(1)
);
}
public downloadBuffer(url: string, options?: Options & { isStream?: true }): Observable<Progression<Buffer, IncomingMessage>> {
return new Observable<Progression<Buffer, IncomingMessage>>(subscriber => {
public downloadBuffer(
url: string,
options?: got.GotOptions<null>
): Observable<Progression<Buffer, IncomingMessage>> {
return new Observable<Progression<Buffer, IncomingMessage>>((subscriber) => {
const progress: Progression<Buffer, IncomingMessage> = {
current: 0,
total: 0,
data: null,
};
const req = got.stream(url, options);
const familiesToTry = this.preferredFamily ? [this.preferredFamily, this.preferredFamily === 4 ? 6 : 4] : [4, 6];
let data = Buffer.alloc(0);
let response: IncomingMessage;
let attempt = 0;
let stream: got.GotEmitter & internal.Duplex;
req.once("response", res => {
response = res;
});
const tryNextFamily = () => {
if (attempt >= familiesToTry.length) {
subscriber.error(new Error(`Download failed over IPv4 and IPv6 for URL: ${url}`));
return;
}
req.on("data", (chunk: Buffer) => {
data = Buffer.concat([data, chunk]);
})
const family = familiesToTry[attempt++];
req.on("downloadProgress", ({ transferred, total }) => {
progress.current = transferred;
progress.total = total;
subscriber.next(progress);
});
// @ts-ignore (ESM is not well supported in this project, We need to move out electron-react-boilerplate, and use Vite)
stream = got.stream(url, { dnsLookupIpVersion: family, ...(options ?? {}) });
req.once("error", err => {
subscriber.error(err);
});
let data = Buffer.alloc(0);
let response: IncomingMessage;
req.once("end", () => {
progress.data = data;
progress.extra = response;
subscriber.next(progress);
subscriber.complete();
});
stream.once('response', (res) => {
this.preferredFamily = family;
response = res;
});
req.resume();
stream.on('data', (chunk: Buffer) => {
data = Buffer.concat([data, chunk]);
});
stream.on('downloadProgress', ({ transferred, total }) => {
progress.current = transferred;
progress.total = total;
subscriber.next(progress);
});
stream.on('error', err => {
log.warn(`Download failed over IPv${family} for URL: ${url}`, err);
stream.destroy();
tryNextFamily();
});
stream.on('end', () => {
progress.data = data;
progress.extra = response;
subscriber.next(progress);
subscriber.complete();
});
};
tryNextFamily();
return () => {
req.destroy();
}
stream?.destroy();
};
}).pipe(
tap({ error: (e) => log.error(e, url) }),
shareReplay(1)
);
}
}).pipe(tap({ error: log.error }), shareReplay(1))
public getFilenameFromContentDisposition(disposition: string): string | undefined {
if(!disposition) {
return undefined;
}
const utf8FilenameRegex = /filename\*=UTF-8''([\w%\-\.]+)(?:; ?|$)/i;
const asciiFilenameRegex = /^filename=(["']?)(.*?[^\\])\1(?:; ?|$)/i;
const utf8Match = utf8FilenameRegex.exec(disposition);
if (utf8Match?.[1]) {
return decodeURIComponent(utf8Match[1]);
}
const filenameStart = disposition.toLowerCase().indexOf('filename=');
if (filenameStart < 0) {
return undefined;
}
const partialDisposition = disposition.slice(filenameStart);
return asciiFilenameRegex.exec(partialDisposition)?.[2];
}
}
@@ -0,0 +1,108 @@
import ElectronStore from "electron-store";
import { pathExistsSync } from "fs-extra";
import path from "path";
import { PROTON_BINARY_PREFIX, WINE_BINARY_PREFIX } from "main/constants";
import { Observable, Subject } from "rxjs";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { BSVersion } from "shared/bs-version.interface";
export class StaticConfigurationService {
private static instance: StaticConfigurationService;
public static getInstance(): StaticConfigurationService {
if (!StaticConfigurationService.instance) {
StaticConfigurationService.instance = new StaticConfigurationService();
}
return StaticConfigurationService.instance;
}
private readonly store: ElectronStore;
private readonly watchers: {
[K in StaticConfigKeys]?: Subject<StaticConfigKeyValues[K]>;
} = {};
private constructor() {
this.store = new ElectronStore();
}
public has<K extends StaticConfigKeys>(key: K): boolean {
return this.store.has(key);
}
public get<K extends StaticConfigKeys>(key: K): StaticConfigKeyValues[K] {
return this.store.get<K>(key) as StaticConfigKeyValues[K];
}
public take<K extends StaticConfigKeys>(key: K, cb: (val: StaticConfigKeyValues[K]) => void): void {
cb(this.get(key));
}
public async set<K extends StaticConfigKeys>(key: K, value: StaticConfigKeyValues[K]): Promise<void> {
// Validate the setters
switch (key) {
case "proton-folder":
this.validateProtonFolder(value as string);
break;
default:
break;
}
this.store.set(key, value);
if (this.watchers[key]) {
this.watchers[key].next(value); // update watchers if any
}
}
// Setters with validation
private validateProtonFolder(protonFolder: string): void {
const protonPath = path.join(protonFolder, PROTON_BINARY_PREFIX);
const winePath = path.join(protonFolder, WINE_BINARY_PREFIX);
if (!pathExistsSync(protonPath) || !pathExistsSync(winePath)) {
throw new CustomError("Invalid proton folder path", "invalid-folder");
}
}
public delete<K extends StaticConfigKeys>(key: K): void {
this.store.delete(key);
}
public getStore(): ElectronStore {
return this.store;
}
public $watch<K extends StaticConfigKeys>(key: K): Observable<StaticConfigKeyValues[K]> {
if (!this.watchers[key]) {
this.watchers[key] = new Subject() as any; // avoid type error here, the essential is that it work using the function
}
return this.watchers[key];
}
}
export interface StaticConfigKeyValues {
"installation-folder": string;
"song-details-cache-etag": string;
"disable-hadware-acceleration": boolean;
"use-symlinks": boolean;
// Linux Specific static configs
"proton-folder": string;
"versions": BSVersion[];
};
export type StaticConfigKeys = keyof StaticConfigKeyValues;
export type StaticConfigGetIpcRequestResponse<K extends StaticConfigKeys> = {
request: K;
response: StaticConfigKeyValues[K];
};
export type StaticConfigSetIpcRequest<K extends StaticConfigKeys> = {
request: { key: K, value: StaticConfigKeyValues[K] };
response: void;
};
+9 -8
View File
@@ -5,7 +5,7 @@ import { readFile } from "fs/promises";
import { pathExist } from "../helpers/fs.helpers";
import log from "electron-log";
import { app, shell } from "electron";
import { getProcessPid, taskRunning } from "../helpers/os.helpers";
import { getProcessId, isProcessRunning } from "main/helpers/os.helpers";
import { isElevated } from "query-process";
import { execOnOs } from "../helpers/env.helpers";
@@ -13,7 +13,9 @@ const { list } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {})
export class SteamService {
private static readonly PROCESS_NAME = "steam";
private static readonly PROCESS_NAME: string = process.platform === "linux"
? "steam-runtime-launcher-service"
: "steam.exe";
private static instance: SteamService;
@@ -35,15 +37,15 @@ export class SteamService {
return registryValue.value;
}
public async steamRunning(): Promise<boolean>{
const steamProcessRunning = await taskRunning(SteamService.PROCESS_NAME);
public async isSteamRunning(): Promise<boolean>{
const steamProcessRunning = await isProcessRunning(SteamService.PROCESS_NAME);
if(process.platform === "linux") { return steamProcessRunning; }
const activeUser = await this.getActiveUser().catch(err => log.error(err));
return steamProcessRunning && !!activeUser;
}
public async getSteamPid(): Promise<number>{
return getProcessPid(SteamService.PROCESS_NAME);
return getProcessId(SteamService.PROCESS_NAME);
}
/**
@@ -52,7 +54,6 @@ export class SteamService {
* @returns true if the Steam process is running as administrator
*/
public async isElevated(): Promise<boolean>{
if(process.platform === "linux"){ return true; }
const steamPid = await this.getSteamPid();
if(!steamPid){ return false; }
@@ -117,12 +118,12 @@ export class SteamService {
public async openSteam(): Promise<void> {
await shell.openPath("steam://open/games");
await shell.openExternal("steam://open/games");
return new Promise((resolve, reject) => {
// Every 3 seconds check if steam is running
const interval = setInterval(() => {
const steamRunning = this.steamRunning().catch(() => false);
const steamRunning = this.isSteamRunning().catch(() => false);
steamRunning.then(running => {
if(!running){ return; }
clearInterval(interval);
+1 -1
View File
@@ -35,7 +35,7 @@ export class SupportersService {
}
private getRemoteSupporters(): Promise<Supporter[]> {
return this.requestService.getJSON(this.PATREONS_URL);
return this.requestService.getJSON<Supporter[]>(this.PATREONS_URL).then(res => res.data);
}
private async getLocalSupporters(): Promise<Supporter[]> {

Some files were not shown because too many files have changed in this diff Show More