Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: bfc722a4ac
Fetching contributors…

Cannot retrieve contributors at this time

99 lines (76 sloc) 3.121 kb
#!/bin/bash
# Date : (2012-08-11 16-50)
# Last revision : (2012-08-14 18-54)
# Wine version used : 1.5.5
# Distribution used to test : Debian Sid (Unstable)
# Author : Pierre Etchemaite pe-pol@concept-micro.com
# Script licence : GPL v.2
# Program licence : Retail
# Depend :
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
GOGID="sid_meiers_alpha_centauri"
PREFIX="AlphaCentauri_gog"
WORKING_WINE_VERSION="1.5.5"
TITLE="Sid Meier's Alpha Centauri (GoG release)"
SHORTCUT_NAME="Alpha Centauri"
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Firaxis Games / Electronic Arts" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX"
# For OS/X we automatically download sox
if [ "$POL_OS" != "Mac" ]; then
sox --version || POL_Debug_Fatal "Please install sox before installing $TITLE"
fi
POL_Debug_Init
POL_Call POL_GoG_setup "$GOGID" "d9bd6f055c1d08ee4aacf480ad4d62a0"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
# Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix
POL_Call POL_Function_SetNativeExtension "pdf"
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')"
# GoG work!
Set_OS winxp
POL_SetupWindow_VMS "2"
if [ "$POL_OS" = "Mac" ]; then
POL_System_TmpCreate "$PREFIX"
cd "$POL_System_TmpDir"
POL_Download "http://files.playonlinux.com/sox-osx.7z" "3c97904fa3799513a31fbbb48c8edf4b"
POL_System_ExtractSingleFile "$PWD/sox-osx.7z" "sox" "$PWD/sox"
chmod +x sox
PATH="$POL_System_TmpDir:$PATH"
fi
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/GOGcom/Sid Meiers Alpha Centauri/fx" || POL_Debug_Fatal "Could not find sounds directory"
# Activate pulsebar if you want to turn a 4 seconds job into a 3 minutes one (POL 4.1.6)
#POL_SetupWindow_pulsebar "$(eval_gettext 'Fixing sounds gain')" "$TITLE"
PULSE=0
# 2s of silence (for what I'm about to do :D)
sox -n -r 22050 -c 1 silence.wav trim 0 2
for i in *.wav; do # 291 files
#POL_SetupWindow_set_text "$i"
case "$i" in
"CPU please don't go.wav"|"CPU review your options.wav")
# those loop if modified - possibly more to go
;;
"opening menu.wav")
# Need looping, but the whole sound!
mv "$i" "$i.orig" &&
sox "$i.orig" "$i.orig" "$i.orig" "$i.orig" "$i.orig" "$i.orig" silence.wav "$i" && rm "$i.orig"
;;
*)
# avoid clipping
mv "$i" "$i.orig" &&
sox "$i.orig" "$i" gain -3 && rm "$i.orig"
;;
esac
let PULSE++
#POL_SetupWindow_pulse "$((PULSE/3))"
done
# Doesn't hurt ;)
POL_Wine_reboot
POL_Shortcut "terran.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" ""
POL_Shortcut_QuietDebug "$SHORTCUT_NAME"
POL_Shortcut_Document "$SHORTCUT_NAME" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOGcom/Sid Meiers Alpha Centauri/Manual.pdf"
# C:\Program Files\GOGcom\Sid Meiers Alpha Centauri\readme.txt
POL_SetupWindow_Close
exit
Jump to Line
Something went wrong with that request. Please try again.