Skip to content

Commit

Permalink
Fixed error in HelpWindow files path in windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmoreto committed Jun 7, 2023
1 parent 83e1bb3 commit b5b9f7c
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(
['\\'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='',
)
6 changes: 2 additions & 4 deletions LabControl3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ def __init__(self):

self.setCurrentTopic(0)
self.listTopics.itemClicked.connect(self.onListTopicsClicked)
self.textBrowser.setSearchPaths([os.path.join(self.currentDir, 'help')])
self.textBrowser.setSearchPaths([str(os.path.join(self.currentDir, 'help'))])
self.loadText()


Expand All @@ -2579,9 +2579,7 @@ def loadText(self):
Load a Markdown text in the textBroser
"""
filepath = os.path.join(self.currentDir, 'help',self.topicFiles[self.currentTopic])
self.textBrowser.setSource(QtCore.QUrl(filepath))


self.textBrowser.setSource(QtCore.QUrl.fromLocalFile(filepath))


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion LabControl3.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ a = Analysis(
['LabControl3.py'],
pathex=[],
binaries=[],
datas=[('MainWindow.ui', '.'), ('matplotlibwidget.py', '.'), ('libstdc++.so.6', '.')],
datas=[],
hiddenimports=['PyQt5.sip'],
hookspath=[],
hooksconfig={},
Expand Down
2 changes: 2 additions & 0 deletions notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ conda install -c anaconda pyqt
conda install -c conda-forge libstdcxx-ng
conda install -c conda-forge pyinstaller
pyinstaller --clean -y --onedir --exclude-module sqlalchemy --hidden-import PyQt5.sip LabControl3.py
pyinstaller --noconfirm --clean --onedir --add-data="MainWindow.ui:." --add-data="HelpWindow.ui:." --add-data="matplotlibwidget.py:." --exclude-module=sqlalchemy --hidden-import=PyQt5.sip LabControl3.py

conda deactivate

Utility commands:
Expand Down

0 comments on commit b5b9f7c

Please sign in to comment.