-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
63 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,33 @@ | ||
Building on Windows | ||
=================== | ||
|
||
This section contains information about building Tribler on Windows. In the end you should be left with a ``.exe`` file which, when opened, enables users to install Tribler on their system. | ||
This guide installs a 64-bit version of Tribler and has been tested on Windows 10 and Windows 2008 Server R2, 64-bit. It is recommended to create this builder on a system that is already able to run Tribler from a git checkout (it means that all the required packages required by Tribler are installed already). In case you want to build a 32 bit version, just install all the dependencies mentioned in 32 bit version. | ||
Information about setting up a developer environment on Windows can be found `here <../development/development_on_windows.rst>`__. | ||
We assume you've set up your environment to run Tribler. | ||
Don't forget to build the GUI using NPM! | ||
Additionally, you will need to install: | ||
|
||
**When you have installed zope, an empty** ``__init__.py`` **file must be present in the zope folder. If this file is missing, a** ``No module named zope`` **error will be thrown. Create this file in the** ``site-packages/zope`` **folder if it does not exist.** | ||
- ``NSIS``, the ``SimpleFC`` plugin, and the ``nsProcess`` plugin. | ||
- The latest ``libsodium.dll`` release. | ||
- ``Microsoft Visual Studio 2022 Enterprise``. ``2022 Community`` will also work, but you need to edit `tribler.nsi` in the appropriate place. | ||
- ``Windows Kits 10.0.19041.0``. | ||
- ``OpenSSL``. | ||
|
||
Required packages | ||
----------------- | ||
.. note:: | ||
If you install any of these applications to non-default folders, you will need to modify the build scripts. | ||
|
||
To build a Tribler installer, you'll need some additional scripts and packages. The versions used as of writing this guide are mentioned next to the package or script. | ||
* The git command tools (version 2.7.0) are required to fetch the latest release information. These can be downloaded from `here <https://git-scm.com/download/win>`__. | ||
* PyInstaller, a tool to create an executable from python files. Install the latest version from pip: ``pip install pyinstaller``. | ||
* The builder needs to find all packages that are required by Tribler so make sure you can run Tribler on your machine and that there are no missing dependencies. | ||
* Nullsoft Scriptable Install System (NSIS) (version 2.5.0) is a script-driven Installer authoring tool for Microsoft Windows with minimal overhead. It can be downloaded `here <http://nsis.sourceforge.net/Download>`__. We selected version 2.5 as the uninstall functions were not called properly in 3.03b. | ||
* Three plugins are required.The UAC plugin is the first. This can be downloaded from `here <http://nsis.sourceforge.net/UAC_plug-in>`__ (version 0.2.4c). How to install a plugin can be found `here <http://nsis.sourceforge.net/How_can_I_install_a_plugin>`__. | ||
* The second plugin that is needed is AccessControl plug-in (version 1.0.8.1). It can be downloaded `here <http://nsis.sourceforge.net/AccessControl_plug-in>`__. | ||
* The third plugin required is NSIS Simple Firewall Plugin (version 1.2.0). You can download it `here <http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin>`__. | ||
* The fourth plugin needed is NSProcess (Version 1.6.7), which can be downloaded `here <http://nsis.sourceforge.net/NsProcess_plugin>`__. | ||
* A version of Microsoft Visual Studio should be installed (we use 2012), but make sure you do not have the build-tools only. The full (community) edition can be downloaded `here <https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx>`__. | ||
Run the following commands in your command prompt (assuming you are in the Tribler's repository root folder). | ||
|
||
Other packages can be installed using ``pip``: | ||
First, install additional requirements: | ||
|
||
.. code-block:: bash | ||
.. code-block:: | ||
python -m pip install -r requirements-build.txt | ||
Building & Packaging Tribler | ||
---------------------------- | ||
Second, create the ``.exe`` file in the ``dist`` directory. | ||
You can set the ``GITHUB_TAG`` to whatever you want to have your version set as. | ||
|
||
Start by cloning Tribler if you haven't done already (using the ``git clone`` command). | ||
Next, create a ``build`` folder directly on your ``C:\`` drive. | ||
Inside the ``build`` folder, put the following items: | ||
.. code-block:: | ||
1. A folder ``certs`` containing a ``.pfx`` key. In our case it's named ``swarmplayerprivatekey.pfx``. Make sure to rename paths in ``makedist_win.bat`` to match your file name. | ||
2. ``vc_redist_110.exe`` (Visual C++ Redistributable for Visual Studio 2012), which is available `here <https://www.microsoft.com/en-us/download/details.aspx?id=30679>`__. In case you build 32 bit, get the x86 version. Once more, don't forget to rename the file. | ||
3. ``libsodium.dll`` which can be downloaded from `libsodium.org <https://download.libsodium.org/libsodium/releases/>`_ (as of writing version 1.0.8). | ||
4. The openssl dll files ``libeay32.dll``, ``libssl32.dll`` and ``ssleay32.dll`` (place them in a directory named ``openssl``). | ||
|
||
Then: | ||
|
||
* Set a ``PASSWORD`` `environment variable <https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx?mfr=true>`__ with its value set to the password matching the one set in your ``.pfx`` file. | ||
* Create the ``.TriblerVersion`` file with the result of execution of the following command: ``git describe | python -c "import sys; print(next(sys.stdin).lstrip('v'))"`` | ||
* Create the ``.TriblerCommit`` file with the result of execution of the following command: ``git rev-parse HEAD`` | ||
* Set the ``TRIBLER_VERSION`` environment variable with the content of the ``.TriblerVersion`` file. | ||
* Set the ``QT_QPA_PLATFORM=offscreen`` environment variable | ||
* Set the ``QT_ACCESSIBILITY=1`` environment variable | ||
* Set the ``QT_IM_MODULE=ibus`` environment variable | ||
|
||
Finally, open a command prompt and enter the following commands (Change 11.0 depending on your version of Microsoft Visual Studio): | ||
Note that for building 32 bit you need to pass anything but 64, i.e. 32 or 86 to the ``update_version.py`` script. | ||
|
||
.. code-block:: bash | ||
python build\update_version.py 64 | ||
python build\win\replace_nsi.py -r . --architecture x64 | ||
set GITHUB_TAG="1.2.3" | ||
build\win\makedist_win.bat | ||
This builds an ``.exe`` installer which installs Tribler. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters