summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD47
-rw-r--r--directsound-latency.reg5
-rw-r--r--osu-fullscreen.desktop10
-rw-r--r--osu.desktop10
-rw-r--r--osu.install22
-rw-r--r--osu.pngbin0 -> 38922 bytes
-rwxr-xr-xosulauncher111
8 files changed, 232 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5819786a26fa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = osu
+ pkgdesc = Freeware rhythm video game
+ pkgver = 20150510
+ pkgrel = 1
+ url = http://osu.ppy.sh
+ install = osu.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = wine
+ depends = xterm
+ depends = winetricks
+ source = http://m1.ppy.sh/r/osu!install.exe
+ source = directsound-latency.reg
+ source = osu.desktop
+ source = osu-fullscreen.desktop
+ source = osulauncher
+ source = osu.png
+ md5sums = SKIP
+ md5sums = 1d285eb3a5bdb6a70da89116dec18441
+ md5sums = d9749afe35fdd440e560d03b0a20a695
+ md5sums = 31bada75b7fe984395423c877d9bd036
+ md5sums = 9759a6ed1e0cf16afea7c496f305422f
+ md5sums = 33164b758af5645efca61a99f6ddd342
+
+pkgname = osu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ea211fe4631a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: ValdikSS <iam@valdikss.org.ru>
+# Contributor: ValdikSS <iam@valdikss.org.ru>
+
+pkgname=osu
+pkgver=20150510
+pkgrel=1
+
+source=("http://m1.ppy.sh/r/osu!install.exe"
+ "directsound-latency.reg"
+ "osu.desktop"
+ "osu-fullscreen.desktop"
+ "osulauncher"
+ "osu.png")
+
+md5sums=('SKIP'
+ '1d285eb3a5bdb6a70da89116dec18441'
+ 'd9749afe35fdd440e560d03b0a20a695'
+ '31bada75b7fe984395423c877d9bd036'
+ '9759a6ed1e0cf16afea7c496f305422f'
+ '33164b758af5645efca61a99f6ddd342')
+
+pkgdesc="Freeware rhythm video game"
+url="http://osu.ppy.sh"
+arch=(i686 x86_64)
+license=(custom)
+install=osu.install
+
+depends=(wine xterm winetricks)
+
+package() {
+ cd "$srcdir"
+
+ install -Dm644 osu.desktop "$pkgdir/usr/share/applications/osu.desktop"
+ install -Dm644 osu-fullscreen.desktop "$pkgdir/usr/share/applications/osu-fullscreen.desktop"
+ install -Dm644 osu.png "$pkgdir/opt/osu/osu.png"
+ install -Dm644 directsound-latency.reg "$pkgdir/opt/osu/directsound-latency.reg"
+ install -Dm755 osulauncher "$pkgdir/opt/osu/"
+ mkdir -p "$pkgdir/usr/bin"
+ ln -s /opt/osu/osulauncher "$pkgdir/usr/bin/osu"
+ install -Dm775 osu\!install.exe "$pkgdir/opt/osu/game/osu!install.exe"
+ #mkdir "$pkgdir/opt/osu/game/"
+ #cd "$pkgdir/opt/osu/game/"
+ #tar xjpf "$srcdir/osu.tar.bz2"
+ chown -R root:games "$pkgdir/opt/osu/game/"
+ chmod g+s "$pkgdir/opt/osu/game/"
+ chmod g+w "$pkgdir/opt/osu/game/"
+}
diff --git a/directsound-latency.reg b/directsound-latency.reg
new file mode 100644
index 000000000000..b91ef7c7aec0
--- /dev/null
+++ b/directsound-latency.reg
@@ -0,0 +1,5 @@
+REGEDIT4
+
+[HKEY_CURRENT_USER\Software\Wine\DirectSound]
+"_HelBuflen"="8192"
+"SndQueueMax"="2"
diff --git a/osu-fullscreen.desktop b/osu-fullscreen.desktop
new file mode 100644
index 000000000000..a2b0b440a987
--- /dev/null
+++ b/osu-fullscreen.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=osu! (fullscreen)
+Comment=Freeware rhythm video game
+GenericName=Freeware rhythm video game
+Exec=/opt/osu/osulauncher fullscreen
+Icon=/opt/osu/osu.png
+Terminal=false
+Categories=Game;
diff --git a/osu.desktop b/osu.desktop
new file mode 100644
index 000000000000..0932d2933358
--- /dev/null
+++ b/osu.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=osu!
+Comment=Freeware rhythm video game
+GenericName=Freeware rhythm video game
+Exec=/opt/osu/osulauncher
+Icon=/opt/osu/osu.png
+Terminal=false
+Categories=Game;
diff --git a/osu.install b/osu.install
new file mode 100644
index 000000000000..0f23b9fa6979
--- /dev/null
+++ b/osu.install
@@ -0,0 +1,22 @@
+post_install() {
+ #chmod g+s "/opt/osu/game/"
+ #chmod g+w "/opt/osu/game/"
+ update-desktop-database -q
+ echo "To run this game, you have to be in 'games' group"
+ echo "Use 'sudo gpasswd -a YOUR_USERNAME games'"
+ echo
+ echo "If you experience sound lag with alsa, you might try to add something like"
+ echo "http://pastebin.com/djQGVmHf in your $HOME/.asoundrc (or /etc/asound.conf)"
+ echo
+ echo "If you use pulseaudio, try your luck tuning"
+ echo "default-fragments and default-fragment-size-msec in /etc/pulse/daemon.conf"
+ echo
+ echo "If you experience sound crackling, play with"
+ echo "HKEY_CURRENT_USER\Software\Wine\DirectSound\SndQueueMax in regedit"
+ echo "(set it to 3 or more)"
+
+}
+
+post_remove() {
+ update-desktop-database -q
+}
diff --git a/osu.png b/osu.png
new file mode 100644
index 000000000000..91c0743b7f8b
--- /dev/null
+++ b/osu.png
Binary files differ
diff --git a/osulauncher b/osulauncher
new file mode 100755
index 000000000000..87de19342aa4
--- /dev/null
+++ b/osulauncher
@@ -0,0 +1,111 @@
+#!/bin/sh
+export WINEARCH=win32
+mkdir -p "$HOME/.local/share/wineprefixes/"
+export WINEPREFIX=$HOME/.local/share/wineprefixes/osu
+export WINEDEBUG=-all
+export PULSE_LATENCY_MSEC=22
+
+function doinstall {
+echo "Installing osu!"
+echo
+
+if [ -d $HOME/.osu ]
+then
+while true
+do
+read -p "$HOME/.osu exists, would you like to move it to $WINEPREFIX? (Will assume that the wineprefix is configured correctly) [Y/n] " yn
+case $yn in
+""|[Yy]* )
+rm -r $WINEPREFIX &>/dev/null
+mv $HOME/.osu $WINEPREFIX
+/opt/osu/osulauncher & exit;;
+[Nn]* ) break;;
+* ) echo "Please answer y or n.";;
+esac
+done
+fi
+# maybe this should test $XDG_DATA_HOME?
+if [ -f $HOME/.local/share/applications/wine-extension-osz.desktop ]
+then
+sed -i "s:$HOME/.osu:$WINEPREFIX:" $HOME/.local/share/applications/wine-extension-*.desktop
+fi
+
+echo "Creating wineprefix..."
+echo "Do NOT install Mono (press cancel)!"
+wine hh || exit 1
+echo "Wineprefix created successfully!"
+echo "Installing .NET 2.0 and gdi"
+if [ -z $(which winetricks) ]
+then
+echo "Install failed. Please install winetricks."
+read
+exit 1
+fi
+winetricks dotnet20sp2 gdiplus || (doremove && exit 1)
+echo ".NET 2.0 and gdi instlled successfully!"
+echo
+echo "Applying some settings..."
+winetricks ddr=opengl fontsmooth=rgb sound=alsa strictdrawordering=enabled
+regedit /opt/osu/directsound-latency.reg
+echo "All done! Running osu! updater..."
+sleep 10
+wine /opt/osu/game/osu\!install.exe
+}
+
+function doremove {
+echo "Removing wineprefix..."
+rm -rf "$WINEPREFIX"
+}
+
+
+case "$1" in
+"install")
+ doinstall
+ exit 0
+ ;;
+
+"remove")
+ doremove
+ exit 0
+ ;;
+
+"reinstall")
+ doremove
+ doinstall
+ exit 0
+ ;;
+
+"winecfg")
+ winecfg
+ exit 0
+ ;;
+
+"regedit")
+ regedit
+ exit 0
+ ;;
+
+"winetricks")
+ winetricks
+ exit 0
+ ;;
+esac
+
+if [ ! -d "$WINEPREFIX" ]
+then
+if [ ! -t 0 ]
+then
+xterm -e "/opt/osu/osulauncher install"
+else
+doinstall
+exit 0
+fi
+fi
+
+if [ "$1" == "fullscreen" ]
+then
+RES=$(xrandr | grep +0 | awk '{print $3}' | sed 's/+0+0//')
+vblank_mode=0 wine explorer /desktop=osu,$RES /opt/osu/game/osu\!.exe $@
+else
+vblank_mode=0 wine /opt/osu/game/osu\!.exe $@
+fi