Dishonored 2

Informations

Creator Message
kreyren
Banned

Warning

This installer is a beta script. It means that it might not work as expected

Informations

Platforms:
Downloads: 417
Wine: 3.21-staging

Feedbacks

Description

Action-adventure video game, 2016.

 

Required dependencies: xact, dxvk, corefonts.


known issue: https://github.com/ValveSoftware/Proton/issues/823 (DXVK 0.94 regression)

Research: https://github.com/RXT067/Research/tree/master/WINE-Dishonored2

Source code

#!/usr/bin/env bash
# Date : (2018-12-29)
# Last revision : (2018-12-29)
# Wine version tested : WINE-4.0-rc2-22-g5a8e430b96 (Staging)
# Distribution used to test : Gentoo
# Author : Kreyren, Forked from Ruzven's Dishonored POL script
# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic

# TODO : Can PlayOnLinux work without winetricks?
# TODO : What extension should POL Scripts have?
# TODO : How to test scripts?
# TODO : Allow user to make custom wineprefix or use default
# TODO : Make a function which saved markdown documment in TMP with HW/SW info
# TODO : Fail if invoked from root?
# TODO : Check if system is able to use vulkan?
# TODO : Add install method from Steam using proton / WINE

### CHANGELOG ###
# 2018-12-29 19:19:47 (UTC) - Jacob Hrbek
#     - Initial commit

### MANDATORY
# Dependencies : xact, corefonts, dxvk, steam
# Wine : WINE-3.21 (Staging) ~ WINE-4.0-rc2-22-g5a8e430b96 (Staging)
# GPU Drivers : AMDGPU (Nvidia/Nouveau untested)
# MESA : 18.3.1 - needs testing
# Kernel : 4.18.18-gentoo-r1 In theory anything above 4.14?

### VARIABLES ### 
TITLE="Dishonored 2"
PREFIX="Dishonored-2"
SHORTCUT_NAME="Dishonored-2" # Name of shortcut
EDITOR="Arkane Studios"
# Verify: what is EDITOR
GAME_URL="http://www.dishonored.com/"
AUTHOR="Kreyren, Ruzven"
GAME_VMS="512" 
# TODO: What is GAME_VMS

install_wine () {

WINE_CHECK=$(wine --version); IFS=- read -r _ WINE_VERSION WINE_REVISION _ <<<"$WINE_CHECK"; 

  if [[ -x $(command -v wine) ]] && [[ $WINE_VERSION > 3.21 ]] && [[ $(wine --version | grep '(staging)') == @('(staging)'|'(Staging)') ]]; then # Experiment # TODO: grep 'Staging'
    POL_SetupWindow_message "$(wine --version) detected and is sufficient."
    POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
    POL_Wine_PrefixCreate # Creates WINE prefix
    POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix

    else
      POL_SetupWindow_message "Wine is not sufficient, using POL WINE."
      POL_Wine_PrefixCreate "3.21-staging"
      POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
      POL_Wine_PrefixCreate # Creates WINE prefix
      POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
  fi
}

use_winetricks () {

  POL_Call POL_Install_xact # Required for audio
  POL_Call POL_Install_steam # Dependent on steam
  POL_Call POL_Install_corefonts # In case it's not pulled with steam which depends on corefonts
  POL_Call POL_Install_dxvk # Required for runtime
  Set_OS "win7"

}

if [[ -e /usr/share/playonlinux/lib ]]; then
  PLAYONLINUX='/usr/share/playonlinux/lib'
  source "$PLAYONLINUX/lib/sources"

  POL_SetupWindow_Init # Initiates POL installer window

  # RootCheck
  if [[ $UID == 0 ]]; then
    POL_SetupWindow_message "FATAL: This script needs to be invoked as non-root."
    exit 0
  fi

  # TODO: Ask for PREFIX
  PREFIX="/home/$USER/Games/Dishonored-2"

  POL_Debug_Init # Debug?

  POL_SetupWindow_presentation "49: $TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" # needs verification

  POL_SetupWindow_message "
Game is expected to work on platinum excluding DXVK regression which causes freezes in game. 

Please report any other issues on https://www.playonlinux.com/en/app-3443-Dishonored_2.html

Credits: Kreyren, Ruzven
"

  # POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
    # TODO : Add images

  if [[ $(uname -s) == 'Linux' ]]; then
    install_wine
    use_winetricks
    POL_Wine "steam steam://rungameid/403640"
    # TODO: Check Graphics + drivers
  fi

  if [[ $(uname -s) != 'Linux' ]]; then
    POL_SetupWindow_message "FATAL: Script is not optimized for non-linux."
    # TODO: Needs non-linux support.
  fi

  POL_SetupWindow_Close
  exit 0

  else
    echo "FATAL: Directory /usr/share/playonlinux/lib doesn't exist."
    exit 0
 fi

## REFERENCES
# Introduction - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_1:_Getting_to_know_Bash
# Basic Functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_2:_Basic_Functions
# Variables - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_3:_Variables
# Conditions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_4:_Conditions
# Wine - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_5:_Wine
# Filesystem - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_6:_The_Filesystem
# Installation Media - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_7:_Installation_Media
# Real Script - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_8:_My_First_Real_Script
# Standartization - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization
# Script translation - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation
# List of functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions
# 

## FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/tree/df9e090b4db5b7a41f72145877cc541b908c319b/lib
# DEBUG FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/debug.lib 
# DEPRECATED FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/deprecated.lib
# DOSBOX FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/dosbox.lib
# POL FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/playonlinux.lib
# PLUGINS FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/plugins.lib
# SCRIPT FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/scripts.lib
# SETUP WINDOW FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib
# SOURCES FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/sources
# VARIABLE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/variables
# WEBSITE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/website.lib
# WINE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/wine.lib

Contributions

Filters:

Contribute
Member Message
kreyren Monday 31 December 2018 at 21:26
kreyren
Banned

Information

This update has been approved by the team.

Message

Improved script

 

needs testing

 

needs MacOS support (which i can't provide)

 

Added experiment in install_wine function to try compare wine versions which seems to work in non-pol environment
 

Need info in https://www.playonlinux.com/en/topic-16224-Script_testing.html to proceed

Differences

@@ -0,0 +1,145 @@
+#!/usr/bin/env bash
+# Date : (2018-12-29)
+# Last revision : (2018-12-29)
+# Wine version tested : WINE-4.0-rc2-22-g5a8e430b96 (Staging)
+# Distribution used to test : Gentoo
+# Author : Kreyren, Forked from Ruzven's Dishonored POL script
+# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic
+
+# TODO : Can PlayOnLinux work without winetricks?
+# TODO : What extension should POL Scripts have?
+# TODO : How to test scripts?
+# TODO : Allow user to make custom wineprefix or use default
+# TODO : Make a function which saved markdown documment in TMP with HW/SW info
+# TODO : Fail if invoked from root?
+# TODO : Check if system is able to use vulkan?
+# TODO : Add install method from Steam using proton / WINE
+
+### CHANGELOG ###
+# 2018-12-29 19:19:47 (UTC) - Jacob Hrbek
+#     - Initial commit
+
+### MANDATORY
+# Dependencies : xact, corefonts, dxvk, steam
+# Wine : WINE-3.21 (Staging) ~ WINE-4.0-rc2-22-g5a8e430b96 (Staging)
+# GPU Drivers : AMDGPU (Nvidia/Nouveau untested)
+# MESA : 18.3.1 - needs testing
+# Kernel : 4.18.18-gentoo-r1 In theory anything above 4.14?
+
+### VARIABLES ### 
+TITLE="Dishonored 2"
+PREFIX="Dishonored-2"
+SHORTCUT_NAME="Dishonored-2" # Name of shortcut
+EDITOR="Arkane Studios"
+# Verify: what is EDITOR
+GAME_URL="http://www.dishonored.com/"
+AUTHOR="Kreyren, Ruzven"
+GAME_VMS="512" 
+# TODO: What is GAME_VMS
+
+install_wine () {
+
+WINE_CHECK=$(wine --version); IFS=- read -r _ WINE_VERSION WINE_REVISION _ <<<"$WINE_CHECK"; 
+
+  if [[ -x $(command -v wine) ]] && [[ $WINE_VERSION > 3.21 ]] && [[ $(wine --version | grep '(staging)') == @('(staging)'|'(Staging)') ]]; then # Experiment # TODO: grep 'Staging'
+    POL_SetupWindow_message "$(wine --version) detected and is sufficient."
+    POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
+    POL_Wine_PrefixCreate # Creates WINE prefix
+    POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
+
+    else
+      POL_SetupWindow_message "Wine is not sufficient, using POL WINE."
+      POL_Wine_PrefixCreate "3.21-staging"
+      POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
+      POL_Wine_PrefixCreate # Creates WINE prefix
+      POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
+  fi
+}
+
+use_winetricks () {
+
+  POL_Call POL_Install_xact # Required for audio
+  POL_Call POL_Install_steam # Dependent on steam
+  POL_Call POL_Install_corefonts # In case it's not pulled with steam which depends on corefonts
+  POL_Call POL_Install_dxvk # Required for runtime
+  Set_OS "win7"
+
+}
+
+if [[ -e /usr/share/playonlinux/lib ]]; then
+  PLAYONLINUX='/usr/share/playonlinux/lib'
+  source "$PLAYONLINUX/lib/sources"
+
+  POL_SetupWindow_Init # Initiates POL installer window
+
+  # RootCheck
+  if [[ $UID == 0 ]]; then
+    POL_SetupWindow_message "FATAL: This script needs to be invoked as non-root."
+    exit 0
+  fi
+
+  # TODO: Ask for PREFIX
+  PREFIX="/home/$USER/Games/Dishonored-2"
+
+  POL_Debug_Init # Debug?
+
+  POL_SetupWindow_presentation "49: $TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" # needs verification
+
+  POL_SetupWindow_message "
+Game is expected to work on platinum excluding DXVK regression which causes freezes in game. 
+
+Please report any other issues on https://www.playonlinux.com/en/app-3443-Dishonored_2.html
+
+Credits: Kreyren, Ruzven
+"
+
+  # POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+    # TODO : Add images
+
+  if [[ $(uname -s) == 'Linux' ]]; then
+    install_wine
+    use_winetricks
+    POL_Wine "steam steam://rungameid/403640"
+    # TODO: Check Graphics + drivers
+  fi
+
+  if [[ $(uname -s) != 'Linux' ]]; then
+    POL_SetupWindow_message "FATAL: Script is not optimized for non-linux."
+    # TODO: Needs non-linux support.
+  fi
+
+  POL_SetupWindow_Close
+  exit 0
+
+  else
+    echo "FATAL: Directory /usr/share/playonlinux/lib doesn't exist."
+    exit 0
+ fi
+
+## REFERENCES
+# Introduction - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_1:_Getting_to_know_Bash
+# Basic Functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_2:_Basic_Functions
+# Variables - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_3:_Variables
+# Conditions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_4:_Conditions
+# Wine - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_5:_Wine
+# Filesystem - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_6:_The_Filesystem
+# Installation Media - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_7:_Installation_Media
+# Real Script - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_8:_My_First_Real_Script
+# Standartization - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization
+# Script translation - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation
+# List of functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions
+# 
+
+## FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/tree/df9e090b4db5b7a41f72145877cc541b908c319b/lib
+# DEBUG FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/debug.lib 
+# DEPRECATED FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/deprecated.lib
+# DOSBOX FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/dosbox.lib
+# POL FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/playonlinux.lib
+# PLUGINS FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/plugins.lib
+# SCRIPT FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/scripts.lib
+# SETUP WINDOW FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib
+# SOURCES FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/sources
+# VARIABLE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/variables
+# WEBSITE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/website.lib
+# WINE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/wine.lib
+

New source code

#!/usr/bin/env bash
# Date : (2018-12-29)
# Last revision : (2018-12-29)
# Wine version tested : WINE-4.0-rc2-22-g5a8e430b96 (Staging)
# Distribution used to test : Gentoo
# Author : Kreyren, Forked from Ruzven's Dishonored POL script
# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic

# TODO : Can PlayOnLinux work without winetricks?
# TODO : What extension should POL Scripts have?
# TODO : How to test scripts?
# TODO : Allow user to make custom wineprefix or use default
# TODO : Make a function which saved markdown documment in TMP with HW/SW info
# TODO : Fail if invoked from root?
# TODO : Check if system is able to use vulkan?
# TODO : Add install method from Steam using proton / WINE

### CHANGELOG ###
# 2018-12-29 19:19:47 (UTC) - Jacob Hrbek
#     - Initial commit

### MANDATORY
# Dependencies : xact, corefonts, dxvk, steam
# Wine : WINE-3.21 (Staging) ~ WINE-4.0-rc2-22-g5a8e430b96 (Staging)
# GPU Drivers : AMDGPU (Nvidia/Nouveau untested)
# MESA : 18.3.1 - needs testing
# Kernel : 4.18.18-gentoo-r1 In theory anything above 4.14?

### VARIABLES ### 
TITLE="Dishonored 2"
PREFIX="Dishonored-2"
SHORTCUT_NAME="Dishonored-2" # Name of shortcut
EDITOR="Arkane Studios"
# Verify: what is EDITOR
GAME_URL="http://www.dishonored.com/"
AUTHOR="Kreyren, Ruzven"
GAME_VMS="512" 
# TODO: What is GAME_VMS

install_wine () {

WINE_CHECK=$(wine --version); IFS=- read -r _ WINE_VERSION WINE_REVISION _ <<<"$WINE_CHECK"; 

  if [[ -x $(command -v wine) ]] && [[ $WINE_VERSION > 3.21 ]] && [[ $(wine --version | grep '(staging)') == @('(staging)'|'(Staging)') ]]; then # Experiment # TODO: grep 'Staging'
    POL_SetupWindow_message "$(wine --version) detected and is sufficient."
    POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
    POL_Wine_PrefixCreate # Creates WINE prefix
    POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix

    else
      POL_SetupWindow_message "Wine is not sufficient, using POL WINE."
      POL_Wine_PrefixCreate "3.21-staging"
      POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
      POL_Wine_PrefixCreate # Creates WINE prefix
      POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
  fi
}

use_winetricks () {

  POL_Call POL_Install_xact # Required for audio
  POL_Call POL_Install_steam # Dependent on steam
  POL_Call POL_Install_corefonts # In case it's not pulled with steam which depends on corefonts
  POL_Call POL_Install_dxvk # Required for runtime
  Set_OS "win7"

}

if [[ -e /usr/share/playonlinux/lib ]]; then
  PLAYONLINUX='/usr/share/playonlinux/lib'
  source "$PLAYONLINUX/lib/sources"

  POL_SetupWindow_Init # Initiates POL installer window

  # RootCheck
  if [[ $UID == 0 ]]; then
    POL_SetupWindow_message "FATAL: This script needs to be invoked as non-root."
    exit 0
  fi

  # TODO: Ask for PREFIX
  PREFIX="/home/$USER/Games/Dishonored-2"

  POL_Debug_Init # Debug?

  POL_SetupWindow_presentation "49: $TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" # needs verification

  POL_SetupWindow_message "
Game is expected to work on platinum excluding DXVK regression which causes freezes in game. 

Please report any other issues on https://www.playonlinux.com/en/app-3443-Dishonored_2.html

Credits: Kreyren, Ruzven
"

  # POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
    # TODO : Add images

  if [[ $(uname -s) == 'Linux' ]]; then
    install_wine
    use_winetricks
    POL_Wine "steam steam://rungameid/403640"
    # TODO: Check Graphics + drivers
  fi

  if [[ $(uname -s) != 'Linux' ]]; then
    POL_SetupWindow_message "FATAL: Script is not optimized for non-linux."
    # TODO: Needs non-linux support.
  fi

  POL_SetupWindow_Close
  exit 0

  else
    echo "FATAL: Directory /usr/share/playonlinux/lib doesn't exist."
    exit 0
 fi

## REFERENCES
# Introduction - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_1:_Getting_to_know_Bash
# Basic Functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_2:_Basic_Functions
# Variables - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_3:_Variables
# Conditions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_4:_Conditions
# Wine - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_5:_Wine
# Filesystem - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_6:_The_Filesystem
# Installation Media - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_7:_Installation_Media
# Real Script - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_8:_My_First_Real_Script
# Standartization - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization
# Script translation - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation
# List of functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions
# 

## FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/tree/df9e090b4db5b7a41f72145877cc541b908c319b/lib
# DEBUG FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/debug.lib 
# DEPRECATED FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/deprecated.lib
# DOSBOX FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/dosbox.lib
# POL FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/playonlinux.lib
# PLUGINS FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/plugins.lib
# SCRIPT FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/scripts.lib
# SETUP WINDOW FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib
# SOURCES FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/sources
# VARIABLE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/variables
# WEBSITE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/website.lib
# WINE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/wine.lib

Replies

Edited by kreyren

kreyren Monday 31 December 2018 at 21:12
kreyren
Banned

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Obsolete:  New version, untested.

Need info in https://www.playonlinux.com/en/topic-16224-Script_testing.html to proceed

Differences

@@ -0,0 +1,136 @@
+#!/usr/bin/env bash
+# Date : (2018-12-29)
+# Last revision : (2018-12-29)
+# Wine version tested : WINE-4.0-rc2-22-g5a8e430b96 (Staging)
+# Distribution used to test : Gentoo
+# Author : Kreyren, Forked from Ruzven's Dishonored POL script
+# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic
+
+# TODO : Can PlayOnLinux work without winetricks?
+# TODO : What extension should POL Scripts have?
+# TODO : How to test scripts?
+
+### CHANGELOG ###
+# 2018-12-29 19:19:47 (UTC) - Jacob Hrbek
+#     - Initial commit
+
+### MANDATORY
+# Dependencies : xact, corefonts, dxvk
+# Wine : WINE-3.21 (Staging) ~ WINE-4.0-rc2-22-g5a8e430b96 (Staging)
+# GPU Drivers : AMDGPU (Nvidia/Nouveau untested)
+# MESA : 18.3.1 - needs testing
+# Kernel : 4.18.18-gentoo-r1 In theory anything above 4.14?
+
+### VARIABLES ### 
+TITLE="Dishonored 2"
+PREFIX="Dishonored-2"
+SHORTCUT_NAME="Dishonored-2" # Name of shortcut
+EDITOR="Arkane Studios"
+# Verify: what is EDITOR
+GAME_URL="http://www.dishonored.com/"
+AUTHOR="Kreyren, Ruzven"
+GAME_VMS="512" 
+# TODO: What is GAME_VMS
+PREFIX="/home/$USER/Games/Dishonored-2"
+# TODO: Allow user to select it's prefix or to use defautl
+
+
+if [[ $PLAYONLINUX=="" ]]; then
+  exit 0
+  echo "TODO: $PLAYONLINUX variable is empty" # TODO: Why is var required not empty?
+
+  else
+    source "$PLAYONLINUX/lib/sources"
+fi
+
+POL_SetupWindow_Init # Initiates POL installer window
+
+POL_Debug_Init # Debug?
+
+POL_SetupWindow_presentation "49: $TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" # needs verification
+
+POL_SetupWindow_message "
+Game is expected to work on platinum excluding DXVK regression which causes freezes in game. 
+
+Please report any other issues on https://www.playonlinux.com/en/app-3443-Dishonored_2.html
+
+Credits: Kreyren, Ruzven
+"
+
+# POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+# TODO : Add images
+
+### Dependencies
+# TODO : Check kernel
+
+# TODO : Check MESA
+
+# TODO : Check GPU driver
+
+# TODO : Check Kernel Configuration 
+
+# TODO : Check POL version
+
+# TODO : Check OS
+
+
+### WINE
+# TODO : Install WINE
+
+if [[ "$(wine --version)" >= "*-3.21*" && "$(wine --version | grep '(staging)')" == '(staging)' ]]; then # TODO: Expected to install POL wine if system wine is not present or higher then 3.21-staging
+  POL_SetupWindow_message "$(wine --version) detected and is sufficient."
+  POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
+  POL_Wine_PrefixCreate # Creates WINE prefix
+  POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
+
+  else
+    POL_SetupWindow_message "Wine is not sufficient, using POL WINE."
+    POL_Wine_PrefixCreate "3.21-staging"
+    POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
+    POL_Wine_PrefixCreate # Creates WINE prefix
+    POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
+fi
+
+
+### WINETRICKS
+# TODO : Install WINE Dependencies
+POL_Call POL_Install_xact # Required for audio
+POL_Call POL_Install_steam # Dependent on steam
+POL_Call POL_Install_corefonts # In case it's not pulled with steam which depends on corefonts
+POL_Call POL_Install_dxvk # Required for runtime
+Set_OS "win7"
+
+# TODO : Install Game
+POL_Wine "steam steam://rungameid/403640"
+
+
+POL_SetupWindow_Close
+
+## REFERENCES
+# Introduction - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_1:_Getting_to_know_Bash
+# Basic Functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_2:_Basic_Functions
+# Variables - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_3:_Variables
+# Conditions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_4:_Conditions
+# Wine - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_5:_Wine
+# Filesystem - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_6:_The_Filesystem
+# Installation Media - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_7:_Installation_Media
+# Real Script - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_8:_My_First_Real_Script
+# Standartization - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization
+# Script translation - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation
+# List of functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions
+# 
+
+## FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/tree/df9e090b4db5b7a41f72145877cc541b908c319b/lib
+# DEBUG FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/debug.lib 
+# DEPRECATED FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/deprecated.lib
+# DOSBOX FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/dosbox.lib
+# POL FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/playonlinux.lib
+# PLUGINS FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/plugins.lib
+# SCRIPT FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/scripts.lib
+# SETUP WINDOW FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib
+# SOURCES FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/sources
+# VARIABLE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/variables
+# WEBSITE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/website.lib
+# WINE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/wine.lib
+
+exit 0
\ No newline at end of file

New source code

#!/usr/bin/env bash
# Date : (2018-12-29)
# Last revision : (2018-12-29)
# Wine version tested : WINE-4.0-rc2-22-g5a8e430b96 (Staging)
# Distribution used to test : Gentoo
# Author : Kreyren, Forked from Ruzven's Dishonored POL script
# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic

# TODO : Can PlayOnLinux work without winetricks?
# TODO : What extension should POL Scripts have?
# TODO : How to test scripts?

### CHANGELOG ###
# 2018-12-29 19:19:47 (UTC) - Jacob Hrbek
#     - Initial commit

### MANDATORY
# Dependencies : xact, corefonts, dxvk
# Wine : WINE-3.21 (Staging) ~ WINE-4.0-rc2-22-g5a8e430b96 (Staging)
# GPU Drivers : AMDGPU (Nvidia/Nouveau untested)
# MESA : 18.3.1 - needs testing
# Kernel : 4.18.18-gentoo-r1 In theory anything above 4.14?

### VARIABLES ### 
TITLE="Dishonored 2"
PREFIX="Dishonored-2"
SHORTCUT_NAME="Dishonored-2" # Name of shortcut
EDITOR="Arkane Studios"
# Verify: what is EDITOR
GAME_URL="http://www.dishonored.com/"
AUTHOR="Kreyren, Ruzven"
GAME_VMS="512" 
# TODO: What is GAME_VMS
PREFIX="/home/$USER/Games/Dishonored-2"
# TODO: Allow user to select it's prefix or to use defautl


if [[ $PLAYONLINUX=="" ]]; then
  exit 0
  echo "TODO: $PLAYONLINUX variable is empty" # TODO: Why is var required not empty?

  else
    source "$PLAYONLINUX/lib/sources"
fi

POL_SetupWindow_Init # Initiates POL installer window

POL_Debug_Init # Debug?

POL_SetupWindow_presentation "49: $TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" # needs verification

POL_SetupWindow_message "
Game is expected to work on platinum excluding DXVK regression which causes freezes in game. 

Please report any other issues on https://www.playonlinux.com/en/app-3443-Dishonored_2.html

Credits: Kreyren, Ruzven
"

# POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
# TODO : Add images

### Dependencies
# TODO : Check kernel

# TODO : Check MESA

# TODO : Check GPU driver

# TODO : Check Kernel Configuration 

# TODO : Check POL version

# TODO : Check OS


### WINE
# TODO : Install WINE

if [[ "$(wine --version)" >= "*-3.21*" && "$(wine --version | grep '(staging)')" == '(staging)' ]]; then # TODO: Expected to install POL wine if system wine is not present or higher then 3.21-staging
  POL_SetupWindow_message "$(wine --version) detected and is sufficient."
  POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
  POL_Wine_PrefixCreate # Creates WINE prefix
  POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix

  else
    POL_SetupWindow_message "Wine is not sufficient, using POL WINE."
    POL_Wine_PrefixCreate "3.21-staging"
    POL_Wine_SelectPrefix "$PREFIX" # Name of prefix
    POL_Wine_PrefixCreate # Creates WINE prefix
    POL_Wine_SelectPrefix "$PREFIX" # Select WINE prefix
fi


### WINETRICKS
# TODO : Install WINE Dependencies
POL_Call POL_Install_xact # Required for audio
POL_Call POL_Install_steam # Dependent on steam
POL_Call POL_Install_corefonts # In case it's not pulled with steam which depends on corefonts
POL_Call POL_Install_dxvk # Required for runtime
Set_OS "win7"

# TODO : Install Game
POL_Wine "steam steam://rungameid/403640"


POL_SetupWindow_Close

## REFERENCES
# Introduction - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_1:_Getting_to_know_Bash
# Basic Functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_2:_Basic_Functions
# Variables - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_3:_Variables
# Conditions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_4:_Conditions
# Wine - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_5:_Wine
# Filesystem - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_6:_The_Filesystem
# Installation Media - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_7:_Installation_Media
# Real Script - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_8:_My_First_Real_Script
# Standartization - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization
# Script translation - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation
# List of functions - http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions
# 

## FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/tree/df9e090b4db5b7a41f72145877cc541b908c319b/lib
# DEBUG FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/debug.lib 
# DEPRECATED FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/deprecated.lib
# DOSBOX FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/dosbox.lib
# POL FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/playonlinux.lib
# PLUGINS FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/plugins.lib
# SCRIPT FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/scripts.lib
# SETUP WINDOW FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib
# SOURCES FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/sources
# VARIABLE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/variables
# WEBSITE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/website.lib
# WINE FUNCTIONS - https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/wine.lib

exit 0

Replies

Edited by kreyren

kreyren Saturday 29 December 2018 at 15:49
kreyren
Banned

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Obsolete: Forked from Dishonored 1 did my best to provide all the info and make the installer, requires contribution/info.

Differences

@@ -0,0 +1,120 @@
+#!/usr/bin/env bash
+
+## Why is POL useing shebang for a script that is pure shell lol.. 
+
+# Date : (2012-09-01)
+# Last revision : (2013-02-04)
+# Wine version tested : Wine4.0-rc2
+# Distribution used to test : Gentoooo
+# Author : KREEEEYYYREEEEEN!! Forked from Ruzven's Dishonored POL script
+# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic
+
+# VARS(?): https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib#L46
+
+if [[ PLAYONLINUX == "" ]] && [[ $UID == 0 ]]; then
+  echo "FATAL: PlayOnLinux failed to set wine directory(?) or invoked from root user.. mad lad" 
+  # i have no hugging idea what PLAYONLINUX var is.. https://github.com/PlayOnLinux/POL-POM-4/search?q=PLAYONLINUX&unscoped_q=PLAYONLINUX I'M NOT READING THROUG 13 PAGES OMFG... https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/bash/playonlinux-pkg what the hug.. nope i have no idea.. someone tell me plz
+  # Is PLAYONLINUX a wine prefix?
+  exit 0
+  
+  else
+    source "$PLAYONLINUX/lib/sources"
+    
+    TITLE="Dishonored 2"
+    PREFIX="Dishonored-2"
+    WINEVERSION="3.21-staging" #TODO: Use System wine or download something that is everywhere
+    EDITOR="Bethersda Softworks"
+    GAME_URL="http://www.dishonored.com/"
+    AUTHOR="Kreyren, Ruzven"
+    GAME_VMS="512" #What The Hug is this var?
+    PREFIX="/home/$USER/Games/Dishonored2"
+
+    #POL_GetSetupImages "http://files.playonlinux.com/resources/setups/....../top.jpg" "http://files.playonlinux.com/resources/setups/....../left.jpg" "$TITLE"
+
+    # Starting the script
+    POL_SetupWindow_Init # Probably to inicialize POL wizard to use the installer?
+
+    # Starting debugging API
+    POL_Debug_Init
+
+    POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" 
+
+    # Setting prefix patheme
+    POL_Wine_SelectPrefix "$PREFIX"
+
+    # Downloading wine if necessary and creating prefix
+    POL_System_SetArch "auto"
+    POL_Wine_PrefixCreate "$WINEVERSION"
+
+    Set_OS "win7"
+  
+fi
+
+# Choose between DVD and Digital Download version
+POL_SetupWindow_InstallMethod "DVD,STEAM"
+
+
+# Installing mandatory dependencies
+if [ "$INSTALL_METHOD" == "STEAM" ]; then
+        POL_Call POL_Install_steam
+        POL_Call POL_Install_xact
+        POL_Call POL_Install_dxvk
+        POL_CALL POL_Install_corefonts
+
+fi
+
+# Set Graphic Card information keys for wine
+        POL_Wine_SetVideoDriver
+  
+# Asking about memory size of graphic card
+        POL_SetupWindow_VMS $GAME_VMS
+         
+# Begin game installation
+if [ "$INSTALL_METHOD" == "DVD" ]; then
+        # Asking for CDROM and checking if it's correct one
+        POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\nif not already done.')" "$TITLE"
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "icon.ico"
+        POL_Wine start /unix "$CDROM/Setup.exe"
+        POL_Wine_WaitExit "$TITLE"
+
+elif [ "$INSTALL_METHOD" == "STEAM" ]; then
+
+      POL_SetupWindow_menu "You want install with ?" "$TITLE" "Steam Store-Steam Backup Restore" "-"
+       
+      if [ "$APP_ANSWER" = "Steam Store" ]
+      then
+  
+      cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+        POL_Wine "steam.exe" steam://install/205100
+        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"
+        POL_Wine_WaitExit "$TITLE"
+        
+      else
+   
+      cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+        POL_Wine "steam.exe" steam://install/ 
+        POL_SetupWindow_message "$(eval_gettext 'When $TITLE Restore by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue.')" "$TITLE"        
+        POL_Wine_WaitExit "$TITLE"
+      fi
+       
+         
+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 "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+fi
+  
+# Making shortcut
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/205100"
+
+#Fix for first launcher window Mod
+POL_Shortcut "Dishonored.exe" "$TITLE windowed" "" "-windowed"
+
+POL_SetupWindow_message "Installation is finished" "$TITLE"
+
+POL_SetupWindow_Close
+exit 0
\ No newline at end of file

New source code

#!/usr/bin/env bash

## Why is POL useing shebang for a script that is pure shell lol.. 

# Date : (2012-09-01)
# Last revision : (2013-02-04)
# Wine version tested : Wine4.0-rc2
# Distribution used to test : Gentoooo
# Author : KREEEEYYYREEEEEN!! Forked from Ruzven's Dishonored POL script
# Licence : Do what the hug you want i don't give a butterfly, just don't break it because i want to to play dishonored 2 - 2018 Czech republic

# VARS(?): https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/lib/setupwindow.lib#L46

if [[ PLAYONLINUX == "" ]] && [[ $UID == 0 ]]; then
  echo "FATAL: PlayOnLinux failed to set wine directory(?) or invoked from root user.. mad lad" 
  # i have no hugging idea what PLAYONLINUX var is.. https://github.com/PlayOnLinux/POL-POM-4/search?q=PLAYONLINUX&unscoped_q=PLAYONLINUX I'M NOT READING THROUG 13 PAGES OMFG... https://github.com/PlayOnLinux/POL-POM-4/blob/df9e090b4db5b7a41f72145877cc541b908c319b/bash/playonlinux-pkg what the hug.. nope i have no idea.. someone tell me plz
  # Is PLAYONLINUX a wine prefix?
  exit 0
  
  else
    source "$PLAYONLINUX/lib/sources"
    
    TITLE="Dishonored 2"
    PREFIX="Dishonored-2"
    WINEVERSION="3.21-staging" #TODO: Use System wine or download something that is everywhere
    EDITOR="Bethersda Softworks"
    GAME_URL="http://www.dishonored.com/"
    AUTHOR="Kreyren, Ruzven"
    GAME_VMS="512" #What The Hug is this var?
    PREFIX="/home/$USER/Games/Dishonored2"

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

    # Starting the script
    POL_SetupWindow_Init # Probably to inicialize POL wizard to use the installer?

    # Starting debugging API
    POL_Debug_Init

    POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" 

    # Setting prefix patheme
    POL_Wine_SelectPrefix "$PREFIX"

    # Downloading wine if necessary and creating prefix
    POL_System_SetArch "auto"
    POL_Wine_PrefixCreate "$WINEVERSION"

    Set_OS "win7"
  
fi

# Choose between DVD and Digital Download version
POL_SetupWindow_InstallMethod "DVD,STEAM"


# Installing mandatory dependencies
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        POL_Call POL_Install_xact
        POL_Call POL_Install_dxvk
        POL_CALL POL_Install_corefonts

fi

# Set Graphic Card information keys for wine
        POL_Wine_SetVideoDriver
  
# Asking about memory size of graphic card
        POL_SetupWindow_VMS $GAME_VMS
         
# Begin game installation
if [ "$INSTALL_METHOD" == "DVD" ]; then
        # Asking for CDROM and checking if it's correct one
        POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\nif not already done.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "icon.ico"
        POL_Wine start /unix "$CDROM/Setup.exe"
        POL_Wine_WaitExit "$TITLE"

elif [ "$INSTALL_METHOD" == "STEAM" ]; then

      POL_SetupWindow_menu "You want install with ?" "$TITLE" "Steam Store-Steam Backup Restore" "-"
       
      if [ "$APP_ANSWER" = "Steam Store" ]
      then
  
      cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine "steam.exe" steam://install/205100
        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"
        POL_Wine_WaitExit "$TITLE"
        
      else
   
      cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine "steam.exe" steam://install/ 
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE Restore by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue.')" "$TITLE"        
        POL_Wine_WaitExit "$TITLE"
      fi
       
         
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 "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
fi
  
# Making shortcut
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/205100"

#Fix for first launcher window Mod
POL_Shortcut "Dishonored.exe" "$TITLE windowed" "" "-windowed"

POL_SetupWindow_message "Installation is finished" "$TITLE"

POL_SetupWindow_Close
exit 0

Replies

Saturday 29 December 2018 at 19:29
Hi! Thank you for your contribution. Does your script work?
Saturday 29 December 2018 at 19:47
@Quentin PARIS untested, needs work. If you provide answers to comments in source code i can try to finish it.
EDIT: I'm on freenode #playonlinux as kreyren any help is appreciated.
Sunday 30 December 2018 at 19:15
Update: Updating the script based on informations that i've gathered
Sunday 30 December 2018 at 22:43
What else do you need?

Edited by kreyren