2023-04-30 19:56:24 +00:00
|
|
|
REM copy entry script
|
|
|
|
copy .\entry.py ..\api\entry.py
|
|
|
|
|
2023-04-30 19:24:43 +00:00
|
|
|
REM build bundle
|
2023-04-30 19:50:01 +00:00
|
|
|
pyinstaller win10.directml.dir.spec --noconfirm
|
2023-04-30 19:24:43 +00:00
|
|
|
|
2023-04-30 19:50:01 +00:00
|
|
|
REM copy additional dirs
|
2023-12-31 19:00:50 +00:00
|
|
|
xcopy .\gfpgan .\dist\server\_internal\gfpgan /s /e /f /i /y
|
2023-04-30 19:50:01 +00:00
|
|
|
xcopy ..\api\gui .\dist\client /s /e /f /i /y
|
|
|
|
xcopy ..\api\schemas .\dist\schemas /s /e /f /i /y
|
|
|
|
xcopy ..\docs .\dist\docs /s /e /f /i /y
|
|
|
|
xcopy ..\models .\dist\models /s /e /f /i /y
|
|
|
|
xcopy ..\outputs .\dist\outputs /s /e /f /i /y
|
|
|
|
|
|
|
|
REM copy loose files
|
2023-04-30 22:26:13 +00:00
|
|
|
copy .\onnx-web-full.bat .\dist\onnx-web-full.bat /y
|
|
|
|
copy .\onnx-web-half.bat .\dist\onnx-web-half.bat /y
|
2023-04-30 19:52:02 +00:00
|
|
|
copy .\README.txt .\dist\README.txt
|
2023-04-30 19:50:01 +00:00
|
|
|
copy ..\api\logging.yaml .\dist\logging.yaml /y
|
|
|
|
copy ..\api\params.json .\dist\params.json /y
|
|
|
|
|
|
|
|
REM set version number
|
|
|
|
set BUNDLE_TYPE=rc
|
2023-12-31 20:15:31 +00:00
|
|
|
set BUNDLE_VERSION=0.12.0
|
2023-04-30 19:24:43 +00:00
|
|
|
|
|
|
|
REM get commit info
|
|
|
|
git rev-parse HEAD > commit.txt
|
|
|
|
set /p GIT_SHA=<commit.txt
|
2023-04-30 19:50:01 +00:00
|
|
|
set GIT_HEAD=%GIT_SHA:~0,8%
|
2023-04-30 19:24:43 +00:00
|
|
|
|
2023-07-01 03:32:43 +00:00
|
|
|
REM create version file
|
|
|
|
echo "%BUNDLE_VERSION%-%BUNDLE_TYPE%-%GIT_HEAD%" > .\dist\version.txt
|
|
|
|
|
2023-04-30 19:24:43 +00:00
|
|
|
REM create archive
|
2023-04-30 22:19:29 +00:00
|
|
|
"C:\Program Files\7-Zip\7z.exe" a .\dist\onnx-web-v%BUNDLE_VERSION%-%BUNDLE_TYPE%-%GIT_HEAD%.zip ".\dist\*"
|