From 0111a26a5526fe5f01c0dc3b4d4391af4234c2a7 Mon Sep 17 00:00:00 2001 From: yum Date: Sun, 18 Dec 2022 20:36:42 -0800 Subject: Now it's possible to build the app from Powershell No more WSL dependencies! --- GUI/.gitignore | 3 ++- GUI/Libraries/fetch.ps1 | 20 ++++++++++++++++++++ GUI/Libraries/fetch.sh | 14 -------------- GUI/README.md | 6 +++--- GUI/package.ps1 | 2 +- 5 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 GUI/Libraries/fetch.ps1 delete mode 100644 GUI/Libraries/fetch.sh (limited to 'GUI') 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 -- cgit v1.2.3