Building » History » Version 14
Sergey Smolov, 04/05/2023 06:17 PM
1 | 1 | Sergey Smolov | h1. Building |
---|---|---|---|
2 | |||
3 | The tool building is based on the "pyInstaller":http://www.pyinstaller.org/ |
||
4 | |||
5 | h2. Windows |
||
6 | |||
7 | 9 | Sergey Smolov | # Install Python 3.* interpreter from "here":https://www.python.org/downloads/ |
8 | 13 | Sergey Smolov | # Install PyWin32 from "here":https://github.com/mhammond/pywin32/releases |
9 | 1 | Sergey Smolov | # Get pip-Win Python package manager from "here":https://sites.google.com/site/pydatalog/python/pip-for-windows and run it. |
10 | # In the pip-Win Command field enter the following: |
||
11 | <pre> |
||
12 | venv -c -i pyi-env-name |
||
13 | </pre> |
||
14 | then click Run. |
||
15 | This creates a new virtual environment rooted at C:\Python\pyi-env-name and makes it the current environment. A new command shell window opens in which you can run commands within this environment. Enter the command: |
||
16 | <pre> |
||
17 | 9 | Sergey Smolov | pip3 install PyInstaller |
18 | 1 | Sergey Smolov | </pre> |
19 | # Once pyInstaller is installed, start pip-Win, in the Command field enter the following: |
||
20 | <pre> |
||
21 | venv pyi-env-name |
||
22 | </pre> |
||
23 | then click Run. |
||
24 | 2 | Sergey Smolov | # Go to the tool sources folder. |
25 | 1 | Sergey Smolov | # Run the following command: |
26 | <pre> |
||
27 | 7 | Sergey Smolov | pyinstaller traceutils\trace_matcher.py -n traceutils --add-data="LICENSE;." --add-data="README;." -p="traceutils;traceutils\record" -d |
28 | 1 | Sergey Smolov | </pre> |
29 | # Go to the _dist_ subdirectory and zip the result. |
||
30 | 3 | Sergey Smolov | |
31 | h2. Linux |
||
32 | |||
33 | 11 | Sergey Smolov | # Get _pip_ installation script from "here":https://pip.pypa.io/en/stable/installing/ and install it: |
34 | <pre> |
||
35 | $ sudo apt install curl |
||
36 | $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py |
||
37 | </pre> |
||
38 | 3 | Sergey Smolov | # Run the _pip_ installation script as follows: |
39 | <pre> |
||
40 | 9 | Sergey Smolov | sudo python3 get-pip.py |
41 | 3 | Sergey Smolov | </pre> |
42 | # Install _pyInstaller_ as follows: |
||
43 | <pre> |
||
44 | 12 | Sergey Smolov | pip3 install PyInstaller |
45 | 3 | Sergey Smolov | </pre> |
46 | 10 | Sergey Smolov | # Go to the @traceutils@ project folder. |
47 | 3 | Sergey Smolov | # Run the following command: |
48 | <pre> |
||
49 | 14 | Sergey Smolov | pyinstaller src/traceutils/trace_matcher.py --distpath ./build/target -n traceutils --add-data 'LICENSE:.' --add-data 'README.md:.' --add-data 'ChangeLog.md:.' -p 'src/traceutils/:src/traceutils/record/' |
50 | 3 | Sergey Smolov | </pre> |
51 | 14 | Sergey Smolov | # Go to the _build/target_ subdirectory and zip the result. |