https://github.com/ardillo-php/ext
PHP extension for building native desktop applications
https://github.com/ardillo-php/ext
ardillo asyncio desktop desktop-app extension gui php php-extension
Last synced: 3 days ago
JSON representation
PHP extension for building native desktop applications
- Host: GitHub
- URL: https://github.com/ardillo-php/ext
- Owner: ardillo-php
- Created: 2023-07-16T21:09:41.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-30T18:26:53.000Z (over 1 year ago)
- Last Synced: 2024-07-03T23:50:25.134Z (over 1 year ago)
- Topics: ardillo, asyncio, desktop, desktop-app, extension, gui, php, php-extension
- Language: C
- Homepage: https://ardillo.dev
- Size: 355 KB
- Stars: 19
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
## Ardillo PHP Extension
[](https://github.com/ardillo-php/ext/actions/workflows/ci.yaml)
[](LICENSE)
The Ardillo extension provides an object-oriented PHP interface to the [libui-ng](https://github.com/libui-ng/libui-ng) library as well as routines for implementing a [ReactPHP event loop](https://github.com/ardillo-php/loop). The end goal is to provide a framework for developing cross-platform desktop applications in PHP, as seen in our [examples](https://github.com/ardillo-php/examples).
Please head to [ardillo.dev](https://ardillo.dev) for documentation.
### Build requirements
- Your operating system build essentials (Xcode/clang on macOS, build-essential on Linux, MS Visual Studio 2019 on Windows);
- PHP development headers and tools;
- Meson/Ninja build system;
For Linux builds, you will also need the GTK development headers.
### Build and install using PECL
Please note this method is currently available just for Linux and macOS.
Download the [latest extension package](https://github.com/ardillo-php/ext/releases/download/v0.1.1/ardillo-0.1.1.tgz) manually or via curl:
```sh
curl -s -L https://github.com/ardillo-php/ext/releases/download/v0.1.1/ardillo-0.1.1.tgz -o ardillo.tgz
```
Then install it using PECL:
```sh
sudo pecl install ardillo.tgz
```
The Ardillo extension has yet to be published on the PECL repository.
### Build from source
After cloning the repository, you will need to initialize the submodule then you can proceed to build the extension.
On unices, you can use the following commands:
```sh
git submodule update --init
phpize
./configure
make -j
sudo make install
```
On Windows, you should use the following commands:
```sh
git submodule update --init
cd libui-ng
meson setup build --default-library=shared
ninja -C build
cd ..
phpize
configure
nmake
nmake install
```
Since libui-ng is presently built as a shared library, you might want to copy the libui.dll file (`libui-ng\build\meson-out\libui.dll`) to a directory reachable by your Ardillo applications.
### License
The Ardillo extension is licensed under the [MIT license](LICENSE).
### Acknowledgements
The Ardillo extension is based on the [libui-ng](https://github.com/libui-ng/libui-ng) library, which is licensed under the [MIT license](https://github.com/libui-ng/libui-ng/blob/master/LICENSE.md).
The Windows I/O implementation is based on the [wepool](https://github.com/piscisaureus/wepoll) library, which is licensed under the [BSD 2-Clause license](https://github.com/piscisaureus/wepoll/blob/dist/LICENSE).
### Contributing
Bug reports (and small patches) can be submitted via the [issue tracker](https://github.com/ardillo-php/ext/issues). Forking the repository and submitting a Pull Request is preferred for substantial patches. Please be sure to read and comply with the [Contributing Terms](CONTRIBUTING.md) document before proceeding.