From d2708a6b3dce703bc401f2d4df09b320fc8a198d Mon Sep 17 00:00:00 2001 From: Barmaley13 Date: Mon, 15 May 2017 16:23:15 -0600 Subject: [PATCH 1/2] Adding most basic bbfreeze code --- docs/shipping/freezing.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/shipping/freezing.rst b/docs/shipping/freezing.rst index b75d0c1..ff95f41 100644 --- a/docs/shipping/freezing.rst +++ b/docs/shipping/freezing.rst @@ -70,7 +70,13 @@ bbFreeze Prerequisite is to install :ref:`Python, Setuptools and pywin32 dependency on Windows `. -.. todo:: Write steps for most basic .exe +.. code-block:: python + + from bbfreeze import Freezer + + freezer = Freezer('script') + freezer.addScript('foobar.py') + freezer() py2exe ~~~~~~ From fcd3b1324d7fcfed9121ac24a6617a4a88f14e8f Mon Sep 17 00:00:00 2001 From: Barmaley13 Date: Mon, 15 May 2017 17:19:03 -0600 Subject: [PATCH 2/2] Adding some documentation --- docs/shipping/freezing.rst | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/docs/shipping/freezing.rst b/docs/shipping/freezing.rst index ff95f41..cb01c9e 100644 --- a/docs/shipping/freezing.rst +++ b/docs/shipping/freezing.rst @@ -70,13 +70,46 @@ bbFreeze Prerequisite is to install :ref:`Python, Setuptools and pywin32 dependency on Windows `. +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('script') - freezer.addScript('foobar.py') + 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 ~~~~~~