summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2022-12-18 20:36:42 -0800
committeryum <yum.food.vr@gmail.com>2022-12-18 20:36:42 -0800
commit0111a26a5526fe5f01c0dc3b4d4391af4234c2a7 (patch)
tree17469d9db468bfd9c6082c247cdc95f560db51e5
parent42e22cc25ffa66d936ca53171dc745b5fa799906 (diff)
Now it's possible to build the app from Powershell
No more WSL dependencies!
-rw-r--r--GUI/.gitignore3
-rw-r--r--GUI/Libraries/fetch.ps120
-rw-r--r--GUI/Libraries/fetch.sh14
-rw-r--r--GUI/README.md6
-rw-r--r--GUI/package.ps12
5 files changed, 26 insertions, 19 deletions
diff --git a/GUI/.gitignore b/GUI/.gitignore
index f327245..b847faa 100644
--- a/GUI/.gitignore
+++ b/GUI/.gitignore
@@ -1,2 +1,3 @@
-# ignore generated package directory
+# ignore generated package files
TaSTT
+TaSTT.zip
diff --git a/GUI/Libraries/fetch.ps1 b/GUI/Libraries/fetch.ps1
new file mode 100644
index 0000000..5f8d63e
--- /dev/null
+++ b/GUI/Libraries/fetch.ps1
@@ -0,0 +1,20 @@
+Set-PSDebug -trace 0
+
+$WX_3_2_1_URL = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.zip"
+$WX_URL = $WX_3_2_1_URL
+$WX_FILE = $(Split-Path -Path $WX_URL -Leaf)
+
+pushd $PSScriptRoot
+
+if (Test-Path wx) {
+ rm -Recurse wx
+}
+
+mkdir wx
+pushd wx > $null
+Invoke-WebRequest $WX_URL -OutFile $WX_FILE
+Expand-Archive $WX_FILE -DestinationPath .
+popd > $null
+
+popd > $null
+
diff --git a/GUI/Libraries/fetch.sh b/GUI/Libraries/fetch.sh
deleted file mode 100644
index dcf096c..0000000
--- a/GUI/Libraries/fetch.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-set -o errexit
-set -o xtrace
-
-WX_3_2_1_URL=https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.zip
-WX_URL=$WX_3_2_1_URL
-
-mkdir wx
-pushd wx >/dev/null
-wget $WX_URL
-unzip $(basename $WX_URL)
-popd >/dev/null
-
diff --git a/GUI/README.md b/GUI/README.md
index b03cace..079474d 100644
--- a/GUI/README.md
+++ b/GUI/README.md
@@ -1,7 +1,7 @@
## Build instructions
-0. Open WSL.
-1. Execute Libraries/fetch.sh.
+0. Open Powershell.
+1. Execute Libraries/fetch.ps1.
2. Install Visual Studio 2022.
3. Open Libraries/wx/build/msw/wx\_vc17.sln with Visual Studio 2022.
4. Build x64/Release.
@@ -19,7 +19,7 @@
that's hacked up to allow installing packages via pip. We use this
to install packages at runtime (like a net installer), so we don't
actually distribute all our transitive dependencies. This also keeps
- the package size small.
+ the initial package size small.
## C++ Style
diff --git a/GUI/package.ps1 b/GUI/package.ps1
index 36049b2..703518a 100644
--- a/GUI/package.ps1
+++ b/GUI/package.ps1
@@ -12,5 +12,5 @@ cp -Recurse ../Scripts TaSTT/Resources/Scripts
cp -Recurse ../Sounds TaSTT/Resources/Sounds
cp GUI/x64/Release/GUI.exe TaSTT/TaSTT.exe
-#Compress-Archive -Path "$install_dir" -DestinationPath "$install_dir.zip" -Force
+Compress-Archive -Path "$install_dir" -DestinationPath "$install_dir.zip" -Force