Attempt to clarify installation instructions a little
[vchess.git] / INSTALL_INSTRUCTIONS
CommitLineData
48edc620
BA
1### DOWNLOAD REPO ###
2
3git clone git@github.com:yagu0/vchess.git
4# or https version: git clone https://github.com/yagu0/vchess.git
5cd vchess
6
3a0ff866
BA
7### INSTALL TOOLS ###
8
9# You need to install sqlite3, nodejs and npm (example for Ubuntu).
10# wget & rsync help too, they are generally installed by default.
11apt install sqlite3 nodejs npm
12
48edc620
BA
13### SERVER ###
14
15cd server/db
3a0ff866
BA
16sqlite3 vchess.sqlite
17# And then within sqlite invite command:
18.read create.sql
19.read populate.sql
20# Then exit sqlite (\q works)
48edc620
BA
21# Rename dbconnect.py.dist --> dbconnect.py and edit DB path on line 7
22# Then synchronize the GameStat table:
23./sync_gamestat.py
24
25cd ../config
26# Rename and edit parameters.js.dist --> parameters.js
27# Rename and edit discord.json.dist --> discord.json
28# NOTE: token *must be empty* locally in dev mode
29
30cd ..
31npm i
32npm start
33
34### CLIENT ###
35
36cd client/src
37# Rename and edit parameters.js.dist --> parameters.js
38# NOTE: parameters here and in server/config should be intuitive enough.
39# if not, ask me or check in code :)
40
41# Next step is just "git fat init && git fat pull" if I have your ssh key.
42# NOTE: you should use your own strategy then, for binary files.
43wget -r --no-parent https://xogo.fr/images/pieces/Eightpieces/tmp_png/
44wget -r --no-parent https://xogo.fr/images/pieces/Otage/
45wget -r --no-parent https://xogo.fr/images/pieces/Pacosako/
46wget -r --no-parent https://xogo.fr/images/pieces/Titan/
47rsync -a --exclude=index.html xogo.fr/images/ public/images/
48wget -r --no-parent https://xogo.fr/variants/Empire/
49wget -r --no-parent https://xogo.fr/variants/Orda/
50wget -r --no-parent https://xogo.fr/variants/Xiangqi/
51rsync -a --exclude=index.html xogo.fr/variants/ public/variants/
52wget -r --no-parent https://xogo.fr/sounds/
53rsync -a --exclude=index.html xogo.fr/sounds/ public/sounds/
54rm -rf xogo.fr
55wget -O public/favicon.ico https://xogo.fr/favicon.ico
56
57# Generate Emergo + Avalam pieces
58cd public/images/pieces/Emergo
59./generateSVG_simple.py
60./generateSVG_composite.py
61cd ../Avalam
62./generateSVG.py
63
64cd ../../../../
65npm i
66npm run serve
67# In production, use 'npm run build' and serve dist/ folder
68# NOTE: this dist/ folder is symlinked as server/static.