Skip to content

Commit

Permalink
Updated README, protobuf extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Allyans3 committed Jan 27, 2023
1 parent 6f533df commit 1744f2e
Show file tree
Hide file tree
Showing 9 changed files with 2,105 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,38 @@
<a href="https://github.com/Allyans3/protobuf-steam-auth"><img src="https://img.shields.io/packagist/l/Allyans3/protobuf-steam-auth?style=flat-square&color=3555555" alt="License"></a>
</p>

> To use this package you need to install php extension `protobuf`. Installation instructions are below.
## About Protobuf Steam Auth

This package provides the ability to authorize to the Steam using Google Protobuf.

## Installation

Run this text in a console to install this package from Packagist:
1. Run this text in a console to install this package from Packagist:

```
composer require allyans3/protobuf-steam-auth
```

2. Copy folder `protobuf-ext` from `/vendor/allyans3/protobuf-steam-auth` to your project:

```
cp -a /vendor/allyans3/protobuf-steam-auth/protobuf-ext .
```

3. Build php extension with next commands:

```
cd protobuf-ext
phpize
./configure
make
make install
```

4. Add line `extension=protobuf.so` to your php.ini file

## Usage

```php
Expand Down
11 changes: 11 additions & 0 deletions protobuf-ext/config.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dnl $Id$
dnl config.m4 for extension protobuf

PHP_ARG_ENABLE(protobuf, whether to enable protobuf support,
[ --enable-protobuf enable protobuf support])

if test "$PHP_PROTOBUF" != "no"; then
PHP_NEW_EXTENSION(protobuf, protobuf.c reader.c writer.c, $ext_shared)
fi

PHP_C_BIGENDIAN()
13 changes: 13 additions & 0 deletions protobuf-ext/php_protobuf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef PROTOBUF_PHP_PHP_PROTOBUF_H
#define PROTOBUF_PHP_PHP_PROTOBUF_H

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#define PHP_PROTOBUF_VERSION "0.12.3"
#define PHP_PROTOBUF_EXTNAME "protobuf"

extern zend_module_entry protobuf_module_entry;

#endif /* PROTOBUF_PHP_PHP_PROTOBUF_H */
Loading

0 comments on commit 1744f2e

Please sign in to comment.