-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathinstallerPreBuild.bat
More file actions
33 lines (30 loc) · 920 Bytes
/
installerPreBuild.bat
File metadata and controls
33 lines (30 loc) · 920 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
30
31
32
33
@echo off
echo ------------------------------------------------
echo This script contains the required processes that
echo need to be completed before the installer can be
echo built by InnoSetup.
echo.
echo POC: jrocha@usbr.gov
echo.
echo ------------------------------------------------
:: Delete the old directory containing the last build
echo Deleting old build directories...
cd build
rmdir /s /q "main"
cd..
cd dist
rmdir /s /q "main"
cd..
echo.
:: Run pyinstaller to create a new build
echo Running PyInstaller...
::L03Py38Env\Scripts\activate
::pyinstaller --paths=L03Py38Env\Lib\site-packages main.py
pyinstaller main.spec
echo.
:: Copy required files
echo Copying Python modules...
::robocopy L03Py38Env\Lib\site-packages dist\main /E /XC /XN /XO /NFL /XD __pycache__ *-info tests
echo Copying PyForecast resources...
robocopy resources dist\main\resources\ /E /XC /XN /XO /NFL /XD __pycache__
echo.