Compare commits

...

2 Commits

Author SHA1 Message Date
Fabien LOISON ea76ed0d2d
feat: Added scripts to build a redistribuable Linux binary 2024-03-20 14:04:17 +01:00
Fabien LOISON b8308c5098
docs: Updated winbuild docs and distributed Windows README 2024-03-20 13:55:08 +01:00
7 changed files with 102 additions and 8 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ _*.c*
.pytest_cache/
*.tags
/__misc__/
yoga-bin.*

View File

@ -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

28
linux-bin/README.md Normal file
View File

@ -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

31
linux-bin/build.sh Executable file
View File

@ -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

View File

@ -0,0 +1 @@
nuitka==2.1.2

View File

@ -4,13 +4,13 @@
YOGA is a command-line tool that:
* converts and optimizes images from various format to JPEG and PNG,
* converts and optimizes 3D models from various formats to GLB.
* 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 directory
YOGA does not need any installation. Just unzip the content of this archive
and you are ready to go! :)

View File

@ -9,11 +9,6 @@
* Visual Studio Build Tools (MSVC and MSBuild)
## Build and install from PYPI
pip install yoga
## Build standalone version from source
Clone this repository (using Git Bash):