mirror of https://github.com/wanadev/yoga.git
feat: Added scripts to build a redistribuable Linux binary
This commit is contained in:
parent
b8308c5098
commit
ea76ed0d2d
|
@ -17,3 +17,4 @@ _*.c*
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
*.tags
|
*.tags
|
||||||
/__misc__/
|
/__misc__/
|
||||||
|
yoga-bin.*
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
# YOGA binary for Linux
|
||||||
|
|
||||||
|
> YOGA: Yummy Optimizer for Gorgeous Assets
|
||||||
|
|
||||||
|
YOGA is a command-line tool that:
|
||||||
|
|
||||||
|
* converts and optimizes images from various format to JPEG, PNG and WebP,
|
||||||
|
* converts and optimizes 3D models from various formats to glTF and GLB.
|
||||||
|
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
YOGA does not need any installation. Just unzip the content of this archive
|
||||||
|
and you are ready to go! :)
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
YOGA is a CLI (command line) program. To use it, open a terminal in this folder
|
||||||
|
and just use one of the following commands, depending on the terminal you are
|
||||||
|
using.
|
||||||
|
|
||||||
|
./yoga.bin -h
|
||||||
|
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
Project page and source code:
|
||||||
|
|
||||||
|
* https://github.com/wanadev/yoga
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
|
||||||
|
* https://wanadev.github.io/yoga/
|
||||||
|
|
||||||
|
Please report any issue on our bug tracker:
|
||||||
|
|
||||||
|
* https://github.com/wanadev/yoga/issues
|
|
@ -0,0 +1,28 @@
|
||||||
|
# YOGA Linux binary
|
||||||
|
|
||||||
|
This forlder contains scripts to compile yoga as an executable binary for Linux.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
* Python 3.x
|
||||||
|
* Python 3 headers (Debian/Ubuntu: `apt install python3-dev`)
|
||||||
|
* Virtualenv (Debian/Ubuntu: `apt install python3-venv`)
|
||||||
|
* Build tools and CMake (Debian/Ubuntu: `apt install build-essential cmake`)
|
||||||
|
|
||||||
|
|
||||||
|
## Build standalone version from source
|
||||||
|
|
||||||
|
Clone this repository:
|
||||||
|
|
||||||
|
git clone https://github.com/wanadev/yoga.git
|
||||||
|
cd yoga
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
Run the build script (from the root directory of this repository):
|
||||||
|
|
||||||
|
./linux-bin/build.sh
|
||||||
|
|
||||||
|
Once the build finished, you will find the result in the `yoga-bin.dist` folder. To run YOGA, use the `yoga` executable:
|
||||||
|
|
||||||
|
./yoga-bin.dist/yoga.bin -h
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
# Create and/or activate the virtual env
|
||||||
|
mkdir -p build/
|
||||||
|
|
||||||
|
if [ ! -d build/__env__/ ] ; then
|
||||||
|
python3 -m venv build/__env__/
|
||||||
|
source build/__env__/bin/activate
|
||||||
|
pip install -r linux-bin/requirements.txt
|
||||||
|
pip install -e .
|
||||||
|
else
|
||||||
|
source build/__env__/bin/activate
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Build YOGA
|
||||||
|
python -m nuitka \
|
||||||
|
--standalone \
|
||||||
|
--follow-imports \
|
||||||
|
--include-package=PIL \
|
||||||
|
linux-bin/yoga-bin.py
|
||||||
|
|
||||||
|
|
||||||
|
# Rename YOGA binary
|
||||||
|
mv yoga-bin.dist/yoga-bin.bin yoga-bin.dist/yoga.bin
|
||||||
|
|
||||||
|
|
||||||
|
# Copy additional files
|
||||||
|
cp LICENSE yoga-bin.dist/LICENSE
|
||||||
|
cp linux-bin/README-linux-dist.md yoga-bin.dist/README.md
|
|
@ -0,0 +1 @@
|
||||||
|
nuitka==2.1.2
|
Loading…
Reference in New Issue