-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathGenerateProjectFiles.sh
More file actions
executable file
·36 lines (31 loc) · 1.45 KB
/
Copy pathGenerateProjectFiles.sh
File metadata and controls
executable file
·36 lines (31 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
#
# Regenerate IDE project files after adding or removing modules, plugins or sources, and the Unix
# counterpart to GenerateProjectFiles.bat. First-time setup is Setup.sh. Source files themselves
# are discovered at build time, so this is only needed to refresh what the editor sees.
#
# On this platform the artefact is compile_commands.json at the repository root, which is what
# clangd, CLion and the VS Code clangd extension read. No solution is generated: nothing here
# can open one.
#
# ./GenerateProjectFiles.sh
# ./GenerateProjectFiles.sh -Tracy=off persistent defaults live in Engine/Build/BuildConfiguration.json
set -uo pipefail
LuminaRoot="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export LUMINA_DIR="$LuminaRoot"
# dotnet-install.sh drops .NET in $HOME/.dotnet and persists nothing, so a new shell loses it and
# every script here fails claiming the SDK is missing when it is sitting right there.
if ! command -v dotnet >/dev/null 2>&1 && [ -x "$HOME/.dotnet/dotnet" ]; then
export PATH="$HOME/.dotnet:$PATH"
fi
if ! command -v dotnet >/dev/null 2>&1; then
echo "error: the .NET SDK is required to run LuminaBuildTool. Install .NET 10 or newer." >&2
exit 1
fi
# Extra arguments pass straight through.
# The tool reports what it wrote and where, so there is nothing to add here on success.
if ! "$LuminaRoot/LuminaBuild.sh" GenerateProjectFiles "$@"; then
echo
echo "Project generation failed." >&2
exit 1
fi