From 56728ff18698140f85fd9614b15ca379b68c7120 Mon Sep 17 00:00:00 2001 From: neru Date: Fri, 20 Mar 2026 12:37:40 -0300 Subject: [PATCH] build: define platform and restore sln --- create-project.ps1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/create-project.ps1 b/create-project.ps1 index a15c8bd..7c37795 100644 --- a/create-project.ps1 +++ b/create-project.ps1 @@ -5,13 +5,21 @@ function Initialize-Project { # generation Write-Host "Generating project" Set-Location $projectFolder - $cmakeProcess = Start-Process -FilePath cmake -ArgumentList @("..") -NoNewWindow -Wait -PassThru - Set-Location .. - if ($cmakeProcess.ExitCode -ne 0) { - Write-Host "CMake generation failed" + cmake .. -G "Visual Studio 17 2022" -A x64 ` + -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ` + -DCMAKE_VS_PLATFORM_NAME="x64" + + dotnet restore "$slnName.sln" --arch x64 + + $exitCode = $LASTEXITCODE + + if ($exitCode -ne 0) { + Write-Host "CMake generation failed with exit code: $exitCode" -ForegroundColor Red exit 1 } + + Set-Location .. # sln open try {