[bt-devel] Locales on Window / MacOS

Gary Holmlund gary.holmlund at gmail.com
Tue Jul 6 19:08:31 MST 2010


On 07/06/2010 01:15 PM, Martin Gruner wrote:
> Hi Gary,
>
>    
>>> reading through BT's code for windows, I noted that you do some fancy
>>> tricks to get BibleTime to read the locales directory of the installed
>>> Sword files of the Windows installer. It seems that it is possible to
>>> construct an sword::LocaleMgr object directly, where we can pass the
>>> directory to the constructor. Then we can set this as the LocaleMgr to
>>> use by LocaleMgr::setSystemLocaleMgr. That would eliminate the need for
>>> us to patch config files just to add the locale path. Do you think this
>>> would be a good idea?
>>>        
>> I don't remember all the details of why I did it a certain way. I sent
>> and received many emails with Matthew Talbert to get it going. Matthew
>> knew how it worked for Xiphos on Windows and we tried to make them
>> consistent. I did not try setting the LocaleMgr as you describe. I do
>> remember that before I got all the present setup in place, there
>> seemed to be a trade-off between finding the locale and also finding
>> all of the module search paths.
>>      
> what would you think about including the locales in BibleTime and
> installing them on "make install" so that we can consistently load them
> from our installation in all target systems? I think that would be a
> good idea.
>    
On linux they are part of the sword packages that are shared among 
several frontends of sword, so it does not seem good to do there.

On Windows we don't have any separate sword packages, so we install the 
locales with BibleTime. I would think we would do the same on Mac.
>>> Another question: when I start BT, and there is no ~/.sword/sword.conf,
>>> it will be created. Which code is responsible for that, is that BT or
>>> Sword itself (and where exactly)? I didn't find it so far. On a mac, the
>>> default location of this file should be somewhere else, but I didn't
>>> find how to change that.
>>>        
>> Look at BibleTime::initSwordConfigFile() in bibletime_init.cpp.
>>      
> Hm, it seems this function is only implemented on windows. But on other
> platforms, the sword.conf is also written (thus on Mac, too), but I
> don't know where, yet. Am I correct on that?
>    
I don't believe it is written on startup on linux. It is written by Bt 
when changing the "install folders" in the Bookshelf Manager dialog. 
Windows needed it to be created earlier so the locale could be 
specified. The locale being specified is needed when sword first is 
initialized. See setTargetList() in instbackend.cpp

> Thanks, mg
>    
Gary



More information about the bt-devel mailing list