Skip to content

Commit 87f6726

Browse files
authored
V1.03.02
Fixed issue with reference to Icon.png that occurs when binary is compiled.
1 parent e3eec8f commit 87f6726

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

DBConverter.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
###################
2-
# VERSION 1.03.01 #
2+
# VERSION 1.03.02 #
33
###################
44

55
###################
66
# LIBRARY IMPORTS #
77
###################
88

99
import os
10+
from os import path
11+
import sys
1012
import sqlite3
1113
import csv
1214
from tkinter import *
1315
from tkinter import filedialog
1416
from tkinter import font
1517

18+
19+
1620
########################
1721
# VARIABLE DEFINITIONS #
1822
########################
@@ -26,6 +30,12 @@
2630
# FUNCTION DEFINITIONS #
2731
########################
2832

33+
34+
35+
def resource_path(relative_path):
36+
base_path = getattr(sys, '_MEIPASS', path.dirname(path.abspath(__file__)))
37+
return path.join(base_path, relative_path)
38+
2939
#WRITES SELECTED DATABASE TABLE TO A CSV FILE
3040
def subConvertDB(fullpath, dbFPath, tableName):
3141

@@ -232,7 +242,7 @@ def createScrollableContainer():
232242
mainWindow.geometry('%dx%d+%d+%d' % (mainWidth, mainHeight, mainCornerX, mainCornerY))
233243
mainWindow.resizable(False, False)
234244
mainWindow.title("SQLite3 Database Conversion Tool")
235-
icon = PhotoImage(file="Icon.png")
245+
icon = PhotoImage(file=resource_path('assets\\Icon.png'))
236246
mainWindow.iconphoto(False, icon)
237247

238248
#DATABASE SELECTION WIDGETS

0 commit comments

Comments
 (0)