Skip to content

Commit 609ae6a

Browse files
authored
Fix issue with missing files from executable (#46) (#47)
* Bump version to 3.5.2
1 parent c6f2dff commit 609ae6a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packaging/objdictedit.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ a = Analysis(
2727
pathex=[],
2828
binaries=[],
2929
datas=[
30-
(basepath + "/src/objdictgen/img/networkedit.ico", "objdictgen/img"),
30+
(basepath + "/src/objdictgen/img/*", "objdictgen/img"),
31+
(basepath + "/src/objdictgen/config/*.prf", "objdictgen/config"),
32+
(basepath + "/src/objdictgen/schema/*.json", "objdictgen/schema"),
3133
],
3234
hiddenimports=[],
3335
hookspath=[],

src/objdictgen/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
# USA
1919

2020
import os
21+
import sys
2122
from pathlib import Path
2223

2324
from objdictgen.node import Node
2425
from objdictgen.nodemanager import NodeManager
2526

26-
__version__ = "3.5.1"
27-
__version_tuple__ = (3, 5, 1, 0)
27+
__version__ = "3.5.2"
28+
__version_tuple__ = (3, 5, 2, 0)
2829
__copyright__ = "(c) 2024 Svein Seldal, Laerdal Medical AS, and several. Licensed under GPLv2.1."
2930

3031
# Shortcuts
@@ -33,7 +34,10 @@
3334

3435
ODG_PROGRAM = "odg"
3536

36-
SCRIPT_DIRECTORY = Path(__file__).parent
37+
if hasattr(sys, '_MEIPASS'):
38+
SCRIPT_DIRECTORY = Path(sys._MEIPASS) / 'objdictgen'
39+
else:
40+
SCRIPT_DIRECTORY = Path(__file__).resolve().parent
3741

3842
PROFILE_DIRECTORIES: list[Path] = [
3943
SCRIPT_DIRECTORY / 'config'

0 commit comments

Comments
 (0)