2

After wasting some time to figure out what goes wrong, I finally have to ask for help. I want to use appledocs from Gentle Bytes. I followed every step of the quick install guide, but I´m not able to compile the project.

Here is what I´ve done: 1. cloned it from git://github.com/tomaz/appledoc.git 2. installed the templates to ~/Library/Application Support/appledoc 3. tried to compile the project

Everytime I try to compile, I get following error: ERROR: AppledocException: At least one directory or file name path is required, use 'appledoc --help'

What do I have to do now?

dgw
  • 13,418
  • 11
  • 56
  • 54
Tomte
  • 1,331
  • 12
  • 19

2 Answers2

1

Sounds like you've compiled it just fine and are now running the program. If it's a command-line program try command-option-R in Xcode to provide some arguments (i.e. names of files that you want to process).

Caleb
  • 124,013
  • 19
  • 183
  • 272
  • Ok, when i build the project it says that there´s the error showed in my post. When i use the argument "--help", i see the help in the console window. But when i switch to Terminal it says that no command is found. I´m really new to this and i don´t even understand whats wrong... – Tomte Mar 28 '12 at 12:28
  • There's no command found in Terminal because the program isn't in your $PATH. You can either add the directory containing your program to your $PATH, or move the program to a location that *is* in your $PATH, or specify the program using its full path name. In other words, your problem isn't with building the program, it's with using your shell effectively. – Caleb Mar 28 '12 at 12:33
  • Well that explains why it´s working with arguments. So i have to learn more about the shell. Thank you very much! – Tomte Mar 28 '12 at 14:31
  • Look in the Products folder in your project to find the built program. Control-click the program and choose "Show in Finder". Open a terminal window and type "mv " at the prompt (no return). Drag your program into the terminal window, so that it's full path appears on the command line. Follow that with " /usr/local/bin" for example, to move your program to /usr/local/bin, which is probably in your PATH. Press return. Now you should be able to run the program at the command line. If not, try `echo $PATH` to display your PATH, and make sure that it contains `/usr/local/bin`. – Caleb Mar 28 '12 at 14:46
  • That´s very curious: I´ve done all of the steps provided on [link](https://github.com/tomaz/appledoc/blob/master/Readme.markdown), but nothing helps. I´ve moved the build to my $PATH but it won´t work. In Terminal it says always: command not found. Somethings very wrong here. – Tomte Mar 28 '12 at 18:02
0

The error means you didn't give it source paths: after all switches, you must give it at least one path to your source files. Can be either file or directory. In later case it will recursively scan the dir. Here's example

appledoc <options> ~/MyProject

Above example will use ~/MyProject directory as a source. You can also add multiple source paths. Note that you need to give the tool few options, see this page for minimum command line and other usage examples.

You either have to copy appledoc executable to one of directories in your path, as suggested by Caleb, or use full path to it when invoking (for example: /path/to/appledoc)

Tom
  • 1,522
  • 9
  • 10
  • Thanks for the reply! The problem is not that it won´t compile, the problem is that i can´t use the output file. I´ve moved the output file to my $PATH but regardless of which argument i give the appledoc file in the terminal, it won´t work. It says always: command not found – Tomte Mar 29 '12 at 07:24
  • A little mistake by me, and some things to learn: i moved the executable to ur/local/bin - i thought. It was moved but renamed to "bin". So thanks for all the help, i have to learn much about Unix and shell and so on! – Tomte Mar 29 '12 at 11:04