Difference between revisions of "Fs2 open on Linux/Acquiring the Code"
m (Stable branch clarifications) |
|||
| (8 intermediate revisions by 8 users not shown) | |||
| Line 3: | Line 3: | ||
CurrentPage=Acquiring the Code|Acquiring the Code| | CurrentPage=Acquiring the Code|Acquiring the Code| | ||
PrevPage=[[Fs2_open on Linux/Installing the Development Libraries|Installing the Development Libraries]]| | PrevPage=[[Fs2_open on Linux/Installing the Development Libraries|Installing the Development Libraries]]| | ||
| − | NextPage=[[ | + | NextPage=[[Fs2 open on Linux/Pre-Compile Configuration|Pre-Compile Configuration]]}} |
<p></p> | <p></p> | ||
{{Note| This step is only for those who want the bleeding-edge source code to compile on their own. You can skip this if you intend to use a provided binary | {{Note| This step is only for those who want the bleeding-edge source code to compile on their own. You can skip this if you intend to use a provided binary | ||
executable.}} | executable.}} | ||
| − | |||
| − | + | This guide will walk the user through on how to acquire and download the source code locally to their machine. | |
| − | + | ||
| − | This | + | <h1>For New Users</h1> |
| − | < | + | |
| − | + | 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. | |
| − | $ | + | |
| − | + | <h2>📖 Prerequisites</h2> | |
| − | + | ||
| − | + | The following accounts will be required to get started with acquiring and downloading the code. | |
| − | + | ||
| − | < | + | <ol> |
| + | <li>git program</li> | ||
| + | <li>GitHub Account</li> | ||
| + | <li>Visual Studio Code</li> | ||
| + | </ol> | ||
| + | |||
| + | <h3>ℹ️ INFORMATION</h3> | ||
| + | |||
| + | You will need to sign in to the GitHub account within Visual Studio Code to download the code seamlessly. | ||
| + | |||
| + | <h2>✅ Forking And Downloading The Code</h2> | ||
| + | |||
| + | 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. | ||
| + | |||
| + | <h1>For Advanced Users</h1> | ||
| + | |||
| + | This section is for users who are already familiar with the git commands. | ||
| + | |||
| + | <h2>✅ Download The Repository Using Git</h2> | ||
| + | |||
| + | This requires the user to have downloaded and configured git on their system. Please see [[Fs2_open_on_Linux/Installing Git|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 | ||
| + | |||
| + | <hr> | ||
| + | |||
| + | <h1>⚠️ ATTENTION</h1> | ||
| + | <ul> | ||
| + | <li>Please clone the repository recursively. If not cloned recursively, the code may not compile on your machine.</li> | ||
| + | <li>In case you have cloned the code non-recursively, please remove the project directory and clone it recursively.</li> | ||
| + | </ul> | ||
| + | |||
| + | <BR> | ||
| + | |||
| + | Once done, congratulations! You have the source code ready to be built! | ||
| + | |||
| + | [[Category:FreeSpace Open on Linux|Acquiring the Code]] | ||
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!