-
Install on Linux
-
Install on Windows
Installing PHP-GLFW on MacOS¶
To make the installation on MacOS as painless as possible we provide an installer script that in most scenarios installs the extension in a one liner.
Installer¶
Run the following command to download and execute the installer.
Having PHP installed locally is required!
php -r "copy('https://raw.githubusercontent.com/mario-deluna/php-glfw/master/install/macos-installer.php', 'phpglfw-installer.php');" && php phpglfw-installer.php
Thats it, if you see the text "Installation finished!" you should be ready to go!
Manual installation¶
If you prefer a "manual" approach, ensure you have installed the php-dev
, git
and cmake
packages. They are required!
Clone the repository:
Configure and build the extension
make sure to add glfw.so
in the php.ini
file.
You can figure out the path to your php.ini file using:
Edit that file using you favorite editor:
And add the following line at the end of the file