summaryrefslogtreecommitdiffstats
path: root/GUI/Libraries
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2023-02-22 18:40:09 -0800
committeryum <yum.food.vr@gmail.com>2023-02-22 21:54:27 -0800
commit4840ab9beb831ec68887a5199fbb50ae6932f498 (patch)
treeef8bde6f4da7b051c0336dd83977829ea06d5fee /GUI/Libraries
parentd701f80119ecb51366a45f429ec7006926527a40 (diff)
Checkpoint: begin work reimplementing processes
It appears that you cannot spawn a wxProcess from an independent thread of execution. I imagine they're supposed to be spawned from the main thread. Fuck that, I'm going to try to use the raw WIN32 API to spawn helper processes, and do it from arbitrary thread context. * Log() now delegates to a queue which the main thread periodically drains. * Log() now writes to a file. * WhisperCPP thread is now done with std::async. * Default chars per sync is now 8 * oatpp: Promising web framework.
Diffstat (limited to 'GUI/Libraries')
-rw-r--r--GUI/Libraries/.gitignore2
-rw-r--r--GUI/Libraries/fetch.ps131
2 files changed, 32 insertions, 1 deletions
diff --git a/GUI/Libraries/.gitignore b/GUI/Libraries/.gitignore
index 0e14a69..26be5d9 100644
--- a/GUI/Libraries/.gitignore
+++ b/GUI/Libraries/.gitignore
@@ -2,4 +2,4 @@
wx
rapidyaml
whisper
-
+oatpp
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