POV-Ray : Newsgroups : povray.unix : using both a global and a local .ini file Server Time
30 Apr 2024 00:54:44 EDT (-0400)
  using both a global and a local .ini file (Message 1 to 9 of 9)  
From: Klaus Nowikow
Subject: using both a global and a local .ini file
Date: 11 Jun 2009 05:45:23
Message: <4a30d233$1@news.povray.org>
Hi!

I am using povray-3.6.1 on Gentoo. There's a global ini
file /etc/povray/povray.ini containing some Library_Path entries
for the standard libs.

I put some include files that I downloaded or created myself into
%HOME/povray/include and created a local ini file
$HOME/.povray/3.6/povray.ini containing a corresponding Library_Path
entry. When I start povray now, it seems to ignore the global ini file
and only use my local one, thus not finding the standard libraries any
more. Is there a way to tell povray to use the global file first and
then load the local one?

Regards,

Klaus


Post a reply to this message

From: Doctor John
Subject: Re: using both a global and a local .ini file
Date: 11 Jun 2009 08:01:30
Message: <4a30f21a@news.povray.org>
Klaus Nowikow wrote:
> Hi!
> 
> I am using povray-3.6.1 on Gentoo. There's a global ini
> file /etc/povray/povray.ini containing some Library_Path entries
> for the standard libs.
> 
> I put some include files that I downloaded or created myself into
> %HOME/povray/include and created a local ini file
> $HOME/.povray/3.6/povray.ini containing a corresponding Library_Path
> entry. When I start povray now, it seems to ignore the global ini file
> and only use my local one, thus not finding the standard libraries any
> more. Is there a way to tell povray to use the global file first and
> then load the local one?
> 
> Regards,
> 
> Klaus
Why not just put the paths in your local ini?
This is in mine:

Library_Path="/usr/local/share/povray-3.6"
Library_Path="/usr/local/share/povray-3.6/ini"
Library_Path="/usr/local/share/povray-3.6/include"
Library_Path="/home/john/povray/include"

BTW POV doesn't care about repeated library paths

John
-- 
"Eppur si muove" - Galileo Galilei


Post a reply to this message

From: Doctor John
Subject: Re: using both a global and a local .ini file
Date: 11 Jun 2009 08:11:13
Message: <4a30f461@news.povray.org>
Doctor John wrote:
> Klaus Nowikow wrote:
>> Hi!
>>
>> I am using povray-3.6.1 on Gentoo. There's a global ini
>> file /etc/povray/povray.ini containing some Library_Path entries
>> for the standard libs.
>>
>> I put some include files that I downloaded or created myself into
>> %HOME/povray/include and created a local ini file
>> $HOME/.povray/3.6/povray.ini containing a corresponding Library_Path
>> entry. When I start povray now, it seems to ignore the global ini file
>> and only use my local one, thus not finding the standard libraries any
>> more. Is there a way to tell povray to use the global file first and
>> then load the local one?
>>
>> Regards,
>>
>> Klaus
> Why not just put the paths in your local ini?
> This is in mine:
> 
> Library_Path="/usr/local/share/povray-3.6"
> Library_Path="/usr/local/share/povray-3.6/ini"
> Library_Path="/usr/local/share/povray-3.6/include"
> Library_Path="/home/john/povray/include"
> 
> BTW POV doesn't care about repeated library paths
> 
> John
Sorry, forgot to add that POV will search in the order (I quote from the
manual, but the numbering is mine):

1. The place defined by the POVINI environment variable. When you want
to use an INI file at a custom location you can set this environment
variable.
2. ./povray.ini
3. $HOME/.povray/3.6/povray.ini
4. PREFIX/etc/povray/3.6/povray.ini (PREFIX by default is /usr/local)

IIRC having found one file it probably stops searching (I could be wrong)

John
-- 
"Eppur si muove" - Galileo Galilei


Post a reply to this message

From: Klaus Nowikow
Subject: Re: using both a global and a local .ini file
Date: 11 Jun 2009 08:52:24
Message: <4a30fe08@news.povray.org>
Doctor John wrote:
> Doctor John wrote:
>> Klaus Nowikow wrote:
>>> [...]
>>> I put some include files that I downloaded or created myself into
>>> %HOME/povray/include and created a local ini file
>>> $HOME/.povray/3.6/povray.ini containing a corresponding Library_Path
>>> entry. When I start povray now, it seems to ignore the global ini file
>>> and only use my local one, thus not finding the standard libraries any
>>> more. Is there a way to tell povray to use the global file first and
>>> then load the local one?
 >>> [...]
>> Why not just put the paths in your local ini?

I'd rather avoid copying the global ini, because it is not directly
under my control and I'd have to copy it again when it was updated.

But thank you for your suggestion, it is an option if anything else
fails.

> Sorry, forgot to add that POV will search in the order (I quote from the
> manual, but the numbering is mine):
> 
> 1. The place defined by the POVINI environment variable. When you want
> to use an INI file at a custom location you can set this environment
> variable.
> 2. ./povray.ini
> 3. $HOME/.povray/3.6/povray.ini
> 4. PREFIX/etc/povray/3.6/povray.ini (PREFIX by default is /usr/local)
> 
> IIRC having found one file it probably stops searching (I could be wrong)

Yes, that would be consistent with my observations.

Actually, that means that if I had a project-local ini file, I'd also
have to copy my account-local ini file into that one and probably to
adapt it if I move my project to another computer -- possibly with
Windows instead of Linux, where the paths will definitely be different.

I'd rather have POV read all the ini files in the reverse order -- from
most global to most local.

--
Klaus


Post a reply to this message

From: clipka
Subject: Re: using both a global and a local .ini file
Date: 11 Jun 2009 14:20:01
Message: <web.4a314a99f13ccd8c7371b39b0@news.povray.org>
Klaus Nowikow <kla### [at] gmxat> wrote:
> Hi!
>
> I am using povray-3.6.1 on Gentoo. There's a global ini
> file /etc/povray/povray.ini containing some Library_Path entries
> for the standard libs.
>
> I put some include files that I downloaded or created myself into
> %HOME/povray/include and created a local ini file
> $HOME/.povray/3.6/povray.ini containing a corresponding Library_Path
> entry. When I start povray now, it seems to ignore the global ini file
> and only use my local one, thus not finding the standard libraries any
> more. Is there a way to tell povray to use the global file first and
> then load the local one?

Never tried this, but I think a simple

  /etc/povray/povray.ini

at the beginning of your local .ini file should do the job of invoking the
global one.


Post a reply to this message

From: Doctor John
Subject: Re: using both a global and a local .ini file
Date: 14 Jun 2009 09:58:48
Message: <4a350218$1@news.povray.org>
clipka wrote:
> 
> Never tried this, but I think a simple
> 
>   /etc/povray/povray.ini
> 
> at the beginning of your local .ini file should do the job of invoking the
> global one.
> 
> 
> 
Just tested this. Unfortunately what seems to happen is that POV reads
the global ini but then stops reading any further in your local file :-(
I suppose you could put the line at the _end_ of your local ini but that
would be the opposite of what Klaus is trying to achieve.

One further possibility springs to mind: How about renaming your local
ini file so that POV doesn't automatically read it then referencing it
at the end of your global ini - $HOME/.povray/3.6/local.ini

John
-- 
"Eppur si muove" - Galileo Galilei


Post a reply to this message

From: clipka
Subject: Re: using both a global and a local .ini file
Date: 17 Jun 2009 13:55:01
Message: <web.4a392d9ff13ccd8c7705fe780@news.povray.org>
Doctor John <joh### [at] homecom> wrote:
> clipka wrote:
> >
> > Never tried this, but I think a simple
> >
> >   /etc/povray/povray.ini
> >
> > at the beginning of your local .ini file should do the job of invoking the
> > global one.
> >
> Just tested this. Unfortunately what seems to happen is that POV reads
> the global ini but then stops reading any further in your local file :-(
> I suppose you could put the line at the _end_ of your local ini but that
> would be the opposite of what Klaus is trying to achieve.

In that case we have just discovered a bug; quote from documentation, section
2.2.8.2 ("Using INI Files"):

-------------
[...] You may nest INI files by simply putting the file name on a line by itself
with no equals sign after it. Nesting may occur up to ten levels deep. For
example:

  ; This is a sample INI file. This entire line is a comment.
  ; Blank lines are permitted.
  Input_File_Name=simple.pov ;This sets the input file name
  +W80 +H60 ; Traditional +/- switches are permitted too
  MOREOPT   ; Read MOREOPT.INI and continue with next line
  +V        ; Another switch
  ; That's all folks!
-------------


Post a reply to this message

From: Doctor John
Subject: Re: using both a global and a local .ini file
Date: 18 Jun 2009 13:50:14
Message: <4a3a7e56@news.povray.org>
clipka wrote:
> Doctor John <joh### [at] homecom> wrote:
>> clipka wrote:
>>> Never tried this, but I think a simple
>>>
>>>   /etc/povray/povray.ini
>>>
>>> at the beginning of your local .ini file should do the job of invoking the
>>> global one.
>>>
>> Just tested this. Unfortunately what seems to happen is that POV reads
>> the global ini but then stops reading any further in your local file :-(
>> I suppose you could put the line at the _end_ of your local ini but that
>> would be the opposite of what Klaus is trying to achieve.
> 
> In that case we have just discovered a bug; quote from documentation, section
> 2.2.8.2 ("Using INI Files"):
> 
> -------------
> [...] You may nest INI files by simply putting the file name on a line by itself
> with no equals sign after it. Nesting may occur up to ten levels deep. For
> example:
> 
>   ; This is a sample INI file. This entire line is a comment.
>   ; Blank lines are permitted.
>   Input_File_Name=simple.pov ;This sets the input file name
>   +W80 +H60 ; Traditional +/- switches are permitted too
>   MOREOPT   ; Read MOREOPT.INI and continue with next line
>   +V        ; Another switch
>   ; That's all folks!
> -------------
> 
> 
> 
I'm going to recheck this later this evening. Results will be posted
here tomorrow

John
-- 
"Eppur si muove" - Galileo Galilei


Post a reply to this message

From: Klaus Nowikow
Subject: Re: using both a global and a local .ini file
Date: 19 Jun 2009 11:33:29
Message: <4a3bafc9$1@news.povray.org>
clipka wrote:
> Doctor John <joh### [at] homecom> wrote:
>> clipka wrote:
>>> Never tried this, but I think a simple
>>>
>>>   /etc/povray/povray.ini
>>>
>>> at the beginning of your local .ini file should do the job of invoking the
>>> global one.
>>>
>> Just tested this. Unfortunately what seems to happen is that POV reads
>> the global ini but then stops reading any further in your local file :-(
>> I suppose you could put the line at the _end_ of your local ini but that
>> would be the opposite of what Klaus is trying to achieve.
> 
> In that case we have just discovered a bug; quote from documentation, section
> 2.2.8.2 ("Using INI Files"):
> 
> -------------
> [...] You may nest INI files by simply putting the file name on a line by itself
> with no equals sign after it. Nesting may occur up to ten levels deep. For
> example:

Oops, I missed that statement in the docs. Thanks for pointing me to it.
If that worked it would be exactly what I was looking for.

--
Klaus


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.