Forked from samp-node
- Only can work with infernus.
- Update Node.jsto v22.20.0.
- 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.
- Updated github workflows.
- Building based on ubuntu-latestmeans you may need a higher version of glibc.
 
- Building based on 
git clone https://github.com/dockfries/samp-node
# or ssh
# git clone [email protected]:dockfries/samp-node.git
cd samp-node
git submodule update --init
chmod +x ./build.sh
./build.sh 2.6.1 # versioncd samp-node
mkdir build, releases -ErrorAction SilentlyContinue
cd build
cmake .. -A Win32
cmake --build . --config Release
cpack
cd ..
Move-Item -Path "build/cpack/*" -Destination "releases/" -Forcefork and run on github actions.
example v22.x
- delete everything under deps/node/include.
- download node-v22.20.0-headers.tar.gz.
- decompress and copy everything under node/v22.20.0/include/nodetodeps/node/include.
git clone https://github.com/nodejs/node.git -b v22.x --depth 1
cd node
.\vcbuild x86 dll openssl-no-asm
cd out/Release # so you can get the libnode.dll & libnode.lib, windows need this two files.- You need to install docker first.
- Create a normal user and set up home directories and passwd.
- Add this user to the docker group.
- sudo usermod -aG docker YOUR_NORMAL_USERNAME
 
su YOUR_NORMAL_USERNAME
/bin/bash
rm -fr ~/Devel/unofficial-builds-home
mkdir -p ~/Devel/unofficial-builds-home
cd ~/Devel/unofficial-builds-home
git clone https://github.com/dockfries/unofficial-builds
cd ~/Devel/unofficial-builds-home/unofficial-builds/recipes/x86_22/
chmod +x ./run.sh
chmod +x ./should-build.sh
cd ~/Devel/unofficial-builds-home/unofficial-builds
bin/local_build.sh -r x86 -v v22.20.0 # don't forget startWith 'v'
cp ~/Devel/unofficial-builds-home/staging/release/v22.20.0/node-v22.20.0-linux-x86.tar.gz /tmp
su YOUR_SUDO_USER
mv /tmp/node-v22.20.0-linux-x86.tar.gz ~
# use anything like shell/sftp download this file
# decompress it, you can see libnode.so.xxx in lib folder, that's what you need only.
# For version 22, `.so` files end with `127`after that, for local build samp-node, pls put your libnode into deps/node/lib/Release/win and deps/node/lib/Release/linux respectively.
for build samp-node, see .github/workflows/build.yml.
- 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