info-inventor-dev
[Top] [All Lists]

[patch] ivman does not need SoXt

To: info-inventor-dev@xxxxxxxxxxx
Subject: [patch] ivman does not need SoXt
From: "Steve M. Robbins" <steven.robbins@xxxxxxxxxxxx>
Date: Tue, 19 Feb 2002 14:09:37 -0500
Sender: owner-info-inventor-dev@xxxxxxxxxxx
User-agent: Mutt/1.3.27i
Hi,

I maintain OpenInventor for Debian.  We build packages automatically
for most architectures.  Therefore, the package must build in a 
non-interactive environment, in particular there is no Xserver running.

The following patch implements the suggestion I made last July.

Index: doc/man/ivman/Main.c++
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/doc/man/ivman/Main.c++,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -B -r1.1.1.1 -r1.2
--- doc/man/ivman/Main.c++      29 Oct 2000 15:04:17 -0000      1.1.1.1
+++ doc/man/ivman/Main.c++      16 Dec 2001 20:13:18 -0000      1.2
@@ -119,7 +119,14 @@
     SoDB::init();
     SoNodeKit::init();
     SoInteraction::init();
-    SoXt::init(argv[0]);
+
+    // The next line in this code used to be:
+    // SoXt::init(argv[0]);
+    // but that requires a connection to an X11 server.
+    // To remove this requirement, one should replace SoXt::init(...)
+    // with the same code, stripped of its calls to X.  That turns
+    // out to be the same three *::init() calls just above!
+
 
     // Process each class in turn
     ClassDef   *mainCd = NULL, *curCd = NULL, *cd;



----- Forwarded message from steve -----

Date: Thu, 26 Jul 2001 14:20:15 -0400
To: OpenInventor devel mailing list <info-inventor-dev@xxxxxxxxxxx>
Subject: ivman: X11 required?

Hi,

To build the current sources, one needs to be running an X11 server:
the man-page generator doc/man/ivman makes Xt-calls in its initialization.
However, upon closer inspection, this doesn't appear to be necessary.

The Xt calls come from the SoXt::init() call in doc/man/ivman/Main.c++.  
A cursory glance through the code doesn't show where any Xt stuff is
necessary, so I replaced the SoXt::init() call in Main.c++ with the
corresponding code after stripping out the X11 calls.

I did a full build, and compared the installed man pages before and
after.  There was no change on my (Debian) linux system.  

By the way, after stripping the X11-calls from SoXt::init(), all
that remains is:

     SoDB::init();
     SoNodeKit::init();
     SoInteraction::init();

... which appears in ivman/Main.c++ just above the SoXt::init() call!

The upshot is: you can just remove the SoXt::init() call and build
without needing an X11 server.

-Steve

-- 
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants


----- End forwarded message -----

-- 
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants


<Prev in Thread] Current Thread [Next in Thread>
  • [patch] ivman does not need SoXt, Steve M. Robbins <=