Forums

SonoHana 08 - Tenshi no Hanabira Zome

天使の花びら染め / Dyed with an Angel’s Petals

Auteur Réponses
markingdude Samedi 12 Octobre 2013 à 15:12
markingdudeAnonymous

08 - 天使の花びら染め (Tenshi no Hanabira Zome / Dyed with an Angel’s Petals)

This was tested using Mac OS X Snow Leopard and Mountain Lion. Nothing else was needed.

[code language=playonlinux]
#!/bin/bash
# Date : (2013-03-01)
# Last revision : (2013-10-05)
# Wine version used : 1.3.4
# Distribution used to test : Mac OS X 10.8.4
# Author : Marking

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

# Setup some needed variables
TITLE="Sono Hanabira ni Kuchizuke wo 08 - Tenshi no Hanabira Zome"
PREFIX="SonoHana_08"
WINEVERSION="1.3.4"
EDITOR="Fuguriya"
GAME_URL="http://fuguriya.sakura.ne.jp"
AUTHOR="Marking"

# Download images for installation script
POL_GetSetupImages "http://images.markinglifestyle.com/sonohana_mac/script_icons/SonoHana_08-64x64.png" "http://images.markinglifestyle.com/sonohana_mac/script_banners/SH_08.jpg" "$TITLE"

# Initialize the script, debugging, and set required version
POL_SetupWindow_Init
POL_RequiredVersion "4.1.6" || POL_Debug_Fatal "$APPLICATION_TITLE 4.1.6 is required to install $TITLE"
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"
SONOHANA="$WINEPREFIX/drive_c/$PROGRAMFILES/ふぐり屋/その花びらにくちづけを 天使の花びら染め/"

# Installs Japanese fonts in order for visual novel to work
JP_FONTS="sazanami-20040629.zip"
cd "$WINEPREFIX/drive_c/windows/Fonts/"
POL_Download "http://files.markinglifestyle.com/sh_files/sazanami-20040629.zip"
POL_System_unzip $JP_FONTS

# Ask user for either DVD or Local installation
POL_SetupWindow_InstallMethod "LOCAL,DVD"

if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    # Ask user to find "Setup.exe"
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please locate installation program (Setup.exe)')" "$TITLE"
    # Tell user what to do while the installation program is running
    POL_SetupWindow_message "$(eval_gettext 'When the install program starts, click on インストール. When a new window opens, click on インストール. When installation finishes, click on 終了 and then on はい (Y). Click Next to begin installation.')" "Installation instructions"
    LANG="ja_JP.UTF-8" POL_Wine "$APP_ANSWER"
       

elif [ "$INSTALL_METHOD" = "DVD" ]
then
    # Launches the installation program from CD/DVD
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom
    # Tell user what to do while the installation program is running
    POL_SetupWindow_message "$(eval_gettext 'When the install program starts, click on インストール. When a new window opens, click on インストール. When installation finishes, click on 終了 and then on はい (Y). Click Next to begin installation.')" "Installation instructions"
    LANG="ja_JP.UTF-8" POL_Wine "$CDROM/Setup.exe"
fi

# Tells users which language they want to use
POL_SetupWindow_menu "Which language would you like to read this in?" "Select Language" "日本語 (Japanese)|English" "|"

#For Japanese language
if [ "$APP_ANSWER" = "日本語 (Japanese)" ]
then
    # Apply fjfix to fix the visual novel
    FJFIX_PATCH="fjfix.zip"
    cd "$SONOHANA"
    POL_Download "http://files.markinglifestyle.com/sh_files/fjfix.zip" "789634f517003c1619eca669a83306a0"
    POL_System_unzip $FJFIX_PATCH
    POL_Wine "fjfix.exe" -f MGD
    POL_Wine_WaitExit "the fjfix patch"
   
    # Create a shortcut for easy access
    POL_Shortcut "HANA8.EXE" "その花びらにくちづけを 08 天使の花びら染め"
    # Insert a command to run as a Japanese application
    POL_Shortcut_InsertBeforeWine "その花びらにくちづけを 08 天使の花びら染め" "LANG=ja_JP.UTF-8"

#For English language   
elif [ "$APP_ANSWER" = "English" ]
then
    # Apply the English patch
    POL_SetupWindow_browse "$(eval_gettext 'Please locate English translation patch file')" "$TITLE"
    cp "$APP_ANSWER" "$SONOHANA/SH_EN.EXE"
    cd "$SONOHANA"
    POL_Wine_WaitExit "the English patch"
    LANG="ja_JP.UTF-8" POL_Wine "SH_EN.EXE"
   
    # Apply fjfix to fix the visual novel
    FJFIX_PATCH="fjfix.zip"
    cd "$SONOHANA"
    POL_Download "http://files.markinglifestyle.com/sh_files/fjfix.zip" "789634f517003c1619eca669a83306a0"
    POL_System_unzip $FJFIX_PATCH
    POL_Wine "fjfix.exe" -f MGD
    POL_Wine_WaitExit "the fjfix patch"
   
    # Create a shortcut for easy access
    POL_Shortcut "HANA8.EXE" "A Kiss for the Petals 08 - Dyed With An Angel’s Petals"
    # Insert a command to run as a Japanese application/fix font issues
    POL_Shortcut_InsertBeforeWine "A Kiss for the Petals 08 - Dyed With An Angel’s Petals" "LANG=ja_JP.UTF-8"
fi
POL_SetupWindow_Close
exit
[/code]

The images:
Screenshot
22x22 icon
48x48 icon
Top corner icon
Left banner

Edité par markingdude

petch Samedi 12 Octobre 2013 à 16:18
petch

Reading it on more time, is there no problem when installing the english patch?
I see POL_Wine_WaitExit being used before POL_Wine (l. 90-91)
markingdude Samedi 12 Octobre 2013 à 18:08
markingdudeAnonymous

Not on my end, no. It will display the "WaitExit" message and then launch it while the WaitExit part is still working. It will stop when the patch installer has ended. I tested it out earlier before submitting these scripts by putting "POL_Wine" before the WaitExit and what ended up happening was that the program will launch, exit, and then display the WaitExit message which I thought was weird.

Same thing applies for the fjfix patch.

Edité par markingdude

petch Samedi 12 Octobre 2013 à 20:18
petch

My interpretation of what you've been seeing:
- POL_Wine_WaitExit will display its message then immediately give back control since Wine is not running
- POL_Wine does not update PlayOnLinux window content, so you're seeing the POL_Wine_WaitExit message as it runs
- POL_Wine is usually synchronous, when "start" is not used; So the script works as expected

I think you could get the same behavior, but in a slightly more obvious syntax, if you used POL_Wine_WaitBefore instead of POL_Wine_WaitExit; It displays the same message, but doesn't even try to wait for Wine's exit.
markingdude Dimanche 13 Octobre 2013 à 0:58
markingdudeAnonymous

All right. That worked as it should with this:
POL_Wine_WaitBefore "the English patch"
LANG="ja_JP.UTF-8" POL_Wine "SH_EN.EXE"


Is it just the syntax that's different from Wine_WaitExit, or is there something else, because it sounds like they perform similarly.

That being said, I'll send the script with the Wine_WaitBefore changes if there's nothing else.
petch Dimanche 13 Octobre 2013 à 9:14
petch

Looking at the source they're very similar beside the lack of wait for wineserver exit that only exists in POL_Wine_WaitExit.
Even the usage comment hasn't been changed, it's plain cut&paste :D

So yes, same syntax, and you can submit the script any time ;)
markingdude Dimanche 13 Octobre 2013 à 15:39
markingdudeAnonymous

All right, cool. Script has been sent.
petch Dimanche 13 Octobre 2013 à 19:51
petch

petch Vendredi 25 Octobre 2013 à 19:07
petch

Hi markingdude,

I had to slightly modify the scripts because of a constraint we weren't aware of:
The gettext "keys" (untranslated texts) should be in plain ASCII so that translators don't have any issue displaying them no matter the encoding they use.

To this end, I moved the japanese words in the texts in separate variables, that can then be used in the texts. Added benefit: you're sure no translator will try to translate those ;)

INSTALL_JP='インストール'
END_JP='終了'
YES_JP='はい'

...

	POL_SetupWindow_message "$(eval_gettext 'When the install program starts, click on ${INSTALL_JP}. When a new window opens, click on ${INSTALL_JP}. When installation finishes, click on ${END_JP} and then on ${YES_JP}. Click Next when you are done installing.')" "Installation instructions"

Edité par petch

markingdude Samedi 26 Octobre 2013 à 4:05
markingdudeAnonymous

Oh OK. Thanks for the heads up. Scripts nine through eleven (and Hanahira!) will have this updated code (when I get to posting them, lol). It looks like that you added these to all current SonoHana scripts, so thanks for that.

I tested the eighth VN and still works as it should, so yeah. :)

Edité par markingdude

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com