Hello,

While testing the Ubuntu/Debian packages, I've noticed in the examples  
files (for instance, localization XMLs) are opened assuming they are  
in the same folder the application binary is when it is started.

For instance, the Debian packages install the examples source to  
/usr/share/doc/witty-doc/examples/.

Say you are in /home/user/dev/wtexamples and you want to build the  
examples in that directory. You run CMake like this:

cmake -DWT_SOURCE_DIR=/usr/share/doc/witty-doc/  
-DEXAMPLES_CONNECTOR="wt;wthttp" /usr/share/doc/witty-doc/examples

Then you run make in /home/user/dev/wtexamples

Now, if you want to run the charts example, you can either:

- Run /home/user/dev/wtexamples/charts/charts.wt --docroot  
/usr/share/doc/witty-doc/examples/charts --http-port 10000 --http-addr  
0.0.0.0

- Or go into the /home/user/dev/wtexamples/charts directory, then run  
./charts.wt --docroot /usr/share/doc/witty-doc/examples/charts  
--http-port 10000 --http-addr 0.0.0.0

Either way, your XML files, CSS files, etc are not found because they  
are not opened taking the directory you specified with --docroot as  
the "." directory for open, std::istream, etc. The "." directory is  
the directory from where you run the binary (not even the directory  
the binary is in).

Am I wrong? Shouldn't "--docroot" be enforced? Or maybe something like  
BinReloc ( http://autopackage.org/docs/binreloc/ ) to use the  
directory where the binary is as the root? (I like docroot enforced  
better, FWIW)

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to