User Tools

Site Tools


proj:wininstallers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
proj:wininstallers [2021/01/12 22:35]
114.23.208.115 [Create working folders]
proj:wininstallers [2022/08/14 05:15] (current)
151.210.130.23 [Set launch.py dependency imports]
Line 28: Line 28:
   * Change the version at the top of In D:​\sofa_dev_win\packaging\1 sofastats.nsi:​   * Change the version at the top of In D:​\sofa_dev_win\packaging\1 sofastats.nsi:​
  
-  !define SOFA_VERSION "1.5.3"+  !define SOFA_VERSION "1.5.4"
  
   * In D:​\sofa_dev_win\packaging right click on  "1 sofastats.nsi"​ and "​compile NSIS script"​ then click on "Test Installer"​ button.   * In D:​\sofa_dev_win\packaging right click on  "1 sofastats.nsi"​ and "​compile NSIS script"​ then click on "Test Installer"​ button.
Line 77: Line 77:
 === wkhtmltopdf (for HTML to PDF) === === wkhtmltopdf (for HTML to PDF) ===
  
-wkhtmltopdf.exe - download installer from https://​wkhtmltopdf.org/​downloads.html then go to installed location e.g. C:\Program Files\wkhtmltopdf and put copy in D:​\sofa_dev_win\store and under D:​\sofa_dev_win\packaging\sofastats+wkhtmltopdf.exe - download installer from https://​wkhtmltopdf.org/​downloads.html then go to installed location e.g. C:\Program Files\wkhtmltopdf and put copy in D:​\sofa_dev_win\store and under D:​\sofa_dev_win\sofa4packaging\sofastats
  
 === convert (for PDF to PNG) === === convert (for PDF to PNG) ===
Line 124: Line 124:
 ==== Get SOFA working on Windows ==== ==== Get SOFA working on Windows ====
  
-  cd "​D:​\sofa_dev_win\sofastatistics\sofastats+  cd "​D:​\sofa_dev_win\sofastatistics\"​ 
-  python start.py+  python ​-m sofastats.start 
 +  
 +Note - SOFA puts parent path into sys.path so we start in the same folder as start.py
  
 Iron out inevitable bugs. Iron out inevitable bugs.
Line 146: Line 148:
  
   #import CUBRID-Python ## 2014 Python 2 only   #import CUBRID-Python ## 2014 Python 2 only
-  import PIL  ## actually ​pillow ​installed+  import PIL  ## actually ​Pillow ​installed
   import PyPDF2   import PyPDF2
-  import adodbapi+  import adodbapi ​ ## part of pywin32 now
   import agw   import agw
   import numpy   import numpy
Line 186: Line 188:
 Otherwise errors like: ModuleNotFoundError:​ No module named '​wx.lib.agw.hypertreelist'​ Otherwise errors like: ModuleNotFoundError:​ No module named '​wx.lib.agw.hypertreelist'​
  
-==== Identify Windows C Runtime (CRT) dependency path ====+==== Identify Windows C Runtime (CRT) dependency path (nothing to install) ​====
  
 This dependency is required if using Python >= 3.5 and Windows systems < Windows 10. I.e. it is required. This dependency is required if using Python >= 3.5 and Windows systems < Windows 10. I.e. it is required.
Line 203: Line 205:
  
 ==== Run pyinstaller for full run (making spec and using) ==== ==== Run pyinstaller for full run (making spec and using) ====
 +
 +Note - sofa_win_dev/​sofa4packaging/​sofastats must contain latest code plus dependencies plus launch.py, import2run.py,​ and sofastats.spec as well from /packaging. Leave behind pycache, app.fil and sofastats.pot.
  
 Note - usually people only use the --onedir option to start with for debugging reasons and the --onefile option later. Note - usually people only use the --onedir option to start with for debugging reasons and the --onefile option later.
Line 268: Line 272:
   pyinstaller sofastats.spec   pyinstaller sofastats.spec
  
-Shift all D:​\sofa_dev_win\sofa4packaging\sofastats\ in (except for __pycache__build, or dist)Folder already named sofastats ​because of spec edits. +Note - sofa_win_dev/​sofa4packaging/sofastats ​must contain latest code plus dependencies plus launch.pyimport2run.py, and sofastats.spec as well from /packaging. Leave behind pycache, app.fil and sofastats.pot.
 ==== Test binary and SOFA code folders on clean machine ==== ==== Test binary and SOFA code folders on clean machine ====
  
Line 277: Line 280:
 ==== Make NSIS installer ==== ==== Make NSIS installer ====
  
-Use UltraModernUI+Install NSIS https://​nsis.sourceforge.io/​Download
  
-Get latest version from [[https://​sourceforge.net/​projects/​ultramodernui/​files/​UltraModernUI/​]]+Use UltraModernUI - get latest version from [[https://​sourceforge.net/​projects/​ultramodernui/​files/​UltraModernUI/​]]
  
 Note - don't need to specify every file - can just use the recursive syntax Note - don't need to specify every file - can just use the recursive syntax
proj/wininstallers.1610508929.txt.gz · Last modified: 2021/01/12 22:35 by 114.23.208.115