Skip to content

Commit 76a7e7c

Browse files
authored
Merge pull request #819 from Barmaley13/master
Adding most basic bbfreeze example
2 parents daa0fca + fcd3b13 commit 76a7e7c

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

docs/shipping/freezing.rst

+40-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,46 @@ bbFreeze
7070

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

73-
.. todo:: Write steps for most basic .exe
73+
1. Install :code:`bbfreeze`:
74+
75+
.. code-block:: console
76+
77+
$ pip install bbfreeze
78+
79+
2. Write most basic :file:`bb_setup.py`
80+
81+
.. code-block:: python
82+
83+
from bbfreeze import Freezer
84+
85+
freezer = Freezer(distdir='dist')
86+
freezer.addScript('foobar.py', gui_only=True)
87+
freezer()
88+
89+
.. note::
90+
91+
This will work for the most basic one file scripts. For more advanced freezing you will have to provide
92+
include and exclude paths like so
93+
94+
.. code-block:: python
95+
96+
freezer = Freezer(distdir='dist', includes=['my_code'], excludes=['docs'])
97+
98+
3. (Optionally) include icon
99+
100+
.. code-block:: python
101+
102+
freezer.setIcon('my_awesome_icon.ico')
103+
104+
4. Provide the Microsoft Visual C runtime DLL for the freezer. It might be possible to append your :code:`sys.path`
105+
with Microsoft Visual Studio path but I find it easier to drop :file:`msvcp90.dll` in the same folder where your script
106+
resides.
107+
108+
5. Freeze!
109+
110+
.. code-block:: console
111+
112+
$ python bb_setup.py
74113
75114
py2exe
76115
~~~~~~

0 commit comments

Comments
 (0)