Group all the user configuration file under a ".coriolis/" directory.

* Change: In CRL Core, in coriolisInit.py now read the configuration
    files from a ".coriolis2/" directory. This is to avoid too many
    dot files in the user's directory. Files have also been renamed:
       .coriolis2.conf         ==>  .coriolis2/settings.conf
       .coriolis2_techno.conf  ==>  .coriolis2/techno.conf
* Change: In Kite, in kiteInit.py follow the same policy as CRL Core
    for configuration file.
       .coriolis2.kite.py      ==>  .coriolis2/kite.py
This commit is contained in:
Jean-Paul Chaput 2014-09-27 17:40:35 +02:00
parent 9c322501fe
commit c244c9ce70
4 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
install ( FILES coriolis2_techno.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 ) install ( FILES techno.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( DIRECTORY common DESTINATION ${SYS_CONF_DIR}/coriolis2 ) install ( DIRECTORY common DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( DIRECTORY cmos DESTINATION ${SYS_CONF_DIR}/coriolis2 ) install ( DIRECTORY cmos DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( DIRECTORY vsc200 DESTINATION ${SYS_CONF_DIR}/coriolis2 ) install ( DIRECTORY vsc200 DESTINATION ${SYS_CONF_DIR}/coriolis2 )

View File

@ -86,10 +86,10 @@ def coriolisConfigure():
Cfg.Configuration.pushDefaultPriority ( Cfg.Parameter.Priority.ConfigurationFile ) Cfg.Configuration.pushDefaultPriority ( Cfg.Parameter.Priority.ConfigurationFile )
technoFiles = [ helpers.sysConfDir+'/coriolis2_techno.conf' ] technoFiles = [ helpers.sysConfDir+'/techno.conf' ]
if os.getenv('HOME'): if os.getenv('HOME'):
technoFiles += [ os.getenv('HOME')+'/.coriolis2_techno.conf' ] technoFiles += [ os.getenv('HOME')+'/.coriolis2/techno.conf' ]
technoFiles += [ os.getcwd()+'/.coriolis2_techno.conf' ] technoFiles += [ os.getcwd()+'/.coriolis2/techno.conf' ]
technoFiles.reverse() technoFiles.reverse()
for technoFile in technoFiles: for technoFile in technoFiles:
@ -121,13 +121,13 @@ def coriolisConfigure():
, (helpers.sysConfDir+'/'+symbolicTechno+'/plugins.conf' , SystemFile|ConfigurationHelper) , (helpers.sysConfDir+'/'+symbolicTechno+'/plugins.conf' , SystemFile|ConfigurationHelper)
] ]
if os.getenv('HOME'): if os.getenv('HOME'):
confFiles += [ (os.getenv('HOME')+'/.coriolis2.conf', 0) ] confFiles += [ (os.getenv('HOME')+'/.coriolis2/settings.conf', 0) ]
else: else:
w = WarningMessage(['The <HOME> environment variable is not defined, this is most unusual.' w = WarningMessage(['The <HOME> environment variable is not defined, this is most unusual.'
,'It prevents the loading of ${HOME}/.coriolis2.conf']) ,'It prevents the loading of ${HOME}/.coriolis2/settings.conf'])
print w print w
confFiles += [ (os.getcwd()+'/.coriolis2.conf', 0) ] confFiles += [ (os.getcwd()+'/.coriolis2/settings.conf', 0) ]
if helpers.xmlCompatMode: if helpers.xmlCompatMode:

View File

@ -33,7 +33,7 @@ def kiteHook ( **kw ):
print ErrorMessage( 3, 'kiteHook(): Must be run from a KiteEngine.' ) print ErrorMessage( 3, 'kiteHook(): Must be run from a KiteEngine.' )
return return
userInit = os.path.join( os.getcwd(), '.coriolis2.kite.py' ) userInit = os.path.join( os.getcwd(), '.coriolis2/kite.py' )
if (os.path.exists(userInit)): if (os.path.exists(userInit)):
execfile( userInit ) execfile( userInit )
return return