Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 2.69 KB

WINDOWS.md

File metadata and controls

69 lines (54 loc) · 2.69 KB

Zephir Installation/Usage Guide (Windows)

This guide explains how to use zephir using a windows operating system. Some parts are optional, when you have a specific PHP version. Parts which are only necessary for a specific PHP version, are marked as such. PHP-Version requirements are marked using [ ]

Software Requirements [PHP 5.5 or later]

Software Requirements General

setx php_sdk "c:\path-to-php-sdk"
setx php_devpack "c:\path-to-extracted-devpack"

Installation of Zephir

  • Clone/Download the repository and set the path as below
setx path "%path%;c:\path-to-zephir"
cd c:\path-to-zephir
composer install

Installation of Zephir Parser

  1. Download Zephir Parser for Windows
  2. Extract the DLL file and copy it to your PHP extensions directory
  3. Edit your php.ini file and add this line:
    [Zephir Parser]
    ; You can use here absolute path to your custom modules dir
    ; or relative to the PHP modules dir
    extension=zephir_parser.dll

NOTE: Also you can compile it yourself.

Usage of Zephir

  • [PHP7 or later] Open the Visual Studio 2015 Command Prompt (Find it by searching for cmd or just open "%VS140COMNTOOLS%\VsDevCmd")
  • [PHP5.5 or later] Open the Visual Studio 2012 Command Prompt (Find it by searching for cmd or just open "%VS110COMNTOOLS%\VsDevCmd")
  • Execute %PHP_SDK%\bin\phpsdk_setvars
  • CD to your extension and zephir build
  • Take the built .dll from your_ext/Release/php_extname.dll (or your_ext/Release_TS/php_extname.dll)

Additional Links