Skip to content

Commit 8a2fbef

Browse files
committed
MS Window tweakes
1 parent d0b1c17 commit 8a2fbef

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ archive
44
build
55
dist
66
env
7+
78
ffprobe
9+
ffprobe.exe
810

911
.DS_Store
1012
.pylintrc

main.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -415,17 +415,13 @@ def resource_path(relative_path):
415415
return os.path.join(sys._MEIPASS, relative_path)
416416
return os.path.join(os.path.abspath('.'), relative_path)
417417

418-
try:
419-
# Windows only(for icon)???
420-
from PyQt5.QtWinExtras import QtWin
421-
myappid = 'mycompany.myproduct.subproduct.version'
422-
QtWin.setCurrentProcessExplicitAppUserModelID(myappid)
423-
except ImportError:
424-
pass
425-
426418

427419
if __name__ == '__main__':
428420
app = QApplication(sys.argv)
429-
app.setWindowIcon(QIcon('GTD_icon.ico')) # MS Windows only
421+
try:
422+
# MS Windows only
423+
app.setWindowIcon(QIcon(resource_path('images/GTD_icon.ico')))
424+
except:
425+
pass
430426
window = MainWindow()
431427
sys.exit(app.exec_())

main_wn.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ block_cipher = None
55
a = Analysis(['main.py'],
66
pathex=['C:\\Users\\Dan\\Downloads\\total_duration-master\\total_duration-master'],
77
binaries=[('./ffprobe.exe', '.')],
8-
datas=[('GTD_icon.ico', '.')],
8+
datas=[('images\GTD_icon.ico', '.')],
99
hiddenimports=[],
1010
hookspath=[],
1111
runtime_hooks=[],
@@ -32,5 +32,5 @@ exe = EXE(pyz,
3232
upx_exclude=[],
3333
runtime_tmpdir=None,
3434
console=False,
35-
icon='GTD_icon.ico')
35+
icon='images\GTD_icon.ico')
3636

0 commit comments

Comments
 (0)