index.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. pynsis |version|
  2. ================
  3. pynsis is a tool to build Windows installers for your Python applications. The
  4. installers bundle Python itself, so you can distribute your application to
  5. people who don't have Windows installed.
  6. Quickstart
  7. ----------
  8. 1. Get the tools. Install `NSIS <http://nsis.sourceforge.net/Download>`_, and
  9. then install pynsis from PyPI by running ``pip install pynsis``.
  10. 2. Add this code to the top of your script, above any other imports::
  11. import sys
  12. sys.path.insert(0, 'pkgs')
  13. This will let your installed application find the packages installed with it.
  14. 3. Write a config file ``installer.cfg``, like this:
  15. .. code-block:: ini
  16. [Application]
  17. name=My App
  18. version=1.0
  19. script=myapp.py
  20. icon=myapp.ico
  21. [Python]
  22. version=3.4.0
  23. [Include]
  24. # Importable packages that your application requires, one per line
  25. packages = requests
  26. bs4
  27. html5lib
  28. # Other files and folders that should be installed
  29. files = LICENSE
  30. data_files/
  31. See :doc:`cfgfile` for more details about this.
  32. 4. Run ``pynsis installer.cfg`` to generate your installer. If ``pynsis`` isn't
  33. found, you can use ``python -m nsisbuilder installer.cfg`` instead.
  34. Contents
  35. --------
  36. .. toctree::
  37. :maxdepth: 2
  38. cfgfile
  39. faq
  40. Indices and tables
  41. ==================
  42. * :ref:`genindex`
  43. * :ref:`modindex`
  44. * :ref:`search`