Skip to content

Commit

Permalink
Merge Updated building instructions (mr-485)
Browse files Browse the repository at this point in the history
160c823 - tweak(build): updated building instructions
  • Loading branch information
prikolium-cfx committed Aug 26, 2024
2 parents d5255f9 + 160c823 commit 9409569
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

To build FiveM, RedM or FXServer on Windows you need the following dependencies:

* A Windows machine with Visual Studio 2019 (Build Tools/Community is fine) installed with the following workloads:
- .NET desktop environment
- Desktop development with C++
- Universal Windows Platform development
* [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (Community edition or higher) including the following:
- Workloads
- .NET desktop development
- Desktop development with C++
- Windows application development
- Individual components
- .NET Framework 4.6 targeting pack
- Windows 11 SDK (10.0.22000.0)

You can install these workloads by going to "Tools" -> "Get Tools and Features..." -> Check the checkboxes -> Click "Modify" in the bottom right corner.

Expand All @@ -23,13 +27,16 @@ git clone https://github.com/citizenfx/fivem.git -c core.symlinks=true
cd fivem
git submodule update --jobs=16 --init
:: If you're using Python 3.12 or higher you may need to install setuptools
:: pip install setuptools
:: if you're using Python 3.12 or higher make sure you install the setuptools package
pip install setuptools
:: downloads the right Chrome version for 64-bit projects
fxd get-chrome
:: or -game server/-game rdr3/-game ny
:: build bindings of game natives.
prebuild
:: or -game server/-game rdr3
fxd gen -game five
fxd vs -game five
```
Expand All @@ -40,16 +47,20 @@ After building the FiveM client, you should be having files such as `/code/bin/f

**Symlink `game-storage` directory** (optional)

The `/code/bin/five/debug/data/game-storage` directory can get quite large and is equivalent to the `%LocalAppData%/FiveM/FiveM.app/data/game-storage` directory, so you should use a **symlink** to save disk space.
The `code\bin\five\debug\data\game-storage` directory can get quite large and is equivalent to the `%LocalAppData%\FiveM\FiveM.app\data\game-storage` directory, so you should use a **symlink** to save disk space.

If you don't know how to do that, here's how:

1. Navigate to `/code/bin/five/debug`.
2. Delete the `game-storage` folder in `data` if it already exists.
3. Make a new `data` directory if it doesn't already exist.
4. Hold <kbd>Shift</kbd>, right click empty space in `/code/bin/five/debug/data`, and select "Open PowerShell window here".
5. Type this: `New-Item -ItemType SymbolicLink -Path "game-storage" -Target "$env:localappdata/FiveM/FiveM.app/data/game-storage"`.
6. You should now see a `game-storage` folder inside `/code/bin/five/debug/data`.
1. Navigate to `code\bin\five\debug` in your `fivem` source repository.
2. Make a new `data` directory if it doesn't already exist.
3. Delete the `game-storage` folder in `data` if it already exists.
4. Hold <kbd>Shift</kbd>, right click empty space while in `code\bin\five\debug\data`, and select "Open PowerShell window here".
5. Type in the following commands:
```
cmd
mklink /d game-storage "%localappdata%\FiveM\FiveM.app\data\game-storage"
```
6. You should now see a `game-storage` folder inside `code\bin\five\debug\data`.

**Known issues**

Expand All @@ -65,3 +76,8 @@ If you don't know how to do that, here's how:
- Windows error code 127.

Add an antivirus exclusion for the repository, try rebuilding, and see if it works this time.

- error CS0234: The type or namespace name 'API' does not exist in the namespace 'CitizenFX.Core.Native' (are you missing an assembly reference?)
- error CS0246: The type or namespace name 'Hash' could not be found (are you missing a using directive or an assembly reference?)

`fxd gen` ran before `prebuild`. Close the solution, re-run `fxd gen` and then reopen & build the solution again.

0 comments on commit 9409569

Please sign in to comment.