diff --git a/dev/how_to_build_gui.txt b/dev/how_to_build_gui.txt index cf3c3b986..f13ddb75b 100644 --- a/dev/how_to_build_gui.txt +++ b/dev/how_to_build_gui.txt @@ -1,17 +1,40 @@ +Packages +-------- +>>> pip install pyqt5 vtk imageio py-splash + +Last Built on: + - Python 3.11.9, 2024/11/23 (get the dev version) + Windows ------- -1. Use 32-bit or 64-bit Python 3.7 +1. Use 64-bit Python 3.10+ 2. Verify the gui works by typing: >>> pyNastranGUI -3. Download pyInstaller -> http://www.pyinstaller.org/ - - pyInstaller 3.1 (https://github.com/pyinstaller/pyinstaller/releases/download/v3.1/PyInstaller-3.1.zip) +3. Download pyInstaller -> https://github.com/pyinstaller/pyinstaller + - Get the dev version from github 4. Extract pyInstaller 5. Go into the pyInstaller directory and run setup.py -6. In pyInstaller/building/toc_conversion.py; line 135, change: - OLD : os.makedirs(workpath) - NEW : if not os.path.exists(workpath): - os.makedirs(workpath) -7. Go into pyNastran/dev and run: +6. DEPRECATED: In pyInstaller/building/toc_conversion.py; line 135, change: + OLD: os.makedirs(workpath) + NEW: if not os.path.exists(workpath): + os.makedirs(workpath) +7. In pyInstaller/archive/writers.py; line 138, skip the __pycache__ directory: + OLD: + # Write entries' data and collect TOC entries + toc = [] + for entry in entries: + toc_entry = self._write_entry(fp, entry) + toc.append(toc_entry) + NEW: + # Write entries' data and collect TOC entries + toc = [] + for entry in entries: + dest_name, src_name, compress, typecode = entry + if '__pycache__' in dest_name: + continue + toc_entry = self._write_entry(fp, entry) + toc.append(toc_entry) +8. Go into pyNastran/dev and run: >>> pyinstaller pyNastranGUI.spec diff --git a/dev/pyNastranGUI.spec b/dev/pyNastranGUI.spec index 279d47ab2..34aafd3af 100644 --- a/dev/pyNastranGUI.spec +++ b/dev/pyNastranGUI.spec @@ -26,7 +26,7 @@ IS_RELEASE = True USE_TODAY = True IS_ONEDIR = False # True=onedir; False=onefile -MAKE_SPLASH = False # requires tk +MAKE_SPLASH = True # requires tk BUILD_EXE = True BUILD_COLLECT = False diff --git a/pyNastran/bdf/cards/aero/examples/flutter/case1/ha145e.test_bdf.caero.bdf b/pyNastran/bdf/cards/aero/examples/flutter/case1/ha145e.test_bdf.caero.bdf deleted file mode 100644 index 663ae3da1..000000000 --- a/pyNastran/bdf/cards/aero/examples/flutter/case1/ha145e.test_bdf.caero.bdf +++ /dev/null @@ -1,134 +0,0 @@ -SOL 101 -CEND -BEGIN BULK -$ CAERO7 101 WING 7 5 0 -$ 0. 0. 0. 2.07055 -$ 1.48044 5.5251 0. 2.07055 -PSHELL,101,1,0.1 -$ CAERO7 101 WING 7 5 0 -$ 0. 0. 0. 2.07055 -$ 1.48044 5.5251 0. 2.07055 -$$ -$$ XYZ_LE is taken at the center of the leading edge; (p1+p4)/2 -$$ -$$ CAEROID EID XLE YLE ZLE CHORD SPAN XLE+C/4 XLE+C/2 -$$ 101 101 0.1057 0.3947 0.0000 0.4141 0.7893 0.2093 0.3128 -$$ 101 102 0.5199 0.3947 0.0000 0.4141 0.7893 0.6234 0.7269 -$$ 101 103 0.9340 0.3947 0.0000 0.4141 0.7893 1.0375 1.1410 -$$ 101 104 1.3481 0.3947 0.0000 0.4141 0.7893 1.4516 1.5551 -$$ 101 105 1.7622 0.3947 0.0000 0.4141 0.7893 1.8657 1.9692 -$$ 101 106 0.3172 1.1840 0.0000 0.4141 0.7893 0.4208 0.5243 -$$ 101 107 0.7313 1.1840 0.0000 0.4141 0.7893 0.8349 0.9384 -$$ 101 108 1.1455 1.1840 0.0000 0.4141 0.7893 1.2490 1.3525 -$$ 101 109 1.5596 1.1840 0.0000 0.4141 0.7893 1.6631 1.7666 -$$ 101 110 1.9737 1.1840 0.0000 0.4141 0.7893 2.0772 2.1807 -$$ 101 111 0.5287 1.9733 0.0000 0.4141 0.7893 0.6323 0.7358 -$$ 101 112 0.9428 1.9733 0.0000 0.4141 0.7893 1.0464 1.1499 -$$ 101 113 1.3569 1.9733 0.0000 0.4141 0.7893 1.4605 1.5640 -$$ 101 114 1.7711 1.9733 0.0000 0.4141 0.7893 1.8746 1.9781 -$$ 101 115 2.1852 1.9733 0.0000 0.4141 0.7893 2.2887 2.3922 -$$ 101 116 0.7402 2.7626 0.0000 0.4141 0.7893 0.8437 0.9473 -$$ 101 117 1.1543 2.7626 0.0000 0.4141 0.7893 1.2579 1.3614 -$$ 101 118 1.5684 2.7626 0.0000 0.4141 0.7893 1.6720 1.7755 -$$ 101 119 1.9825 2.7626 0.0000 0.4141 0.7893 2.0861 2.1896 -$$ 101 120 2.3967 2.7626 0.0000 0.4141 0.7893 2.5002 2.6037 -$$ 101 121 0.9517 3.5518 0.0000 0.4141 0.7893 1.0552 1.1588 -$$ 101 122 1.3658 3.5518 0.0000 0.4141 0.7893 1.4693 1.5729 -$$ 101 123 1.7799 3.5518 0.0000 0.4141 0.7893 1.8835 1.9870 -$$ 101 124 2.1940 3.5518 0.0000 0.4141 0.7893 2.2976 2.4011 -$$ 101 125 2.6082 3.5518 0.0000 0.4141 0.7893 2.7117 2.8152 -$$ 101 126 1.1632 4.3411 0.0000 0.4141 0.7893 1.2667 1.3703 -$$ 101 127 1.5773 4.3411 0.0000 0.4141 0.7893 1.6808 1.7844 -$$ 101 128 1.9914 4.3411 0.0000 0.4141 0.7893 2.0950 2.1985 -$$ 101 129 2.4055 4.3411 0.0000 0.4141 0.7893 2.5091 2.6126 -$$ 101 130 2.8196 4.3411 0.0000 0.4141 0.7893 2.9232 3.0267 -$$ 101 131 1.3747 5.1304 0.0000 0.4141 0.7893 1.4782 1.5817 -$$ 101 132 1.7888 5.1304 0.0000 0.4141 0.7893 1.8923 1.9959 -$$ 101 133 2.2029 5.1304 0.0000 0.4141 0.7893 2.3064 2.4100 -$$ 101 134 2.6170 5.1304 0.0000 0.4141 0.7893 2.7206 2.8241 -$$ 101 135 3.0311 5.1304 0.0000 0.4141 0.7893 3.1347 3.2382 -GRID 1 0. 0. 0. -GRID 2 .41411 0. 0. -GRID 3 .82822 0. 0. -GRID 4 1.24233 0. 0. -GRID 5 1.65644 0. 0. -GRID 6 2.07055 0. 0. -GRID 7 .2114914 .7893 0. -GRID 8 .6256014 .7893 0. -GRID 9 1.039711 .7893 0. -GRID 10 1.453821 .7893 0. -GRID 11 1.867931 .7893 0. -GRID 12 2.282041 .7893 0. -GRID 13 .4229829 1.5786 0. -GRID 14 .8370929 1.5786 0. -GRID 15 1.251203 1.5786 0. -GRID 16 1.665313 1.5786 0. -GRID 17 2.079423 1.5786 0. -GRID 18 2.493533 1.5786 0. -GRID 19 .6344743 2.3679 0. -GRID 20 1.048584 2.3679 0. -GRID 21 1.462694 2.3679 0. -GRID 22 1.876804 2.3679 0. -GRID 23 2.290914 2.3679 0. -GRID 24 2.705024 2.3679 0. -GRID 25 .8459657 3.1572 0. -GRID 26 1.260076 3.1572 0. -GRID 27 1.674186 3.1572 0. -GRID 28 2.088296 3.1572 0. -GRID 29 2.502406 3.1572 0. -GRID 30 2.916516 3.1572 0. -GRID 31 1.057457 3.9465 0. -GRID 32 1.471567 3.9465 0. -GRID 33 1.885677 3.9465 0. -GRID 34 2.299787 3.9465 0. -GRID 35 2.713897 3.9465 0. -GRID 36 3.128007 3.9465 0. -GRID 37 1.268949 4.7358 0. -GRID 38 1.683059 4.7358 0. -GRID 39 2.097169 4.7358 0. -GRID 40 2.511279 4.7358 0. -GRID 41 2.925389 4.7358 0. -GRID 42 3.339499 4.7358 0. -GRID 43 1.48044 5.5251 0. -GRID 44 1.89455 5.5251 0. -GRID 45 2.30866 5.5251 0. -GRID 46 2.72277 5.5251 0. -GRID 47 3.13688 5.5251 0. -GRID 48 3.55099 5.5251 0. -CQUAD4 101 101 1 7 8 2 -CQUAD4 102 101 2 8 9 3 -CQUAD4 103 101 3 9 10 4 -CQUAD4 104 101 4 10 11 5 -CQUAD4 105 101 5 11 12 6 -CQUAD4 106 101 7 13 14 8 -CQUAD4 107 101 8 14 15 9 -CQUAD4 108 101 9 15 16 10 -CQUAD4 109 101 10 16 17 11 -CQUAD4 110 101 11 17 18 12 -CQUAD4 111 101 13 19 20 14 -CQUAD4 112 101 14 20 21 15 -CQUAD4 113 101 15 21 22 16 -CQUAD4 114 101 16 22 23 17 -CQUAD4 115 101 17 23 24 18 -CQUAD4 116 101 19 25 26 20 -CQUAD4 117 101 20 26 27 21 -CQUAD4 118 101 21 27 28 22 -CQUAD4 119 101 22 28 29 23 -CQUAD4 120 101 23 29 30 24 -CQUAD4 121 101 25 31 32 26 -CQUAD4 122 101 26 32 33 27 -CQUAD4 123 101 27 33 34 28 -CQUAD4 124 101 28 34 35 29 -CQUAD4 125 101 29 35 36 30 -CQUAD4 126 101 31 37 38 32 -CQUAD4 127 101 32 38 39 33 -CQUAD4 128 101 33 39 40 34 -CQUAD4 129 101 34 40 41 35 -CQUAD4 130 101 35 41 42 36 -CQUAD4 131 101 37 43 44 38 -CQUAD4 132 101 38 44 45 39 -CQUAD4 133 101 39 45 46 40 -CQUAD4 134 101 40 46 47 41 -CQUAD4 135 101 41 47 48 42 -MAT1,1,350000000000.0,,0.3,2700.0 -ENDDATA diff --git a/pyNastran/bdf/cards/aero/examples/flutter/case1/ha145e.test_bdf.inp b/pyNastran/bdf/cards/aero/examples/flutter/case1/ha145e.test_bdf.inp deleted file mode 100644 index eae96a89f..000000000 --- a/pyNastran/bdf/cards/aero/examples/flutter/case1/ha145e.test_bdf.inp +++ /dev/null @@ -1,158 +0,0 @@ -$pyNastran: version=zona -$pyNastran: punch=False -$pyNastran: encoding=utf-8 -ASSIGN FEM=ha145e.f06, PRINT=0,FORM=MSC,BOUND=SYM - -$EXECUTIVE CONTROL DECK -SOL 145 -DIAG 1 - -CEND -$CASE CONTROL DECK -ECHO = SORT -TITLE = SUBSONIC FLUTTER ANALYSIS (15 DEGREE SWEPTBACK WING) -SUBCASE 1 - FLUTTER = 100 - LABEL = MACH NUMBER = 0.45, NON-MATCH POINT FLUTTER ANALYSIS - SUBTITLE = ZONA6 METHOD -BEGIN BULK -$PARAMS -PARAM COUPMASS 1 -PARAM GRDPNT 17 -PARAM WTMASS.0025901 -$NODES -GRID 1 0. 0. 0. -GRID 2 .211491 .7893 0. -GRID 3 .422983 1.5786 0. -GRID 4 .634474 2.3679 0. -GRID 5 .845966 3.1572 0. -GRID 6 1.05746 3.9465 0. -GRID 7 1.26895 4.7358 0. -GRID 8 1.48044 5.5251 0. -GRID 9 .258819 0. 0. -GRID 10 .47031 .7893 0. -GRID 11 .681802 1.5786 0. -GRID 12 .893293 2.3679 0. -GRID 13 1.10478 3.1572 0. -GRID 14 1.31628 3.9465 0. -GRID 15 1.52777 4.7358 0. -GRID 16 1.73926 5.5251 0. -GRID 17 1.03528 0. 0. -GRID 18 1.24677 .7893 0. -GRID 19 1.45826 1.5786 0. -GRID 20 1.66975 2.3679 0. -GRID 21 1.88124 3.1572 0. -GRID 22 2.09273 3.9465 0. -GRID 23 2.30422 4.7358 0. -GRID 24 2.51572 5.5251 0. -GRID 25 1.81173 0. 0. -GRID 26 2.02322 .7893 0. -GRID 27 2.23471 1.5786 0. -GRID 28 2.44621 2.3679 0. -GRID 29 2.6577 3.1572 0. -GRID 30 2.86919 3.9465 0. -GRID 31 3.08068 4.7358 0. -GRID 32 3.29217 5.5251 0. -GRID 33 2.07055 0. 0. -GRID 34 2.28204 .7893 0. -GRID 35 2.49353 1.5786 0. -GRID 36 2.70502 2.3679 0. -GRID 37 2.91652 3.1572 0. -GRID 38 3.12801 3.9465 0. -GRID 39 3.3395 4.7358 0. -GRID 40 3.55099 5.5251 0. -$ELEMENTS -CQUAD4 1 1 1 2 10 9 - 0. 0. .041 .041 -CQUAD4 2 1 2 3 11 10 - 0. 0. .041 .041 -CQUAD4 3 1 3 4 12 11 - 0. 0. .041 .041 -CQUAD4 4 1 4 5 13 12 - 0. 0. .041 .041 -CQUAD4 5 1 5 6 14 13 - 0. 0. .041 .041 -CQUAD4 6 1 6 7 15 14 - 0. 0. .041 .041 -CQUAD4 7 1 7 8 16 15 - 0. 0. .041 .041 -CQUAD4 8 1 9 10 18 17 -CQUAD4 9 1 10 11 19 18 -CQUAD4 10 1 11 12 20 19 -CQUAD4 11 1 12 13 21 20 -CQUAD4 12 1 13 14 22 21 -CQUAD4 13 1 14 15 23 22 -CQUAD4 14 1 15 16 24 23 -CQUAD4 15 1 17 18 26 25 -CQUAD4 16 1 18 19 27 26 -CQUAD4 17 1 19 20 28 27 -CQUAD4 18 1 20 21 29 28 -CQUAD4 19 1 21 22 30 29 -CQUAD4 20 1 22 23 31 30 -CQUAD4 21 1 23 24 32 31 -CQUAD4 22 1 25 26 34 33 - .041 .041 0. 0. -CQUAD4 23 1 26 27 35 34 - .041 .041 0. 0. -CQUAD4 24 1 27 28 36 35 - .041 .041 0. 0. -CQUAD4 25 1 28 29 37 36 - .041 .041 0. 0. -CQUAD4 26 1 29 30 38 37 - .041 .041 0. 0. -CQUAD4 27 1 30 31 39 38 - .041 .041 0. 0. -CQUAD4 28 1 31 32 40 39 - .041 .041 0. 0. -$PROPERTIES -PSHELL 1 1 .041 1 1 -$MATERIALS -MAT1 19241800. .3205212 -$AERO -CAERO7 101 WING 7 5 0 - 0. 0. 0. 2.07055 - 1.48044 5.5251 0. 2.07055 -SPLINE1 100 WING 101 100 0. 0. -PANLST2 101 101 101 THRU 124 -MKAEROZ 80 .45 0 0 SAVEHA145E_A IC.45 -3 - .05 .08 .1 .11 .12 .14 .16 .18 - .2 .25 .5 -$DYNAMIC -EIGR 10 MGIV 4 - MAX -$STATIC AERO -AEROZ 0 YES NO SLIN IN 2.07055 11.0502 22.88 - .5176 0. 0. -$FLUTTER -FLUTTER 100 SYM 100 0 10 25 -$SPCs -SPC1 1 6 1 2 3 4 5 6 - 7 8 9 10 11 12 13 14 - 15 16 17 18 19 20 21 22 - 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 - 39 40 -SPC1 1 12345 9 -SPC1 1 12345 25 -$TABLES -TABDMP1 10 G - 0. .01 1000. .01 ENDT -$SETS -SET1 100 2 4 6 8 9 11 13 - 15 18 20 22 24 25 27 29 - 31 34 36 38 40 -ASET1 3 1 THRU 8 -ASET1 3 10 THRU 16 -ASET1 3 18 THRU 24 -ASET1 3 26 THRU 40 -$REJECT_LINES -FIXMDEN 100 80 1.0726-7SLIN IN 12.00 0 +FL1 -+FL1 4000. 4200. 4400. 4600. 4800. 5000. 5200. 5400. +FL2 -+FL2 5600. 5700. 5800. 5900. 6000. 6200. 6400. -PLTAERO 11 YES 0 TECPLOT AERO1.PLT -PLTCP 3000 SYM 80 6 1 TECPLOT CP1.PLT -PLTFLUT 10 100 1 8 .3 TECPLOT FLUT1.PLT -PLTMODE 10 SYM 1 .3 TECPLOT MODE1.PLT -PLTMODE 20 SYM 2 .3 PATRAN MODE2.PLT -PLTVG 11 100 V VG1.PLT -ENDDATA diff --git a/pyNastran/gui/main_window.py b/pyNastran/gui/main_window.py index b5c009bfe..50322cb89 100644 --- a/pyNastran/gui/main_window.py +++ b/pyNastran/gui/main_window.py @@ -171,8 +171,17 @@ def __init__(self, inputs, **kwds): self.setup_controls() self.setup_post(inputs) - if is_pynastrangui_exe and '_PYIBoot_SPLASH' in os.environ and importlib.util.find_spec("pyi_splash"): - import pyi_splash + if 0: # pragma: no cover + print(f'is_pynastrangui_exe = {is_pynastrangui_exe}') + if is_pynastrangui_exe: + print(f'os.environ = {os.environ}') + print('_PYIBoot_SPLASH', '_PYIBoot_SPLASH' in os.environ) + if '_PYIBoot_SPLASH' in os.environ: + is_pysplash = importlib.util.find_spec("pyi_splash") + print(f'is_pysplash', is_pysplash) + + if is_pynastrangui_exe: # and '_PYIBoot_SPLASH' in os.environ and importlib.util.find_spec("pyi_splash"): + import pyi_splash # pip install py-splash # Update the text on the splash screen pyi_splash.update_text("PyInstaller is a great software!") #pyi_splash.update_text("Second time's a charm!") diff --git a/pyNastran/gui/menus/about/about.py b/pyNastran/gui/menus/about/about.py index 445669139..312e875dc 100644 --- a/pyNastran/gui/menus/about/about.py +++ b/pyNastran/gui/menus/about/about.py @@ -229,12 +229,21 @@ def get_packages() -> dict[str, str]: if 'pyside' in qt_name.lower(): del packages['QScintilla2'] - for name in ['setuptools', 'matplotlib', 'pandas', 'h5py', 'tables', 'imageio', 'PIL', 'pygments']: + pkgs = [ + 'setuptools', 'matplotlib', 'pandas', 'h5py', 'tables', + 'imageio', 'PIL', 'pygments'] + for name in pkgs: try: module = importlib.import_module(name, package=None) except ImportError: continue - packages[name] = module.__version__ + + try: + pkg_version = module.__version__ + except AttributeError: + continue + packages[name] = pkg_version + return packages def get_version() -> dict[str, str]: