Skip to content

Latest commit

 

History

History
173 lines (124 loc) · 3.51 KB

README.md

File metadata and controls

173 lines (124 loc) · 3.51 KB

GHost.js



🎲 Overview


Ghost++ — is a Warcraft III game hosting bot. It can host Warcraft III games on LAN, on battle.net, on PVPGN, and on any combination of these networks at the same time.

As the original project ghostplusplus based on ghost,

This one is a try to port ghost++ to js. Here is the original repo location ghost.js started and maintained by JiLiZART (Nikolay Kostyurin)




📑 Navigation


  1. Demo
  2. Prerequisites
  3. Installation
  4. Launch
  5. Platform Specific
  6. Create issue



📺 Demo

Click on it below :

asciicast




🚧 Prerequisites


You must have :

  • Node.js
  • Npm

or install :

  1. Install Node Version Manager with these commands:
    sudo apt update
    sudo apt install build-essential ; sudo apt install libssl-dev
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
    source ~/.bashrc
    

  1. Install latest Node.js :
    nvm install node
    nvm use node
    

  1. Install Npm :
    nvm install --latest-npm
    




🔨 Installation


  1. Install required packages : sudo apt install git cmake libclang-6.0-dev libgmp10 libgmp-dev libgmp3-dev

  2. Go to the directory where you want to store your bot : cd ~

  3. Clone this repo to your computer git clone https://github.com/ice-go/ghost.js

  4. Go to cloned repo : ghost.js

  5. Install Node modules : npm i

    Bncsutil compilation
    cd bncsutil
    cmake -G "Unix Makefiles" -B./build -H./
    cd build && make
    sudo make install
    cd .. && cp -r src/bncsutil/ ../src/libbncsutil/src/
    cd .. && rm -rf bncsutil
    sudo ln -s /usr/local/lib/libbncsutil.so libbncsutil.so
    

    StormLib compilation
    git clone https://github.com/ladislav-zezula/StormLib.git
    cd StormLib
    mv Makefile.linux Makefile && make
    sudo make install
    cp -r src/ ../src/libStorm/src/
    cd .. && rm -rf Stormlib
    sudo ln -s /usr/local/lib/libStorm.so /usr/lib/libstorm.so
    



🔌 Launch


Npm Commands
name Description
npm start Regular execution
npm run dev Start in debug mode



🔧 Platform Specific

If you get sort of bncsutil/stormlib errors then you can get rid of it by generating wrappers regarding to your platform:

Bncsutil wrapper
cd src/libbncsutil
./ffi-generate.sh > libbncsutil.js
cd -

Stormlib wrapper
cd src/libStorm
./ffi-generate.sh > libStorm.js
cd -

Next, you must comment out undefined properties related to libbncsutil or libstorm.




📢 Create issue

If you have any questions feel free to ask them here.