-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathwin_make.bat
36 lines (31 loc) · 913 Bytes
/
win_make.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
36
@ECHO OFF
SET pyinstaller=c:\Python27\Scripts\pyinstaller.exe
:Loop
IF "%1"=="clean" GOTO clean
IF "%1"=="build" GOTO build
IF "%1"=="exe" GOTO exe
:build
(
echo Building Lector...
CALL pylupdate5 lector.pro
CALL lrelease lector.pro
CALL pyrcc5 ui/resources.qrc -o lector/ui/resources_rc.py
CALL pyuic5 ui/ui_lector.ui -o lector/ui/ui_lector.py
CALL pyuic5 ui/ui_settings.ui -o lector/ui/ui_settings.py
CALL pyuic5 ui/ui_scanner.ui -o lector/ui/ui_scanner.py
GOTO end
REM EXIT /B 0
)
:clean
rm -f lector/ui/ui_*.py lector/ui/resources*.py lector/ui/*.pyc
rm -f lector/*.pyc lector/editor/*.pyc lector/utils/*.pyc ts/lector_*.qm
GOTO end
:exe
%pyinstaller% --onefile "lector.pyw"
GOTO end
:end
echo Done!
REM DOC
REM http://www.robvanderwoude.com/parameters.php
REM http://ss64.com/nt/syntax-args.html
REM http://skypher.com/index.php/2010/08/17/batch-command-line-arguments/