GTK HTMLView

Archives Forums/Linux Discussion/GTK HTMLView

Brucey(Posted 2006) [#1]
After some tinkering, I have a working firefox embedded htmlview in the gtk module.
However, it's a tad fiddly with regards paths/libs.
For example, the path to the installation needs to appear in the environment variable LD_LIBRARY_PATH (mine is /usr/lib/mozilla-firefox), and you need to tell it this path when you want to create an htmlview gadget (I've made it use this path as the default, but it can also be set thru an environment variable)

Anyways... I'm wondering whether I should include this as standard, and have the developer tweak their system to make it work... or... split the HTMLViews out of the GTK module into two separate mods that you could "import" depending if you wanted to use the gtkhtml one *or* the firefox one - or neither (freeing up a library dependency if you don't need an htmlview)

What's anyone think about this?
Skid??? ;-)

:o)


skidracer(Posted 2006) [#2]
I was having the same thoughts re our losing OSX10.2 compatability due to Safari1.0 which doesn't seem to have a public webkit interface. Not even microsoft forced win98 users to stick with ie4.0....

In regards to Linux, I vote we add something to MaxIDE options for configuring the path, and just make sure your code fails gracefully....

In respect of building, I'd like to see makemods maybe respect readonly property of module so unless you HAVE to rebuild BlitzMax users in general will use the static libraries you distribute on the modserver version.


Brucey(Posted 2006) [#3]
seems one can run "ldconfig path/to/mozilla/libs/" and it saves you having to add the path to LD_LIBRARY_PATH. except you need root/sudo access to run it.
But the user would still need to know *where* mozilla/firefox is installed.

Can I assume most Linux developers will know how/where to find their firefox/moz install?
If that is the case, maybe I *can* safely do away with the gtkhtml lib and go 100% the firefox way...


SebHoll(Posted 2006) [#4]
Hi Brucey,

When you say...

Can I assume most Linux developers will know how/where to find their firefox/moz install?



Do you mean developers or end-users will know how/where to find their firefox path? - Developers should know, however I wouldn't expect all linux end users to know (or want to set it up) themselves.

Thanks Brucey


Seb


P.S. Read your e-mail today. Sent a reply...


Brucey(Posted 2006) [#5]
..which is kind of trouble-some.

Perhaps if firefox was always installed in the same place it wouldn't be much of an issue.
I wonder if I can get away with supplying the shared objects for it in the distribution?
Then you would only need to direct the user to their firefox install dir one time when they ran an app. (or better yet, store a setting in their home which any of your apps could access)

There must be a standard "way" of going about this?

I know... stick with gtkhtml ;-)


Brucey(Posted 2006) [#6]
P.S. Read your e-mail today. Sent a reply...

Thanks :-)


Brucey(Posted 2006) [#7]
Decision made (finally!).

I split out the HTMLView into separate modules - one for GTKHTML and one for Mozilla.
This way, you can choose which one you want to use, or not.
Doing it this way removes a dependency on an external library if you don't intend using an HTMLView in an application. For example a typical game wouldn't need it.

I believe (perhaps mis-guidedly) that this now makes the GTK module that bit tidier and self-contained (only core GTK specific stuff is in the GTK module).

btw, if you try to run an app that creates an html view that hasn't imported one of them it will throw an exception stating such. (better to have "nice" error messages, me thinks)

:o)