POV-Ray : Newsgroups : povray.general : res.ini only a feature for povray in Windows? Server Time
22 Dec 2024 08:51:10 EST (-0500)
  res.ini only a feature for povray in Windows? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: The Traveler
Subject: res.ini only a feature for povray in Windows?
Date: 26 Sep 2021 15:45:00
Message: <web.6150cd0af089858cdd31149be3dfee7c@news.povray.org>
Howdy folks, Was the ability to parse multiple rendering configurations using a
"res.ini" file only a feature for the Windows version of povray? I've been using
povray under Linux for so long, I don't recall.

From section 2.2.8.2 I have a simple res.ini file with these settings (copied
from the verbatim manual):

; RES.INI
  ; This sample INI file is used to set resolution.
  +W120 +H100  ; This section has no label.
               ; Select it with "RES"
  [Low]
  +W80 +H60    ; This section has a label.
               ; Select it with "RES[Low]"
  [Med]
  +W320 +H200  ; This section has a label.
               ; Select it with "RES[Med]"
  [High]
  +W640 +H480  ; Labels are not case sensitive.
               ; "RES[high]" works
  [Really High]
  +W800 +H600  ; Labels may contain blanks

Using 3.8.0-b2 in Lubuntu Linux: povray res[Low] +Itest.pov gives me an error:
"Failed to parse command line option".

I've checked to make sure the res.ini file is in a searchable directory path.

Any insight is appreciated. Thanks.


Post a reply to this message

From: Cousin Ricky
Subject: Re: res.ini only a feature for povray in Windows?
Date: 26 Sep 2021 20:26:13
Message: <61510fa5$1@news.povray.org>
On 2021-09-26 3:43 PM (-4), The Traveler wrote:
> Howdy folks, Was the ability to parse multiple rendering configurations using a
> "res.ini" file only a feature for the Windows version of povray? I've been using
> povray under Linux for so long, I don't recall.
> 
> [snip]
> 
> Using 3.8.0-b2 in Lubuntu Linux: povray res[Low] +Itest.pov gives me an error:
> "Failed to parse command line option".
> 
> I've checked to make sure the res.ini file is in a searchable directory path.

See:
https://news.povray.org/povray.beta-test/thread/%3C5bdf75ab%241%40news.povray.org%3E/

Apparently, the library path isn't *supposed* to work for .ini files.
The fact that it works in POV-Ray 3.6 and 3.7 is an undocumented side
effect of the parser code in those versions.  I can only suppose that
res.ini is a feature of the Windows IDE, and there is not yet a standard
IDE for Unix or GNU/Linux.


Post a reply to this message

From: Kenneth
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 02:40:00
Message: <web.615166daffffcfe74cef624e6e066e29@news.povray.org>
"The Traveler" <jho### [at] northrimnet> wrote:
>
> From section 2.2.8.2 I have a simple res.ini file with these settings (copied
> from the verbatim manual):
>
> ; RES.INI
>   ; This sample INI file is used to set resolution.
>   +W120 +H100  ; This section has no label.
>                ; Select it with "RES"
>   [Low]
>   +W80 +H60    ; This section has a label.
>                ; Select it with "RES[Low]"
> ...

I'm running v3.8.0 beta 1 in Windows, so I don't know if any of the following is
useful...

I can't get the doc's suggested version of anything like RES[Low] to work; I've
tried various iterations of that syntax. (The typical resolution .ini file for
Windows versions is called  quickres.ini-- but I couldn't use that name as-is
because POV-ray barks a fatal warning, something like "expecting a value after Q
switch, uickres  is invalid entry". So I renamed a copy as RESTEMP, but still no
luck, with or without something like [Low] added from my .ini file-- mine would
be like [320x240])

The syntax that *does* work on my own command line is like the following
(running one of POV-ray's included sample scenes called  lathe1a.pov , for
example), and only after closing out ALL of my open scenes:

+IC:\Users\Kenneth\Documents\POV-Ray\v3.8-beta\scenes\objects\lathe1a +w400
+h200

or with quotes...
+I"C:\Users\Kenneth\Documents\POV-Ray\v3.8-beta\scenes\objects\lathe1a" +w400
+h200

I had to use the complete library path, and the render-size switches. Note the
use of +I  (i) not +L in my successful tests-- the docs say +L is for library
paths, but when I use it instead, it *sometimes* throws a fatal error, "This is
not a valid command line"... but at other times (like with a fresh re-boot of my
machine!), it actually works but renders an image of a previously-run scene
file, NOT  lathe1a.pov.  :-\

The doc's example of simply
        povray +Isimple.pov +V +W80 +H60
(with  lathe1a.pov substituted) doesn't work-- "This is not a valid command
line"

And I could not get a version of this one to work either-- fatal error:
           povray res[Med] +Imyfile.pov
I *think* both attempts  are  choking on "povray"-- but no luck even without
that.

----
However, the following example-- or something *very* similar  to it-- worked at
least once for me... but now I can't reproduce it! (I think something got set or
reset somewhere in POV-ray's basic files while I was messing with the command
line, or while opening/closing scene files):

RESTEMP[320X240]
+IC:\Users\Kenneth\Documents\POV-Ray\v3.8-beta\scenes\objects\lathe1a.pov

But it ignored the particular [...]  block I used and instead picked the 'bare'
entry that I added to my RESTEMP.ini file as a test (like the doc's example),
+w80 +h60
----

It's very possible that I'm simply using bad syntax; I'm no expert with the
command line, as I rarely use it...and I'm guessing that there are differences
between its usage in Windows vs Linux.


Post a reply to this message

From: jr
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 02:50:00
Message: <web.6151694affffcfe780468f836cde94f1@news.povray.org>
hi,

"The Traveler" <jho### [at] northrimnet> wrote:
> Howdy folks, Was the ability to parse multiple rendering configurations using a
> "res.ini" file only a feature for the Windows version of povray? I've been using
> povray under Linux for so long, I don't recall.
>
> From section 2.2.8.2 I have a simple res.ini file with these settings (copied
> from the verbatim manual):
>
> ; RES.INI
>   ; This sample INI file is used to set resolution.
>   +W120 +H100  ; This section has no label.
>               ; Select it with "RES"
> ...
> Using 3.8.0-b2 in Lubuntu Linux: povray res[Low] +Itest.pov gives me an error:
> "Failed to parse command line option".

looks like you're ignoring the "environment".  not sure about Lubuntu, but many
Linux distributions (incl my favourite) use the Bourne Again Shell (BASH) as
interpreter, and that uses brackets, so your command needs to read:

  $ povray 'res[low]' +itest.pov

or quotes instead of apostrophes.  also, you can drop the '+Iname' if the .ini
file contains that info, eg:

  input_file_name = test.pov

hth.


regards, jr.


Post a reply to this message

From: The Traveler
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 10:25:00
Message: <web.6151d3e8ffffcfe7dd31149be3dfee7c@news.povray.org>
> looks like you're ignoring the "environment".  not sure about Lubuntu, but many
> Linux distributions (incl my favourite) use the Bourne Again Shell (BASH) as
> interpreter, and that uses brackets, so your command needs to read:
>
>   $ povray 'res[low]' +itest.pov
>
> or quotes instead of apostrophes.  also, you can drop the '+Iname' if the .ini
> file contains that info, eg:
>
>   input_file_name = test.pov
>
> hth.
>
>
> regards, jr.

Thanks for the insights folks. jr hit the nail on the head. I was escaping the
res[Low] with everything but the right delimiters, backticks. So, it should look
like this:

povray `res[Low]` test.pov

I dropped the +I flag as well. Now, it doesn't throw the error, BUT, it doesn't
parse the file either for the different render resolutions. Still getting my
default 800x600 render no matter what. It appears that none of the other stock
"res" .ini files work either so there's probably something else amiss. Checked
the path settings and everything else appears proper. Well, one step forward at
least and onward ...

Cheers.


Post a reply to this message

From: tth
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 10:51:21
Message: <6151da69@news.povray.org>
On 9/27/21 4:23 PM, The Traveler wrote:

> 
> povray `res[Low]` test.pov
> 

    Just try normal ' or double " quote.
    Backticks ` have special meaning for the shell


-- 
+-------------------------------------------------------------------+
|                      sphinx of black quartz, judge my vow.        |
+-------------------------------------------------------------------+


Post a reply to this message

From: The Traveler
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 11:35:00
Message: <web.6151e485ffffcfe7dd31149be3dfee7c@news.povray.org>
tth <sig### [at] dinoramafr> wrote:
> On 9/27/21 4:23 PM, The Traveler wrote:
>
> >
> > povray `res[Low]` test.pov
> >
>
>     Just try normal ' or double " quote.
>     Backticks ` have special meaning for the shell
>
>
> --
> +-------------------------------------------------------------------+
> |                      sphinx of black quartz, judge my vow.        |
> +-------------------------------------------------------------------+

Thanks. Yep, tried 'em all now, single, double, backticks, escaped slashes "\"
all that I an think of for the bash shell.

The only ones that don't throw an error are backticks. As they are usually part
of command substitution in the shell, the actual res{Low] isn't being parsed at
all on the command line essentially executing povray test.pov and using the
default 800x600 resolution.

I'll keep looking tho' ... ;)


Post a reply to this message

From: The Traveler
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 12:15:00
Message: <web.6151ecf7ffffcfe7dd31149be3dfee7c@news.povray.org>
Well, hmm, okay. It appears that NONE of the "resXXX.ini files are working so
the problem may lay elsewhere. Same "failed to parse command line" error on any
of them.

It may be a command expansion problem with bash itself reading a "naked" shell
parameter, but I've never seen that happen in a stock Linux distro.

I have compiled and installed 3.8.0-b2 in /home/jeff/.local which is normally
how I install any testing code I don't want polluting my file system. I have
full read/write/execute permissions as its my home directory and I have
ownership. There is a /home/jeff/.povray/3.8 directory with both povray.conf and
povray.ini files in it. The Library_path variables point to the correct include
and ini directories. The install was done via the configure script ./configure
--prefix=/home/jeff/.local so the compiler/installer built all the files

Everything else works properly with the exception of reading the "resXXX" or
"res[XXX]" files.

Interesting problem. I do know my way around a Linux system having used various
distros since '95 so I'm checking all the obvious stuff. (Okay, I missed the
backticks) ;)

I suppose I could uninstall this current config and let the installer place
everything in /usr/local by default. I don't think it will make any difference
buy I'll give it a go and see what happens.

Cheer


Post a reply to this message

From: jr
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 12:20:00
Message: <web.6151edf8ffffcfe780468f836cde94f1@news.povray.org>
hi,

"The Traveler" <jho### [at] northrimnet> wrote:
> tth <sig### [at] dinoramafr> wrote:
> > On 9/27/21 4:23 PM, The Traveler wrote:
> > > povray `res[Low]` test.pov
> >
> >     Just try normal ' or double " quote.
> >     Backticks ` have special meaning for the shell
> >
> >
> > --
> > +-------------------------------------------------------------------+
> > |                      sphinx of black quartz, judge my vow.        |
> > +-------------------------------------------------------------------+
>
> Thanks. Yep, tried 'em all now, single, double, backticks, escaped slashes "\"
> all that I an think of for the bash shell.
>
> The only ones that don't throw an error are backticks.

that is so .. unusual, if it were my machine, I'd focus on finding out why the
shell does not (apparently) work as it ought to.


regards, jr.


Post a reply to this message

From: The Traveler
Subject: Re: res.ini only a feature for povray in Windows?
Date: 27 Sep 2021 12:30:00
Message: <web.6151f0a3ffffcfe7dd31149be3dfee7c@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "The Traveler" <jho### [at] northrimnet> wrote:
> > tth <sig### [at] dinoramafr> wrote:
> > > On 9/27/21 4:23 PM, The Traveler wrote:
> > > > povray `res[Low]` test.pov
> > >
> > >     Just try normal ' or double " quote.
> > >     Backticks ` have special meaning for the shell
> > >
> > >
> > > --
> > > +-------------------------------------------------------------------+
> > > |                      sphinx of black quartz, judge my vow.        |
> > > +-------------------------------------------------------------------+
> >
> > Thanks. Yep, tried 'em all now, single, double, backticks, escaped slashes "\"
> > all that I an think of for the bash shell.
> >
> > The only ones that don't throw an error are backticks.
>
> that is so .. unusual, if it were my machine, I'd focus on finding out why the
> shell does not (apparently) work as it ought to.
>
>
> regards, jr.

Well, so far, it's only this single case issue with povray. Using backticks is
normally used for command substitution in the shell itself, not in passing flags
to an application so I think it's working as it should. Putting backticks thus
'res[Low]' is telling the shell itself to process the parameter so it never gets
passed to the povray executable to be parsed by it.

Well, either way it's an interesting problem. As I'm now retired from the IT
life, I have a lot of time for interesting problems ...

Cheers.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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