Skip to content

Commit ed702c2

Browse files
committed
client/server: Update README(s)
Former-commit-id: bfc1aa4
1 parent eecbb48 commit ed702c2

File tree

2 files changed

+9
-39
lines changed

2 files changed

+9
-39
lines changed

client/README.md

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
# Official clientside JavaScript runtime for alt:V
1+
# Clientside JavaScript runtime for alt:V
22

3-
## To build:
4-
Run `.\tools\build.bat` (Make sure to run this script from the main directory of the repo)
3+
*Powered by V8*
54

6-
Or use the VSCode task
5+
To build the module, read the article on [how to build the module](../docs/building.md#client).
76

8-
Built `altv-client-js.dll` is now inside `dist` directory (if build was successful)
9-
10-
## To test:
11-
Get dev branch of alt:V client (download from https://altv.mp or change branch in `altv.cfg`)
12-
13-
Place `altv-client-js.dll` into the `modules/altv-client-js` directory in the alt:V client folder. (You need to create these directories yourself)
14-
15-
Set `debug: true` in `altv.cfg`
16-
17-
### All contributions are appreciated.
7+
To troubleshoot issues, read the article on [troubleshooting](../docs/troubleshooting.md#client).

server/README.md

+5-25
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
1-
# altv-js-module
2-
JS module for alt:V Multiplayer. Powered by NodeJS & v8
1+
# Serverside JavaScript runtime for alt:V
32

4-
## Troubleshooting
5-
**Problem**: I want to build a native Node.js addon with
6-
[node-gyp](https://github.com/nodejs/node-gyp) but the alt:V server can not load
7-
it and responds with following error:
8-
```
9-
./altv-server: symbol lookup error: /usr/share/addon/binding.node: undefined symbol: node_module_register
10-
```
11-
**Solution**: Add a C++ file to your project with following content and include
12-
it the ```sources``` in your ```binding.gyp``` file.
13-
```cpp
14-
#include <node.h>
15-
#include <dlfcn.h>
3+
*Powered by V8 and NodeJS*
164

17-
extern "C" NODE_EXTERN void node_module_register(void* mod) {
18-
auto base_ptr = dlopen("libnode.so.72", RTLD_NOW | RTLD_GLOBAL);
19-
if (base_ptr == nullptr) {
20-
return;
21-
}
22-
auto register_func = reinterpret_cast<decltype(&node_module_register)>(dlsym(base_ptr, "node_module_register"));
23-
if (register_func == nullptr) {
24-
return;
25-
}
26-
register_func(mod);
27-
}
5+
To build the module, read the article on [how to build the module](../docs/building.md#server).
6+
7+
To troubleshoot issues, read the article on [troubleshooting](../docs/troubleshooting.md#server).

0 commit comments

Comments
 (0)