This commit is contained in:
RealJohnGalt 2020-04-07 12:54:03 -04:00
commit 60a19ee420
4 changed files with 101 additions and 23 deletions

View File

@ -15,11 +15,22 @@ Run the following commands to download and run the program to see usage capabili
wget -O ./cemutil.sh https://github.com/CEMULinux/cemutil/raw/master/cemutil.sh && chmod +x cemutil.sh && ./cemutil.sh wget -O ./cemutil.sh https://github.com/CEMULinux/cemutil/raw/master/cemutil.sh && chmod +x cemutil.sh && ./cemutil.sh
``` ```
Run the following commands to download and run the program with the '-a' flag to download Cemu, Cemu Hook and the latest Graphics Packs: Run the following commands to download and run the program with the '-a' flag to download latest known working Cemu, Cemu Hook and the latest Graphics Packs:
``` ```
wget -O ./cemutil.sh https://github.com/CEMULinux/cemutil/raw/master/cemutil.sh && chmod +x cemutil.sh && ./cemutil.sh -a wget -O ./cemutil.sh https://github.com/CEMULinux/cemutil/raw/master/cemutil.sh && chmod +x cemutil.sh && ./cemutil.sh -a
``` ```
Run the following commands to download and run the program with the '-l' flag to download latest Cemu, Cemu Hook and the latest Graphics Packs:
```
wget -O ./cemutil.sh https://github.com/CEMULinux/cemutil/raw/master/cemutil.sh && chmod +x cemutil.sh && ./cemutil.sh -l
```
Support Support
=============================================================== ===============================================================
Go to #linux on [CEMU Discord](https://discord.gg/5psYsup) Go to #linux on [CEMU Discord](https://discord.gg/5psYsup)
- If you're using an Arch based Distro, it is recommended to build wine-tkg yourself.(https://github.com/Tk-Glitch/PKGBUILDS/tree/master/wine-tkg-git)
Users with Ubuntu 18.04 and later can run this command in terminal:
```
wget -O ./ubuntu-wine.sh https://github.com/HengiFettlich/cemutil/raw/master/ubuntu-wine.sh && chmod +x ubuntu-wine.sh && ./ubuntu-wine.sh
```

View File

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
if (( $EUID == 0 )); then if (( $EUID == 0 )); then
echo "Do not run as root." echo "Do not run as root."
exit 1 exit 1
fi fi
if [ -z "$DISPLAY" ]; then if [ -z "$DISPLAY" ]; then
export DISPLAY=:0.0 export DISPLAY=:0.0
fi fi
# help function: # help function:
@ -25,6 +25,8 @@ function downloadlatest {
#wget -q --show-progress -O cemutemp.zip http://cemu.info/releases/cemu_1.15.0.zip #wget -q --show-progress -O cemutemp.zip http://cemu.info/releases/cemu_1.15.0.zip
echo "Downloading latest cemuhook" echo "Downloading latest cemuhook"
wget -q --show-progress -O cemuhooktemp.zip $(curl -s https://cemuhook.sshnuke.net |grep .zip |awk -F '"' NR==2{'print $2'}) wget -q --show-progress -O cemuhooktemp.zip $(curl -s https://cemuhook.sshnuke.net |grep .zip |awk -F '"' NR==2{'print $2'})
echo "Downloading cemuhook shared fonts"
wget -q --show-progress -O sharedFonts.zip https://github.com/CEMULinux/cemutil/raw/master/sharedFonts.zip
return return
} }
@ -32,12 +34,16 @@ function downloadlatest {
declare -a reqsw=("wine" "bsdtar" "unzip" "glxinfo" "curl" "wget" "winetricks") declare -a reqsw=("wine" "bsdtar" "unzip" "glxinfo" "curl" "wget" "winetricks")
for i in "${reqsw[@]}" for i in "${reqsw[@]}"
do do
if ! [ -x "$(command -v $i)" ]; then if ! [ -x "$(command -v $i)" ]; then
echo "You must install $i" echo "You must install $i"
exit 1 exit 1
fi fi
done done
if $(glxinfo | grep -q -e "NVIDIA"); then
skipgfxcheck=1
fi
function checkgfxver { function checkgfxver {
echo "Checking graphics packages are new enough. To skip this check (on Nvidia for instance), run with -f flag." echo "Checking graphics packages are new enough. To skip this check (on Nvidia for instance), run with -f flag."
if ! $(glxinfo | grep -q -e 'Mesa 18.2' -e 'Mesa 18.3' -e 'Mesa 18.4' -e 'Mesa 19' -e 'Mesa 20'); then if ! $(glxinfo | grep -q -e 'Mesa 18.2' -e 'Mesa 18.3' -e 'Mesa 18.4' -e 'Mesa 19' -e 'Mesa 20'); then
@ -58,7 +64,7 @@ function checkgfxver {
#Check for args #Check for args
if [[ ! $@ =~ ^\-.+ ]] if [[ ! $@ =~ ^\-.+ ]]
then then
printhelp; printhelp;
fi fi
#Handle args #Handle args
@ -97,21 +103,24 @@ while getopts ":c:h:afi:" opt; do
esac esac
done done
shift $((OPTIND -1)) shift $((OPTIND -1))
skipgfxcheck=1
#check gfx package vers #check gfx package vers
if [[ "$skipgfxcheck" == "" ]]; then if [[ "$skipgfxcheck" == "" ]]; then
checkgfxver checkgfxver
fi fi
#Set opts if unset #Set opts if unset
if [[ "$instdir" == "" ]]; then if [[ "$instdir" == "" ]]; then
instdir=$HOME/.cemu instdir=$HOME/.cemu
fi fi
if [[ "$cemuzip" == "" ]]; then if [[ "$cemuzip" == "" ]]; then
cemuzip=cemutemp.zip cemuzip=cemutemp.zip
fi fi
if [[ "$cemuhookzip" == "" ]]; then if [[ "$cemuhookzip" == "" ]]; then
cemuhookzip=cemuhooktemp.zip cemuhookzip=cemuhooktemp.zip
fi
if [[ "$sharedFonts" == "" ]]; then
sharedFonts=sharedFonts.zip
fi fi
#Extract zips #Extract zips
@ -121,26 +130,40 @@ mkdir -p $instdir
#Unpack downloaded zips if applicable #Unpack downloaded zips if applicable
if [ -f "$cemuzip" ]; then if [ -f "$cemuzip" ]; then
bsdtar -xf "$cemuzip" -s'|[^/]*/||' -C $instdir bsdtar -xf "$cemuzip" -s'|[^/]*/||' -C $instdir
fi fi
if [ -f "$cemuhookzip" ]; then if [ -f "$cemuhookzip" ]; then
unzip -q -o "$cemuhookzip" -d $instdir unzip -q -o "$cemuhookzip" -d $instdir
fi
if [ -f "$sharedFonts" ]; then
unzip -q -o "$sharedFonts" -d $instdir
fi fi
#Delete downloaded zips if applicable #Delete downloaded zips if applicable
if [ -f "cemutemp.zip" ]; then if [ -f "cemutemp.zip" ]; then
rm -rf cemutemp.zip rm -rf cemutemp.zip
fi fi
if [ -f "cemuhooktemp.zip" ]; then if [ -f "cemuhooktemp.zip" ]; then
rm -rf cemuhooktemp.zip rm -rf cemuhooktemp.zip
fi
if [ -f "sharedFonts.zip" ]; then
rm -rf sharedFonts.zip
fi fi
#Configure wine prefix #Configure wine prefix
echo "Configuring new wine prefix" echo "Configuring new wine prefix"
export WINEPREFIX=$(realpath $instdir)/wine export WINEPREFIX=$(realpath $instdir)/wine
winetricks -q vcrun2015 winetricks -q vcrun2017
winetricks settings win7 winetricks settings win7
#Create cemuhook.ini, enabling cemuhook h264 as default
cat > $instdir/cemuhook.ini << EOF1
[Debug]
useH264Decoder = true
EOF1
#Create launch scripts #Create launch scripts
cat > LaunchCEMU << EOF1 cat > LaunchCEMU << EOF1
#!/bin/bash #!/bin/bash
@ -167,7 +190,5 @@ chmod +x LaunchCEMUgcn3BOTW
echo "Successfully installed to $(realpath $instdir)" echo "Successfully installed to $(realpath $instdir)"
echo "You may now run CEMU with LaunchCEMU written in this directory" echo "You may now run CEMU with LaunchCEMU written in this directory"
echo "You may place LaunchCEMU anywhere, and even pass arguments to it just like Cemu.exe on Windows" echo "You may place LaunchCEMU anywhere, and even pass arguments to it just like Cemu.exe on Windows"
echo "Note: When launching there may be a WxWidgets error. Press Cancel; this is normal from cemuhook"
echo "Note2: gcn3 (radeon 300-500 series) users should use the gcn3BOTW script for launching BOTW" echo "Note2: gcn3 (radeon 300-500 series) users should use the gcn3BOTW script for launching BOTW"
echo "Note3: Cemu Hook may not be able to download the 4 required shared fonts, these can be copied from a working Windows install of Cemu" echo "Note3: CEMU versions >= 1.15.4 utilize a built-in solution for in-game video playback. Turn on Debug -> 'Use CemuHook H264' if you are encountering any green screens."
echo "Note4: CEMU versions >= 1.15.4 utilize a built-in solution for in-game video playback. Turn on Debug -> 'Use CemuHook H264' if you are encountering any green screens."

BIN
sharedFonts.zip Normal file

Binary file not shown.

46
ubuntu-wine.sh Normal file
View File

@ -0,0 +1,46 @@
if [ -z "$DISPLAY" ]; then
export DISPLAY=:0.0
fi
if ! $(lsb_release -a | grep -q -e "18.04" -e "18.10" -e "19.04" -e "19.10"); then
echo "You need at least Ubuntu 18.04"
exit 1
fi
# add i386 architecture, necessary for wine
sudo dpkg --add-architecture i386
# download wine repo key
sudo wget -nc https://dl.winehq.org/wine-builds/winehq.key
# add wine repo key
sudo apt-key add winehq.key
if $(lsb_release -a | grep -q -e "18.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
fi
if $(lsb_release -a | grep -q -e "18.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
fi
if $(lsb_release -a | grep -q -e "19.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ disco main'
fi
if $(lsb_release -a | grep -q -e "19.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'
fi
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport -y
sudo apt update
# install wine-staging
sudo apt -y install --install-recommends winehq-staging
# install winetricks
sudo apt -y install winetricks
#cleanup
sudo rm -rf winehq.key