Skip to content

Instantly share code, notes, and snippets.

@AlinaNova21
Last active October 29, 2016 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlinaNova21/94c6c8188ed9d8109c6383a006108ddf to your computer and use it in GitHub Desktop.
Save AlinaNova21/94c6c8188ed9d8109c6383a006108ddf to your computer and use it in GitHub Desktop.

Requirements:

From here on, the following folder structure is assumed for simplicity:

  • steamworks_sdk
  • greenworks
  • server
    • modules
    • assets
    • mods
    • .screepsrc
    • db.json
    • package.json
    • rebuild.sh

Note that only the files listed above are required for the server, the rest are for electron

Inside server run bash rebuild.sh Goto https://steamcommunity.com/dev/apikey and get a Steam API key, add it to your .screepsrc

Done! Now you can start the server with:

node modules/launcher/bin/screeps.js start

And CLI:

node modules/launcher/bin/screeps.js cli

#!/bin/bash
rm -r greenworks/lib/sdk # Just to make sure
cp -r steamworks_sdk greenworks/lib/sdk
pushd greenworks
npm install
popd
cp -f greenworks/build/Release/*.node server/modules/backend/greenworks/lib/
for M in $PWD/server/modules/*/
do
pushd $M
npm install
popd
done
npm install -g node-gyp
pushd server/modules/driver/native
node-gyp configure
node-gyp build
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment