|appledoc won´t work for me||Tomte||3/28/12 11:30 AM|
After hours of searching i have problems i can´t get rid of. I got the latest release of appledoc and followed the quick install guide. My Problems began as i tried to install the templates but i solved it. Then i tried to build the project which had an error saying: ERROR: AppledocException: At least one directory or file name path is required, use 'appledoc --help'. After a request for help at StackOverflow i tried to give the build an argument (--help). That worked! The help was shown in the console in xCode. I moved the build to my $PATH, but now i have no clue what to do.
Every time i try to run the appledoc in terminal it says: -bash: appledoc: command not found! I´ve done everything, but i can´t help - it won´t work for me. As i´m completely new to this, i need some help. How can i solve this problem?
Am i right, that if i can´t run the command line tool, i can´t use appledoc? Is there another way to do so? Please help, Tomte
|Re: appledoc won´t work for me||Tomaz Kragelj||3/28/12 11:13 PM|
Oh, just answered your question on stack overflow, now I noticed the email :) You must give the tool at least one path to source files, see usage examples on http://gentlebytes.com/appledoc-docs-examples-basic/
If you're using it from within Xcode, you can setup command line in schema editor. It's a bit acquard compared to cmd line, but essentially you give it a single option per line. The order of lines determines the order of options, so add your source paths at the end.
If you're using it from Terminal, just type all options and paths separated by spaces.
|Re: appledoc won´t work for me||Tomte||3/29/12 12:37 AM|
Thanks a lot for your reply! As in StackOverflow commented i have the problem that the output file won´t work because of "command not found" error in terminal.After using the minimum command line, i got following error:
$ appledoc --project-name appledoc -- project-company "gentle Bytes" --company-id com.gentlebytes --output ~~/help
-bash: appledoc: command not found
I´ve moved it to my$PATH, but it won´t still work. Is there an issue with Xcode-select? I had to use this as part of the install process of the templates with the sh file.
|Re: appledoc won´t work for me||Tomaz Kragelj||3/29/12 1:08 AM|
If you type "which appledoc" in Terminal, does it find your executable? If not, you need to copy it to one of the directories in path, then it should work. Alternatively you can just use full path to executable, just for test. From stackoverflow question I understood that it was working when using --help, so it should work the same by giving it other switches. However you're describing you got output in Xcode output, so I'm assuming you've just run the tool in Xcode after building it. You can find build executable in you derived data folder (~/Library/Developer/Xcode/DerivedData/appledoc... for version 4).
Also in your example, you probably mistyped ~~/help - should only be ~/help. Also you didn't specify source paths (this isn't causing you issues right now, but as soon as the executable will run, it will bail out). So full cmd line would be something like:
$ appledoc --project-name appledoc -- project-company "gentle Bytes" --company-id com.gentlebytes --output ~/help ~/MyProjectSourceDir
Hope this helps, Tom
|Re: appledoc won´t work for me||Tomte||3/29/12 2:39 AM|
Thanks again! The curious thing is, that when i navigate to the derived data folder and try to run the executable, it still gives me the "command not found" error. I still can use the appledoc project to generate a documentation with arguments like Caleb on StackOverflow told.
Do i have to give the project an "initial" argument to compile the executable? When i use "which appledoc" the terminal accepts it but gives me no output - it gives me just a new line.
|Re: appledoc won´t work for me||Tomaz Kragelj||3/29/12 2:53 AM|
You need to use ./appledoc if you're in the folder - that's how unix works. If which doesn't return anything, then appledoc is not in your path; you need to copy it to one of the directories that are in the path, then you can use simply "appledoc" from any folder.
To see the list of directories, type "echo $PATH" and you'll see all the dirs separated by colon (:) - on my system I get:
So I'd need to copy to one of the given folders, for example /usr/local/bin would be a good choice.
|Re: appledoc won´t work for me||Tomte||3/29/12 4:02 AM|
Man, i have to learn much about Mac and Unix. With ./appledoc i can access the executable in the terminal. After figuring out how i can look into the /usr/local/bin (the place i thought i have the executable moved to), i found out that the executable was moved there but renamed to "bin". A simple mistake in the shell and some hours are wasted! Hope this helps the other noobs like me :)
Thanks for helping me!
|Re: appledoc won´t work for me||Tomaz Kragelj||3/29/12 4:03 AM|
Glad it was solved!