-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #629 from silentrald/bugfix/627
[bugfix-627] build BSM with deb and flatpak for linux
- Loading branch information
Showing
25 changed files
with
744 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Linux Guide | ||
|
||
## Installation | ||
|
||
Go to [Releases](https://github.com/Zagrios/bs-manager/releases) page and go to the latest release. 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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: "org.erb.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:ro", // 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.