@@ -1,54 +1,85 @@
+#!/bin/bash
#!/usr/bin/env playonlinux-bash
-# Date : (2016-02-08)
-# Last revision : (2016-02-09)
-# Wine revision used : 1.6.2
-# Distribution used to test : Ubuntu 15.04
-# Author : NoSt
-
-[ "$PLAYONLINUX" = "" ] && exit 0
+# Date : (2019-07-11)
+# Last revision : see changelog
+# Wine version used : see below
+# Distribution used to test : Ubuntu 18.04 x64
+# Script licence : GPL3
+# Program licence : Retail
+# Playonlinux v4.3.4
+#
+# Tested version : Azada v1.03 (december 2007) from GOG.com.
+#
+# Game based on: .
+#
+#
+# CHANGELOG
+# [Dadu042] (2019-07-11)
+# Second script wrote, after the one wrote by NoSt in 2016.
+#
+# KNOWN ISSUES
+
+
+[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
-
-# Definition of the variables
+
TITLE="Azada"
-PREFIX="Azada"
-STEAM_ID="7340"
-
-# Initialization of the setup
+PREFIX="azada"
+WORKING_WINE_VERSION="3.0.3"
+AUTHOR="Dadu042"
+EDITOR="Big Fish Games"
+
POL_SetupWindow_Init
-
-# Initialization of the debugging
POL_Debug_Init
-
-# Presentation screen
-
-# Definition of the Wine prefix
+
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+
+POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+
POL_Wine_SelectPrefix "$PREFIX"
-POL_Wine_PrefixCreate
+POL_System_SetArch "amd64"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+# POL_Wine_PrefixCreate
+POL_System_TmpCreate "$TITLE"
+
+Set_OS "win7"
-# Selecting the installation method
+# This game was not released on CD/DVD.
POL_SetupWindow_InstallMethod "LOCAL,STEAM"
-
-# Installation from a local archive
-if [ "$INSTALL_METHOD" = "LOCAL" ]
-then
- POL_SetupWindow_browse "$(eval_gettext "Please select the installation file to run.")" "$TITLE"
- POL_SetupWindow_wait "$(eval_gettext "Please wait...")" "$TITLE"
- POL_Wine "$APP_ANSWER"
- POL_Shortcut "Azada.exe" "$TITLE"
- POL_SetupWindow_message "$(eval_gettext "Installation finished.")" "$TITLE"
-
-# Installation in Steam
+
+if [ "$INSTALL_METHOD" == "LOCAL" ]; then
+ cd "$HOME"
+ POL_SetupWindow_browse "$(eval_gettext 'Please select the ZIP file')" "$TITLE"
+ SETUP_EXE="$APP_ANSWER"
+ cd "$POL_System_TmpDir"
+
+ POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+ POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/"
+ # POL_Wine start /unix "$SETUP_EXE"
+ # POL_Wine_WaitExit "$TITLE"
+
+elif [ "$INSTALL_METHOD" == "STEAM" ];then
+ POL_Call POL_Install_steam
+ cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+ POL_Wine_WaitBefore "$TITLE"
else
- POL_Call POL_Install_steam
- cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam" || exit
- POL_SetupWindow_message "$(eval_gettext "Steam is installing $TITLE. Press Next when the installation is finished.")" "$TITLE"
- POL_Shortcut "Steam.exe" "$TITLE" "" "-applaunch $STEAM_ID"
- POL_SetupWindow_message "$(eval_gettext "Installation finished.")" "$TITLE"
+ POL_SetupWindow_cdrom
+ POL_SetupWindow_check_cdrom "pidgen.dll"
+ POL_Wine start /unix "$CDROM/install.exe"
+ POL_Wine_WaitExit "install.exe"
+ cd "$POL_System_TmpDir"
+fi
+
+
+if [ "$INSTALL_METHOD" == "STEAM" ]; then
+else
+ POL_Shortcut "Azada.exe" "$TITLE" "" "" "Game;PuzzleGame;"
+# POL_Shortcut_Document "$TITLE" "readme.txt"
fi
-# Terminating the setup
+POL_System_TmpDelete
POL_SetupWindow_Close
-
-exit
+exit 0
\ No newline at end of file