Trouble with Dev setup

storr

New Member
Hello all,

I recently came upon this project and thought it was pretty cool, and since I just finished a Java course, I figured I might see if I can't figure out what's going in the code here and possibly help out!

So I was plugging away through the Dev setup on github, and I've run into a problem with gradle

I try to run the command
Code:
gradlew idea
and I receive the error

Code:
storr@storr-desktop:~/Dev/Terasology$ gradlew idea
No command 'gradlew' found, did you mean:
 Command 'gradle' from package 'gradle' (universe)
gradlew: command not found
I know gradle is installed, i've run
Code:
gradle -v
and it returns the version number.

This is on a ubuntu 12.04 box.

Any help is appreciated! I'm excited to get this up and running so I can start messing around in the code!

Sorry to any mod if this isn't posted in the correct section, I searched the forum for this question and couldn't find anything so I figured I might ask.
 

x3ro

Member
Contributor
GUI
I think you might want to run

Code:
./gradlew run
Note the "./" in front, because "gradlew" is a file that lives in the Terasology repository (a wrapper around the gradle executable).
 

storr

New Member
Thanks for that!

typing ./gradlew run launched the game for me. Is that was it was supposed to do?

I kept following the instructions on the dev setup and have everything open in intellij, but when i attempt to compile Terasology.java under the game directory, i get 7 errors starting with this one:

Code:
java: package org.terasology.game.modes does not exist
The paths are all right as far as I can tell... I don't understand why it's can't find them when it comes time to compile.

Any help is appreciated!
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Hi storr and welcome :)

You did manage to run ./gradlew idea after the comment from x3ro then? Figuring probably so since you've got the project open in IntelliJ. I added a related note to the wiki real quick

Be sure to open it from the generated .ipr file rather than from the Gradle script (or "importing" the directory), I'm not entirely sure if that'll work as well as from the .ipr. We've had trouble related to that reported in the past.

You may also need to look under File --> Project Structure to see if you have a good project SDK defined, should be Java 7. Probably also set just fine already.

Are you trying the develop branch or multiplayer branch? Probably doesn't relate, but good to know, just in case. At this point all development should be against the multiplayer branch - develop will be archived and replaced soon.

The good news is that if ./gradlew run did launch the game then it should just be some issue with the IntelliJ setup that we can figure out. Let us know if you've checked everything I've noted here :)

If in doubt, take a screenshot or two of the game loaded in IntelliJ to attach here? We probably should attach some of those with a working setup to the GitHub wiki sometime.
 

storr

New Member
Thanks!

For some reason I thought I should run ./gradlew run instead of ./gradlew idea... So I went back and ran ./gradlew idea and it built the project perfectly. I was able to open the project in intellij and compile + run successfully!

Thanks again!
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Excellent! Here's for hoping you'll find something neat to code - let us know if you have any additional questions :)
 
Top