Difference between revisions of "Quick Start/en"
(Created page with "To build the project, use the following commands (when you are located in the directory ''w4-sdk-demo''): * Delete the results of the previous assembly: '''./w4 --clean''' * B...") |
(Created page with "Check the game through the browser by typing in the address bar:") |
||
Line 77: | Line 77: | ||
cd deploy | cd deploy | ||
serve -l 8080 | serve -l 8080 | ||
− | + | Check the game through the browser by typing in the address bar: | |
http://localhost:8080/ | http://localhost:8080/ | ||
Revision as of 11:47, 13 May 2020
W4 SDK DEMO Launch Procedure.
Setup environment
The project uses Debian OS, if it is already installed, you can go directly to the Debian environment settings section. For other operating systems, you must follow these steps (or make sure they are completed).
Windows
Install Windows Terminal
It is not obliged to use Windows Terminal if you prefer another tool skip this section.
- Download the latest stable version of the installer from the project page (the download link is in the Assets drop-down list under the changelog)and install the application.
- You can configure Windows Terminal by changing the settings.json file. In general, it is located in the directory LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\ or similar one.
See the Windows Terminal documentation for more information about customization.
Install WSL
To run a Debian image on Windows, use Windows Subsystem for Linux (WSL). It is recommended that you use WSL2, which requires Windows 10 build 18917 or later. If you have an old build of Windows 10, then you can work with WSL1. The difference is that on WSL1, some operations are much slower than on WSL2.
Follow these steps:
- Check / Enable the WSL component. To do this, in PowerShell, run the command:
dism.exe / online / enable-feature / featurename: Microsoft-Windows-Subsystem-Linux / all / norestart
- If you can use WSL2, then also use the Virtual Machine Platform component:
dism.exe / online / enable-feature / featurename: VirtualMachinePlatform / all / norestart
- Reboot the system to complete the installation of components.
Install Debian WSL Image
To add a Debian image, download and install the Debian application from the Microsoft Store.
If you use WSL2, initialize the distribution with the command (for WSL1 skip this item):
wsl --set-version Debian 2
Mac OS (TBD)
TBD
Debian environment settings
If you are working from another OS, start Debian (for example, through the Windows Terminal menu). At the first start, you will be asked to set a username and password for logging in.
It is recommended to install the latest system updates by running the following commands:
sudo apt-get update sudo apt-get upgrade
Install Midnight Commander
Если вам не удобно работать с файлами из командной строки, установите Midnight Commander.
sudo apt-get install mc
Install Git
Install Git application:
sudo apt-get install git
Clone SDK
Before the first call to the repository required generate SSH key and add the public key in your account on Bitbucket. The same key must be sent to the W4 team to gain access.
Note. Instead of generating a new key, you can use the existing key by copying the public and private parts to the .ssh directory of the Debian user home directory and setting access permissions to the key file with the command chmod =600 ~/.ssh/id_rsa
Клонируйте репозиторий с SDK:
git clone git@bitbucket.org:ciliz2/w4-sdk-demo.git
Install SDK prerequisites
To get started with the SDK, go to the directory:
cd w4-sdk-demo
Run the command:
./w4 --prereq
Reload Debian instance or subshell. Then run the command:
npm -g install serve
You may also need to install node web server if it is needed for your project.
Build
If you are using WSL1, the build process can take more time.
To build the project, use the following commands (when you are located in the directory w4-sdk-demo):
- Delete the results of the previous assembly: ./w4 --clean
- Build the project (release version): ./w4 --build
Test Run
Start webserver:
cd deploy serve -l 8080
Check the game through the browser by typing in the address bar:
http://localhost:8080/
Edit source code
Здесь даны общие сведения по работе с SDK. Подробнее работа с кодом разбирается на странице SDK Experiments.
Для работы с кодом можно использовать любую удобную среду. Далее описывается установка и настройка Visual Studio Code, так как это решение позволяет напрямую работать с кодом в Debian Instance, при запуске из вашей основной ОС.
VSCode as IDE
Install Visual Studio Code
Загрузите и установите VSCode для вашей ОС.
Initial setup
- Start VSCode and install Remote WSL extension
- Connect to Debian WSL
- Open SDK workspace
- Install All recomemended extensions
- Reload IDE and work with code
serve -l 8080