From a76ded2a98abcd716dab1c4a5780d32ee6e283e4 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 30 Apr 2023 14:24:43 -0500 Subject: [PATCH] fix(exe): add build script for Windows bundle --- exe/.gitignore | 4 ++++ exe/build.bat | 22 ++++++++++++++++++++++ exe/onnx-web-full.bat | 2 +- exe/onnx-web-half.bat | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 exe/.gitignore create mode 100644 exe/build.bat diff --git a/exe/.gitignore b/exe/.gitignore new file mode 100644 index 00000000..a6ac0212 --- /dev/null +++ b/exe/.gitignore @@ -0,0 +1,4 @@ +build/ +dist/ + +commit.txt \ No newline at end of file diff --git a/exe/build.bat b/exe/build.bat new file mode 100644 index 00000000..cc36b417 --- /dev/null +++ b/exe/build.bat @@ -0,0 +1,22 @@ +REM activate venv +..\api\onnx_env\Scripts\Activate.bat + +REM build bundle +pyinstaller win10.directml.dir.spec + +REM add additional files +xcopy \gfpgan \dist\server\gfpgan /t /e +xcopy ..\api\gui \dist\client /t /e +xcopy ..\api\schemas \dist\schemas /t /e +xcopy ..\api\logging.yaml \dist\logging.yaml +xcopy ..\api\params.json \dist\params.json +xcopy ..\docs \dist\docs /t /e +xcopy ..\models \dist\models /t /e +xcopy ..\outputs \dist\outputs /t /e + +REM get commit info +git rev-parse HEAD > commit.txt +set /p GIT_SHA=