Skip to content

Commit

Permalink
Update FAQ entry on building on non-Windows platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Aug 19, 2017
1 parent 7afbce6 commit c3267f4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions doc/cfgfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ limitations:
Python. If your application has plugins based on Python packages, this might
require extra thought about how and where plugins are installed.

.. _cfg_include:

Include section
---------------

Expand Down
26 changes: 20 additions & 6 deletions doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,36 @@ FAQs
Building on other platforms
---------------------------

NSIS can run on Linux, so you can build Windows installers without running
Windows. However, if your package relies on compiled extension modules, like
You can use Pynsist to build Windows installers from a Linux or Mac system.
You'll need to install NSIS so that the ``makensis`` command is available.
Here's how to do that on some common platforms:

* Debian/Ubuntu: ``sudo apt-get install nsis``
* Fedora: ``sudo dnf install mingw32-nsis``
* Mac with `Homebrew <https://brew.sh/>`__: ``brew install makensis``

Installing Pynsist itself is the same on all platforms::

pip install pynsist

If your package relies on compiled extension modules, like
PyQt4, lxml or numpy, you'll need to ensure that the installer is built with
Windows versions of these packages. There are two ways to do this:
Windows versions of these packages. There are a few options for this:

- List them under ``pypi_wheels`` in the :ref:`Include section <cfg_include>`
of your config file. Pynsist will download Windows-compatible wheels from
PyPI. This is the easiest option if the dependency publishes wheels.
- Get the importable packages/modules, either from a Windows installation, or
by extracting them from an installer. Copy them into a folder called
``pynsist_pkgs``, next to your ``installer.cfg`` file. pynsist will
``pynsist_pkgs``, next to your ``installer.cfg`` file. Pynsist will
copy everything in this folder to the build directory.
- Include exe/msi installers for those modules, and modify the ``.nsi`` template
to extract and run these during installation. This can make your installer
bigger and slower, and it may create unwanted start menu shortcuts
(e.g. PyQt4 does), so the first option is usually better. However, if the
(e.g. PyQt4 does), so it's a last resort. However, if the
installer sets up other things on the system, you may need to do this.

When running on non-Windows systems, pynsis will bundle a 32-bit version of
When running on non-Windows systems, Pynsist will bundle a 32-bit version of
Python by default, though you can override this :ref:`in the config file <cfg_python>`.
Whichever method you use, compiled libraries must have the same bit-ness as
the version of Python that's installed.
Expand Down

0 comments on commit c3267f4

Please sign in to comment.