-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildWindows.bat
More file actions
29 lines (25 loc) · 881 Bytes
/
Copy pathbuildWindows.bat
File metadata and controls
29 lines (25 loc) · 881 Bytes
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
@echo off
set "WORKSPACE=%~dp0"
set "PYTHONEXE=python"
set "HT=Win64"
set "BUILDPATH=%WORKSPACE%build\%HT%"
echo [34mRemove existing build[0m
if exist "%BUILDPATH%" rd /s /q "%BUILDPATH%"
echo [34mCreate build path[0m
mkdir "%BUILDPATH%"
set "WORKPATH=%BUILDPATH%\work"
set "DISTPATH=%BUILDPATH%\dist"
set "SPECPATH=%WORKSPACE%\res\build.spec"
set "VENVPATH=%BUILDPATH%\venv"
echo [34mCreate virtual environment[0m
%PYTHONEXE% -m venv "%VENVPATH%"
echo [34mActivate virtual environment[0m
"%VENVPATH%\Scripts\activate.bat" & ^
echo [34mUpgrade pip[0m & ^
%PYTHONEXE% -m pip install --upgrade pip & ^
echo [34mInstall requirements[0m & ^
%PYTHONEXE% -m pip install -r requirements.txt & ^
echo [34mCreate executable[0m & ^
pyinstaller.exe --workpath "%WORKPATH%" --distpath "%DISTPATH%" "%SPECPATH%" & ^
echo [34mDeactivate virtual environment[0m & ^
deactivate