Skip to content

Commit 1329545

Browse files
committed
Problem with accessing fit.png from exe.
The exe has to be released with resources/features/fit.png.
1 parent 017a8ed commit 1329545

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

build.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ mkdir bin
33

44
cd dls_barcode
55

6+
REM use to debug the exe file
7+
REM pyinstaller --onefile --icon=..\resources\icons\qr_code.ico --debug --clean main.py
8+
69
pyinstaller --onefile --windowed --icon=..\resources\icons\qr_code.ico --clean main.py
710

811
move dist\main.exe ..\bin\barcode.exe

dls_barcode/geometry/unipuck_locator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def _find_feature(self, features_cnt): # do this better
105105
# compares the feature from the image with the features found on the edge of the puck
106106
if getattr(sys, 'frozen', False): # for the .exe bundle
107107
#see: #see https://pythonhosted.org/PyInstaller/runtime-information.html
108-
f_path = os.path.join('..', 'resources', 'features', 'fit.png')
108+
#f_path = os.path.join('..', 'resources', 'features', 'fit.png')
109+
f_path = os.path.join('resources', 'features', 'fit.png')
109110
else:
110111
dir_path = os.path.dirname(os.path.abspath(__file__))
111112
f_path = os.path.join(dir_path, '..', '..', 'resources', 'features', 'fit.png')

0 commit comments

Comments
 (0)