-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall.sh
executable file
·84 lines (66 loc) · 2.64 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
write_red_bold () {
printf "\\033[00;31m\\033[1m%s\\033[0m\\n" "$1"
}
write_bold () {
printf "\\033[1m%b\\033[0m\\n" "$1"
}
print_step () {
printf "\\n\\033[31m\\033[1m##### OVERALL INSTALLATION STEP %s #####\\033[0m\\n" "$1"
}
write_bold "Unofficial Pokémon Uranium Wine Installation Tool"
write_bold "For instructions for this tool please go to https://github.com/microbug/pokemon-uranium-on-macos"
if [ -d "$HOME/pokemon_uranium" ]; then
write_red_bold "Error: ~/pokemon_uranium already exists, please move or delete it before continuing"
exit 1
fi
print_step 1
if [ -x "$(command -v brew)" ]; then
write_bold "Homebrew is already installed! Good for you, Homebrew is awesome."
else
write_bold "Homebrew not installed, installing now"
write_red_bold "Accept all prompts and provide your password when it's asked for"
# install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || exit 1
brew analytics off
fi
print_step 2
write_bold "Updating Homebrew"
brew update
print_step 3
write_bold "Tapping caskroom"
brew tap caskroom/cask
print_step 4
write_bold "Tapping caskroom/versions"
brew tap caskroom/versions
print_step 5
write_bold "Installing XQuartz"
brew cask install caskroom/cask/xquartz
print_step 6
write_bold "Installing Wine Staging"
brew cask install caskroom/versions/wine-staging
print_step 7
write_bold "Installing Winetricks"
brew install winetricks
print_step 8
write_bold "Creating virtual Windows installation at ~/pokemon_uranium"
write_red_bold "Remember to accept all prompts to install Mono and/or Gecko, you may be asked several times"
write_bold "Lots of Wine logs (may look like nonsense) coming up..."
export PATH=$PATH:"/Applications/Wine Staging.app/Contents/Resources/wine/bin/"
mkdir ~/pokemon_uranium
export WINEPREFIX=~/pokemon_uranium
cd $WINEPREFIX || exit
wineboot
wineserver -w # Wait for process to finish before continuing
winetricks directplay directmusic dsound d3dx9_43 ddr=opengl macdriver=x11 win10 devenum dmsynth quartz
sleep 5 # Let Wine finish spewing logs
print_step 9
write_bold "Adding game start script"
curl -s -o "$HOME/pokemon_uranium/Run Pokémon Uranium.command" "https://raw.githubusercontent.com/microbug/pokemon-uranium-on-macos/master/run.sh"
chmod +x "$HOME/pokemon_uranium/Run Pokémon Uranium.command"
print_step 10
write_bold "Clearing caches"
rm -rf ~/.cache/wine ~/.cache/winetricks
rm -rf $(brew --cache)
write_bold "Done!"
write_red_bold "Wait for all Wine configuration to finish (wait for any remaining windows to close), then REBOOT and check the guide on GitHub for next steps"