-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.bat
22 lines (22 loc) · 878 Bytes
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
set ver=0.2.1
rem build script for the distributable versions of frogtool
if not exist "venv\" (
py -m venv venv
)
if not exist "venv\Lib\site-packages\PyInstaller" (
venv\Scripts\python -m pip install pyinstaller
)
if not exist "venv\Lib\site-packages\PIL" (
venv\Scripts\python -m pip install Pillow
)
venv\Scripts\python -m PyInstaller frogtool.py -F --version-file versioninfo --icon frog.ico
copy README.md "dist\readme.md"
rem extremely dirty markdown to txt conversion by stripping out a few non-obvious characters
py -c "open('dist/readme.txt','w').write(open('dist/readme.md','r').read().replace('`','').replace('### ',''))"
copy LICENSE "dist\license.txt"
copy frogtool.py "dist\frogtool.py"
cd dist
tar -a -cf frogtool-%ver%-win.zip frogtool.exe readme.txt license.txt
tar -a -cf frogtool-%ver%-py.zip frogtool.py readme.txt license.txt
cd ../