使用不同的快捷方式运行 rcp 的多个配置
我认为这很简单,但通过大量的游戏和谷歌搜索,我找不到答案。因此,如果答案就在我眼前,请先道歉。
我们有一个 rcp 应用程序,它使用应用程序特定的 ini 文件来确定数据库、文件位置等(称为 bob.ini),以免与应用程序 ini 文件(称为 xxx.ini,exe 是 xxx.exe)混淆。
我们希望使用不同的快捷方式运行应用程序,以便可以使用不同的 bob.ini 文件,因此我们在 config.ini 文件中设置变量以指向该位置。到目前为止没问题,您运行 xxx.exe -configuration \location\config.ini 并且我们要运行的每个配置都有不同的位置。
但我还想做的(我可能没有正确地说出这一点)是将 config.ini 文件位于不可写的目录中(即所有文件夹,如 org.eclipse.osgi 等)并指出该内容到@user.home/某处。但这似乎不可能,因为一旦我的快捷方式说“-configuration \location\config.ini”,osgi.configuration.area 就被设置了。我希望不同的配置文件单独位于一个文件夹中以提供信息但只读。
所以然后我尝试使用 xxx.ini 文件,我理解该文件使用 -D 设置 vm 和 vmarg 信息,但无法获得正确的组合
我知道有基础、默认、共享+级联(我不明白)、只读但无法弄清楚这一点。
非常感谢您的意见和建议。
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 located 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将信息放入不同的 xxx_1.ini xxx_2.ini 文件中,并通过运行
xxx.exe --launcher.ini xxx_1.ini
使用快捷方式指定要使用哪个文件。否则,我对所有配置属性总是有点模糊,但你可以尝试 osgi.configuration.cascaded 和 osgi .sharedConfiguration.area
所以我认为你会使用
xxx.exe -configuration \location\config.ini
然后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