Page 1 of 1
Letting CL find XRC and INI files
Posted: Wed Feb 25, 2009 3:49 am
by coder99
I'm still using CL 2674 and have tried a search in this forum, but have not found any answer to my 'problem'
I am currently debugging a wxWidgets application using XRC resources - both for ANSI and Unicode versions.
My problem is that it seems I need to have copies of the XRC file in the debug and release directories for CL to be able to find them for debugging or running the apps.
Same issue with using .INI files - this is unlike MS VC, which seems to adjust its search path accordingly.
I've played with the Config entry 'Working Directory" but without much luck.
Re: Letting CL find XRC and INI files
Posted: Wed Feb 25, 2009 12:42 pm
by eranif
The search path is set by your code and by setting the correct working directory.
If your working directory is set to /some/path it means that codelite will do:
cd /some/path
and then it will execute the command you placed in the: project settings -> general -> command
Eran
Re: Letting CL find XRC and INI files
Posted: Wed Feb 25, 2009 8:52 pm
by coder99
That is what it does, but ....
Since I am building both an ANSI and Unicode release and debug version - and want to keep the executables separate (in separate directories) - otherwise I need to at least re-link every time I want to run or test a version - this means that I have to copy the .INI file, any help files and XRC files to 4 different directories and if I happen to modify one of these I have to ensure all copies are also updated - this is a very big nuisance.
Somehow, the MS IDE VS seems quite happy to use these files in their 'home' location - the root directory of the project or any sub-directories, which I have to take into account in locating the files from within my program - at least that is the way it appears to me. Only when I start using CL do I have to start copying these files to each configuration directory.
I have never seen any place in VS where one would or could specify just what sort of files VS will track down in this way, but as far as I can tell, it works for all of the files I have run into.
Re: Letting CL find XRC and INI files
Posted: Wed Feb 25, 2009 11:10 pm
by eranif
CL can do it also:
Lets assume you have debug and release configurations:
codelite *by default* will set the following values in the project settings -> general tab:
This is the file tree:
Code: Select all
root/
Debug/
Release/
Configuration_Files/
WorkingDirectory: $(IntermediateDirectory)
Command: ./$(ProjectName)
You could set things like this:
WorkingDirectory: ./Configuration_Files/
Command: ../Debug/MyExe
and for the release configuration:
WorkingDirectory: ./Configuration_Files/
Command: ../Release/MyExe
This will solve your problem.
I am working with VS as well, and there is no magic there, and VS is not smarter... its just that its defaults values are set in a way that the files can be picked in the way you want - settings them like I suggested will do the same for you.
Eran
Re: Letting CL find XRC and INI files
Posted: Thu Feb 26, 2009 12:47 am
by coder99
And so it does - and I think I understand a bit more about how these directory specifications are used.
I had played with them some, but never quite got it right.
Thank you ever so much, Eran.