File: generate-nvpy-exe.bat

package info (click to toggle)
nvpy 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,460 kB
  • sloc: python: 4,870; makefile: 37; sh: 11
file content (36 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download | duplicates (2)
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
36
rem This batch generates an executable file for Windows.
rem
rem Requirements:
rem   Windows 10
rem   Python 3.7 and Python launcher
rem   PyInstaller
rem
rem Output:
rem   dist\nvpy-windows.zip
rem   dist\nvpy-windows-debug.zip

rem Remove build cache and executable files before starting build.
rmdir /q /s build
del dist\nvpy.exe
del dist\nvpy-debug.exe

rem Upgrade pyinstaller.
py -3 -m pip install --upgrade pyinstaller

rem When you generate windows binary, you need the certifi package.
rem See workaround code on nvpy.py for details.
py -3 -m pip install --upgrade certifi

rem Install dependencies.
rem When build nvpy on the clean environment, this process is required.
py -3 -m pip install --upgrade Markdown docutils simplenote

py -3 setup.py clean

rem Generate one-folder bundles.
rem NOTE:
rem   The one-file bundles have a start-up performance issue.  Therefore, the one-file bundle is no longer provided.
py -3 -m PyInstaller -i nvpy\icons\nvpy.ico --add-binary "nvpy\icons\nvpy.gif;icons" -n nvpy       --windowed start-nvpy.py
py -3 -m PyInstaller -i nvpy\icons\nvpy.ico --add-binary "nvpy\icons\nvpy.gif;icons" -n nvpy-debug --console  start-nvpy.py
echo Compress-Archive dist/nvpy dist/nvpy-windows.zip             |powershell -Command -
echo Compress-Archive dist/nvpy-debug dist/nvpy-windows-debug.zip |powershell -Command -