Windows MSVC (requires MSVC, i.e. Microsoft Visual C++)
Prerequisites
- Make sure
cargois installed. Check usingcargo -Vin Command Prompt (cmd) or PowerShell. If you see one of the following:'cargo' is not recognized as an internal or external command, operable program or batch file.cargo : The term 'cargo' is not recognized as the name of a cmdlet, function, script file, or operable program.- Click here to follow the installation steps.
- Download the source code from GitHub:
- If git is installed, run
git clone https://github.com/TeamFlos/phira.gitto clone the repository. - If git is not installed, go to the Phira repository page, click the Code button, select
Download ZIP, and extract to any local directory. - GitHub should be your primary source. Use a Git mirror or accelerator only if GitHub is genuinely inaccessible for you.
- To build a specific version, go to the release page and download
Source code(zip)from Assets. - Warning: To avoid hard-to-diagnose build issues, we recommend using a path that contains only ASCII characters.
- If git is installed, run
- For static library files, download from ESA or EdgeOne and extract to the project root. If prompted to overwrite, click overwrite.
- Ensure you have
x64 Native Tools Command Prompt for VS 20**. If you have cargo but not this environment, installVisual Studio 20xxseparately, selectingMSVCandWindows SDKcomponents during installation. After installation, you will havex64 Native Tools Command Prompt for VS 20**.- If you don't have cargo yet, follow step 1 to install it; you will also get
x64 Native Tools Command Prompt for VS 20**.
- If you don't have cargo yet, follow step 1 to install it; you will also get
Building
- Open
x64 Native Tools Command Prompt for VS 20**and navigate to the project root (e.g.,D:\phira\). Note: Do NOT use regular cmd or PowerShell. - Run
cargo build -r --bin phira-main. If building an older version, the terminal may hang atopenssl-sys(build)for a long time — this is normal, do not exit. - After the build, find the compiled binary in
.\target\release\. - Copy all files from
.\assets\to.\target\release\assets\. The build is now complete. Runphira-main.exeto check that resource files are intact.
- Note: At the time this document was written, the repository did not include a complete set of resource files. If the program crashes on startup, download any package from the Releases page and copy the missing resource files from there.
Troubleshooting
Q. Error: failed to send request: connection timed out
A. Check your network first and make sure GitHub is accessible. Mirrors should be treated as a fallback, not the default source.
Q. Error: failed to send request: unable to resolve server name or address
A. Check or change your DNS settings, then flush the DNS cache.
Q. Build error contains: note: LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
A. Missing Windows SDK. Check that Windows SDK is correctly installed and try again.
Q. Not challenging enough?
A. Try the GNU build method instead — it's slightly harder.
A2. You could try compiling the static library yourself — definitely more challenging. But I doubt you came to the build guide for a challenge...