Page 1 of 1

Inserting a dollar symbol in the PostBuild commands?

Posted: Thu Jan 08, 2009 1:17 pm
by Jedive
First of all, I want to say thank you for creating such a wonderful IDE. I am using CodeLite 1.0.2419 on Mac OS X Leopard, and I'm truely loving it.

I have an executable project configured in CodeLite, and I use the PostBuild commands to generate the required app bundle. Basically, PostBuild calls an external "bundle.sh" script which generates the folders and property files of the bundle, and then uses "cp" to copy the binary and the required resources.

One of the resources I need to copy is a JPG image which has a dollar $ symbol on its name. In order to put a dollar symbol in the command, I think I should use the same syntax as in a Makefile, and I wrote it down like this:

Code: Select all

cp ../../Resources/Meshes/Teapot/$$spheremap.jpg ./$(ProjectName).app/Contents/Resources/$$spheremap.jpg
But the Build output tab logs this:

Code: Select all

cp ../../Resources/Meshes/Teapot/$spheremap.jpg ./test_teapot.app/Contents/Resources/$spheremap.jpg
cp: ../../Resources/Meshes/Teapot/.jpg: No such file or directory
The file is obviously not copied, while all the other resources are correctly copied into the bundle :)

Re: Inserting a dollar symbol in the PostBuild commands?

Posted: Thu Jan 08, 2009 2:19 pm
by eranif
On linux, placing a backslah in front of the $ works:

Code: Select all

cp ../../Resources/Meshes/Teapot/\$spheremap.jpg ./$(ProjectName).app/Contents/Resources/\$spheremap.jpg
Eran