-
Notifications
You must be signed in to change notification settings - Fork 41
Building and running
Make sure to understand the Technical Details before trying to build and run Galapagos.
Galapagos depends heavily on Tortoise to handle a lot of the work of running models, so to contribute changes for Galapagos often involves contributing a change for Tortoise as well. As such the below instructions also include information on setting up the Tortoise repository, too.
- Install a Java 17 JDK. Any OpenJDK should work fine, or Oracle's if you prefer. Liberica's JDK is a fine choice if you aren't sure which to choose.
- You need to make sure that you have the installed Java 17 in particular on your
PATH
. Runningjavac -version
at a command prompt or terminal should give the appropriate version.
- You need to make sure that you have the installed Java 17 in particular on your
- Install SBT (on Mac OS X:
brew install sbt
) - Install Node and NPM (on Mac OS X:
brew install node
installs both). At least Node.js 14 is required for Galapagos, 16 is recommended. - Clone the Galapagos repository using
git clone https://github.com/NetLogo/Galapagos.git
and the Tortoise repositorygit clone https://github.com/NetLogo/Tortoise.git
- If you intend to work in your own forked repositories, you can use those instead.
- In your terminal, navigate into the root of the Galapagos repository folder.
- Run the
sbt
command to start the build, test, and run tool. - Run the command
run <desired port number>
(port number is optional, defaults to 9000) - Open your browser and connect to the URL
http://localhost:<desired port number from above>
-
Note: This will take a while the first time you try to connect. This is because Play does not compile up-to-date sources until they are requested. (If you would like to force compilation ahead of time, you can use the
compile
command in the Play console.) The upshot of this compilation strategy is that Play servers rarely need to be restarted during development, because Scala/Java/CoffeeScript sources are always recompiled when newer versions are available.
-
Note: This will take a while the first time you try to connect. This is because Play does not compile up-to-date sources until they are requested. (If you would like to force compilation ahead of time, you can use the
To get Tortoise building and running, in case you're making changes to the NetLogo Web compiler or runtime simulation engine, check out the steps for building and running on the Tortoise wiki.
You should now be ready to make changes and see them when run
ing Galapagos locally! If you need to see results from a Tortoise change in Galapagos or you want to try fixing some issues or making some improvements be sure to read our Contributing guide.
Here is a community provided Docker file for easy build and deployment of Galapagos. Please verify the file does what you'd like (and nothing else) before using, the CCL provides no guarantees for it.