kfields / attacus

Python powered Flutter Shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attacus 🦋 🐍

Flutter SDL Python

Flutter

SDL

Required

Optional

Clone

git clone --recursive https://github.com/kfields/attacus
cd attacus

Extra Steps

You need to download the Flutter engine binaries from: Custom-Flutter-Engine-Embedders

Extract to: [project-root]/binaries/flutter

Development

Tool Chain

scikit-build

pybind11

Build

poetry shell
poetry install
python setup.py build [--build-type [Release|Debug]}

Release

python setup.py build

Debug

python setup.py build --build-type Debug
#or
python setup.py build -G "Visual Studio 16 2019" --build-type Debug
#or
python setup.py build -G "Visual Studio 17 2022" --build-type Debug

Quick Start

git clone --recursive https://github.com/kfields/attacus
cd attacus
mkdir build
cd build
cmake ..

Or

mkdir build-debug
cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ..

Wayland

sudo apt install libwayland-dev
sudo apt install libxkbcommon-dev
sudo add-apt-repository ppa:christianrauch/libdecoration

cmake -DATT_WM_WAYLAND=ON -DCMAKE_BUILD_TYPE=Debug ..

Glad

v1
glad --generator c --no-loader --out-path src

v2
glad --api gl:core --out-path src/glad c
flutter channel master
flutter config --enable-custom-devices
flutter custom-devices

C:\Users\kurti\AppData\Roaming.flutter_custom_devices.json

    {
      "id": "attacus",
      "label": "Attacus",
      "sdkNameAndVersion": "Attacus 0.1",
      "platform": null,
      "enabled": true,
      "ping": [
        "ping",
        "-n",
        "1",
        "-w",
        "500",
        "localhost"
      ],
      "pingSuccessRegex": "[<=]\\d+ms",
      "postBuild": null,
      "install": [
        "python",
        "--version"
      ],
      "uninstall": [
        "python",
        "--version"
      ],
      "runDebug": [
        "python",
        "main.py"
      ],
      "forwardPort": null,
      "forwardPortSuccessRegex": null,
      "screenshot": null
    }

Get the SHA of the Flutter engine you wish to use

cd flutter/bin/internal
cat engine.version

Flutter Examples

flutter build bundle
python main.py

or

flutter run

icudtl.dat

flutter\bin\cache\artifacts\engine\windows-x64\icudtl.dat

I'm manually copying this into the build directory. Not good. It needs to be copied over automatically

About

Python powered Flutter Shell

License:MIT License


Languages

Language:C 61.1%Language:C++ 38.0%Language:CMake 0.7%Language:Python 0.1%