Installing the CLI
Please refer to this guide for information on how to use the gcsim CLI.
You have two options to obtain the gcsim CLI (gcsim.exe):
- Downloading The CLI - recommended
- Building The CLI From Source
Assumptions
The following descriptions assume:
- Windows as the operating system
- main working folder where gcsim source code should be stored is called
TC
The file and folder names are just examples.
Downloading The CLI
The CLI (gcsim.exe) for the latest version of gcsim can be downloaded from the Releases page of gcsim's GitHub repository.
Building The CLI From Source
Setup
Install Go
gcsim is mainly written in a programming langugage called Go. Download and install the latest version of Go from here.
Install Git
gcsim uses Git for version control. Download and install the latest version of Git for Windows from here.
Install IDE (VS Code)
In order to have a smooth experience while navigating the gcsim source code, it is recommend to install an IDE. For this guide, it is recommended to download and install VS Code from here.
Download Source Code
To obtain the gcsim source code, you need to clone gcsim's GitHub repository into a folder of your choice.
- Start VS Code.
- Open the
TCfolder in VS Code. - Click on
Terminalin the top left menu. - Click on
New Terminal. This will open Powershell in theTCfolder. - Type
git clone https://github.com/genshinsim/gcsim.gitinto the Powershell window.
Your initial folder structure should now look like this:
└── TC
└── gcsim
Build The CLI (gcsim.exe)
- Start VS Code.
- Open the topmost
gcsimfolder in VS Code. - Click on
Terminalin the top left menu. - Click on
New Terminal. This will open Powershell in thegcsimfolder. - Type
cd cmd/gcsiminto the Powershell window. This will put you in the folder where you can build the CLI. - Type
go build. This will create agcsim.exein the current folder.
Now your folder structure should look like this:
└── TC
└── gcsim 🡐 VS Code is here
└── cmd
└── gcsim 🡐 VS Code's Powershell window is here
└── gcsim.exe
If you modified your local gcsim source code and would like to try out the changes in the CLI, then just build the CLI again.
Apply Updates
In order to keep your CLI up-to-date with changes made by the gcsim dev team, you need to do the following occasionally:
- Start VS Code.
- Open the topmost
gcsimfolder in VS Code. - Click on
Terminalin the top left menu. - Click on
New Terminal. This will open Powershell in thegcsimfolder. - Type
git pullinto the Powershell window. - Rebuild the
gcsim.exeas described in steps 5 and 6 in this section.