petch |
Tuesday 8 October 2013 at 22:08
|
petch
|
The script looks ok to me, if you want to submit it for addition to the repository...
|
boat |
Wednesday 9 October 2013 at 21:14
|
boat
|
Good to hear, but I got one last question as there is this issue with it starting up in fullscreen and acting a bit weird, having the separate login window under the game itself. I can come up with two "fixes" for this, one being emulating a virtual desktop for the game to be limited to this windowed resolution. This fixes it, but you can't up the resolution or properly play in fullscreen unless the user disables it. The other one being a bit tricky and maybe not even possible, because you'll have to fetch the "user" which the cfg renames itself to (i.e mine is osu.boat.cfg). That way it'll just be set to a set windowed resolution (800x600?) and the user can easily change it through the options of the game. I'd like to try and fix this before submiting it, but I'd like some opinions on what would be the better approach. Edited by boat
|
petch |
Thursday 10 October 2013 at 19:22
|
petch
|
If you want to implement the second solution, easily enough $USER contains the current user name.
|
boat |
Thursday 10 October 2013 at 20:16
|
boat
|
Added
POL_Download "http://www.boaty.org/POL/osu!.user.cfg"
mv "osu!.user.cfg" "osu!.$USER.cfg" Tested it out and it works, for me at least. If this fails it'll still launch and run just fine, but will start up in fullscreen at the native resolution the first time you launch it. The host is pretty reliable but feel free to rehost it if you insist. If this looks good then this should be done and I'll be sending it of to validation. Edited by boat
|
petch |
Thursday 10 October 2013 at 20:22
|
petch
|
3.4KB file may be a bit too large for inlining into the script, but there's no problem hosting the file, we already host many resource files needed by other script... Just submit the working script, and I'll take care of fetching the file and updating the URL.
|
boat |
Thursday 10 October 2013 at 20:34
|
boat
|
|
petch |
Thursday 10 October 2013 at 22:37
|
petch
|
|
boat |
Thursday 10 October 2013 at 22:42
|
boat
|
Oh yeah, forgot to mention, the game is actually called osu! with an exclamation mark, it just didn't let me add it as a title. Thanks for the help.
|
petch |
Thursday 10 October 2013 at 22:44
|
petch
|
Yup, noticed that the editor would not let me add the "!" And since $TITLE must match script name in the repository, I had to remove it there too.
|
boat |
Wednesday 20 November 2013 at 21:52
|
boat
|
Hey, I was wondering how I would go on about adding Japanese character support without having to launch it through "LANG=ja_JP.UTF-8 wine osu.exe" each time?
Additionally it doesn't install with the icon I provided. It's not an issue per sé, but I'm curious as to why it hasn't been added.
Thank you in advance. Edited by boat
|
petch |
Thursday 21 November 2013 at 0:01
|
petch
|
Hey, I was wondering how I would go on about adding Japanese character support without having to launch it through "LANG=ja_JP.UTF-8 wine osu.exe" each time?
After the POL_Shortcut statement you could add [code language=playonlinux] POL_Shortcut_InsertBeforeWine "osu!" 'export LANG=ja_JP.UTF-8' [/code] So that it's executed right before launching the program Additionally it doesn't install with the icon I provided. It's not an issue per sé, but I'm curious as to why it hasn't been added.
Icon can be specified as a 3rd argument to POL_Shortcut, otherwise the statement tries to extract an icon off the executable. File has been copied in the right directory on the server (http://files.playonlinux.com/resources/icones/osu!.png) so that [code language=playonlinux] POL_Shortcut "osu!.exe" "osu!" "osu!.png" [/code] should use it; I can change that but can't really test that it works... Edited by petch
|
boat |
Thursday 21 November 2013 at 14:47
|
boat
|
Tested it, the icon works but the Japanese doesn't. I'll look into it, in the meantime feel free to add the icon if you'd like. Thank you.
|
petch |
Thursday 21 November 2013 at 19:45
|
petch
|
|
boat |
Sunday 24 November 2013 at 0:35
|
boat
|
Downloading these two fonts solves the Japanese characters support issue, but it's an additional 20mB to download. POL_SetupWindow_question "Install additional fonts for Japanese characters support?" "$TITLE"
cd "$WINEPREFIX/drive_c/windows/Fonts"
POL_Download "http://www.boaty.org/POL/msgothic.ttc"
POL_Download "http://www.boaty.org/POL/msmincho.ttc"
|
petch |
Sunday 24 November 2013 at 0:59
|
petch
|
Hi boat, the above code lacks some conditional: POL_SetupWindow_question ...
if [ "$APP_ANSWER" = "TRUE" ]; then
...
fi Also, securing the downloads with MD5 hashes is always a good idea: POL_Download "http://www.boaty.org/POL/msgothic.ttc" "1f162793323e204a0d598a9aa4241443"
POL_Download "http://www.boaty.org/POL/msmincho.ttc" "ea3f8835f67b492a0740ac34e1e807f8" If you could put everything together and test the resulting script, it would be perfect for an update.
|
boat |
Sunday 24 November 2013 at 6:46
|
boat
|
Tested on Linux Mint 15, works fine.
#!/bin/bash
# Date : (2013-10-06 14-11)
# Last revision : (2013-11-24 06-40)
# Wine version used : 1.7.3
# Distribution used to test : Linux Mint 15
# Author : boat
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="osu"
PREFIX="osu_on_linux"
WINEVERSION="1.7.3"
EDITOR="peppy"
GAME_URL="http://osu.ppy.sh/"
AUTHOR="boat"
# Download images for installation script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
# Initialize the script, debugging
POL_SetupWindow_Init
POL_Debug_Init
# Setup presentation window
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
# Begin setting up the Wine Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"
# Install .NET Framework 2.0
POL_Call POL_Install_dotnet20
# Create and select the required directory for the updater
mkdir "$WINEPREFIX/drive_c/$PROGRAMFILES/osu!"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/osu!"
# Download the updater and config file (the config file is required for osu! to launch properly)
POL_Download "http://osu.ppy.sh/release/osume.exe"
POL_Download "http://files.playonlinux.com/osu!.user.cfg" "9c11104e1bd7db6a600fb1b18e535ed3"
mv "osu!.user.cfg" "osu!.$USER.cfg"
# Run the updater
POL_SetupWindow_message "$(eval_gettext 'Press next to start the updater. When the updater is finished, close it down. Do not start osu! yet.')" "$TITLE"
POL_Wine osume.exe
# Wait for the updater to finish in order to create a shortcut of the executable
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "osu!.exe" "osu!" "osu!.png"
# Download the fonts required for Japanese characters support
POL_SetupWindow_question "Install additional fonts for Japanese characters support?" "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ];
then
cd "$WINEPREFIX/drive_c/windows/Fonts"
POL_Download "http://www.boaty.org/POL/msgothic.ttc" "1f162793323e204a0d598a9aa4241443"
POL_Download "http://www.boaty.org/POL/msmincho.ttc" "ea3f8835f67b492a0740ac34e1e807f8"
fi
# Ask if the user wants to enable StrictDrawOrdering
POL_SetupWindow_question "Would you like to enable StrictDrawOrdering?
This is known to fix visual errors for users with AMD graphics cards and is generally recommended." "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]
then
POL_Wine_Direct3D "StrictDrawOrdering" "enabled"
fi
# Ask if the user wants to register an account
POL_SetupWindow_question "It is recommended that you register for an account and download some beatmaps before you start playing. Pressing yes will take you to the registration page, pressing no will finish the installation." "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]
then
POL_Browser "https://osu.ppy.sh/p/register"
fi
POL_SetupWindow_Close
exit
Thanks for all the help, by the way. Edited by boat
|
petch |
Sunday 24 November 2013 at 8:37
|
petch
|
Ok, updated the script, I added indentation to if blocks (even if they're small, it helps readability). Also, I removed semicolumn from line 57, in scripts it's equivalent to a line return, so if you move "then" to the next line you don't need to keep the ;
|
boat |
Friday 27 December 2013 at 5:14
|
boat
|
With the latest update to the game you're now required to install xna31 as well.
If you would have time to add a line with the POL_Call (POL_Call POL_Install_xna31 ?) equivalent of winetricks xna31, right after the dotnet20 one, I would highly appreciate it.
|
petch |
Friday 27 December 2013 at 11:20
|
petch
|
|
boat |
Sunday 1 June 2014 at 1:17
|
boat
|
I've been busy with other things for quite some time and have not had the time to fiddle with this script, however I took the time to sort it out and tested it out on Linux Mint 15 to ensure it's working. xna31 seems to no longer be needed. If you could take the time to go through it and see if there's anything wrong, that would be great, thank you. #!/bin/bash
# Date : (2013-10-06 14-11)
# Last revision : (2013-11-24 06-40)
# Wine version used : 1.7.3
# Distribution used to test : Linux Mint 15
# Author : boat
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="osu"
PREFIX="osu_on_linux"
WINEVERSION="1.7.3"
EDITOR="peppy"
GAME_URL="http://osu.ppy.sh/"
AUTHOR="boat"
# Download images for installation script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
# Initialize the script, debugging
POL_SetupWindow_Init
POL_Debug_Init
# Setup presentation window
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
# Begin setting up the Wine Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"
# Install .NET Framework 2.0
POL_Call POL_Install_dotnet20
# Create and select the required directory for the updater
mkdir "$WINEPREFIX/drive_c/$PROGRAMFILES/osu!"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/osu!"
# Download the updater and config file (the config file is required for osu! to launch properly)
POL_Download "http://osu.ppy.sh/release/osume.exe"
POL_Download "URL: http://www.boaty.org/POL/osu%21.user.cfg"
mv "osu%21.user.cfg" "osu!.$USER.cfg"
# Run the updater
POL_SetupWindow_message "$(eval_gettext 'Press next to start the updater. When the updater is finished, close it down. Do not start osu! yet.')" "$TITLE"
POL_Wine osume.exe
# Wait for the updater to finish in order to create a shortcut of the executable
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "osu!.exe" "osu!" "osu!.png"
# Download the fonts required for Japanese characters support
POL_SetupWindow_question "Install additional fonts for Japanese characters support?" "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ];
then
cd "$WINEPREFIX/drive_c/windows/Fonts"
POL_Download "http://www.boaty.org/POL/msgothic.ttc"
POL_Download "http://www.boaty.org/POL/msmincho.ttc"
fi
# Ask if the user wants to enable StrictDrawOrdering
POL_SetupWindow_question "Would you like to enable StrictDrawOrdering?
This is known to fix visual errors for users with AMD graphics cards and is generally recommended." "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]
then
POL_Wine_Direct3D "StrictDrawOrdering" "enabled"
fi
# Ask if the user wants to register an account
POL_SetupWindow_question "It is recommended that you register for an account and download some beatmaps before you start playing. Pressing yes will take you to the registration page, pressing no will finish the installation." "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]
then
POL_Browser "https://osu.ppy.sh/p/register"
fi
POL_SetupWindow_Close
exit
|