Here's a script I wrote some time back that downloads and installs Photoshop CS2, this version in free to download, the serial number is provided by Adobe: 1045-1412-5685-1654-6343-1431
The script already has the serial number so all you have to follow the prompts.
You need wine(obvious), winetricks and cabextract installed, the script downloads the other dependencies.
You are given the option to download either English, French, German or Japanese versions.
Hope it's of use, let me know if there is a problem.
Code: Select all
#!/bin/sh
# Photoshop Downloader Installer
# By Geoffrey Saturday 29th January 2017
# serial number 1045-1412-5685-1654-6343-1431
NAME="Photoshop Downloader Installer"
MESSAGE_BOX(){
export Message_Box='
<window title="" border-width="30" icon-name="emblem-downloads" resizable="false" skip_taskbar_hint="true">
<vbox>
<text wrap="false" justify="2" use-markup="true">
<label>"'$MESSAGE'"</label>
</text>
</vbox>
<timer seconds="true" interval="10" visible="false">
<action>EXIT:exit</action>
</timer>
<action signal="focus-out-event">EXIT:exit</action>
</window>'
gtkdialog -p Message_Box
}
export -f MESSAGE_BOX
PHOTOSHOP_DOWNLOADER="$(readlink -e "$0")"
sleep 0.3
if [ `pidof "$(basename "$PHOTOSHOP_DOWNLOADER")" -o %PPID | wc -w` -gt 1 ]; then
export MESSAGE="<big><b>$NAME is running.</b></big>"
MESSAGE_BOX
exit 1
fi
if [ -f '/root/.wine/drive_c/Program Files/Adobe/Adobe Photoshop CS2/Photoshop.exe' ]; then
export MESSAGE="<big><b>Adobe Photoshop CS2 already installed</b></big>"
MESSAGE_BOX
exit 1
fi
if [ ! -f /usr/bin/wine ]; then
WINE="Wine";
fi
if [ -f /usr/bin/winetricks ] || [ -f /usr/sbin/winetricks ]; then
WINETRICKS=""
else
WINETRICKS="Winetricks";
fi
if [ ! -f /usr/bin/cabextract ]; then
CABEXTRACT="Cabextract";
fi
if [ ! -f /usr/bin/wine ] || [ ! -f /usr/bin/cabextract ] || [ ! -f /usr/sbin/winetricks ] && [ ! -f /usr/bin/winetricks ]; then
export MESSAGE="<big><b>The following need to be installed
"$WINE" "$WINETRICKS" "$CABEXTRACT"</b></big>"
MESSAGE_BOX
exit 1
fi
function DOWNLOAD(){
if [ "$USERNAME" = "" ] || [ "$COMPANYNAME" = "" ]; then
export MESSAGE="<big><b>Names are required</b></big>"
MESSAGE_BOX
exit 1
fi
export MESSAGE="<big><b>Installing Dependencies</b></big>"
MESSAGE_BOX
rxvt -e winetricks vcrun6 corefonts
[ "$LANGUAGE" = "English" ] && EXE="PhSp_CS2_English.exe" && EXEDIR="PhSp_CS2_UE_Ret"
[ "$LANGUAGE" = "French" ] && EXE="PS_CS2_FR_NonRet.exe" && EXEDIR="PS_CS2_FR_NonRet"
[ "$LANGUAGE" = "German" ] && EXE="PS_CS2_Gr_NonRet.exe" && EXEDIR="PS_CS2_Gr_NonRet"
[ "$LANGUAGE" = "Japanese" ] && EXE="PS_CS2_JP_NonRet.exe" && EXEDIR="PS_CS2_JP_NonRet"
mkdir -p /tmp/PHOTOSHOP
URL='http://download.adobe.com/pub/adobe/magic/creativesuite/CS2_EOL/PHSP/'$EXE''
wget -t 2 -T 20 --waitretry=20 --spider -S "$URL" > /tmp/PHOTOSHOP/filesize 2>&1
SIZE=`echo $(awk '/^Length: / {print $3}' /tmp/PHOTOSHOP/filesize) | sed 's/^.\(.*\).$/\1/'`
export DOWNLOADER_GUI='
<window title="Download Photoshop '$LANGUAGE'" icon-name="emblem-downloads" border-width="10" resizable="false">
<vbox>
<progressbar width-request="450">
<label>Please Wait...</label>
<input>wget --no-check-certificate -4 -c -t 5 -w 5 -P ~/Downloads '$URL' 2>&1 | sed -nru "s|.* ([0-9]+%) +([^ ]+).*$|\1\nDownloading \1 of '$EXE' '$SIZE' @ \2B/sec |p" 2>/dev/null</input>
<action type="exit">Ready</action>
</progressbar>
<hbox homogeneous="true">
<button use-underline="true">
<label>"_Cancel "</label>
<input file stock="gtk-close"></input>
<action>func_terminate_service</action>
<action>EXIT:exit</action>
</button>
</hbox>
</vbox>
</window>'
I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog --program=DOWNLOADER_GUI); do
eval $STATEMENTS
done
IFS=$I
[ $EXIT = exit ] && exit 1
export MESSAGE="<big><b>'$EXE' is Downloaded
Preparing to install....</b></big>"
MESSAGE_BOX &
7z x ~/Downloads/$EXE -o/root/.wine/drive_c/$EXEDIR
echo ";***************************************************************
;Adobe Installer External Configuration File: Abcpy.ini
;***************************************************************
;***************************************************************
;Main Section
;The (Product) key is a required key
;***************************************************************
[MAIN]
Product=Adobe(R) Photoshop CS2
AbcpyVersion=2.0
;***************************************************************
;OEM Installation Options
;***************************************************************
[OEM Install]
SERIALNUMBER=1045-1412-5685-1654-6343-1431
SERIALNUMBERTRYOUT=
USERNAME="$USERNAME"
COMPANYNAME="$COMPANYNAME"
INSTALLDIR=c:\Program Files\Adobe\Adobe Photoshop CS2
" > '/root/.wine/drive_c/'$EXEDIR'/Adobe(R) Photoshop(R) CS2/Abcpy.ini'
# Disable Adobe Updates
echo " Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Updater]
"'"Enterprise"'"=dword:00000001" > /root/.wine/drive_c/DisableAUM_Updates.reg
wine '/root/.wine/drive_c/'$EXEDIR'/Adobe(R) Photoshop(R) CS2/setup.exe'
wine regedit.exe /S /root/.wine/drive_c/DisableAUM_Updates.reg
while [ ! -f '/root/.local/share/applications/wine/Programs/Adobe Photoshop CS2.desktop' ]; do sleep 1; done
cp '/root/.local/share/applications/wine/Programs/Adobe Photoshop CS2.desktop' /usr/share/applications/Adobe-Photoshop-CS2.desktop
echo "Categories=Graphics;" >> /usr/share/applications/Adobe-Photoshop-CS2.desktop
fixmenus
if [ -f /usr/share/applications/Adobe-Photoshop-CS2.desktop ]; then
export MESSAGE="<big><b>Adobe Photoshop CS2 installed
Menu entry added to Graphics</b></big>"
MESSAGE_BOX
exit 1
fi
func_terminate_service
}
export -f DOWNLOAD
func_terminate_service(){
PID_PHOTOSHOP_DOWNLOADER=$(pidof photoshop_downloader)
GUI=$(ps -ef | grep PHOTOSHOP_DOWNLOADER_DIALOG | grep -v grep | awk '{ print $2 }')
kill "$PID_PHOTOSHOP_DOWNLOADER"
kill "$GUI"
}
export -f func_terminate_service
export PHOTOSHOP_DOWNLOADER_DIALOG='
<window title="'$NAME'" icon-name="emblem-downloads" resizable="false">
<vbox>
<text use-markup="true"><label>"<big><b><span>Adobe Photoshop Installer </span></b></big>"</label></text>
<hbox>
<text><label>"User Name"</label></text>
<vbox width-request="225">
<entry>
<variable>USERNAME</variable>
<input>echo "Puppy"</input>
</entry>
</vbox>
</hbox>
<hbox>
<text><label>"Company Name"</label></text>
<vbox width-request="225">
<entry>
<variable>COMPANYNAME</variable>
<input>echo "User"</input>
</entry>
</vbox>
</hbox>
<hbox space-fill="true" space-expand="false" homogeneous="true">
<hbox>
<text><label>"Photoshop CS2 9.0"</label></text>
<comboboxtext>
<variable>LANGUAGE</variable>
<item>English</item>
<item>French</item>
<item>German</item>
<item>Japanese</item>
</comboboxtext>
<button relief="2" use-underline="true">
<label>_Download</label>
<input file icon="emblem-downloads"></input>
<height>24</height><width>24</width>
<action>DOWNLOAD</action>
</button>
</hbox>
</hbox>
<hbox border-width="10" homogeneous="true">
<button use-underline="true">
<label>"_Cancel "</label>
<input file stock="gtk-close"></input>
<action>EXIT:exit</action>
</button>
</hbox>
</vbox>
</window>'
gtkdialog -p PHOTOSHOP_DOWNLOADER_DIALOG &> /dev/null
exit 0