This tutorial shows how to install the chat overflow framework. By now, working with the development environment is the only way. Currently, there are no builds available.
- Clone the main repository. Then clone the api into folder
codeoverflow/api
, the gui into foldercodeoverflow/gui
and public plugins repository intocodeoverflow/plugins-public
. - Setup the main repository as imported scala project, e.g. using IntelliJ. Make sure to refresh all sbt content and load the custom run configurations.
- You're done. Happy coding!
-
Download and install git (obviously) and Node.js. Make sure that you can run it using the console.
-
Clone the main repository using
git clone https://github.com/codeoverflow-org/chatoverflow.git
. -
Navigate to the created chatoverflow-folder, e.g. using
cd chatoverflow
. -
Clone the api repository into a folder named "api". using
git clone https://github.com/codeoverflow-org/chatoverflow-api.git api
. -
Clone the gui repository into a folder named "gui". using
git clone https://github.com/codeoverflow-org/chatoverflow-gui.git gui
. -
Clone the public plugins repository into a folder named "plugins-public" using
git clone https://github.com/codeoverflow-org/chatoverflow-plugins.git plugins-public
.Site note: You can name the folders whatever you want. But if you do so, update the names in the main build-file.
-
Open up your most favorite IDE for java (and scala) development. I recommend using IntelliJ IDEA. There is also a free community version available!
-
Make sure, IntelliJ IDEA and the scala plugin are up to date. Every time I open this software, a new update is available...
-
Choose open project and select the freshly cloned
chatoverflow
folder (with the main build.sbt) in it. Make sure, auto-import is NOT enabled. -
Click on
Refresh sbt project
. Make sure to use a up-to-date java 1.8 SDK, do not change any other settings in the dialog window. -
Wait for 5.2 years. In the background, 3 projects are build, ressources will be downloaded and a lot of magic happens!
-
When the process finished, you should see the project and its children in the project view. Get to know them (or wait till I introduce them later).
Site note: The run configurations contain a lot of sbt commands and presets for plugin development. You will probably never need more. Brief documentation can be found in the main build.sbt file.
-
Select the run configuration
Fetch plugins (sbt fetch)
and execute it. A file namedplugins.sbt
should be generated, containing all references to plugins and the api project. -
Use sbt reload (the refresh icon in the upper left corner of the sbt window, opened e.g. by View -> Tool Windows -> SBT) to reload the whole project. Now, the child projects should be recognized correctly.
-
Have a look at the application run configurations. Do they have an red X? Then they are broken. Click on
Edit configurations
and selectroot
as module ("Use classpath as module"). Now, they should be happy. -
Execute the run configuration
[Advanced] Full Reload and Run ChatOverflow
(and pray). This is only needed for the first startup and when you create a new plugin!- A lot happens now. First, all target folders and the build environment is cleaned.
- Then, the project is freshly build and all plugins are fetched. The plugins.sbt file is generated. Then, the whole build environment is reloaded.
- Next, all plugin versions and the api version are printed for debug reasons.
- Last, all plugins compiled code is packaged into several .JAR-Archives and copied to the
plugins
-folder. - Everything is set up, and the chat overflow framework is executed. It checks the plugin folder and tries to load the plugins. Done!
Site note: You do not have to repeat this step after each simple change. There is also a
[Simple]
run configuration for this.Yet another site note: The projects folder structure is realy easy.
- the api folder contains the API-project with all common chat overflow modelling.
- the plugins folder contains packaged plugins. Just leave him alone.
- the plugins-public folder contains all official/public chat overflow plugins. Each plugin has its own sub project.
- the project folder contains build code for the plugin framework.
- the src folder contains the chat overflow framework code.
- the target folder contains the build framework.
-
You're done. Happy coding!