-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Installing ADE on Arch Linux via WINE
Mingye Wang edited this page Mar 25, 2021
·
5 revisions
Getting keys for ADE is hard with Linux. This script makes that process easier.
- Copy the text below and save it to a file: e.g.
adeinstaller.sh
- Make the script runnable:
chmod 755 adeinstaller.sh
- Run script:
./adeinstaller.sh
(This script essentially helps you run adobekey.py
in a Python running in WINE to extract the key. It's a mouthful.)
TODO:
- The python27 is outdated and the script path needs to be updated
- The script may not be needed at all since there is a WINEPREIX extraction system
#!/bin/bash
set -eou pipefail
wine_install="$HOME/.adewine/"
export WINEPREFIX=$wine_install &>> log.txt
export WINEARCH=win32 &>> log.txt
echo "welcome to ade installer"
echo "========================"
echo "before running, you should probably update your"
echo "system and repositories for best results, i.e. sudo pacman -Syu"
echo "========================"
echo
echo "1) install dependencies"
echo "2) get adobe keys"
echo
read -p "option: " option
echo
case $option in
"1")
echo "installation may take some time, outputting messages to log.txt"
echo "you'll be prompted for installations, please complete them"
echo "installing dependencies, password is needed for pacman"
sudo pacman -S wine winetricks lib32-gnutls |& tee -a log.txt
wineboot &>> log.txt
winetricks -q corefonts &>> log.txt
winetricks -q windowscodecs &>> log.txt
winetricks -q dotnet35sp1 &>> log.txt
winetricks -q python27 &>> log.txt
curl -L http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe -o /tmp/adeinstaller.exe &>> log.txt
curl -L http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe -o /tmp/pycrypto.exe &>> log.txt
mkdir -p "$wine_install/drive_c/dedrm_plugins/" &>> log.txt
curl -L https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/Python2/DeDRM_plugin/adobekey.py \
-o "$wine_install/drive_c/dedrm_plugins/adobekey.py" &>> log.txt
wine /tmp/adeinstaller.exe &>> log.txt
wine /tmp/pycrypto.exe &>> log.txt
echo "put the following function into your profile if you'd like a shortcut to start ade"
printf 'adestart(){ WINEPREFIX=%q wine %q "$@" >/dev/null 2>&1 & }\n' "$wine_install" "$wine_install/drive_c/Program Files/Adobe Digital Editions 2.0/DigitalEditions.exe"
;;
"2")
echo "please make sure you have setup ade correctly or else this scripts will fail"
echo
read -p "have you done so? (y/n) " option
echo
case $option in
[yY] | [yY][eS][sS])
wine python "$wine_install/drive_c/dedrm_plugins/adobekey.py" &>> log.txt
echo "completed, find the key located in $wine_install/drive_c/dedrm_plugins/adobekey_1.der"
;;
*)
echo "please complete setup, exiting"
exit 1
;;
esac
;;
*)
echo "unknown choice, exiting"
exit 1
;;
esac
exit 0