Giter Site home page Giter Site logo

fork-php-tkui's Introduction

php-tkui

php-tkui allows you to build desktop ui applications with PHP only. It leverages FFI extension and Tcl/Tk for that, thus you don't need to compile or install any external extensions.

Requirements

  • PHP >= 7.4
  • ffi extension must be enabled
  • Tcl/Tk >= 8.6

Getting started

Make sure that Tcl/Tk is installed in your OS. For Debian/Ubuntu based distros you may install it with apt:

sudo apt install tcl tk

Next, check FFI extension is enabled:

php --ri ffi

Clone this repository and try out the demos:

git clone https://github.com/skoro/php-tkui.git php-tkui
cd php-tkui
composer install
php demos/buttons.php

Configuration

You may enable some application features like:

  • debug mode
  • appearance

Copy the provided .env.example into .env and customize the options.

Debug mode allows you to find out which commands are executed by Tcl engine. To enable the debug mode set:

DEBUG=true
DEBUG_LOG=php://stdout

All the debug messages will go to the console. You may specify a file name instead of console.

To change the application appearance comment out THEME option and set one of: clam, alt, default, classic. Additional themes for Windows: winnative, xpnative, vista. By default, auto is used, setting a theme depending on OS:

THEME=auto

Windows

You need to install one of Tcl/Tk binary distributions and set path to dlls in .env file like this:

WINDOWS_LIB_TCL=c:\\tcltk\\bin\\tcl86t.dll
WINDOWS_LIB_TK=c:\\tcltk\\bin\\tk86t.dll

fork-php-tkui's People

Contributors

skoro avatar jawira avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.