[PL] Wersja polska instrukcji poniżej
Project of the steering cockpit application, made in the Mobile Platform Team at the Institute of Control and Computation Engineering (IAiIS) of the Warsaw University of Technology.
The application is subject to the terms of the MIT License. The content of the license and its terms are described in the LICENSE.txt file.
Before starting the application, install the following:
- Java Development Kit (JDK) version 13 or higher
- Maven version 3 or higher
- OpenCV version 4.5.1
and then add folders containing executable files (for Windows, e.g. C:\Program Files\Java\jdk-13.0.2\bin
and C:\Program Files\apache-maven-3.8.2\bin
) to the PATH
environment variable.
For the OpenCV library, add the following four folders from the installation folder to the PATH
variable: ...\build\java
, ...\build\java\x64
, ...\build\x64\vc14\bin
, ...\build\x64\vc15\bin
for 64-bit operating system - for 32-bit operating system the last three folders should be selected from the path with the x86
prefix instead of x64
.
To clone the repository in the command line, you must install the version control system Git.
- Clone the repository to the selected folder (or download and unpack the .zip package with the code)
git clone https://github.com/pkacperski/mobile-platform-repo.git
- Go to the main project folder
cd mobile-platform-repo
- Launch the backend application
cd mobileplatform-backend
mvn spring-boot: run
- Launch the frontend application (in a new tab / new terminal window)
cd mobileplatform-frontend
mvn clean install
java -jar target\mobileplatform-frontend-1.0-SNAPSHOT.jar
Then it is possible to add test data in OpenAPI Swagger Editor or using [test data generator] (https://github.com/pawelzakieta97/platforma-mobile-control).
- Download and install PostgreSQL, then add the
bin
folder to thePATH
variable - Create an empty PostgreSQL database (e.g. in DBeaver)
Run DBeaver and add a new connection to the database by selecting:
File -> New -> DBeaver -> Database Connection -> PostgreSQL -> Next
In thepassword
field, enter the selected database password and then set the same password in theapplication.properties
file in themobileplatform-backend\src\main\resources\
folder. The rest of the settings remain unchanged. Create a connection by clicking on 'Finish'.
Then right-click on the newly added connection and selectCreate -> Database
, and in theDatabase name:
field entermobileplatform
. - Clone the repository to the selected folder (or download and unpack the .zip package with the code from the address
https://github.com/pkacperski/mobile-platform-repo/tree/production
)
git clone https://github.com/pkacperski/mobile-platform-repo.git
- Go to the main project folder
cd mobile-platform-repo
- Move to branch 'production'
git checkout production
- Launch the backend and frontend applications - the steps are the same as steps 3, 4 in the developer mode.
Before starting the application, please make sure that no process is occupying ports with numbers from 8080 to 8087. Ports with these numbers must be free for the application to function properly
Projekt aplikacji kokpitu sterowniczego, realizowany w Zespole Platformy Mobilnej w Instytucie Automatyki i Informatyki Stosowanej Politechniki Warszawskiej.
Aplikacja podlega warunkom licencji MIT License.
Treść licencji i jej warunki zostały opisane w pliku LICENSE.txt.
Przed uruchomieniem aplikacji należy pobrać i zainstalować:
- Java Development Kit (JDK) w wersji 13 lub wyższej
- Maven w wersji 3 lub wyższej
- OpenCV w wersji 4.5.1
a następnie dodać foldery zawierające pliki wykonywalne (dla systemu Windows np. C:\Program Files\Java\jdk-13.0.2\bin
i C:\Program Files\apache-maven-3.8.2\bin
) do zmiennej środowiskowej PATH
.
Dla biblioteki OpenCV należy dodać do zmiennej PATH
następujące cztery foldery z folderu instalacji: ...\build\java
, ...\build\java\x64
, ...\build\x64\vc14\bin
, ...\build\x64\vc15\bin
dla 64-bitowego operacyjnego - dla systemu 32-bitowego trzy ostatnie foldery powinny zostać wybrane ze ścieżki z przedrostkiem x86
zamiast x64
.
Do klonowania repozytorium w wierszu poleceń konieczne jest zainstalowanie systemu kontroli wersji Git.
- Sklonowanie repozytorium do wybranego folderu (lub pobranie i rozpakowanie paczki .zip z kodem)
git clone https://github.com/pkacperski/mobile-platform-repo.git
- Przejście do głównego folderu projektu
cd mobile-platform-repo
- Uruchomienie aplikacji backendowej
cd mobileplatform-backend
mvn spring-boot:run
- Uruchomienie aplikacji frontendowej (w nowej karcie/nowym oknie terminala)
cd mobileplatform-frontend
mvn clean install
java -jar target\mobileplatform-frontend-1.0-SNAPSHOT.jar
Następnie jest możliwe dodawanie danych testowych w narzędziu OpenAPI Swagger Editor lub z wykorzystaniem generatora danych testowych.
- Pobranie i instalacja PostgreSQL, a następnie dodanie folderu
bin
do zmiennejPATH
- Utworzenie pustej bazy danych PostgreSQL (np. w programie DBeaver)
Należy uruchomić program DBeaver i dodać nowe połączenie z bazą danych wybierając kolejno:
File -> New -> DBeaver -> Database Connection -> PostgreSQL -> Next
W polupassword
należy wpisać wybrane hasło do bazy danych i następnie to samo hasło ustawić w plikuapplication.properties
w folderzemobileplatform-backend\src\main\resources\
. Reszta ustawień pozostaje niezmieniona. Należy utworzyć połączenie klikającFinish
.
Następnie należy kliknąć prawym przyciskiem myszy na nowo dodanym połączeniu i wybraćCreate -> Database
, a w poluDatabase name:
wpisaćmobileplatform
. - Sklonowanie repozytorium do wybranego folderu (lub pobranie i rozpakowanie paczki .zip z kodem spod adresu
https://github.com/pkacperski/mobile-platform-repo/tree/production
)
git clone https://github.com/pkacperski/mobile-platform-repo.git
- Przejście do głównego folderu projektu
cd mobile-platform-repo
- Przejście na branch 'production'
git checkout production
- Uruchomienie aplikacji backendowej i frontendowej - tak samo jak w krokach 3, 4 w trybie deweloperskim.
Przed uruchomieniem aplikacji warto upewnić się, że żaden proces nie zajmuje portów o numerach od 8080 do 8087.
Porty o tych numerach muszą być wolne dla poprawnego działania aplikacji.