Skip to content

Commit 5034e9b

Browse files
committed
Add flashpoint ext code
1 parent da4a406 commit 5034e9b

File tree

8 files changed

+435
-0
lines changed

8 files changed

+435
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,5 @@ tmp-php.ini
281281
!/ext/fileinfo/magicdata.patch
282282
!/ext/pcre/pcre2lib/config.h
283283
!/win32/build/Makefile
284+
285+
/copy.bat

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files.associations": {
3+
"php_string.h": "c",
4+
"php_http.h": "c",
5+
"zend_compile.h": "c"
6+
}
7+
}

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
</a>
88
</div>
99

10+
# Flashpoint Archive Modifications
11+
12+
This copy of PHP is for building our own PHP extension, Flashpoint.
13+
14+
Windows users see: https://github.com/php/php-sdk-binary-tools
15+
16+
Windows Example usage:
17+
18+
SDK:
19+
`.\phpsdk-starter.bat -c vc15 -a x86 -s 14.16`
20+
*Move into php-src folder*
21+
`buildconf --force`
22+
`configure --disable-all --enable-cli --enable-flashpoint=shared`
23+
`nmake`
24+
25+
See `Release_TS/php_flashpoint.dll` output
26+
1027
# The PHP Interpreter
1128

1229
PHP is a popular general-purpose scripting language that is especially suited to

ext/flashpoint/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Flashpoint PHP Extension
2+
3+
## Build
4+
5+
Build with `--enable-flashpoint=shared` to create a shared library. This can then be loaded via php cli as `php.exe -dextension=flashpoint script.php` where the resulting dll is available to the cli app.
6+
7+
## Usage
8+
9+
Hooks into:
10+
- Require / Includes
11+
- `file`
12+
- `readfile`
13+
- `file_get_contents`
14+
15+
If a file is missing, attempts to fetch it from the Flashpoint Game Server running at `127.0.0.1:22501`
16+
17+
Config options are not currently present

ext/flashpoint/config.m4

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
PHP_ARG_ENABLE([flashpoint],
2+
[whether to enable Flashpoint support],
3+
[AS_HELP_STRING([--enable-flashpoint],
4+
[Enable Flashpoint support])])
5+
6+
if test "$PHP_FLASHPOINT" = "yes"; then
7+
PHP_NEW_EXTENSION(flashpoint, flashpoint.c, $ext_shared)
8+
end

ext/flashpoint/config.w32

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ARG_ENABLE("flashpoint", "enable flashpoint support", "no");
2+
3+
if (PHP_FLASHPOINT != "no") {
4+
EXTENSION("flashpoint", "flashpoint.c");
5+
}

0 commit comments

Comments
 (0)