diff options
Diffstat (limited to 'GUI/Libraries/fetch.ps1')
| -rw-r--r-- | GUI/Libraries/fetch.ps1 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/GUI/Libraries/fetch.ps1 b/GUI/Libraries/fetch.ps1 index f13bad5..218d48b 100644 --- a/GUI/Libraries/fetch.ps1 +++ b/GUI/Libraries/fetch.ps1 @@ -12,6 +12,15 @@ $WHISPER_1_7_0_URL = "https://github.com/Const-me/Whisper/releases/download/1.7. $WHISPER_URL = $WHISPER_1_7_0_URL $WHISPER_FILE = $(Split-Path -Path $WHISPER_URL -Leaf) +$OATPP_1_3_0_URL = "https://github.com/oatpp/oatpp/archive/refs/tags/1.3.0.zip" +$OATPP_URL = $OATPP_1_3_0_URL +$OATPP_FILE = $(Split-Path -Path $OATPP_URL -Leaf) +$OATPP_VER = $OATPP_FILE -replace '\.[a-z\.]*$' +$OATPP_DIR = "oatpp-$OATPP_VER" + +$NPROC = $(Get-CimInstance Win32_Processor).NumberOfCores +echo "nproc: $NPROC" + pushd $PSScriptRoot # WX @@ -61,6 +70,28 @@ if (-Not (Test-Path whisper)) { popd > $null } +if ((Test-Path oatpp) -And ($overwrite)) { + rm -Recurse oatpp +} + +if (-Not (Test-Path oatpp)) { + mkdir oatpp + pushd oatpp > $null + Invoke-WebRequest $OATPP_URL -OutFile $OATPP_FILE + Expand-Archive $OATPP_FILE -DestinationPath . + if (Test-Path ../../GUI/GUI/oatpp/) { + rm -Recurse ../../GUI/GUI/oatpp/ + } + mkdir ../../GUI/GUI/oatpp/ + pushd $OATPP_DIR > $null + mkdir build + pushd build > $null + cmake.exe .. -DCMAKE_BUILD_TYPE=Release -DOATPP_BUILD_TESTS=OFF + cmake.exe --build . -j $NPROC --config Release + popd > $null + popd > $null +} + popd > $null # rapidyaml popd > $null # $PSScriptRoot |
