-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_win.bat
52 lines (40 loc) · 1.98 KB
/
build_win.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@ echo off
REM HEADER FOR WINDOW SYSTEMS
REM Project: AK_SM_RECORDER Azure Kinect SM Recorder https://github.com/GRAP-UdL-AT/ak_sm_recorder
REM
REM * PAgFRUIT http://www.pagfruit.udl.cat/en/
REM * GRAP http://www.grap.udl.cat/
REM
REM Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda
SET APPLICATION_FOLDER_MAIN=ak_sm_recorder
SET APPLICATION_FOLDER_OUT=ak_sm_recorder_f
SET GUI_PATH=gui_single_mode
SET APPLICATION_PATH=%~dp0
SET CONF_NAME=*.conf
SET PATH_FOLDER_RELATIVE_CONF=src\%APPLICATION_FOLDER_MAIN%\conf\
SET PATH_CONF_FILE=%APPLICATION_PATH%%PATH_FOLDER_RELATIVE_CONF%%CONF_NAME%
SET DESTINATION_FOLDER_RELATIVE_CONF=dist\%APPLICATION_FOLDER_OUT%\conf\
SET DESTINATION_FOLDER_ABSOLUTE_CONF=%APPLICATION_PATH%%DESTINATION_FOLDER_RELATIVE_CONF%
SET ASSETS_NAME=*.png
SET PAHT_FOLDER_RELATIVE_ASSETS=src\%GUI_PATH%\assets\
SET PATH_ASSETS_FILE=%APPLICATION_PATH%%PAHT_FOLDER_RELATIVE_ASSETS%%ASSETS_NAME%
SET DESTINATION_FOLDER_RELATIVE_ASSETS=dist\%APPLICATION_FOLDER_OUT%\%GUI_PATH%\assets\
SET DESTINATION_FOLDER_ABSOLUTE_ASSETS=%APPLICATION_PATH%%DESTINATION_FOLDER_RELATIVE_ASSETS%
ECHO %APPLICATION_PATH%
ECHO %PATH_CONF_FILE%
ECHO %DESTINATION_FOLDER_ABSOLUTE_CONF%
ECHO %PATH_ASSETS_FILE%
ECHO %DESTINATION_FOLDER_ABSOLUTE_ASSETS%
REM uncomment the following line if you need to generate again __main__.spec
REM pyi-makespec --paths=%APPLICATION_PATH%src\%APPLICATION_FOLDER_MAIN% --paths=%APPLICATION_FOLDER_MAIN%src\gui_frame_ext --paths=%APPLICATION_PATH%src\helpers %APPLICATION_PATH%src\%APPLICATION_FOLDER_MAIN%\__main__.py
pyinstaller win_exe_conf/__main__.spec ./src/%APPLICATION_FOLDER_MAIN%/__main__.py -y
REM copy .conf files to executable
MKDIR %DESTINATION_FOLDER_ABSOLUTE_CONF%
COPY %PATH_CONF_FILE% %DESTINATION_FOLDER_ABSOLUTE_CONF%
REM copy icons files
MKDIR %DESTINATION_FOLDER_ABSOLUTE_ASSETS%
COPY %PATH_ASSETS_FILE% %DESTINATION_FOLDER_ABSOLUTE_ASSETS%
cd dist
del %APPLICATION_FOLDER_OUT%.zip
"C:\Program Files\7-Zip\7z.exe" a -tzip %APPLICATION_FOLDER_OUT%
cd ..