Skip to content

Instantly share code, notes, and snippets.

@jef
Last active November 6, 2021 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jef/6a85de9c1a1c257ff1b4a4f244ec9620 to your computer and use it in GitHub Desktop.
Save jef/6a85de9c1a1c257ff1b4a4f244ec9620 to your computer and use it in GitHub Desktop.
ADE Installer for Arch Linux
#!/bin/sh
wine_install="$HOME/.adewine"
export WINEPREFIX=$wine_install
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 "include multilib repository in your pacman list"
echo "see https://wiki.archlinux.org/title/Official_repositories#multilib"
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"
echo "you'll be prompted for installations, please complete them"
echo "installing dependencies, password is needed for pacman"
echo
sudo pacman -S wine wine-mono winetricks lib32-gnutls
WINEARCH=win32 wineboot
winetricks -q corefonts
winetricks -q windowscodecs
winetricks -q dotnet40
winetricks -q python27
curl -L https://adedownload.adobe.com/pub/adobe/digitaleditions/ADE_4.5_Installer.exe -o /tmp/adeinstaller.exe
mkdir -p "$wine_install/drive_c/dedrm_plugins/"
curl -L https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/92bf51bc8f201a2d5b1e8b90b8dc033606dbcfb0/DeDRM_plugin/adobekey.py -o "$wine_install/drive_c/dedrm_plugins/adobekey.py"
wine /tmp/adeinstaller.exe
wine pip install pycryptodome
echo "put the following alias into your profile if you'd like a shortcut to start ade"
echo "alias adestart=\"WINEPREFIX=$wine_install $wine_install/drive_c/Program\\ Files/Adobe/Adobe\\ Digital\\ Editions\\ 4.5/DigitalEditions.exe > /dev/null 2>&1 &\""
echo "alias adeconfig=\"WINEPREFIX=$wine_install winecfg > /dev/null 2>&1 &\""
;;
"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][eE][sS])
wine python "$wine_install/drive_c/dedrm_plugins/adobekey.py"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment