more minor changes to fix compilation issues
This commit is contained in:
@@ -12,14 +12,14 @@ From the repository root, run:
|
|||||||
.\scripts\build.ps1
|
.\scripts\build.ps1
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds the Release executable. To build Debug or choose a different build directory, use:
|
This builds the Release executable and refreshes the root `compile_commands.json` for clangd. To build Debug or choose a different build directory, use:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
.\scripts\build.ps1 -Configuration Debug
|
.\scripts\build.ps1 -Configuration Debug
|
||||||
.\scripts\build.ps1 -BuildDirectory build-custom
|
.\scripts\build.ps1 -BuildDirectory build-custom
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, the executable is written to `build\bin\release\LumberJack.exe`.
|
By default, the executable is written to `build-ninja\bin\release\LumberJack.exe`.
|
||||||
|
|
||||||
## Other platforms
|
## Other platforms
|
||||||
|
|
||||||
|
|||||||
@@ -209,14 +209,14 @@ int main() {
|
|||||||
|
|
||||||
|
|
||||||
// ── 4. Setup-screen components ────────────────────────────────────────────
|
// ── 4. Setup-screen components ────────────────────────────────────────────
|
||||||
Component input_log = Input(&log_file_path, "Enter path to log file...");
|
auto input_log = Input(&log_file_path, "Enter path to log file...");
|
||||||
Component input_mmdb = Input(&mmdb_path, "Enter path to MaxMind MMDB...");
|
auto input_mmdb = Input(&mmdb_path, "Enter path to MaxMind MMDB...");
|
||||||
Component submit_button = Button(" Start Log Monitor ", run_log_parsing, ButtonOption::Animated());
|
auto submit_button = Button(" Start Log Monitor ", run_log_parsing, ButtonOption::Animated());
|
||||||
|
|
||||||
auto setup_container = Container::Vertical({input_log, input_mmdb, submit_button});
|
auto setup_container = Container::Vertical({input_log, input_mmdb, submit_button});
|
||||||
|
|
||||||
// ── 5. Search input (dashboard) ───────────────────────────────────────────
|
// ── 5. Search input (dashboard) ───────────────────────────────────────────
|
||||||
Component search_input = Input(&search_query, "Type to filter records (IP, request, status, etc.)...");
|
auto search_input = Input(&search_query, "Type to filter records (IP, request, status, etc.)...");
|
||||||
|
|
||||||
// ── 6. Main renderer ──────────────────────────────────────────────────────
|
// ── 6. Main renderer ──────────────────────────────────────────────────────
|
||||||
auto main_components = Container::Vertical({
|
auto main_components = Container::Vertical({
|
||||||
|
|||||||
+9
-1
@@ -1,7 +1,7 @@
|
|||||||
param(
|
param(
|
||||||
[ValidateSet("Debug", "Release")]
|
[ValidateSet("Debug", "Release")]
|
||||||
[string]$Configuration = "Release",
|
[string]$Configuration = "Release",
|
||||||
[string]$BuildDirectory = "build"
|
[string]$BuildDirectory = "build-ninja"
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
@@ -31,6 +31,13 @@ if ($LASTEXITCODE -ne 0) {
|
|||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$compilationDatabase = Join-Path $buildPath "compile_commands.json"
|
||||||
|
if (-not (Test-Path $compilationDatabase)) {
|
||||||
|
Write-Error "CMake did not generate compile_commands.json at '$compilationDatabase'."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
Copy-Item -LiteralPath $compilationDatabase -Destination (Join-Path $sourceDirectory "compile_commands.json") -Force
|
||||||
|
|
||||||
& cmake --build $buildPath --config $Configuration
|
& cmake --build $buildPath --config $Configuration
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
@@ -38,3 +45,4 @@ if ($LASTEXITCODE -ne 0) {
|
|||||||
|
|
||||||
$outputPath = Join-Path $buildPath "bin\$($Configuration.ToLowerInvariant())\LumberJack.exe"
|
$outputPath = Join-Path $buildPath "bin\$($Configuration.ToLowerInvariant())\LumberJack.exe"
|
||||||
Write-Host "Build complete: $outputPath"
|
Write-Host "Build complete: $outputPath"
|
||||||
|
Write-Host "Updated compile_commands.json for clangd."
|
||||||
|
|||||||
Reference in New Issue
Block a user