On Tue, Sep 04, 2012 at 02:40:19PM +0530, Shriramana Sharma wrote:
But all the same, I really don't see much of a case for [a separate binary]. Sure there have been feature requests for inkview as suv pointed out, but they are like to allow piping input, resizing the window size or such. And as such I do not see what kind of a feature can apply to only inkview and not to inkscape. Surely one can add commandline switches to inkscape for defining the window size etc? Even a read-only mode for view-only?
At a technical level, one can (as I believe mental has previously suggested) merge the two binaries instead of using a shared library, i.e. have main() do
if (streq (program_name, "inkview") || have_inkview_flag) { existing_rest_of_inkview_main(); } else { existing_rest_of_inkscape_main(); }
Compared to using a shared libinkscape, this would on one hand use slightly less disk space, while on the other might be very slightly slower (to the extent that inkview is smaller; also, we might be able to avoid pulling in as many shared libraries, e.g. those to do with import/export or editing, such as spell-checking).
I wonder whether a shared library would have disadvantages for developers, e.g. whether one needs to do `make install' before testing a change, or whether it imposes link-time costs that make it worthwhile marking functions as to whether they should be exported from the library. Can others comment on whether these or other costs are likely?
I like the idea of a library that might evolve towards something more focused that encourages the development of other SVG-rendering-related programs. However, the existence of librsvg does make a hypothetical libinkrender less valuable. (Incidentally, the existence of the commonly-used librsvg does also suggest an answer to the question "what API should libinkrender have": maybe the API should be just what's needed to be able to create a wrapper with a librsvg interface, so that one can swap between librsvg and libinkrender.)
Somehow I hope that a shared library ends up being better than a merged binary, but in absence of more knowledge about those concerns above I'd prefer a merged binary.
pjrm.