[bt-devel] General development questions re installmgr

Joachim Ansorg bt-devel@crosswire.org
Thu, 5 Jul 2001 11:34:39 +0200


Hi Tim!

> > Do you want to add the installmgr to the optionsdialog?
> > Please don't forget, that the interface of the installmgr may get bigger
>> so it's hard to integrate it into the optionsdialog. And it should be
>> possible to open the installmgr using a command line option.
> > If you have questions about this please ask me.
> >
> > This is my opinion and it's probably not the best. I'm open for
> > discussion about this point.

> Sure, would be glad to discuss it.  I was thinking about adding an icon
> to the optionsdialog list that would bring up a page to display a list
> of currently installed modules.  Also on this page would be a button
> "Configure Modules..." that would open the installmgr dialog.  This
> dialog would designed to be reusable (when used by an external
> stand-alone program as well).  This would be a modal dialog on top
> of a modal dialog... lots of other examples of this in KDE, but does
> this fit our look and feel?

This sounds mocuh more nice than I thought first. I thought you wanted to 
build the complete installmgr into the optionsdialogpage.

My idea is/was the following:
We could add a new menu-item in the menubar "Main index->Manage modules...". 
Choosing this opens a modal dialog to install and uninstall new modules. I 
don't know if a list of installed modules is really necessary in the 
optionsdialog because the main indes is already a list of them.
We could also add a new item in the RMB menu of the main index "Uninstall 
this module..." which is enabled if the mouse was pressed over a module.

The installmanager should be really easy to use. Users are reporting very 
often, that they cannot install modules...
Ask if you have questions about this.

> I'm thinking that the installmgr dialog should enable the user to select
> the module source from either a local directory (default /mnt/cdrom)
> and/or an ftp site (default ftp.crosswire.org).  We could use ssh ftp
> (if /usr/bin/sftp is installed), or a regular ftp client (such as
> ncftpget).

Yes, this is possible. It should be possible to install modules from disk, 
from the internet. It should be possible to install module in the global 
sword directory and in $HOME/.sword/.
Maybe you know of the new SWModule::CreateModule interface in Sword? Calling 
this function creates a new modules of the SWModule implementation. Using 
this we could add support for something like "Add new personal 
commentary...".

> [Q: I have heard that some common TCP/IP socket support is built into
> QT/KDE.  Should I be using library calls for ftp access, or external
> utilities?]

This is right. KDE has support for networks (have a look at the API 
documentation of the kio library of KDE2). KDE has also support for .tar.gz 
files in this lib (list, copy, remove files in .tar.gz files etc.). This 
reaklly useful. I'd suggest to use the KDE2 classes for the networking 
operations, unless it's not possible in an easy way (I did not have a deeper 
look into these classes).

> I was also thinking that if a module is selected for install that requires
> a special font, that I should install it?  We should have at least two
> font types available for each module: TT and Type1 (as a backup if TT
> support is not installed)?  For these modules, I should set the initial
> font to the TT font, say at 12 point?

Maybe you heard, that Sword is moving to Unicode?
The special fonts for a module should not be supported any more because 
Unicode makes this much more easy.

> [Q: Does a font installation need to be installed globally for X to be
> able to use it, or can a user install their own fonts in their $HOME?]

Normally fonts should be installed globally. KDE2 supports fonts in 
$KDEHOME/share/fonts/ but we should not use this because it will create much 
more problems. But I did not have a deeper look into this, tough. It may be 
worth the effort.

> I like the idea of determining if installmgr has root or not, and asks
> for either root passwd or use $HOME for install.  The only problem I can
> see with this is that some Unices have the /home partition set noexec
> (for security reasons), and we will not be able to run BT there.  (We
> could run a test program from $HOME and let the user know that the
> install there would be a waste of time?)

The kdesu lib has support to switch to user root at runtime in a secure way. 
I think we could use this lib. libkdesu is included with KDE2.
It's a good idea to install in $HOME if the user does not know the root 
password or don't want to type it in (users in larger network do not know the 
root passwd very often).


> [Q: Or were you all thinking that just the modules would be installed
> in $HOME?]

I think we should offer both options (install modules in the global Sword dir 
like /usr/share/sword or in $HOME/.sword/). The global set of modules is 
necessary if more than one user can work on your PC.

> > IMHO the solution would be to add a new menu item and to create an own
>> dialog for the installmgr.

> I certainly can do this as well, if this better fits the look and feel
> of the product.  I was thinking more of providing just a module list
> report under the options dialog with the real install/config work in
> another dialog. What do others think?
>
> BTW, my suggested code did work as advertised :-)... hopefully things
> will become easier with time (instead of rebuilding my development
> environment).

> [Q: What is the best situation to use signal/slot pairs, as opposed
> to modal fields (such as used by the general options page)?]

SIGNAL add SLOTs should be use in all situations where you have two valid 
objects (lets say button1 and widget1). If you want to do something if 
button1 emits a signal like clicked() connect this signal to a slot of 
widget1.
We use modal fields in the OD because we do not have two valid obejcts (the 
display windows are not accessible easily and it's a bad implemtation if we 
add support for supprted options in the OD. The feature and refresh 
management is done in the display windows.)

I hope I answered your questions. If you have other questions or if I left 
something unclear please ask again!

Joachim