-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.bat
executable file
·35 lines (27 loc) · 1.33 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
rmdir /Q /S "build" 2>NUL
rmdir /Q /S "dist/funscript-editor" 2>NUL
del "dist\\funscript-editor.zip" 2>NUL
del funscript-editor.spec 2>NUL
set CONDAPATH=%USERPROFILE%\Miniconda3
set ENVNAME=python-funscript-editor
if %ENVNAME%==base (set ENVPATH=%CONDAPATH%) else (set ENVPATH=%CONDAPATH%\envs\%ENVNAME%)
call %CONDAPATH%\Scripts\activate.bat base
if exist %ENVPATH% (
call conda env update --name %ENVNAME% --file environment_windows.yaml --prune
) else (
call conda env create -f environment_windows.yaml --name %ENVNAME%
)
call conda activate %ENVNAME%
cd docs/app
mkdocs build
cd ../..
pyinstaller --add-data="funscript_editor/config/*;funscript_editor/config/" --add-data="assets/*;./" --hidden-import "pynput.keyboard._win32" --hidden-import "pynput.mouse._win32" --noupx --icon=icon.ico funscript-editor.py
move "docs\\app\\site" "dist\\funscript-editor\\funscript_editor\\docs"
copy /Y "funscript_editor\\VERSION.txt" "dist\\funscript-editor\\funscript_editor"
md "dist\\funscript-editor\\OFS"
copy /Y "contrib\\Installer\\assets\\main.lua" "dist\\funscript-editor\\OFS"
copy /Y "contrib\\Installer\\assets\\json.lua" "dist\\funscript-editor\\OFS"
powershell Compress-Archive -LiteralPath "dist/funscript-editor" -DestinationPath "dist/funscript-editor.zip"
call conda deactivate
timeout 20 >NUL