Browse Source

Logo location change for bundeling

bernhardbuhl 4 years ago
parent
commit
adf52af177
5 changed files with 11 additions and 4 deletions
  1. 1 0
      MANIFEST.in
  2. 0 0
      baangt/ressources/baangtLogo.png
  3. 0 0
      baangt/ressources/baangtLogo.snagproj
  4. 7 3
      baangt/ui/ui.py
  5. 3 1
      setup.py

+ 1 - 0
MANIFEST.in

@@ -0,0 +1 @@
+recursive include baangt/ressources *.*

ressources/baangtLogo.png → baangt/ressources/baangtLogo.png


ressources/baangtLogo.snagproj → baangt/ressources/baangtLogo.snagproj


+ 7 - 3
baangt/ui/ui.py

@@ -61,12 +61,16 @@ class UI:
                             sg.Button("Details", size=(10, 1), font="Helvetica 10", key="ToggleFields")])
 
         # Baangt Logo
-        lPathLogo = Path(__file__).parent.parent.parent.joinpath("Ressources").joinpath("baangtLogo.png")
+        lPathLogo = Path(__file__).parent.parent.parent.joinpath("ressources").joinpath("baangtLogo.png")
+        # when in pip-Package, this doesn't work.
+        if not lPathLogo.exists():
+            lPathLogo = Path(__file__).parent.parent.joinpath("ressources").joinpath("baangtLogo.png")
+
         lColumnRight = [[sg.Image(filename=lPathLogo)]]
 
         lLayout = [[sg.Menu(lMenu)],
-                   [sg.Col(lColumnLeft),
-                    sg.Col(lColumnRight, justification="right")]]
+                   [sg.Col(lColumnLeft, pad=(0,0)),
+                    sg.Col(lColumnRight, pad=(0,0), justification="right")]]
 
         # Show the button to provide more details
         ttip_Recorder = 'Will start the Katalon Recorder Importer'

+ 3 - 1
setup.py

@@ -6,7 +6,7 @@ if __name__ == '__main__':
 
     setuptools.setup(
         name="baangt", # Replace with your own username
-        version="2020.1.1b12",
+        version="2020.1.1b18",
         author="Bernhard Buhl",
         author_email="buhl@buhl-consulting.com.cy",
         description="Basic And Advanced NextGeneration Testing",
@@ -14,6 +14,8 @@ if __name__ == '__main__':
         long_description_content_type="text/markdown",
         url="https://baangt.org",
         packages=setuptools.find_packages(),
+        data_files=[('baangt', ["baangt/ressources/baangtLogo.png"])],
+        package_data={"baangt": ['baangt/ressources/*.png']},
         install_requires=["pandas", "numpy", "pySimpleGui", "beautifulsoup4", "schwifty"],
         classifiers=[
             "Programming Language :: Python :: 3",