
User Contributed Notes 2 notes
shevegen at gmail dot com ¶
1 year ago
I believe this example is not correct; for example it shows "cmake" in
use but after you git clone the above URL, there are no cmake files.
So this can not possibly have worked; and I actually don't think there
ever was cmake used in the above repository, which makes you wonder
why the above code used cmake to begin with. Did it ever work? I am not sure;
I tend to assume it did not work.
whirlwind110 at 163 dot com ¶
5 years ago
Requirements:
PHP 7
libui (use current master)
Windows/MacOSX/Linux (GTK-3)
Install re2c:
sudo apt install re2c
Install libui:
git clone https://github.com/andlabs/libui.git
cd libui
sudo cp *.h /usr/local/include/
cmake .
cd out
sudo cp * /usr/lib/
Install ui:
Method one: use pecl:
sudo pecl install channel://pecl.php.net/ui-2.0.0
Method two:build source code:
git clone https://github.com/krakjoe/ui.git
cd ui
phpize
make
sudo make install
Enable ui.so:
sudo echo 'extension=ui.so' > /etc/php/7.0/mods-available/ui.ini
sudo ln -s /etc/php/7.0/mods-available/ui.ini 20-ui.ini
Test:
php -m
git clone https://github.com/krakjoe/ui.git
cd ui/examples/
php snake.php