File tree 2 files changed +9
-39
lines changed
2 files changed +9
-39
lines changed Original file line number Diff line number Diff line change 1
- # Official clientside JavaScript runtime for alt: V
1
+ # Clientside JavaScript runtime for alt: V
2
2
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*
5
4
6
- Or use the VSCode task
5
+ To build the module, read the article on [ how to build the module ] ( ../docs/building.md#client ) .
7
6
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 ) .
Original file line number Diff line number Diff line change 1
- # altv-js-module
2
- JS module for alt: V Multiplayer. Powered by NodeJS & ; v8
1
+ # Serverside JavaScript runtime for alt: V
3
2
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*
16
4
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 ) .
You can’t perform that action at this time.
0 commit comments