Inserting a dollar symbol in the PostBuild commands?

General questions regarding the usage of CodeLite
Jedive
CodeLite Curious
Posts: 6
Joined: Thu Jan 08, 2009 1:07 pm
Contact:

Inserting a dollar symbol in the PostBuild commands?

Post 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 :)
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Inserting a dollar symbol in the PostBuild commands?

Post 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
Make sure you have read the HOW TO POST thread
Post Reply