CORE/docs/docs/getting-started/setting-up.mdx

149 lines
4.4 KiB
Text

---
sidebar_position: 0
---
# Setting up
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
This helps you install the CORE Framework in the first place.
## Available branches
You can choose one of the following branches to install CORE with:
<Tabs groupId="explanation">
<TabItem value="develop" label="develop">
The **develop** branch features the latest commits to the framework but contains experimental and breaking changes.
It should never be used in production, not even in testing *unless* you know what you're doing or directly contributing to the framework.
</TabItem>
<TabItem value="stable" label="stable">
The **stable** branch features the latest update to the framework and does not break often. Alphas, betas and release candidates will not show up on the stable branch, only releases will.
This branch of the framework should always be used in production and testing as it doesn't break without a framework-breaking bug or you not being able to read the changelog correctly.
</TabItem>
</Tabs>
## Using the Godot Asset Library
:::note
This will install the CORE Framework without the ability to easily download updates. You will need to look for updates yourself and install the latest version from the Asset Library yourself. If you don't want that hassle, use a [git installation](#using-git) instead.
:::
This will install the latest *stable* version.
1. Open your project in the Godot Editor and click on the **AssetLib** tab
2. Search for `CORE Framework`
3. Click on the first result and hit **Install**
4. Follow the usual asset installation procedure
## Using git
Using git to manage a CORE installation is a bit harder than [using Godot's Asset Library](#using-the-godot-asset-library), but comes with more advantages. One of them being able to switch branches or trying out experimental features.
:::note
You'll need to execute all commands in your project root.
:::
### Installing CORE
<Tabs groupId="git">
<TabItem value="direct-develop" label="Develop branch">
```bash
git clone https://git.staropensource.de/StarOpenSource/CORE-distrib-git.git CORE
cd CORE
git checkout develop
```
</TabItem>
<TabItem value="direct-stable" label="Stable branch" default>
```bash
git clone https://git.staropensource.de/StarOpenSource/CORE-distrib-git.git CORE
cd CORE
git checkout stable
```
</TabItem>
<TabItem value="submodule-develop" label="Develop branch (submodule)">
```bash
git submodule add https://git.staropensource.de/StarOpenSource/CORE-distrib-git.git CORE
cd CORE
git checkout develop
```
</TabItem>
<TabItem value="submodule-stable" label="Stable branch (submodule)">
```bash
git submodule add https://git.staropensource.de/StarOpenSource/CORE-distrib-git.git CORE
cd CORE
git checkout stable
```
</TabItem>
</Tabs>
### Updating CORE
<Tabs groupId="git">
<TabItem value="direct-develop" label="Develop branch">
```bash
cd CORE
git pull
```
</TabItem>
<TabItem value="direct-stable" label="Stable branch" default>
```bash
cd CORE
git pull
```
</TabItem>
<TabItem value="submodule-develop" label="Develop branch (submodule)">
```bash
cd CORE
git pull origin develop
cd ..
git add CORE
git commit -m "Update CORE Framework"
```
</TabItem>
<TabItem value="submodule-stable" label="Stable branch (submodule)">
```bash
cd CORE
git pull origin stable
cd ..
git add CORE
git commit -m "Update CORE Framework"
```
</TabItem>
</Tabs>
## Changing branches
:::warning
Changing branches is not supported by the CORE Framework maintainers and contributors.
Doing so anyway will result in missing features, potential refactoring work and you need to manually review every single commit since the last release (if coming from the stable branch). \
\
**Again, we don't recommend switching branches. Doing so anyway may lead to issues!**
:::
<Tabs groupId="git-branch">
<TabItem value="direct-develop2stable" label="Develop » Stable">
```bash
cd CORE
git fetch
git checkout stable
```
</TabItem>
<TabItem value="direct-stable2develop" label="Stable » Develop" default>
```bash
cd CORE
git fetch
git checkout develop
```
</TabItem>
<TabItem value="submodule-develop2stable" label="Develop » Stable (submodule)">
```bash
cd CORE
git fetch
git checkout stable
cd ..
git add CORE
git commit -m "Switch CORE branch from develop to stable"
```
</TabItem>
<TabItem value="submodule-stable2develop" label="Stable » Develop (submodule)">
```bash
cd CORE
git fetch
git checkout develop
cd ..
git add CORE
git commit -m "Switch CORE branch from stable to develop"
```
</TabItem>
</Tabs>