CodeLite two stored configurations?

General questions regarding the usage of CodeLite
DarkBug
CodeLite Enthusiast
Posts: 18
Joined: Tue Mar 27, 2012 5:00 pm
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite two stored configurations?

Post by DarkBug »

What is the difference between those two configurations of CodeLite? Are both used?

configuration 1: C:\Program Files (x86)\CodeLite
configuration 2: C:\Users\DarkBug\AppData\Roaming\CodeLite

E.g. the lexers directory is stored in both configurations, but it seems to me, that this directory is only used from configuration 1.

Best regards,
DarkBug
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite two stored configurations?

Post by eranif »

DarkBug wrote:configuration 1: C:\Program Files (x86)\CodeLite
configuration 2: C:\Users\DarkBug\AppData\Roaming\CodeLite
The first path is the "clean" configurations that comes with codelite installer.
The second is the user modified configurations ( for example, when you edit any configuration in codelite like changing settings in the syntax highlight dialog - these changes will be written to the second path)

As a rule, an application should NEVER attempt to modify installation files placed under C:\Program Files\.. or under /usr/share/codelite (in many cases codelite will not have permission to modify those files)


Instead, application should write any user configuration to a dedicated location, the location is differ per OS:
Under Linux, codelite will write any modified settings to $HOME/.codelite/ ,under Windows it will be %appdata%\CodeLite\ and for Mac it will be under /Users/<username>/Library/Application Support/codelite

The user settings will always take precedence over the default settings. So if a file exists in both locations, the one under the user's directory will be used.

Also:
1) It is also safe to remove the user folder completely and restore codelite to its "factory settings" (and in many cases this is what I recommend people to do when they hit a wall...)
2) When codelite is un-installed, the user directory is *not* removed - so installing a new codelite will make use of these settings as well (this is how codelite preserve the settings between versions)

Eran
Make sure you have read the HOW TO POST thread
DarkBug
CodeLite Enthusiast
Posts: 18
Joined: Tue Mar 27, 2012 5:00 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite two stored configurations?

Post by DarkBug »

I have made a lexer and put it under C:\Program Files (x86)\CodeLite\lexers. I then can choose this lexer under Settings->Syntax Highlight and Fonts.... But if i put the lexer under C:\Users\DarkBug\AppData\Roaming\CodeLite\lexers, CodeLite won't recognize it.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite two stored configurations?

Post by eranif »

This is because codelite searches for the list of lexers under the installation directory (C:\Program Files\...)

Once codelite has an initial list, it will search for the user version of the lexer under the user's directory - if it will find it, it will override the default one with the user's version.
However, it does not search for list of lexers under the user's directory

Eran
Make sure you have read the HOW TO POST thread
Post Reply