| 1 | ### DOWNLOAD REPO ### |
| 2 | |
| 3 | git clone git@github.com:yagu0/vchess.git |
| 4 | # or https version: git clone https://github.com/yagu0/vchess.git |
| 5 | cd vchess |
| 6 | |
| 7 | ### SERVER ### |
| 8 | |
| 9 | cd server/db |
| 10 | # Next line doesn't work, but should (?!); anyway typing in SQLite works. |
| 11 | sqlite3 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 | |
| 16 | cd ../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 | |
| 21 | cd .. |
| 22 | npm i |
| 23 | npm start |
| 24 | |
| 25 | ### CLIENT ### |
| 26 | |
| 27 | cd 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. |
| 34 | wget -r --no-parent https://xogo.fr/images/pieces/Eightpieces/tmp_png/ |
| 35 | wget -r --no-parent https://xogo.fr/images/pieces/Otage/ |
| 36 | wget -r --no-parent https://xogo.fr/images/pieces/Pacosako/ |
| 37 | wget -r --no-parent https://xogo.fr/images/pieces/Titan/ |
| 38 | rsync -a --exclude=index.html xogo.fr/images/ public/images/ |
| 39 | wget -r --no-parent https://xogo.fr/variants/Empire/ |
| 40 | wget -r --no-parent https://xogo.fr/variants/Orda/ |
| 41 | wget -r --no-parent https://xogo.fr/variants/Xiangqi/ |
| 42 | rsync -a --exclude=index.html xogo.fr/variants/ public/variants/ |
| 43 | wget -r --no-parent https://xogo.fr/sounds/ |
| 44 | rsync -a --exclude=index.html xogo.fr/sounds/ public/sounds/ |
| 45 | rm -rf xogo.fr |
| 46 | wget -O public/favicon.ico https://xogo.fr/favicon.ico |
| 47 | |
| 48 | # Generate Emergo + Avalam pieces |
| 49 | cd public/images/pieces/Emergo |
| 50 | ./generateSVG_simple.py |
| 51 | ./generateSVG_composite.py |
| 52 | cd ../Avalam |
| 53 | ./generateSVG.py |
| 54 | |
| 55 | cd ../../../../ |
| 56 | npm i |
| 57 | npm run serve |
| 58 | # In production, use 'npm run build' and serve dist/ folder |
| 59 | # NOTE: this dist/ folder is symlinked as server/static. |