-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/geefr/beatsaber-linux-goo…
- Loading branch information
Showing
5 changed files
with
212 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# BeatSaber Linux Scripts | ||
|
||
## Wine Scripts | ||
These scripts checks to see if your wine prefix is setup for running BSIPA, and if not will install what you need. | ||
``` | ||
# Set the location of your wine prefix | ||
# If not set the default of ~/.wine will be used | ||
export WINEPREFIX=~/.wine/wineprefix=beatsaber-linux-goodies-ipa | ||
# Check whether wine is setup correctly | ||
./bs-linux-is-wine-valid.sh | ||
# If this script returns non-zero, or shows an error you'll need to install | ||
# For this just run the other script, and follow the prompts when the various setup wizards appear | ||
./bs-linux-setup-wine.sh | ||
# This script will double-check if the prefix is valid at the end, if it doesn't work please raise a github issue | ||
``` | ||
|
||
## Beat Saber Mod Fix | ||
This script needs to be run after you've downloaded mods through BeatDrop/similar. | ||
(Work to integrate this into BeatDrop is in progress, these scripts will remain if you prefer using the terminal) | ||
|
||
The main actions it performs are to: | ||
- Run BSIPA to patch the game | ||
- Apply various tweaks to Proton and the game's prefix so things work correctly | ||
``` | ||
# Before running this script ensure you have: | ||
# - Beat saber installed | ||
# - Beat saber run at least once | ||
# - Mods/BSIPA downloaded | ||
# | ||
# First ensure your wine prefix is set correctly | ||
export WINEPREFIX=~/.wine/wineprefix=beatsaber-linux-goodies-ipa | ||
# Run the script | ||
# The proton installation here will be copied and modified to apply some fixes | ||
./bs-linux-modfis.sh ~/.steam/steam/steamapps/common/Beat\ Saber ~/.steam/steam/steamapps/common/Proton\ 3.7 | ||
``` | ||
|
||
With any luck you should have a modded copy of Beat Saber now, only one this left to do | ||
- Restart Steam | ||
- Right click Beat Saber -> Properties | ||
- Check 'Force the use of a specific Steam Play compatibility tool | ||
- Select the tool called 'Proton BeatSaber' | ||
- Go have fun |
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,64 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2019, Gareth Francis ([email protected]) | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#set -x | ||
|
||
# This script validates whether the wine installation on the system is valid for use with BSIPA | ||
# In order to be considered valid: | ||
# - The wine installation requires .net 4.6.1 installed | ||
# - TODO: This script may not be perfect. It may return true for other similar versions of .net | ||
# | ||
# Arguments: None | ||
# Environment: WINEPREFIX should be set to the prefix to check | ||
# Returns: 0 if the prefix seems valid | ||
|
||
echo "USAGE: ${0} : Validates whether \$WINEPREFIX is setup for running BSIPA" | ||
|
||
which wine > /dev/null | ||
if [ $? -ne 0 ]; then | ||
echo "ERROR: Wine doesn't appear to be installed on your system, please do so and ensure it's in your PATH" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${WINEPREFIX}" ]; then | ||
echo "WARNING: WINEPREFIX not set, assuming ~/.wine" | ||
WINEPREFIX="${HOME}/.wine" | ||
fi | ||
|
||
WINEPREFIX=$(realpath ${WINEPREFIX}) | ||
|
||
if [ ! -d "${WINEPREFIX}" ]; then | ||
echo "ERROR: Wine prefix at ${WINEPREFIX} doesn't exist" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f "${WINEPREFIX}/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/Microsoft.CSharp.dll" ]; then | ||
echo "ERROR: Wine prefix at ${WINEPREFIX} doesn't contain the expected .Net installation" | ||
exit 1 | ||
fi | ||
|
||
echo "SUCCESS: Wine prefix at ${WINEPREFIX} should be able to run BSIPA" | ||
exit 0 |
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,78 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2019, Gareth Francis ([email protected]) | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#set -x | ||
|
||
# This script sets up a wine prefix such that it can run BSIPA | ||
# That means installing: | ||
# - dotnet461 through winetricks | ||
# | ||
# Arguments: None | ||
# Environment: WINEPREFIX should be set to the prefix to check | ||
# Returns: 0 if installation was successful | ||
|
||
echo "USAGE: ${0} : Sets up \$WINEPREFIX for running BSIPA" | ||
|
||
if [ -z "${WINEPREFIX}" ]; then | ||
echo "WARNING: WINEPREFIX not set, assuming ~/.wine" | ||
WINEPREFIX="${HOME}/.wine" | ||
fi | ||
|
||
export WINEPREFIX=$(realpath ${WINEPREFIX}) | ||
|
||
which wine > /dev/null | ||
if [ $? -ne 0 ]; then | ||
echo "ERROR: Wine doesn't appear to be installed on your system, please do so and ensure it's in your PATH" | ||
exit 1 | ||
fi | ||
|
||
which cabextract > /dev/null | ||
if [ $? -ne 0 ]; then | ||
echo "ERROR: cabextract is required to install dotnet 4.6.1, please ensure it's in your PATH" | ||
exit 1 | ||
fi | ||
|
||
mkdir -p ${WINEPREFIX} 2> /dev/null | ||
pushd ${WINEPREFIX} > /dev/null | ||
if ! wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks 2> /dev/null; then | ||
echo "ERROR: Failed to download winetricks, please log this as a bug at https://github.com/geefr/beatsaber-linux-goodies" | ||
exit 1 | ||
fi | ||
chmod +x winetricks | ||
popd > /dev/null | ||
|
||
if ! ${WINEPREFIX}/winetricks dotnet461 2> /dev/null; then | ||
echo "ERROR: Failed to install .Net 4.6.1" | ||
exit 1 | ||
fi | ||
|
||
if ! ./bs-linux-is-wine-valid.sh &> /dev/null; then | ||
echo "ERROR: .Net installation succeeded but wine prefix doesn't appear valid" | ||
exit 1 | ||
fi | ||
|
||
echo "SUCCESS: Wine prefix at ${WINEPREFIX} setup to run BSIPA" | ||
exit 0 |