summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD70
-rw-r--r--directsound-latency.reg5
-rw-r--r--osu.desktop16
-rw-r--r--osu.install25
-rw-r--r--osu.pngbin17732 -> 0 bytes
-rw-r--r--osu.sh45
-rw-r--r--osu.xml32
-rwxr-xr-xosulauncher118
9 files changed, 133 insertions, 209 deletions
diff --git a/.SRCINFO b/.SRCINFO
index edebc8d4d955..033f515582f2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,27 @@
pkgbase = osu
- pkgdesc = Freeware rhythm video game
- pkgver = 20180917
+ pkgdesc = A free-to-win rhythm game
+ pkgver = 20210316
pkgrel = 1
- url = http://osu.ppy.sh
- install = osu.install
+ url = https://osu.ppy.sh
arch = i686
arch = x86_64
license = custom
+ makedepends = icoutils
depends = wine
depends = winetricks
- source = http://m1.ppy.sh/r/osu!install.exe
- source = directsound-latency.reg
+ depends = lib32-gnutls
+ depends = lib32-libxcomposite
+ optdepends = pipewire-pulse: low-latency audio backend
+ source = osu-installer.exe::https://m1.ppy.sh/r/osu!install.exe
+ source = osu-terms.md::https://raw.githubusercontent.com/ppy/osu-wiki/master/wiki/Legal/Terms/en.md
+ source = osu.sh
source = osu.desktop
- source = osulauncher
- source = osu.png
- md5sums = SKIP
- md5sums = 1d285eb3a5bdb6a70da89116dec18441
- md5sums = 45db3339a3f2203418aa6c4f8b5ec838
- md5sums = 60ee5829b38c43bc30eba7805764f71f
- md5sums = a0289f4f499640bfb3b39bf393140b03
- depends_x86_64 = lib32-alsa-lib
- depends_x86_64 = lib32-gnutls
+ source = osu.xml
+ sha256sums = 4ed5eec1c47ab86c69a3f3478127922227d6a0af2aff9a6461c02c19240883fd
+ sha256sums = b79b6325c85092506dadaec05ba1aed91ae63ee6693d0ae588638ba343789076
+ sha256sums = f46d063e16da50175154bfd9c09c1c461bb41d17bc2b6544842cbbd247b517e7
+ sha256sums = 0a2bb920ba3e8ddc9aa6e1bb2321c748b6efb06189294ccdb59fb1977d7a39b5
+ sha256sums = 85a5f5468a22dad75b8e8cfad8bd0754ed5e4ece693a398de0b90ba1934ac4fe
pkgname = osu
diff --git a/PKGBUILD b/PKGBUILD
index fb0027c0419b..668b36a36c35 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,39 @@
-# Maintainer: emersion <contact@emersion.fr>
+# Maintainer: Nguyễn Chính Hữu <huupoke12@gmail.com>
+# Contributor: emersion <contact@emersion.fr>
# Contributor: ValdikSS <iam@valdikss.org.ru>
-pkgname=osu
-pkgver=20180917
+pkgname='osu'
+pkgver='20210316'
pkgrel=1
+pkgdesc='A free-to-win rhythm game'
+arch=('i686' 'x86_64')
+url='https://osu.ppy.sh'
+license=('custom')
+depends=('wine' 'winetricks' 'lib32-gnutls' 'lib32-libxcomposite')
+makedepends=('icoutils')
+optdepends=('pipewire-pulse: low-latency audio backend')
+source=("${pkgname}-installer.exe::https://m1.ppy.sh/r/osu!install.exe"
+ "${pkgname}-terms.md::https://raw.githubusercontent.com/ppy/osu-wiki/master/wiki/Legal/Terms/en.md"
+ "${pkgname}.sh"
+ "${pkgname}.desktop"
+ "${pkgname}.xml")
+sha256sums=('4ed5eec1c47ab86c69a3f3478127922227d6a0af2aff9a6461c02c19240883fd'
+ 'b79b6325c85092506dadaec05ba1aed91ae63ee6693d0ae588638ba343789076'
+ 'f46d063e16da50175154bfd9c09c1c461bb41d17bc2b6544842cbbd247b517e7'
+ '0a2bb920ba3e8ddc9aa6e1bb2321c748b6efb06189294ccdb59fb1977d7a39b5'
+ '85a5f5468a22dad75b8e8cfad8bd0754ed5e4ece693a398de0b90ba1934ac4fe')
-source=("http://m1.ppy.sh/r/osu!install.exe"
- "directsound-latency.reg"
- "osu.desktop"
- "osulauncher"
- "osu.png")
-
-md5sums=('SKIP'
- '1d285eb3a5bdb6a70da89116dec18441'
- '45db3339a3f2203418aa6c4f8b5ec838'
- '60ee5829b38c43bc30eba7805764f71f'
- 'a0289f4f499640bfb3b39bf393140b03')
-
-pkgdesc="Freeware rhythm video game"
-url="http://osu.ppy.sh"
-arch=(i686 x86_64)
-license=(custom)
-install=osu.install
-
-depends=(wine winetricks)
-depends_x86_64=(lib32-alsa-lib lib32-gnutls)
+build() {
+ wrestool -x -t 3 -n 4 -R -o 'osu-stable.png' "${pkgname}-installer.exe"
+ wrestool -x -t 3 -n 15 -R -o 'osu-stable-beatmap.png' "${pkgname}-installer.exe"
+}
package() {
- cd "$srcdir"
-
- install -Dm644 osu.desktop "$pkgdir/usr/share/applications/osu.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/"
+ install -D -m 755 "${pkgname}.sh" "${pkgdir}/usr/bin/osu-stable"
+ install -D -m 644 "${pkgname}-installer.exe" "${pkgdir}/usr/share/${pkgname}/osu-stable-installer.exe"
+ install -D -m 644 "${pkgname}-terms.md" "${pkgdir}/usr/share/licenses/${pkgname}/osu-terms.md"
+ install -D -m 644 "${pkgname}.xml" "${pkgdir}/usr/share/mime/packages/osu-stable.xml"
+ install -D -m 644 "${pkgname}.xml" "${pkgdir}/usr/share/applications/sh.ppy.osu.stable.desktop"
+ install -D -m 644 'osu-stable.png' "${pkgdir}/usr/share/icons/hicolor/256x256/apps/osu-stable.png"
+ install -D -m 644 'osu-stable-beatmap.png' "${pkgdir}/usr/share/icons/hicolor/256x256/mimetypes/osu-stable-beatmap.png"
}
diff --git a/directsound-latency.reg b/directsound-latency.reg
deleted file mode 100644
index b91ef7c7aec0..000000000000
--- a/directsound-latency.reg
+++ /dev/null
@@ -1,5 +0,0 @@
-REGEDIT4
-
-[HKEY_CURRENT_USER\Software\Wine\DirectSound]
-"_HelBuflen"="8192"
-"SndQueueMax"="2"
diff --git a/osu.desktop b/osu.desktop
index 77363e22cc33..6754b282c9fc 100644
--- a/osu.desktop
+++ b/osu.desktop
@@ -1,11 +1,11 @@
[Desktop Entry]
Type=Application
-Encoding=UTF-8
-Name=osu!
-Comment=Freeware rhythm video game
-GenericName=Freeware rhythm video game
-Exec=/opt/osu/osulauncher %F
-Icon=/opt/osu/osu.png
-Terminal=true
+Version=1.5
+Name=osu!stable
+GenericName=Rhythm game
+Comment=A free-to-win rhythm game
+Icon=osu-stable
+Exec=osu-stable %F
+Terminal=false
+MimeType=application/x-osu-storyboard;application/x-osu-skin-archive;application/x-osu-replay;application/x-osu-beatmap;x-osu-beatmap-archive;
Categories=Game;
-MimeType=application/x-wine-extension-osz;application/x-wine-extension-osk;application/x-wine-extension-osr;application/x-wine-extension-osz2;x-scheme-handler/osu;
diff --git a/osu.install b/osu.install
deleted file mode 100644
index 7aebf81da689..000000000000
--- a/osu.install
+++ /dev/null
@@ -1,25 +0,0 @@
-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 want to install optional dependencies, run:"
- echo "/opt/osu/osulauncher install-optional"
- 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
deleted file mode 100644
index 29b22b2df77e..000000000000
--- a/osu.png
+++ /dev/null
Binary files differ
diff --git a/osu.sh b/osu.sh
new file mode 100644
index 000000000000..bc132d574618
--- /dev/null
+++ b/osu.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+export XDG_DATA_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}"
+export WINEDEBUG="${WINEDEBUG--all}"
+export WINEPREFIX="${WINEPREFIX-${XDG_DATA_HOME}/wineprefixes/osu-stable}"
+export WINEARCH='win32'
+export OSU_STABLE_DATA_DIRECTORY="${OSU_STABLE_DATA_DIRECTORY-${XDG_DATA_HOME}/osu-stable}"
+
+if [ ! -d "${WINEPREFIX}" ]; then
+ echo 'Setting up the Wine prefix...'
+ winetricks -q 'dotnet40' 'cjkfonts'
+ echo 'Completed setting up the Wine prefix.'
+fi
+
+if [ ! -d "${OSU_STABLE_DATA_DIRECTORY}" ]; then
+ echo 'Installing osu!stable...'
+ mkdir -p "${OSU_STABLE_DATA_DIRECTORY}"
+ cp '/usr/share/osu/osu-stable-installer.exe' "${OSU_STABLE_DATA_DIRECTORY}"
+ wine "${OSU_STABLE_DATA_DIRECTORY}/osu-stable-installer.exe"
+ echo 'Completed installing osu!stable.'
+ exit
+fi
+
+case "$1" in
+ 'kill')
+ wineserver -k
+ ;;
+ 'winetricks')
+ shift 1
+ winetricks "$@"
+ ;;
+ 'wine')
+ shift 1
+ wine "$@"
+ ;;
+ '')
+ env vblank_mode=0 __GL_SYNC_TO_VBLANK=0 wine "${OSU_STABLE_DATA_DIRECTORY}/osu!.exe" "$@"
+ ;;
+ *)
+ echo 'Usage:'
+ printf '%s\t\t\tRun the game\n' "$(basename "$0")"
+ printf '%s kill\t\t\tKill the game\n' "$(basename "$0")"
+ printf '%s wine [command]\tExecute Wine command on the Wine prefix (winecfg, regedit, ...)\n' "$(basename "$0")"
+ printf '%s winetricks [command]\tExecute Winetricks command on the Wine prefix\n' "$(basename "$0")"
+ ;;
+esac
diff --git a/osu.xml b/osu.xml
new file mode 100644
index 000000000000..999979321827
--- /dev/null
+++ b/osu.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-osu-storyboard">
+ <comment>osu! storyboard</comment>
+ <icon name="application-x-osu"/>
+ <glob pattern="*.osb"/>
+ </mime-type>
+
+ <mime-type type="application/x-osu-skin-archive">
+ <comment>osu! skin archive</comment>
+ <icon name="application-x-osu"/>
+ <glob pattern="*.osk"/>
+ </mime-type>
+
+ <mime-type type="application/x-osu-replay">
+ <comment>osu! replay</comment>
+ <icon name="application-x-osu"/>
+ <glob pattern="*.osr"/>
+ </mime-type>
+
+ <mime-type type="application/x-osu-beatmap">
+ <comment>osu! beatmap</comment>
+ <icon name="application-x-osu"/>
+ <glob pattern="*.osu"/>
+ </mime-type>
+
+ <mime-type type="application/x-osu-beatmap-archive">
+ <comment>osu! beatmap archive</comment>
+ <icon name="application-x-osu"/>
+ <glob pattern="*.osz"/>
+ </mime-type>
+</mime-info>
diff --git a/osulauncher b/osulauncher
deleted file mode 100755
index 87678c050a65..000000000000
--- a/osulauncher
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/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)!"
- WINEDLLOVERRIDES='mscoree=' wine hh || exit 1
- echo "Wineprefix created successfully!"
- echo "Installing .NET 4.5"
- if [ -z "$(which winetricks)" ]
- then
- echo "Installation failed. Please install winetricks."
- read
- exit 1
- fi
- winetricks dotnet45 || (doremove && exit 1)
- echo ".NET 4.5 installed 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 1
- cp "/opt/osu/game/osu!install.exe" "$WINEPREFIX/osu!install.exe"
- wine "$WINEPREFIX/osu!install.exe"
-}
-
-function doinstalloptional {
- if [ ! -d "$WINEPREFIX" ]
- then
- doinstall
- fi
-
- echo "Installing optional dependencies for osu!"
- echo
-
- winetricks gdiplus corefonts cjkfonts
-}
-
-function doremove {
- echo "Removing wineprefix..."
- rm -rf "$WINEPREFIX"
-}
-
-
-case "$1" in
-"install")
- doinstall
- exit 0
- ;;
-
-"install-optional")
- doinstalloptional
- 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
- doinstall
- exit 0
-fi
-
-vblank_mode=0 __GL_SYNC_TO_VBLANK=0 exec wine "$WINEPREFIX/drive_c/users/$USER/Local Settings/Application Data/osu!/osu!.exe" $@