Compare commits

..

No commits in common. "0f9bd53282cbef05ca76c5b437301b73a4fe71a4" and "f9b50f3a1b808b391d494a84c35ebf58c4ff91ea" have entirely different histories.

3 changed files with 17 additions and 27 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
uninstall.sh
install.sh.bak
install_log.log
test.sh
*.tar*

View File

@ -7,18 +7,19 @@ By providing this software, I do not give any guarantees of its work. This scrip
## Showcase ## Showcase
![image](https://github.com/user-attachments/assets/5f4edc77-a67e-49c5-8332-b436f1d6134d) ![image](https://github.com/user-attachments/assets/5f4edc77-a67e-49c5-8332-b436f1d6134d)
![image](https://github.com/user-attachments/assets/ad8c7477-4682-4edc-8665-4f5b5380a382)
### What works ### What works
- Drag and drop ~~(doesn't work on Hyprland)~~ (should be fixed with recent update. Not tested) - Drag and drop (doesn't work on Hyprland)
- Clipboard image pasting - Clipboard image pasting
- Mime type association (right click menu, see [here](https://github.com/user-attachments/assets/eb5f7ab3-fb75-47e7-841b-a763ca5e3382)) - Mime type association (right click menu, see [here](https://github.com/user-attachments/assets/eb5f7ab3-fb75-47e7-841b-a763ca5e3382))
- GPU acceleration (no warranty to work) - GPU acceleration
**Tested on:** **Tested on:**
- Arch Linux / CachyOS - Arch Linux / CachyOS
- KDE Plasma 6.2 (Wayland) / Hyprland - KDE Plasma 6.2 (Wayland) / Hyprland
- wine 9.19+ / wine-staging 9.20+ / ~~wine-cachyos 9.20+~~ window freezes - wine 9.19+ / wine-staging 9.20+ / wine-cachyos 9.20+
- AMD GPU - AMD GPU
### Known issues ### Known issues
@ -33,7 +34,7 @@ By providing this software, I do not give any guarantees of its work. This scrip
## Usage ## Usage
```bash ```bash
./photoshop.sh ./install.sh
Usage: ./install.sh [options...] <path> Usage: ./install.sh [options...] <path>
-a Use already existing Photoshop.tar.xz -a Use already existing Photoshop.tar.xz
-i Install Photoshop -i Install Photoshop

View File

@ -15,7 +15,6 @@ XDG_DATA_HOME="$HOME/.local/share"
if [ ! -d "$XDG_CACHE_HOME" ]; then if [ ! -d "$XDG_CACHE_HOME" ]; then
XDG_CACHE_HOME="$HOME/.cache" XDG_CACHE_HOME="$HOME/.cache"
fi fi
# LOGGING SYSTEM # LOGGING SYSTEM
# ##################################################################### # #####################################################################
# #
@ -41,7 +40,6 @@ if [ -z "$XDG_DATA_HOME" ] && [ -z "$XDG_CACHE_HOME" ]; then
fi fi
# Photoshop URL # Photoshop URL
# TODO: change hosting server
PHOTOSHOP_URL="https://spyderrock.com/kMnq2220-AdobePhotoshop2021.xz" PHOTOSHOP_URL="https://spyderrock.com/kMnq2220-AdobePhotoshop2021.xz"
# sha256 checksum # sha256 checksum
@ -105,11 +103,9 @@ ask_user() {
# One of the functions will load a Photoshop `.webp` icon and convert it to `.png`. The `.png` file will be used in the `.desktop` entry. # One of the functions will load a Photoshop `.webp` icon and convert it to `.png`. The `.png` file will be used in the `.desktop` entry.
check_deps() { check_deps() {
declare -A packages=( declare -A packages=(
["curl"]="curl" # Usually pre-installed on most distributions ["curl"]="curl"
["wine"]="wine" ["wine"]="wine"
["winetricks"]="winetricks" ["winetricks"]="winetricks"
# TODO: do not install ImageMagick if the user is using Papirus.
["magick"]="imagemagick" ["magick"]="imagemagick"
) )
@ -137,7 +133,6 @@ install_deps() {
source /etc/os-release source /etc/os-release
# Deprecated. Will not be updated. Still works for listed distros
# Refer to /etc/os-release for more info # Refer to /etc/os-release for more info
case "$ID" in case "$ID" in
"arch"|"cachyos") "arch"|"cachyos")
@ -429,7 +424,6 @@ install_launcher() {
echo -e "$LOG Installing launcher." echo -e "$LOG Installing launcher."
# Thanks to Katy248 (https://github.com/Katy248) for the idea. # Thanks to Katy248 (https://github.com/Katy248) for the idea.
# Note: some variables are not used at all; TODO: remove them
{ {
echo "#!/usr/bin/env bash" echo "#!/usr/bin/env bash"
echo "" echo ""
@ -469,19 +463,13 @@ main() {
echo -e "$SUCCES Photoshop is successfully installed." echo -e "$SUCCES Photoshop is successfully installed."
} }
if [[ -n $1 && $1 != -* ]]; then if [[ $# -eq 0 ]]; then
echo "Invalid input: options must start with '-'" get_help
get_help exit 0
exit 1
fi fi
if [ -z "$1" ]; then while getopts "a:i:h" flag; do
get_help case $flag in
exit 1
fi
while getopts "a:i:h" opt; do
case "$opt" in
a) a)
LOCAL_ARCHIVE="$OPTARG" LOCAL_ARCHIVE="$OPTARG"
;; ;;
@ -491,11 +479,7 @@ while getopts "a:i:h" opt; do
i) i)
INSTALL_PATH="$OPTARG" INSTALL_PATH="$OPTARG"
;; ;;
:) \?)
echo "Option -${OPTARG} requires an argument"
exit 1
;;
?)
echo "Invalid option: -$OPTARG Use -h for help." echo "Invalid option: -$OPTARG Use -h for help."
exit 1 exit 1
;; ;;