Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build scripts? #1

Open
refi64 opened this issue Jun 9, 2015 · 7 comments
Open

Build scripts? #1

refi64 opened this issue Jun 9, 2015 · 7 comments

Comments

@refi64
Copy link
Collaborator

refi64 commented Jun 9, 2015

Took me a bit to realize that all the hunters had to be linked together, and I still can't figure out which class to run. A Gradle build script or at least a shell script would be very nice (and preferably before The Protect our Wumpuses Act is passed)!

@CaseCal
Copy link
Owner

CaseCal commented Jun 9, 2015

I'm not that familiar with Gradle, but I've added you as a collaborator if you want to implement it yourself. You should run the MetaManager class after adding an instance of your hunter to the hunters linkedlist, and I've updated the readme to say this as well. Thanks for catching that!

@refi64
Copy link
Collaborator Author

refi64 commented Jun 9, 2015

@cain93 Well, I don't like Gradle. Or Java. In fact, I don't even know Gradle. I just figured it seemed like you were good at Java and therefore knew how to implement one. :)

I can take a stab at it, though.

@CaseCal
Copy link
Owner

CaseCal commented Jun 12, 2015

Haha I don't really know Gradle either, I always thought it was more for corporate development and stuff :P

@CaseCal
Copy link
Owner

CaseCal commented Jun 12, 2015

Personally, I would just install and use Eclipse

@refi64
Copy link
Collaborator Author

refi64 commented Jun 16, 2015

@cain93 Ugh...never got it to work. These are the commands I'm running:

/usr/bin/javac -d build/Hunters -verbose Hunters/RandomHunter.java
/usr/bin/javac -d build/Hunters -verbose Hunters/ElmerFudd.java
...
cd build
/usr/bin/jar cf Mechanics.jar Hunters/Hunters/HumanHunter.class Hunters/Mechanics/Hunter.class 
Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/NascarHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/Badger.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/HuddleHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/Idomeneus.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/MonsterHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Move.class Hunters/Mechanics/Room.class Hunters/Hunters/PacingHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/ParanoidHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/WalkingIdiot.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/NealHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/Laomedon$status.class Hunters/Hunters/Laomedon$1.class Hunters/Hunters/Laomedon.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/TriggerHappyHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/FullCoverageHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/ElmerFudd$1.class Hunters/Hunters/ElmerFudd.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Move.class Hunters/Mechanics/Room.class Hunters/Hunters/ScaredyCat.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/Pacifist.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/EatsShootsAndLeaves$RoomInfo.class Hunters/Hunters/EatsShootsAndLeaves.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Move.class Hunters/Mechanics/Room.class Hunters/Hunters/Stay$1.class Hunters/Hunters/Stay.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Move.class Hunters/Mechanics/Room.class Hunters/Hunters/EmoHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class Hunters/Hunters/RandomHunter.class Hunters/Mechanics/Hunter.class Hunters/Mechanics/Occupant.class Hunters/Mechanics/Move.class Hunters/Mechanics/Direction.class Hunters/Mechanics/Room.class
cd ..
/usr/bin/java -cp build/Mechanics.jar Mechanics.MetaManager

(of course, I'm not typing these by hand; they were run by a build system)

And I'm getting:

Error: Could not find or load main class Mechanics.MetaManager

Damn, I hate Java...

@CaseCal
Copy link
Owner

CaseCal commented Jun 17, 2015

You probably don't need to be building a jar, just compile each java file, then run MetaManager

@CaseCal
Copy link
Owner

CaseCal commented Jun 17, 2015

If you put them all in a single src file and create a separate build folder, you should be able to just say
javac -sourcepath src -d build src/*/.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants