[bt-devel] Locales on Window / MacOS

Martin Gruner mg.pub at gmx.net
Wed Jul 14 22:56:10 MST 2010


Gary,
I agree and I will look into that.
mg

Am 15.07.10 06:03, schrieb Gary Holmlund:
> Martin,
>
> It does look like a simpler and nice method of setting locales. On
> Windows we still need to manage sword.conf to get the path to the HOME
> location of modules and the shared location for modules plus any other
> paths that the user can add via the Bookshelf Manager dialog. I would
> think that this would be similar to what is needed for Mac.
>
> Gary
>
> On 07/14/2010 01:05 PM, Martin Gruner wrote:
>> Hi Gary,
>>
>> thanks for your suggestions. I changed the Mac specific code to
>> a) install the locales.d folder on "make install"
>> b) load the locales from this application locales folder (see
>> bibletime_init.cpp: initBackends)
>>
>> I think this approach for loading the locales is simpler and more robust
>> than patching the sword.conf. What do you think?
>>
>> I will continue to work on creating the sword.conf in the right place
>> initially on Mac OS.
>>
>> Regards, mg
>>
>> Am 07.07.10 04:08, schrieb Gary Holmlund:
>>   
>>> 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
>>>
>>> _______________________________________________
>>> bt-devel mailing list
>>> bt-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/bt-devel
>>>
>>>      
>> _______________________________________________
>> bt-devel mailing list
>> bt-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/bt-devel
>>    
>
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel
>



More information about the bt-devel mailing list