Skip to content

Adding most basic bbfreeze example #819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion docs/shipping/freezing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,46 @@ bbFreeze

Prerequisite is to install :ref:`Python, Setuptools and pywin32 dependency on Windows <install-windows>`.

.. todo:: Write steps for most basic .exe
1. Install :code:`bbfreeze`:

.. code-block:: console

$ pip install bbfreeze

2. Write most basic :file:`bb_setup.py`

.. code-block:: python

from bbfreeze import Freezer

freezer = Freezer(distdir='dist')
freezer.addScript('foobar.py', gui_only=True)
freezer()

.. note::

This will work for the most basic one file scripts. For more advanced freezing you will have to provide
include and exclude paths like so

.. code-block:: python

freezer = Freezer(distdir='dist', includes=['my_code'], excludes=['docs'])

3. (Optionally) include icon

.. code-block:: python

freezer.setIcon('my_awesome_icon.ico')

4. Provide the Microsoft Visual C runtime DLL for the freezer. It might be possible to append your :code:`sys.path`
with Microsoft Visual Studio path but I find it easier to drop :file:`msvcp90.dll` in the same folder where your script
resides.

5. Freeze!

.. code-block:: console

$ python bb_setup.py

py2exe
~~~~~~
Expand Down