Skip to content

Instantly share code, notes, and snippets.

@ajbrown
Created March 18, 2014 14:06
Show Gist options
  • Save ajbrown/9620747 to your computer and use it in GitHub Desktop.
Save ajbrown/9620747 to your computer and use it in GitHub Desktop.
Updated *Working* PlayOnLinux installer script for EA's Origin.
#!/bin/bash
# Date : (2014-03-18 10-00)
# Last revision : (2014-03-18 10-00)
# Wine version used : 1.5.28-Origin
# Distribution used to test : Ubuntu 13.10 x64
# Author : A.J. Brown (Originally GNU_Raziel)
# Licence : Retail
# Only For : http://www.playonlinux.com
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="EA's Origin"
PREFIX="Origin"
EDITOR="Electronic Arts"
GAME_URL="http://store.origin.com"
AUTHOR="GNU_Raziel"
WORKING_WINE_VERSION="1.5.28-Origin"
GAME_VMS="256"
# Starting the script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/top.jpg" "http://files.playonlinux.com/resources/setups/left.jpg" "$TITLE"
POL_SetupWindow_Init
# Starting debugging API
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
# Downloading latest Origin
cd "$POL_USER_ROOT/tmp/"
POL_Download "https://download.dm.origin.com/origin/live/OriginSetup.exe" ""
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
# Downloading wine if necessary and creating prefix
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
# Installing mandatory dependencies
POL_Wine_InstallFonts
POL_Function_FontsSmoothRGB
POL_Call POL_Install_wininet # Fix EA Connexion's issue 1
POL_Call POL_Install_vcrun2010
POL_Call POL_Install_vcrun2008
# Installing Origin
cd "$POL_USER_ROOT/tmp/"
POL_Wine start /unix "OriginSetup.exe"
POL_Wine_WaitExit "$TITLE"
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
## Fix for this software
# Fix EA connexion's issue 2
mkdir -p "$POL_USER_ROOT/wineprefix/$PREFIX/drive_c/system32/drivers/etc/"
touch "$POL_USER_ROOT/wineprefix/$PREFIX/drive_c/system32/drivers/etc/hosts"
# Sound problem fix - pulseaudio related
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
# Making shortcut
POL_Shortcut "Origin.exe" "$TITLE" "" ""
POL_SetupWindow_Close
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment