Difference between revisions of "Fs2 open on Linux/Acquiring the Code"
(Guide to acquire the source code from GitHub) |
|||
| Line 64: | Line 64: | ||
<hr> | <hr> | ||
| − | < | + | <h1>⚠️ ATTENTION</h1> |
<ul> | <ul> | ||
<li>Please clone the repository recursively. If not cloned recursively, the code may not compile on your machine.</li> | <li>Please clone the repository recursively. If not cloned recursively, the code may not compile on your machine.</li> | ||
Latest revision as of 06:05, 22 April 2025
| « Installing the Development Libraries | The fs2_open on Linux Guide Acquiring the Code |
Pre-Compile Configuration » |
This guide will walk the user through on how to acquire and download the source code locally to their machine.
Contents
For New Users
This section of the code will explain on how to acquire the source code and download it to your system. For the sake of simplicity to new users, I am using Visual Studio Code to demonstrate on how to clone the source code.
📖 Prerequisites
The following accounts will be required to get started with acquiring and downloading the code.
- git program
- GitHub Account
- Visual Studio Code
ℹ️ INFORMATION
You will need to sign in to the GitHub account within Visual Studio Code to download the code seamlessly.
✅ Forking And Downloading The Code
It is usually a good practice to fork the code locally to your GitHub account. This will help in opening Pull Requests (PRs). On the FreeSpace Open GitHub page, please fork the code by pressing the fork button and following the instructions on the page.
Once the code has been forked, open the Visual Studio Code editor. In the editor, open the command palette (CTRL + SHIFT + P) and type
$ git clone (recursive)
A window shall pop up, asking where the files need to be cloned to. Please choose a location where the user has write access to, preferably under $HOME/$USER. For the sake of simplicity, I will be using
$HOME/$USER/Projects
The path to the FSO code should look like
$HOME/$USER/Projects/fs2open.github.com
If everything is done correctly, you'll be able to see the files in the Explorer tab in Visual Studio Code.
For Advanced Users
This section is for users who are already familiar with the git commands.
✅ Download The Repository Using Git
This requires the user to have downloaded and configured git on their system. Please see Installing Git in case git has not been downloaded and configured.
To download the repository using git, the following command needs to be entered in a terminal:
$ git clone --recurse-submodules https://github.com/scp-fs2open/fs2open.github.com.git
Please be advised that the repository needs to be cloned to a location with read and write access to the user. A good location would be in
$HOME/$USER
⚠️ ATTENTION
- Please clone the repository recursively. If not cloned recursively, the code may not compile on your machine.
- In case you have cloned the code non-recursively, please remove the project directory and clone it recursively.
Once done, congratulations! You have the source code ready to be built!