Thomas Kluyver 11 年之前
父节点
当前提交
5391960cef
共有 3 个文件被更改,包括 35 次插入4 次删除
  1. 7 4
      doc/cfgfile.rst
  2. 25 0
      doc/faq.rst
  3. 3 0
      doc/index.rst

+ 7 - 4
doc/cfgfile.rst

@@ -10,7 +10,8 @@ Application section
 .. describe:: name
 
   The user-readable name of your application. This will be used for various
-  display purposes in the installer, and for shortcuts when installed.
+  display purposes in the installer, and for shortcuts and the folder in
+  'Program Files'.
 
 .. describe:: version
 
@@ -25,6 +26,8 @@ Application section
   Path to a ``.ico`` file to be used for shortcuts to your application. pynsis
   has a default generic icon, but you probably want to replace it.
 
+.. _cfg_python:
+
 Python section
 --------------
 
@@ -35,9 +38,9 @@ Python section
 
 .. describe:: bitness (optional)
 
-  Whether to use 32-bit (x86) or 64-bit (x64) Python. On Windows, this defaults
-  to the version you're using, so that compiled modules will match. On other
-  platforms, it defaults to 32-bit.
+  ``32`` or ``64``, to use 32-bit (x86) or 64-bit (x64) Python. On Windows, this
+  defaults to the version you're using, so that compiled modules will match. On
+  other platforms, it defaults to 32-bit.
 
 Include section
 ---------------

+ 25 - 0
doc/faq.rst

@@ -0,0 +1,25 @@
+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
+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:
+
+- Get the importable packages/modules, either from a Windows installation, or
+  by extracting them from an installer. Copy them into a folder called
+  ``pynsis_pkgs``, next to your ``installer.cfg`` file. pynsis 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
+  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
+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.

+ 3 - 0
doc/index.rst

@@ -41,6 +41,8 @@ Quickstart
        files = LICENSE
            data_files/
 
+  See :doc:`cfgfile` for more details about this.
+
 4. Run ``pynsis installer.cfg`` to generate your installer. If ``pynsis`` isn't
    found, you can use ``python -m nsisbuilder installer.cfg`` instead.
 
@@ -49,6 +51,7 @@ Quickstart
    :maxdepth: 2
 
    cfgfile
+   faq
 
 Indices and tables
 ==================