Skip to content

Latest commit

 

History

History
86 lines (66 loc) · 1.97 KB

File metadata and controls

86 lines (66 loc) · 1.97 KB

Hosted Tools Creation Guide

This is a step-by-step explanation of how we created the tools that we host and that are used by zinstaller. You can also compile these tools manually and use the version you want.

Python Requirements

Clone the latest Zephyr repository:

git clone https://github.com/zephyrproject-rtos/zephyr.git
cd zephyr

Create a requirements directory:

mkdir requirements

Copy the requirements files:

cp zephyr/scripts/requirements*.txt requirements/

Package the requirements:

7z a -tzip requirements-3.7.0.zip requirements

7-Zip Portable (Windows)

Download and install 7-Zip Portable from PortableApps.com.

Create a self-extracting archive:

cp -r 7-ZipPortable/App/7-Zip64 7-Zip
7z a -sfx 7-Zip-24.08.exe 7-Zip

OpenSSL (libssl-1) (Linux)

Download the OpenSSL source:

wget https://www.openssl.org/source/openssl-1.1.1t.tar.gz

Extract the source:

tar xf openssl-1.1.1t.tar.gz

Rename and package the source:

mv out/ openssl-1.1.1t
tar cjf openssl-1.1.1t.tar.bz2 openssl-1.1.1t

Portable Python (Linux)

This setup is based on the portable-python project. Created on an Ubuntu 20.04 host.

Install the required dependencies:

sudo apt-get install python3-pip python3-venv python3-setuptools python3-tk libffi-dev \
libgdbm-compat-dev libbz2-dev libreadline-dev libncurses-dev libssl-dev \
libsqlite3-dev libdb-dev libgdbm-dev tk-dev tcl-dev

Create a virtual environment:

/usr/bin/python3 -m venv /tmp/pp

Install portable-python:

/tmp/pp/bin/python -m pip install portable-python

Inspect the Python installation:

/tmp/pp/bin/portable-python inspect /usr/bin/python3

Ensure that all necessary modules, including _ssl and _tkinter, are installed.

Build portable Python:

/tmp/pp/bin/portable-python build 3.11.9