Skip to content

Environment

Ethan707 edited this page Sep 5, 2021 · 5 revisions

Environment

Environment contain running environment and building environment

Attention: Modifying in C++ requires recompiling the file, but modifying in python does not require recompiling

a) Running Environment

There are two ways to run Sparcraft-Synthesizer

  1. Use the well-set singularity image and run with it (Recommend)

    1. Install the singularity in your Linux, here is the tutorial

    2. go to the Sparcraft/scripts folder

    3. run the command

      singularity exec project.sif python3 main.py {argument}

    the detail of the argument can see the Argument section

  2. Run on Ubuntu Environment or WSL2 (Ubuntu)

    1. Install these two libraries (Please must use Ubuntu here):

      • libsdl2-dev
      • libsdl2-image-dev
    2. go to the Sparcraft/scripts folder

    3. run the command

      python3 main.py {argument}

      the detail of the argument can see the Argument section

b) Building Environment

Compilation Instructions:

  1. Install the required libraries

    • libsdl2-dev
    • libsdl2-image-dev
  2. Clone the BWAPI GitHub repository somewhere on your system

    git clone https://github.com/bwapi/bwapi.git
  3. Edit the Makefile to point to the directory that you cloned BWAPI BWAPI_DIR=/where_you_cloned_to/bwapi/bwapi Attention: it is bwapi/bwapi here

  4. If your BWAPI_DIR doesn't contain the file svnrev.h, you need to generate it using the vbs script in that dir (Note: this may have to be done in windows, but you can just copy the generated .h files to Linux and it will work)

  5. Run make in the SparCraft directory, the binary will go to the SparCraft/bin directory

Clone this wiki locally