开发者

running multiple configurations of an rcp with different shortcuts

I thought this would be straightforward but through lots of play and googling, I can't find the answer. So apologize up front if the answer is in front of my nose.

We have an rcp app that uses a application specific ini file to determine database, file locations, etc (call it bob.ini) to not confuse with the app ini file (call it xxx.ini and the exe is xxx.exe).

We want to run the app with different shortcuts so that we can use different bob.ini files so we set up variable in the config.ini file to point to that location. No problem so far, you run xxx.exe -configuration \location\config.ini and we have a different location for each configuration we want to run.

But what I also want to do (and I may not be saying this correctly) is to have config.ini file lo开发者_JAVA百科cated in a directory that is not writable (ie all the folders like org.eclipse.osgi, etc) and point that stuff to @user.home/somewhere. But that doesn't seem possible because once my shortcut say '-configuration \location\config.ini' the osgi.configuration.area is set. I want different configuration file to be in a folder by itself to give information but read only.

So then I tried using an xxx.ini file which I understand sets vm and vmarg info using -D but couldn't get the right combo

I know there base, default, shared+cascaded (which I don't understand), readonly but can't figure this out.

Your advice and recommendations are greatly appreciated.


You could put information in different xxx_1.ini xxx_2.ini files and have the shortcuts specify which one to use by running xxx.exe --launcher.ini xxx_1.ini.

Otherwise, I'm always a little fuzzy on all the configuration properties, but you can try osgi.configuration.cascaded and osgi.sharedConfiguration.area

So I think you would use xxx.exe -configuration \location\config.ini and then

/location/config.ini:
    osgi.configuration.cascaded=true
    osgi.sharedConfiguration.area=/sharedLocation/readonly/config.ini
    bob.ini.location=bob.ini
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜