Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Date: 2010-03-11
- # Last revision: 2010-03-11
- # Wine version used: 1.1.27
- # Distribution used to test: Ubuntu 9.10 32-bit
- # Author: Simon Johansson - simon [AT] forintens [DOT] se
- # Depend:
- # Licence: GNU General Public License version 3
- # Copyright 2010 Simon Johansson
- #### PlayOnLinux ####
- [ "$PLAYONLINUX" = "" ] && exit 0
- source "$PLAYONLINUX/lib/sources"
- #### VARIABLES ####
- TITLE="Lingoes"
- ORGANISATION="Lingoes Project"
- SITE="http://www.lingoes.net/"
- PREFIX="$REPERTOIRE/wineprefix/LINGOES"
- WINEVERSION="1.1.27"
- RESOURCES="$REPERTOIRE/ressources/"
- PROGRAMFILES="Program Files"
- POL_LoadVar_PROGRAMFILES
- URL_TTS="http://dict.hjenglish.com/publish/Microsoft_TTS_51_eng.msi"
- URL_3="http://www.slymandata.com/lingoes_usa_mirror/lingoes_2.6.3.exe"
- FILE_TTS="Microsoft_TTS_51_eng.msi"
- FILE_3="lingoes_2.6.3.exe"
- MD5_TTS="c157bca19f2b46b7ab3ed7c8d29dc912"
- MD5_3="754443ad2d924af1b329be61c060954c"
- #### LANG-VARS ####
- LANG_DL_TTS="Downloading Text-To-Speech engine..."
- LANG_DL_3="Downloading version 2.6.3-exe..."
- LANG_INST="Press forward to start the installation."
- LANG_WINETRICKS="Downloading Winetricks..."
- LANG_INST_TTS="Installing Text-To-Speech..."
- LANG_INST_3="Installing Lingoes..."
- LANG_INST_IE6="Press forward to install Internet Explorer 6."
- LANG_INST_VCRUN6="Press forward to install Visual C++-runtimes."
- #### FUNCTIONS ####
- #Requires to be in the right directory already.
- #If the file exists: take a md5sum.
- #If wrong md5sum, download new file.
- #Repeat.
- #Return 0
- Download_File()
- {
- if [ -z "$1" ]
- then
- return 1
- fi
- FILENAME="FILE_$1"
- FILENAME="${!FILENAME}"
- URL="URL_$1"
- URL="${!URL}"
- MD5="MD5_$1"
- MD5="${!MD5}"
- DL="LANG_DL_$1"
- DL="${!DL}"
- while [ "`md5sum $FILENAME | cut -c -32`" != "$MD5" ]
- do
- rm ./"$FILENAME"
- POL_SetupWindow_download "$DL" "$TITLE" "$URL"
- done
- return 0
- }
- #### THE REAL START ####
- POL_SetupWindow_Init
- POL_SetupWindow_presentation "$TITLE" "$ORGANISATION" "$SITE" "Dr Phil" "$PREFIX"
- select_prefix "$PREFIX"
- POL_SetupWindow_prefixcreate
- fonts_to_prefix
- POL_SetupWindow_install_wine "$WINEVERSION"
- Use_WineVersion "$WINEVERSION"
- cd "$RESOURCES"
- if [ ! -d "LINGOES" ]
- then
- mkdir "LINGOES"
- fi
- cd "LINGOES"
- Download_File "TTS"
- Download_File "3"
- #I am too tired right now to fix ie6 and C++-libs without winetricks.
- POL_SetupWindow_message "$LANG_INST_IE6" "$TITLE"
- cd "$RESOURCES"
- wget http://www.kegel.com/wine/winetricks
- sh winetricks ie6
- POL_SetupWindow_message "$LANG_INST_VCRUN6" "$TITLE"
- sh winetricks vcrun6
- #POL_SetupWindow_wait_next_signal "$LANG_INST_TTS" "$TITLE"
- #cd "$RESOURCES/LINGOES/"
- #wine start "$FILE_TTS"
- #POL_SetupWindow_detect_exit
- #This is for the TTS-engine, which I haven't got to work.
- cd "$RESOURCES/LINGOES/"
- POL_SetupWindow_wait_next_signal "$LANG_INST_3" "$TITLE"
- wine "$FILE_3"
- POL_SetupWindow_detect_exit
- POL_SetupWindow_make_shortcut "LINGOES" "$PROGRAMFILES/Lingoes/Translator2" "Lingoes.exe" "" "Lingoes"
- POL_SetupWindow_Close
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement