I'm using xCode4 for MacOSX. I am trying to set it up so that it uses Kerm's 'compile.sh' as an external compiler. I have the stuff set up as follows:


Code:
Build Tool: compile.sh
Argument: $(ACTION)
Directory: ~/Desktop/dcs_sdk/asm/


Yet, I get a build error. 'Can't exec because the file or directory is missing'. Any Mac people here? What am I doing wrong?


**Not sure if this is where this belongs. Feel free to move.[/code]
Are you sure that it understands the ~ keyword? Else, you could try using ./compile.sh as well. Also, make sure that it strips out the file extension and is saving the source code in the dcs_sdk/asm/source/ directory.
_player1537 wrote:
Are you sure that it understands the ~ keyword? Else, you could try using ./compile.sh as well.

Failed as well.
_player1537 wrote:
Also, make sure that it strips out the file extension and is saving the source code in the dcs_sdk/asm/source/ directory.

I'm not sure how to set where it saves to. But the issue may be that it's looking for the file in the source directory, but it is not there. I'll have to move it.
XCode version and OS X? The most recent is Xcode 4, being $5 or free (both from the App Store) with the purchase of Lion, 10.7.

One thing I recommend, to get the accurate directory path, is to open terminal and drag the directory from the directory in. OS X will copy the path into Terminal, On the other hand, I don't believe you can just view the desktop like that.

I went ahead and made a folder on my desktop and got the path:

Code:
/Users/Alex/Desktop/Cemetech
comicIDIOT wrote:
XCode version and OS X? The most recent is Xcode 4, being $5 or free (both from the App Store) with the purchase of Lion, 10.7.

One thing I recommend, to get the accurate directory path, is to open terminal and drag the directory from the directory in. OS X will copy the path into Terminal, On the other hand, I don't believe you can just view the desktop like that.

I went ahead and made a folder on my desktop and got the path:

Code:
/Users/Alex/Desktop/Cemetech


XCode version 4 and OS X 10.6.8.


Code:
Build Tool: compile.sh
Argument: $(ACTION)
Directory: /Users/acagliano/Desktop/dcs_sdk/asm/


Still failing. I think it has to do with where compile.sh is pulling the source from.
Maybe you could modify compile.sh so it could take an arbitrary file path as an argument instead of just the name of your source file.
souvik1997 wrote:
Maybe you could modify compile.sh so it could take an arbitrary file path as an argument instead of just the name of your source file.


That would be a bump to Kerm Martian.
Although it's not the most elegant solution, I think you can modify compile.sh by adding these four lines after the #!/bin/bash:

Code:

if [ "$1" != "temp" ]
then
cp $1 ../source/temp.asm
exec $0 temp
fi

And, at the end of the script, put this:

Code:

rm ../source/temp.asm

I'm not sure this will work, though, but you should try it.
Yay for hacky solutions Very Happy I was going to respond with something similar to that. Although, compile.sh is just a wrapper around Brass and Kerm's linker, so it might be better to see if you can remove some of the restrictions it imposes and write another script.
Instead of trying to do it with one script, add several custom build phases (one for compiling, one for linking) with some script-magic to see if everything actually needs to be rebuilt.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement