-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathillustratorSetup.sh
executable file
·87 lines (66 loc) · 2.32 KB
/
illustratorSetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#! /usr/bin/env bash
source "sharedFuncs.sh"
function main() {
mkdir -p $SCR_PATH
mkdir -p $CACHE_PATH
setup_log "================| script executed |================"
#make sure wine package is already installed
package_installed wine
package_installed md5sum
RESOURCES_PATH="$SCR_PATH/resources"
WINE_PREFIX="$SCR_PATH/prefix"
ILLDIR="$SCR_PATH/"
#create new wine prefix for illustrator
rmdir_if_exist $WINE_PREFIX
#export necessary variable for wine
export_var
#config wine prefix and install mono and gecko automatic
echo -e "\033[1;93mplease install mono and gecko packages then click on OK button\e[0m"
winecfg 2> "$SCR_PATH/wine-error.log"
if [ $? -eq 0 ];then
show_message "prefix configured..."
sleep 5
else
error "prefix config failed :("
fi
sleep 10
if [ -f "$WINE_PREFIX/user.reg" ];then
#add dark mod
set_dark_mod
else
error "user.reg Not Found :("
fi
#create resources directory we extract downloaded file into this and will be deleted after installation more like /tmp
rmdir_if_exist $RESOURCES_PATH
#install illustrator
sleep 3
install_illustratorCC
sleep 5
if [ -d $RESOURCES_PATH ];then
show_message "deleting resources folder"
rm -rf $RESOURCES_PATH
else
error "resources folder Not Found"
fi
launcher
show_message "Almost finished..."
sleep 10
}
function install_illustratorCC() {
local filename="illustratorCC17.tgz"
local filemd5="d470b541cef1339a66ea33a998801f83"
local filelink="http://127.0.0.1:4050/illustratorCC17.tgz"
# local filelink="https://victor.poshtiban.io/p/gictor/illustratorCC/illustratorCC17.tgz"
local filepath="$CACHE_PATH/$filename"
download_component $filepath $filemd5 $filelink $filename
echo "===============| IllustratorCC17 |===============" >> "$SCR_PATH/wine-error.log"
show_message "extract IllustratorCC..."
rmdir_if_exist "$SCR_PATH/IllustratorCC17"
tar -xzf "$filepath" -C "$SCR_PATH" || error "sorry something went wrong during illustrator installation"
show_message "install Illustrator..."
show_message "IllustratorCC v17 x64 installed..."
unset filename filemd5 filelink filepath
}
check_arg $@
save_paths
main