https://github.com/grephq/php-desktop-library
php-desktop library source code
https://github.com/grephq/php-desktop-library
c gtk3 php-desktop php-gtk php-gtk3 php-library swig
Last synced: 2 months ago
JSON representation
php-desktop library source code
- Host: GitHub
- URL: https://github.com/grephq/php-desktop-library
- Owner: grephq
- Created: 2022-09-11T14:25:08.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-30T23:18:31.000Z (over 2 years ago)
- Last Synced: 2025-02-03T22:29:22.209Z (4 months ago)
- Topics: c, gtk3, php-desktop, php-gtk, php-gtk3, php-library, swig
- Language: C
- Homepage: https://github.com/grephq/php-desktop
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
How to compile?
---------------- Install [swig](https://www.swig.org) from official site or via package manager. e.g.
```bash
# Debian based distributions
apt install swig
```
- Install GTK library. e.g.
```bash
# Debian based distributions
apt install libgtk-3-dev
```
- Install PHP development package. e.g.
```bash
# Debian based distributions
apt install php7.4-dev
```
- Execute the following commands
```bash
swig -php Source.i
gcc `php-config --includes` `pkg-config --cflags gtk+-3.0` -fpic -c Source_wrap.c Source.c `pkg-config --libs gtk+-3.0`
gcc `pkg-config --cflags gtk+-3.0` --shared Source_wrap.o Source.o -o .so `pkg-config --libs gtk+-3.0`
```
- Move the generated file to the ```php-config``` installation directory
```bash
mv .so $(php-config --extension-dir)/
```
- Copy ```Source.php``` to ```PHP-Desktop/util/ ```Windows Support
---------------
Well, in theory it should work on windows after
- Installing swig on windows
- Installing windows version of the gtk library
- Compiling this library to a dll. You might have to download php source code and manually add/edit/remove references to libraries. Goodluck trying to get this to work.
- Move the dll to ```/ext/```