|
|
[System](https://gitlab.stud.idi.ntnu.no/gruppe-12/picturerama/-/wikis/System)
|
|
|
# Table of content
|
|
|
|
|
|
[Installation manual picturerama.docx](uploads/debabb50a7a69ec202b9c77fd626532d/Installation_manual_picturerama.docx) |
|
|
\ No newline at end of file |
|
|
- Cloning the project
|
|
|
- Importing and opening the project with IntelliJ
|
|
|
- Fixing modules
|
|
|
- Setting up the Database
|
|
|
|
|
|
You can find a video tutorial for this manual by following this link: [https://youtu.be/5MvVc33qKwY](https://youtu.be/5MvVc33qKwY)
|
|
|
|
|
|
## Cloning the project
|
|
|
|
|
|
We assume you have IntelliJ IDEA installed on your computer, as well as downloaded Java 12 SDK.
|
|
|
|
|
|
Make sure you have installed git on your computer. If you have not done it yet, you can download git by following this link: [https://git-scm.com/downloads](https://git-scm.com/downloads)
|
|
|
|
|
|
After you have installed git, navigate to or create a folder on your computer you want to save the project in. Right click inside the folder with your mouse and click on "Git Bash Here" (for Windows) or "open a new terminal here" (for Mac). A terminal should show up (_Screenshot 1)_.
|
|
|
|
|
|
![image](uploads/45b9cd884f29e21ab78417641525882d/image.png)
|
|
|
|
|
|
_Screenshot 1_
|
|
|
|
|
|
Copy this command: `git clone https://gitlab.stud.idi.ntnu.no/gruppe-12/picturerama.git` and paste it inside the terminal by right clicking in the terminal and then clicking "Paste" or "Paste into the terminal". Click "Enter" and wait for the terminal to stop printing out text. The terminal should have displayed a message saying "100%, done". It should look something like _Screenshot 2_.
|
|
|
|
|
|
![image](uploads/5f6adfb9736bdfde0588235261a56588/image.png)
|
|
|
|
|
|
_Screenshot 2_
|
|
|
|
|
|
You can now exit the terminal by clicking on the exit button in the top right corner or typing "exit
|
|
|
2 and pressing "Enter".
|
|
|
|
|
|
## Importing and opening the project with IntelliJ
|
|
|
|
|
|
You have now cloned the project and you can open it in IntelliJ. On IntelliJ's main window click "Open or Import", or "Import Project" for older versions of IntelliJ (_Screenshot 3_).
|
|
|
|
|
|
![image](uploads/e5228dd65d1514a38d8942e54758dd32/image.png)
|
|
|
|
|
|
_Screenshot 3_
|
|
|
|
|
|
Afterwards, navigate to the folder where you cloned the project to. Inside that folder there should now be a new folder called "picturerama". Choose the "picturerama" folder and click OK. IntelliJ should then open the project.
|
|
|
|
|
|
Some older versions of IntelliJ require extra steps for importing the project. If a new window like in _Screenshot 4_ pops up, follow these steps from here. If the project opens up without any extra windows, you can skip this "Fixing modules" section on page 8.
|
|
|
|
|
|
In this new window, choose "Import project from external model" at the top, select Maven and click "Next" (_Screenshot 4_).
|
|
|
|
|
|
![image](uploads/9eb3b86092d044dc13168e5a73adc09d/image.png)
|
|
|
|
|
|
_Screenshot 4_
|
|
|
|
|
|
A new window shows up. Do not change anything and click "Next". Now you should see a window saying "Select Maven projects to import". Make sure "12:Picturerama:1.0 is checked and click "Next" (_Screenshot 5_).
|
|
|
|
|
|
![image](uploads/6c30565fa5900e489801190a76dba09d/image.png)
|
|
|
|
|
|
_Screenshot 5_
|
|
|
|
|
|
Select Java SDK 12 from the list on the left. If you can't find it in the list, click on "Add New SDK" button (marked as a plus sign), click on "JDK", navigate to the folder where you have installed Java JDK 12 and click "OK". When you have selected Java SDK 12 (_Screenshot 6_), click "Next".
|
|
|
|
|
|
![image](uploads/5c479d71c2d6d30ba19feb4fadca6b89/image.png)
|
|
|
|
|
|
_Screenshot 6_
|
|
|
|
|
|
Do not change the name or file location, just click "Finish" and IntelliJ should open the project.
|
|
|
|
|
|
## Fixing modules
|
|
|
|
|
|
To make sure you see Maven resolving dependencies, navigate and open the _pom.xml_ file in the project, right click in it, go down to Maven and click "Reimport" (_Screenshot 7_).
|
|
|
|
|
|
![image](uploads/8a76cff905770e066f447d8037f3e9d7/image.png)
|
|
|
|
|
|
_Screenshot 7_
|
|
|
|
|
|
Now navigate to Project Structure by clicking on File -> Project Structure.
|
|
|
|
|
|
![image](uploads/635fe9fb7a3f1dcb89b00f7e050c304c/image.png)
|
|
|
|
|
|
_Screenshot 8_
|
|
|
|
|
|
Navigate to Modules. Click on the little arrow next to "src" folder to expand the folder. Likewise expend the "main" folder. Select the folder named "App" and click on "Sources" button above where it says "Mark as". The "App" folder icon should turn to blue color. Now select the "Test" folder and click on "Tests" button above. The icon next to the folder should turn to green color. It should look like it is shown in _Screenshot 9_ bellow. If it does, click "Apply" and OK.
|
|
|
|
|
|
![image](uploads/c25b22ba39791e92cffd0a80819d5e33/image.png)
|
|
|
|
|
|
_Screenshot 9_
|
|
|
|
|
|
## Setting up the Database
|
|
|
|
|
|
Follow the readme.md file under "Installing" on GitLab to setup the database:
|
|
|
|
|
|
[https://gitlab.stud.idi.ntnu.no/gruppe-12/picturerama/-/blob/dev/readme.md](https://gitlab.stud.idi.ntnu.no/gruppe-12/picturerama/-/blob/dev/readme.md)
|
|
|
|
|
|
Starting the App
|
|
|
|
|
|
#### Step 1)
|
|
|
|
|
|
Go to View -> Tool Windows -> Maven or click Maven on the right side of the IntelliJ window, as shown with the red arrows in _Screenshot 10_ bellow. Maven tool window should pop out.
|
|
|
|
|
|
![image](uploads/8476835e680b73cf8da6a640269703a5/image.png)
|
|
|
|
|
|
_Screenshot 10_
|
|
|
|
|
|
#### Step 2)
|
|
|
|
|
|
To run the program, you first need to compile it with Maven JavaFX. Locate the JavaFX compiler plugin (javafx:compile) under Plugins -> javafx (_Screenshot 11_), and either double-left-click it or right-click it and click on "Run Maven Build". Wait for it to finish compiling and then click the green hammer (Build Project) at the top in IntelliJ. Wait for the build to finish.
|
|
|
|
|
|
![image](uploads/34a4abb06a1078c9f02d2ef108883694/image.png)
|
|
|
|
|
|
_Screenshot 11_
|
|
|
|
|
|
Finally, right click javafx:run and click "Run Picturerama" like in _Screenshot 12_ (it might also say "Run unnamed"). This will set your run button in IntelliJ to run the project automatically with that Maven plugin. Therefore, you can now use the play button in IntelliJ to easily run the project.
|
|
|
|
|
|
![image](uploads/207f4e7dc534b177c5f7c77cd5b20c56/image.png)
|
|
|
|
|
|
_Screenshot 12_ |
|
|
\ No newline at end of file |