Skip to content

Commit d68dd31

Browse files
committed
update make_spec batch file to add custom python statements automatically
1 parent 6a3425d commit d68dd31

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

make_spec.bat

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
@echo off
2-
echo generating executable file...
2+
echo generating executable spec file...
33

4-
pyi-makespec --onefile --windowed --name AudioToWavConverter src/main.py
4+
rem Name of to be generated spec file
5+
set SPEC_FILE_NAME=AudioToWavConverterrr
56

67
rem Remove '--windowed' if you would like to see console outputs
8+
pyi-makespec --onefile --windowed --name %SPEC_FILE_NAME% src/main.py
79

8-
rem IMPORTANT: Add this to end of generated spec file to copy the config file automatically
9-
rem import shutil
10-
rem shutil.copyfile('src/config.ini', '{0}/config-sample.ini'.format(DISTPATH))
10+
rem Add Python statement to copy config.ini to build folder
11+
ECHO.>>"%SPEC_FILE_NAME%.spec"
12+
ECHO import shutil>>"%SPEC_FILE_NAME%.spec"
13+
ECHO shutil.copyfile('src/config.ini', '{0}/config-sample.ini'.format(DISTPATH))>>"%SPEC_FILE_NAME%.spec"

0 commit comments

Comments
 (0)