-
Notifications
You must be signed in to change notification settings - Fork 6
/
initserver.sh
73 lines (64 loc) · 2.64 KB
/
initserver.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
# Processing Language Server - Prebuild scripts
GREEN='\033[1;32m'
RED='\033[0;31m'
YELLOW='\033[0;1;33m'
NC='\033[0m'
echo "${RED}Installing required node modules...${NC}"
# install required node_modules
npm install
echo "${GREEN}Installation successful.!${NC}"
echo "${RED}Creating out Directories...${NC}"
cd ./client
mkdir out
cd ..
cd ./server
mkdir out
cd ..
echo "${GREEN}Creation successful.!${NC}"
echo "${RED}Cooking client directories...${NC}"
# making the class dir for sketch run
cd ./client/out
mkdir class
cd ..
cd ..
echo "${GREEN}Client setup successful.!${NC}"
echo "${RED}Cooking server directories...${NC}"
# making directories for server compilation
cd ./server/out
mkdir compile
mkdir processing
cd processing
mkdir container
mkdir custom
mkdir customcontainer
mkdir extractor
mkdir insightscontainer
mkdir lspinsights
echo "${GREEN}Server setup successful.!${NC}"
echo "${RED}Cooking Processing Core${NC}"
# extracting Processing core classes
cd ..
mkdir logs
cd ..
cd ..
mkdir pcore
unzip -o ./server/src/processing/lspinsights.zip -d ./server/out/processing/lspinsights
ls ./server/out/processing/lspinsights | tee ./server/out/processing/insightscontainer/insightlist.txt
unzip -o ./server/src/processing/jar/custom.jar -d ./server/out/processing/custom
ls ./server/out/processing/custom | tee ./server/out/processing/customcontainer/custom.txt
unzip -o ./server/src/processing/jar/core.jar -d ./pcore
unzip -o ./server/src/processing/jar/core.jar -d ./server/out/processing/extractor
ls ./server/out/processing/extractor/processing/core | tee ./server/out/processing/container/core.txt
ls ./server/out/processing/extractor/processing/awt | tee ./server/out/processing/container/awt.txt
ls ./server/out/processing/extractor/processing/data | tee ./server/out/processing/container/data.txt
ls ./server/out/processing/extractor/processing/event | tee ./server/out/processing/container/event.txt
ls ./server/out/processing/extractor/processing/javafx | tee ./server/out/processing/container/javafx.txt
ls ./server/out/processing/extractor/processing/opengl | tee ./server/out/processing/container/opengl.txt
echo "${GREEN}Core setup successful.!${NC}"
echo "${RED}Setting up Enviromental Varibales${NC}"
echo "export JAVA_HOME=\$(/usr/libexec/java_home -v 1.8)" >> ~/.bash_profile
echo "${GREEN}Variable setup successful.!${NC}"
echo "${GREEN}Processing Language Server initialized.!${NC}"
echo "${YELLOW}Note: Make sure you have JAVA 8 installed so that you can run Processing sketches${NC}"
echo "${YELLOW}Note: Make sure you have class path setup as environmental variables that point to Processing Core${NC}"
echo "${GREEN} Now Perform: Terminal -> Run Build Task...${NC}"