Forked from AmyrAhmady/samp-node
- Only can work with infernus.
- Update
Node.jsto v22.23.2. - Both
ESModuleandCommonJSsupported, depending on the type field of package.json and the bundler output format. - Only
entry_fileis used,resourceconfig are removed. - Removed
samp.fireto avoid crashes. - Building based on
ubuntu-latestmeans you may need a higher version of glibc. - Updated github workflows.
This project depends on libnode — Node.js built as a shared library.
Pre-built binaries are downloaded automatically from github.com/dockfries/libnode/releases during CMake configuration.
See that repository for instructions on building libnode from source for a specific Node.js version.
If you prefer to build libnode yourself, place the files here:
| Arch | Windows | Linux |
|---|---|---|
| x86 (default) | deps/node/lib/Release/win/libnode.lib + libnode.dll |
deps/node/lib/Release/linux/libnode.so.127 |
| x64 | deps/node/lib/Release/win64/libnode.lib + libnode.dll |
deps/node/lib/Release/linux64/libnode.so.127 |
Set -D__deps_check_enabled=false when running cmake to skip the download.
git clone https://github.com/dockfries/samp-node
# or ssh
# git clone git@github.com:dockfries/samp-node.git
cd samp-node
git submodule update --init
chmod +x ./build.sh
./build.sh 22.23.2 # versioncd samp-node
mkdir build && cd build
# for 32-bit:
cmake -DCMAKE_BUILD_TYPE=Release ..
# for 64-bit:
# cmake -DPLUGIN_ARCH=x64 -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)cd samp-node
mkdir build, releases -ErrorAction SilentlyContinue
cd build
# for 32-bit:
cmake .. -A Win32
# for 64-bit:
# cmake .. -A x64 -DPLUGIN_ARCH=x64
cmake --build . --config Release
cpack
cd ..
Move-Item -Path "build/cpack/*" -Destination "releases/" -Forcefork and run on github actions.
- Damo for his samp.js project.
- Hual for some v8 tips
- Graber for a few suggestions and helpful advices
- pkfln (peek) for fixing and adding some samp callbacks/events in samp-node, and making @sa-mp/node
- polygxn for his changes in README.md which don't exist anymore
- JustMichael (ADRFranklin) for his contributions, including fixes, features, and any others he's going to do in future
- Alexander Plutalov (plutalov) for fixing long time crash issues and not having context running properly
- iAmir (AmyrAhmady) samp-node and omp-node developer