Вы находитесь здесь

Форум

[Script] FEZ (Steam)

script which installs the Steam version of the FEZ game

Автор Replies
dif Thursday 18 July 2013 at 14:44
dif

This is my first script which installs the Steam version of the FEZ game in the POL. I made it according to the Pascal's Reinhard script for the GOG.com version of the game.

[code language=playonlinux]
#!/bin/bash
# Date : (2013-07-18 09-03)
# Last revision : (2013-07-18 09-03)
# Wine version used : 1.4.1
# Distribution used to test : Debian 7.0 Wheezy
# Author : Filippov Daniil <filippovdaniil@gmail.com>

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

STEAM_ID="224760"
PREFIX="FEZ_steam"
WORKING_WINE_VERSION="1.4.1"

TITLE="Steam - FEZ"
SHORTCUT_NAME="FEZ"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Fez_gog/top.jpg" "http://files.playonlinux.com/resources/setups/Fez_gog/left.jpg" "$TITLE"

POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Polytron Corporation" "http://www.gog.com/gamecard/fez" "Xodetaetl" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_mono210

# Choose between Steam and other Digital Download versions
POL_SetupWindow_InstallMethod "STEAM,LOCAL"


if [ "$INSTALL_METHOD" == "STEAM" ]; then
    # Install Steam:
    POL_Call POL_Install_steam
    # Mandatory pre-install fix for steam:
    POL_Call POL_Install_steam_flags "$STEAM_ID"
    # Shortcut done before install for steam version:
    POL_Shortcut "steam.exe" "$SHORTCUT_NAME" "$TITLE.png" "steam://rungameid/$STEAM_ID"
    POL_Shortcut "steam.exe" "Steam ($SHORTCUT_NAME)" "" ""
    # Steam game install:
    POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\\nDo NOT click on Play.\\n\\nClose COMPLETELY the Steam interface, \\nso that the installation script can continue')" "$TITLE"
    cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
    POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
    POL_Wine_WaitExit "$TITLE"
else
    # Asking then installing DDV of the game:
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    SETUP_EXE="$APP_ANSWER"
    POL_Wine start /unix "$SETUP_EXE"
    POL_Wine_WaitExit "$TITLE"

    # Making shortcut:
    POL_Shortcut "FEZ.exe" "$TITLE" "$TITLE.png" ""
fi

# Change the game's config to windowed (the initial launch in full screen is buggy):
mkdir -p "$WINEPREFIX/drive_c/users/$USER/Application Data/FEZ/"
if type -t POL_unbase64 > /dev/null; then
        POL_unbase64 <<-'_EOF_' > "$WINEPREFIX/drive_c/users/$USER/Application Data/FEZ/Settings"
c2V0dGluZ3MgdHlwZT0iRmV6RW5naW5lLlRvb2xzLlNldHRpbmdzLCBGZXpFbmdpbmUiIHsNCgl1
c2VDdXJyZW50TW9kZSBmYWxzZQ0KCXNjcmVlbk1vZGUgIldpbmRvd2VkIg0KCXdpZHRoIDEyODAN
CgloZWlnaHQgNzIwDQoJbGFuZ3VhZ2UgIkVuZ2xpc2giDQoJc291bmRWb2x1bWUgMUYNCgltdXNp
Y1ZvbHVtZSAxRg0KCWtleWJvYXJkTWFwcGluZyBKdW1wPSJTcGFjZSIgR3JhYlRocm93PSJMZWZ0
Q29udHJvbCIgQ2FuY2VsVGFsaz0iTGVmdFNoaWZ0IiBVcD0iVXAiIERvd249IkRvd24iIExlZnQ9
IkxlZnQiIFJpZ2h0PSJSaWdodCIgTG9va1VwPSJJIiBMb29rRG93bj0iSyIgTG9va1JpZ2h0PSJM
IiBMb29rTGVmdD0iSiIgT3Blbk1hcD0iRXNjYXBlIiBPcGVuSW52ZW50b3J5PSJUYWIiIE1hcFpv
b21Jbj0iVyIgTWFwWm9vbU91dD0iUyIgUGF1c2U9IkVudGVyIiBSb3RhdGVMZWZ0PSJBIiBSb3Rh
dGVSaWdodD0iRCIgRnBWaWV3VG9nZ2xlPSJSaWdodEFsdCIgQ2xhbXBMb29rPSJSaWdodFNoaWZ0
Ig0KCWdhbWVwYWRNYXBwaW5nIEp1bXA9MSBHcmFiVGhyb3c9MCBDYW5jZWxUYWxrPTIgT3Blbk1h
cD04IE9wZW5JbnZlbnRvcnk9MyBNYXBab29tSW49NSBNYXBab29tT3V0PTQgUGF1c2U9OSBSb3Rh
dGVMZWZ0PTYgUm90YXRlUmlnaHQ9NyBGcFZpZXdUb2dnbGU9MTAgQ2xhbXBMb29rPTExDQp9
_EOF_
fi

POL_SetupWindow_Close
exit 0
[/code]

Images (please remove my "POL_GetSetupImages" which I used for testing):

FEZ (Steam)-22x22.png

FEZ (Steam)-48x48.png

left.png

top.png

P.S. Also please replace "http://www.gog.com/gamecard/fez" URL with "http://store.steampowered.com/app/224760"

Edited by dif

petch Thursday 18 July 2013 at 19:33
petch

Hi,

I guess the script is ok, the only thing I've found is:
    POL_Shortcut "FEZ.exe" "$TITLE" "$TITLE.png" ""


You probably don't want the shortcut to be called "Steam - Fez", specially since this instruction is in the path when Steam is not used ;)

Edited by petch

dif Friday 19 July 2013 at 5:33
dif

Hello, petch!

You probably don't want the shortcut to be called "Steam - Fez", specially since this instruction is in the path when Steam is not used ;)

Quote from petch

Yes, I forgot to change this to SHORTCUT_NAME. :) Here is the updated script:

[code language=playonlinux]
#!/bin/bash
# Date : (2013-07-19 10-31)
# Last revision : (2013-07-19 10-31)
# Wine version used : 1.4.1
# Distribution used to test : Debian 7.0 Wheezy
# Author : Filippov Daniil <filippovdaniil@gmail.com>

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

STEAM_ID="224760"
PREFIX="FEZ_steam"
WORKING_WINE_VERSION="1.4.1"

TITLE="FEZ (Steam)"
SHORTCUT_NAME="FEZ"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"

POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Polytron Corporation" "http://store.steampowered.com/app/224760" "Xodetaetl" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_mono210

# Choose between Steam and Digital Download versions of the game:
POL_SetupWindow_InstallMethod "STEAM,LOCAL"


if [ "$INSTALL_METHOD" == "STEAM" ]; then
    # Install Steam:
    POL_Call POL_Install_steam
    # Mandatory pre-install fix for steam:
    POL_Call POL_Install_steam_flags "$STEAM_ID"
    # Shortcut done before install for steam version:
    POL_Shortcut "steam.exe" "$SHORTCUT_NAME" "$TITLE.png" "steam://rungameid/$STEAM_ID"
    POL_Shortcut "steam.exe" "Steam ($SHORTCUT_NAME)" "" ""
    # Steam game install:
    POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\\nDo NOT click on Play.\\n\\nClose COMPLETELY the Steam interface, \\nso that the installation script can continue')" "$TITLE"
    cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
    POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
    POL_Wine_WaitExit "$TITLE"
else
    # Asking then installing DDV of the game:
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    SETUP_EXE="$APP_ANSWER"
    POL_Wine start /unix "$SETUP_EXE"
    POL_Wine_WaitExit "$TITLE"

    # Making shortcut:
    POL_Shortcut "FEZ.exe" "$SHORTCUT_NAME" "$TITLE.png" ""
fi

# Change the game's config to windowed (the initial launch in full screen is buggy):
mkdir -p "$WINEPREFIX/drive_c/users/$USER/Application Data/FEZ/"
if type -t POL_unbase64 > /dev/null; then
        POL_unbase64 <<-'_EOF_' > "$WINEPREFIX/drive_c/users/$USER/Application Data/FEZ/Settings"
c2V0dGluZ3MgdHlwZT0iRmV6RW5naW5lLlRvb2xzLlNldHRpbmdzLCBGZXpFbmdpbmUiIHsNCgl1
c2VDdXJyZW50TW9kZSBmYWxzZQ0KCXNjcmVlbk1vZGUgIldpbmRvd2VkIg0KCXdpZHRoIDEyODAN
CgloZWlnaHQgNzIwDQoJbGFuZ3VhZ2UgIkVuZ2xpc2giDQoJc291bmRWb2x1bWUgMUYNCgltdXNp
Y1ZvbHVtZSAxRg0KCWtleWJvYXJkTWFwcGluZyBKdW1wPSJTcGFjZSIgR3JhYlRocm93PSJMZWZ0
Q29udHJvbCIgQ2FuY2VsVGFsaz0iTGVmdFNoaWZ0IiBVcD0iVXAiIERvd249IkRvd24iIExlZnQ9
IkxlZnQiIFJpZ2h0PSJSaWdodCIgTG9va1VwPSJJIiBMb29rRG93bj0iSyIgTG9va1JpZ2h0PSJM
IiBMb29rTGVmdD0iSiIgT3Blbk1hcD0iRXNjYXBlIiBPcGVuSW52ZW50b3J5PSJUYWIiIE1hcFpv
b21Jbj0iVyIgTWFwWm9vbU91dD0iUyIgUGF1c2U9IkVudGVyIiBSb3RhdGVMZWZ0PSJBIiBSb3Rh
dGVSaWdodD0iRCIgRnBWaWV3VG9nZ2xlPSJSaWdodEFsdCIgQ2xhbXBMb29rPSJSaWdodFNoaWZ0
Ig0KCWdhbWVwYWRNYXBwaW5nIEp1bXA9MSBHcmFiVGhyb3c9MCBDYW5jZWxUYWxrPTIgT3Blbk1h
cD04IE9wZW5JbnZlbnRvcnk9MyBNYXBab29tSW49NSBNYXBab29tT3V0PTQgUGF1c2U9OSBSb3Rh
dGVMZWZ0PTYgUm90YXRlUmlnaHQ9NyBGcFZpZXdUb2dnbGU9MTAgQ2xhbXBMb29rPTExDQp9
_EOF_
fi

POL_SetupWindow_Close
exit 0
[/code]

P. S. Please delete/decline my signature request for the old script :)

Edited by dif

dif Friday 19 July 2013 at 14:05
dif

Many thanks for the signature of my script!

I'll be gratefull if you add icons and install resources too:

-The icon that will be used for the installed program:
FEZ (Steam)-48x48.png
Name: FEZ (Steam)-48x48
File Type: PNG
Size: 48x48


-The icon that will be used in the PlayOnLinux script list and the site:
FEZ (Steam)-22x22.png
Name: FEZ (Steam)-22x22
File Type: PNG
Size: 22x22


-Sideways banner that is on the left side of the first window:
left.png
Name: left.png
FIle Type: PNG
Size: 150x356


-Top corner Icon for install script:
top.png
Name: top.png
File Type: PNG
Size: 64x64

Edited by dif

petch Friday 19 July 2013 at 18:55
petch

Didn't had time to add the resources before going to work, but it should be alright now :)
dif Saturday 20 July 2013 at 4:17
dif

Didn't had time to add the resources before going to work, but it should be alright now :)

Quote from petch
Yep, it's alright, thank you! :)
dif Saturday 20 July 2013 at 5:45
dif

Ronin DUSETTE Saturday 20 July 2013 at 7:03
Ronin DUSETTE

Nice. I guess that guy finally finished the game? lol

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
dif Saturday 20 July 2013 at 10:16
dif

Nice. I guess that guy finally finished the game? lol

Quote from DJYoshaBYD
I finished whole game except "heart cubes" which are very difficult to gain :)

It should be said about ingame "clock tower" puzzle - when I tried to set my system clock (it's really necessary if you want to pass it quickly, without a week waiting) the game hunged suddenly. So, before manipulations with your system clock, exit the game and Steam.

Edited by dif

Sudhish Saturday 20 July 2013 at 17:17
SudhishAnonymous

Great job!

Will there be an installer for PlayOnMac as well? Will this script work if I run it on PlayOnMac?
dif Saturday 20 July 2013 at 17:44
dif

Great job!

Quote from Sudhish
My own job was very small, I just edited the existing installation script for the GOG.com version of the FEZ (created by Xodetaetl) to make it "Steam compatible" :)

Will there be an installer for PlayOnMac as well? Will this script work if I run it on PlayOnMac?

Quote from Sudhish

Sorry, I don't have the MacOS, so I can't test this. But the FEZ requires only Mono 2.10, so, I think, this script will work in the PlayOnMac too.
petch Saturday 20 July 2013 at 18:38
petch

Well, Wine itself is an abstraction layer...
Вы находитесь здесь: Index > Your creations. > [Script] FEZ (Steam)