-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from altmp/rc
Merge rc to release Former-commit-id: e7057a0
- Loading branch information
Showing
298 changed files
with
14,819 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test client changes | ||
on: | ||
push: | ||
paths: | ||
- "client/**" | ||
pull_request: | ||
paths: | ||
- "client/**" | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Fetch Submodules | ||
shell: bash | ||
run: | | ||
git submodule init | ||
git submodule update | ||
- name: Generate | ||
shell: bash | ||
run: | | ||
cd client | ||
cmake . -BBUILD | ||
- name: Build | ||
shell: bash | ||
run: | | ||
cd client | ||
cmake --build BUILD --config $BUILD_TYPE | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "src/helpers"] | ||
path = src/helpers | ||
url = https://github.com/altmp/v8-helpers.git | ||
[submodule "src/cpp-sdk"] | ||
path = src/cpp-sdk | ||
[submodule "shared/deps/cpp-sdk"] | ||
path = shared/deps/cpp-sdk | ||
url = https://github.com/altmp/cpp-sdk.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Win32 Static", | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE", | ||
"_UNICODE", | ||
"ALT_CLIENT_API", | ||
"ALT_CLIENT", | ||
"ALT_SERVER_API", | ||
"ALT_SERVER", | ||
"JS_MODULE_VERSION" | ||
], | ||
"windowsSdkVersion": "10.0.19041.0", | ||
"cppStandard": "c++17", | ||
"intelliSenseMode": "msvc-x64", | ||
"configurationProvider": "ms-vscode.cmake-tools", | ||
"includePath": [ | ||
"client/src", | ||
"client/BUILD/_deps/altv-js-deps-src/include", | ||
"server/src", | ||
"server/deps", | ||
"server/deps/nodejs/include", | ||
"server/deps/nodejs/deps/v8/include", | ||
"server/deps/nodejs/deps/uv/include", | ||
"shared/", | ||
"shared/deps" | ||
] | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(Windows) Attach", | ||
"type": "cppvsdbg", | ||
"request": "attach", | ||
"processId": "${command:pickProcess}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"files.associations": { | ||
"algorithm": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"cctype": "cpp", | ||
"chrono": "cpp", | ||
"cmath": "cpp", | ||
"codecvt": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"exception": "cpp", | ||
"filesystem": "cpp", | ||
"fstream": "cpp", | ||
"functional": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"ios": "cpp", | ||
"iosfwd": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"iterator": "cpp", | ||
"limits": "cpp", | ||
"list": "cpp", | ||
"locale": "cpp", | ||
"map": "cpp", | ||
"memory": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"ratio": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"string": "cpp", | ||
"system_error": "cpp", | ||
"thread": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"typeinfo": "cpp", | ||
"unordered_map": "cpp", | ||
"unordered_set": "cpp", | ||
"utility": "cpp", | ||
"vector": "cpp", | ||
"xfacet": "cpp", | ||
"xhash": "cpp", | ||
"xiosbase": "cpp", | ||
"xlocale": "cpp", | ||
"xlocbuf": "cpp", | ||
"xlocinfo": "cpp", | ||
"xlocmes": "cpp", | ||
"xlocmon": "cpp", | ||
"xlocnum": "cpp", | ||
"xloctime": "cpp", | ||
"xmemory": "cpp", | ||
"xmemory0": "cpp", | ||
"xstddef": "cpp", | ||
"xstring": "cpp", | ||
"xtr1common": "cpp", | ||
"xtree": "cpp", | ||
"xutility": "cpp", | ||
"deque": "cpp", | ||
"queue": "cpp", | ||
"sstream": "cpp", | ||
"compare": "cpp", | ||
"concepts": "cpp", | ||
"condition_variable": "cpp", | ||
"set": "cpp", | ||
"bit": "cpp", | ||
"charconv": "cpp", | ||
"clocale": "cpp", | ||
"format": "cpp", | ||
"forward_list": "cpp", | ||
"optional": "cpp", | ||
"stop_token": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build client", | ||
"type": "shell", | ||
"command": "cd client && build-debug.bat", | ||
"problemMatcher": ["$msCompile"], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
}, | ||
{ | ||
"label": "Build server", | ||
"type": "shell", | ||
"command": "cd server && ./build", | ||
"windows": { | ||
"command": "cd server && build.bat" | ||
}, | ||
"problemMatcher": ["$msCompile"], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
# altv-js-module | ||
JS module for alt:V Multiplayer. Powered by NodeJS & v8 | ||
# alt:V JS module | ||
|
||
## Troubleshooting | ||
**Problem**: I want to build a native Node.js addon with | ||
[node-gyp](https://github.com/nodejs/node-gyp) but the alt:V server can not load | ||
it and responds with following error: | ||
``` | ||
./altv-server: symbol lookup error: /usr/share/addon/binding.node: undefined symbol: node_module_register | ||
``` | ||
**Solution**: Add a C++ file to your project with following content and include | ||
it the ```sources``` in your ```binding.gyp``` file. | ||
```cpp | ||
#include <node.h> | ||
#include <dlfcn.h> | ||
Repository containing the JS module for [alt:V multiplayer](https://altv.mp/). | ||
|
||
extern "C" NODE_EXTERN void node_module_register(void* mod) { | ||
auto base_ptr = dlopen("libnode.so.72", RTLD_NOW | RTLD_GLOBAL); | ||
if (base_ptr == nullptr) { | ||
return; | ||
} | ||
auto register_func = reinterpret_cast<decltype(&node_module_register)>(dlsym(base_ptr, "node_module_register")); | ||
if (register_func == nullptr) { | ||
return; | ||
} | ||
register_func(mod); | ||
} | ||
## Structure | ||
|
||
| Directory | Description | | ||
| ------------------ | ------------------------------------------------------- | | ||
| [/client](/client) | Clientside JS module powered by V8 | | ||
| [/server](/server) | Serverside JS module powered by Node.js | | ||
| [/shared](/shared) | Shared code for the clientside & serverside module | | ||
| [/docs](/docs) | Documentation for the internal workings of the module | | ||
|
||
## Contributions | ||
|
||
All contributions are greatly appreciated. | ||
If there are any questions or you would like to discuss a feature, | ||
contact the *module maintainer*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Build files | ||
BUILD/ | ||
deps/v8/ | ||
dist/ | ||
|
||
# Editors | ||
.vs/ | ||
.vscode/settings.json | ||
|
||
# Extra | ||
tools/extra.bat |
Oops, something went wrong.