I think I finish it, still I may messed up something.
#!/bin/bash
# INFO
# Tested on: Linux
# Distributor ID: Ubuntu
# Release: 9.04
# Codename: Jaunty Jackalope
# Linux kernel: 2.6.28.19 - generic
# PlayOnLinux: 3.8
# WineHQ: 1.2
# Status: Working
# Presentation
TITLE="Heart Of Darkness"
CREATORS="Amazing Studio"
TITLESITE="This product no longer have a website!"
SCRIPTAUTHOR="LiL_Stenly"
# Prefix
PREFIX="HOD"
WVERSION="1.2"
# Set cd or dir
FINDINS="HeartOfDarkness.exe"
# Executables and names
TITLEEXE="HODWin32.exe"
TITLENAME="Heart Of Darkness"
# Icon and images
IMGLEFT="http://i207.photobucket.com/albums/bb127/LiL_Stenly/HOD/HODLeft.png"
IMGTOP="http://i207.photobucket.com/albums/bb127/LiL_Stenly/HOD/HODTop.png"
LOADLEFT="$REPERTOIRE/tmp/HODLeft.png"
LOADTOP="$REPERTOIRE/tmp/HODTop.png"
IMGTMP="$REPERTOIRE/tmp"
# Messages
WARN="PLEASE READ CAREFULLY!"
WARNTEXT="In the next window you will have to point \\nthe CD or Installation directory \\nthat contains $FINDINS file! \\n\\nAfter that installation will continue in silent mode! \\n\\nThank you for your attention! \\n\\nLiL_Stenly"
MSGINS="Now installing... "
MSG="Read Me (Full installation information)!"
MSGTEXT="Do you want to start '$TITLENAME' without disc? \\nThen in the next window choose *YES* \\nto make full installation of $TITLENAME \\nand that script will copy the $TITLENAME \\nneeded files from the disk to your computer! \\n\\nOtherwise you can also run the $TITLENAME with cd in your drive! \\n\\nLiL_Stenly"
INSMSG="You continued in normal installation!"
INSMSGTEXT="You will have to run $TITLENAME with disc in your drive!"
# Check
if [ "$PLAYONLINUX" = "" ]; then
exit 0
fi
# Loading sources
source "$PLAYONLINUX/lib/sources"
# Initalization
cd $IMGTMP
rm {HODLeft,HODTop}.png
wget {"$IMGLEFT","$IMGTOP"}
POL_SetupWindow_Init "$LOADTOP" "$LOADLEFT"
# Welcome policy window
POL_SetupWindow_presentation "$TITLE" "$CREATORS" "$TITLESITE" "$SCRIPTAUTHOR" "$PREFIX"
# Show warning message
POL_SetupWindow_message "$WARNTEXT" "$WARN"
# Checking for existing installer
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "$FINDINS"
# Setup new prefix
select_prefix "$REPERTOIRE/wineprefix/$PREFIX/"
# Installing compatible wine version
POL_SetupWindow_install_wine "$WVERSION"
Use_WineVersion "$WVERSION"
# Creating the prefix
POL_SetupWindow_prefixcreate
# Load Program files variable
POL_LoadVar_PROGRAMFILES
# Starting the installer
POL_SetupWindow_wait_next_signal "$MSGINS" "$TITLE"
cd "$CDROM"
wine "$FINDINS" /SILENT
POL_SetupWindow_detect_exit
# Setting up window resolution
Set_Desktop On 800 600
# Setting up windows version
Set_OS "Win95"
# Instructions
POL_SetupWindow_message "$MSGTEXT" "$MSG"
# Full installation option
POL_SetupWindow_menu "Do you want to make full installation?" "$TITLE" "YES! NO!" " "
# Copy movie file in the game dir
if [ "$APP_ANSWER" == "YES!" ]; then
mkdir -p "$REPERTOIRE/wineprefix/$PREFIX/drive_c/$PROGRAMFILES/$TITLE/paf"
cp "$CDROM/paf/hod.paf" "$REPERTOIRE/wineprefix/$PREFIX/drive_c/$PROGRAMFILES/$TITLE/paf/hod.paf"
# Adding registry to locate the new place of the movie file
pushd "$IMGTMP"
REGPATH1='.'
REGPATH2='.\\\\paf'
echo REGEDIT4 > HOD.reg
echo >> HOD.reg
echo "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Amazing Studio\\Heart Of Darkness]" >> HOD.reg
echo "\\"EXE_PATH\\"="\\"$REGPATH1\\" >> HOD.reg
echo "\\"PAF_PATH\\"="\\"$REGPATH2\\" >> HOD.reg
regedit HOD.reg
popd
# Continue playing with disc
elif [ "$APP_ANSWER" == "NO!" ]; then
POL_SetupWindow_message "$INSMSGTEXT" "$INSMSG"
fi
#Converting xpm icon to png
convert "$HOME/.local/share/icons/*_hodwin32.0.xpm" -geometry 32X32 "$REPERTOIRE/icones/32/HODWin32.png"
# Creating the game shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/$TITLE" "$TITLEEXE" "" "$TITLENAME"
Set_WineVersion_Assign "$WVERSION" "$TITLENAME"
# Removing the temp files
cd $IMGTMP
rm {HODLeft,HODTop}.png
rm HOD.reg
# Exiting
POL_SetupWindow_Close
exit
Side panel image!
Top panel image!
Download the script
NOTE: This game doesn't need cracks!
You may play it with the cd in the drive when install the game as normal or make full install and play it without disc!
The script is for Windows2000 English Version CD!
Works pretty fine, still I'm not sure how to skip the movies from the begining of the game and I think that many versions of wine have the same problem. :)
Edité par lil_stenly