strongback / strongback-java

A library for FIRST Robotics Competition robots that makes it easier to write and test your robot code.
MIT License
41 stars 38 forks source link

Strongback Executable - New project and log converter #15

Closed Zabot closed 9 years ago

Zabot commented 9 years ago

Here it is, there still is a bit of cleanup to do, but its pretty much ready to go, and it does affect #4, so I wanted to get it pushed.

Before merge:

Supersedes #14 Closes #6

Distribution file structure:

strongback
    ├── bin
    │   ├── strongback.sh -> /strongback-tools/scripts/strongback.sh
    │   └── strongback.bat -> /strongback-tools/scripts/strongback.bat
    ├── java
    │   ├── ant
    │   │   ├── build.properties -> /ant/strongback/build.properties
    │   │   └── build.xml -> /ant/strongback/build.xml
    │   ├── libs
    │   │   └── strongback.jar
    │   └── templates
    │       ├── build.properties.template -> /ant/project/build.properties.template
    │       ├── build.xml.template -> /ant/project/build.xml.template
    │       ├── classpath.template -> /IncludeInBuild/classpath.template
    │       ├── project.template -> /IncludeInBuild/project.template
    │       ├── Robot.java.template -> /IncludeInBuild/Robot.java.template
    │       └── TestRobot.java.template -> /IncludeInBuild/TestRobot.java.template
    ├── libs
    │   └── strongback-tools.jar
    └── strongback.properties -> /IncludeInBuild/strongback.properties
rhauch commented 9 years ago

Looks great. The only question is whether you want to handle the TODO mentioned above now or later, and that's up to you.

rhauch commented 9 years ago

BTW, I think we should hold off on the install script. Let's get a build and release mechanism working, and then we can add another script that installs or upgrades Strongback.

rhauch commented 9 years ago

One more thing: you said the directory structure would include:

├── libs
│   ├── logCon.jar
│   └── newProject.jar

Why create 2 JAR files? Wouldn't it just be easier to create a single strongback-executable.JAR? And speaking of that, what do you think about renaming the strongback-executable project (and JAR) to strongback-tools?

rhauch commented 9 years ago

I thought we talked about having one strongback script (well, one for Windows and one for everything else) whose second parameter would be the 'command'. Kind of like 'git'. The benefit is that we have fewer scripts to manage, and there's only one "executable" for users to learn and remember.

rhauch commented 9 years ago

@Zabot, I'd suggest having the script look at the first parameter and using it to pick the class file to run as main, and passing all other parameters as-is. But, it'd be nice if it could support a help command ... not sure if that should be a Java class or in the script itself. (Normally, I'd put it in the script, but I also don't write windows scripts. :-) )

Zabot commented 9 years ago

Bat file works in wine, I don't have a native windows machine to test it on right now. Both scripts do have a help option; right now it just spits out the sub-commands that can be used, but it can do more or less in the future.

rhauch commented 9 years ago

@Zabot, can you combine the scripts into one? I'd really like to have a single executable.

Zabot commented 9 years ago

I did, strongback.bat for windows and strongback.sh for everyone else.

rhauch commented 9 years ago

@Zabot, sorry about that. Looks good to me. Is there anything else you want to wait for, or can this be merged?

Zabot commented 9 years ago

Its good to go. Anything else can be taken care of in separate issues.

rhauch commented 9 years ago

Thanks, @Zabot. Nice work, as usual.