Files
msime-windows/windows/scripts/lcompile.ps1
T
Evan Hu 253b068984 refactor: move the Windows TSF frontend under windows/
Preparation for folding Server, UI, UiHtml, Installer, ImeLog and TsfEditControl into this repository. The Windows tip's own sources, build files and local build scripts move under windows/ so every component sits at the same level. Product-level files stay at the root: the lock, the release manifest, the shared CI scripts, the integration tests, the docs and the Engine submodule.
2026-09-06 02:24:27 +09:00

66 lines
1.5 KiB
PowerShell

# Generate and compile dll files
# Default is to compile 64-bit dll, if 32-bit is specified, 32-bit dll would be compiled
$currentDirectory = Get-Location
$cmakeListsPath = Join-Path -Path $currentDirectory -ChildPath "CMakeLists.txt"
if (-not (Test-Path $cmakeListsPath))
{
Write-Host("No CMakeLists.txt in current directory, please check.")
return
}
Write-Host "Start generating and compiling..."
$arch = $args[0]
if ($arch -eq "32")
{
$buildFolderPath = ".\build32"
if (-not (Test-Path $buildFolderPath))
{
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
Write-Host "build32 folder created."
}
cmake --preset=for32
if ($LASTEXITCODE -eq 0)
{
cmake --build ./build32/
}
} elseif ($arch -eq "64")
{
$buildFolderPath = ".\build64"
if (-not (Test-Path $buildFolderPath))
{
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
Write-Host "build64 folder created."
}
cmake --preset=for64
if ($LASTEXITCODE -eq 0)
{
cmake --build ./build64/
}
} else
{ # Default is 64-bit
$buildFolderPath = ".\build64"
if (-not (Test-Path $buildFolderPath))
{
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
Write-Host "build64 folder created."
}
cmake --preset=for64
if ($LASTEXITCODE -eq 0)
{
cmake --build ./build64/
}
}