Update installation instructions
[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
7### SERVER ###
8
9cd server/db
10# Next line doesn't work, but should (?!); anyway typing in SQLite works.
11sqlite3 vchess.sqlite '.read create.sql ; .read populate.sql'
12# Rename dbconnect.py.dist --> dbconnect.py and edit DB path on line 7
13# Then synchronize the GameStat table:
14./sync_gamestat.py
15
16cd ../config
17# Rename and edit parameters.js.dist --> parameters.js
18# Rename and edit discord.json.dist --> discord.json
19# NOTE: token *must be empty* locally in dev mode
20
21cd ..
22npm i
23npm start
24
25### CLIENT ###
26
27cd client/src
28# Rename and edit parameters.js.dist --> parameters.js
29# NOTE: parameters here and in server/config should be intuitive enough.
30# if not, ask me or check in code :)
31
32# Next step is just "git fat init && git fat pull" if I have your ssh key.
33# NOTE: you should use your own strategy then, for binary files.
34wget -r --no-parent https://xogo.fr/images/pieces/Eightpieces/tmp_png/
35wget -r --no-parent https://xogo.fr/images/pieces/Otage/
36wget -r --no-parent https://xogo.fr/images/pieces/Pacosako/
37wget -r --no-parent https://xogo.fr/images/pieces/Titan/
38rsync -a --exclude=index.html xogo.fr/images/ public/images/
39wget -r --no-parent https://xogo.fr/variants/Empire/
40wget -r --no-parent https://xogo.fr/variants/Orda/
41wget -r --no-parent https://xogo.fr/variants/Xiangqi/
42rsync -a --exclude=index.html xogo.fr/variants/ public/variants/
43wget -r --no-parent https://xogo.fr/sounds/
44rsync -a --exclude=index.html xogo.fr/sounds/ public/sounds/
45rm -rf xogo.fr
46wget -O public/favicon.ico https://xogo.fr/favicon.ico
47
48# Generate Emergo + Avalam pieces
49cd public/images/pieces/Emergo
50./generateSVG_simple.py
51./generateSVG_composite.py
52cd ../Avalam
53./generateSVG.py
54
55cd ../../../../
56npm i
57npm run serve
58# In production, use 'npm run build' and serve dist/ folder
59# NOTE: this dist/ folder is symlinked as server/static.