POV-Ray : Newsgroups : povray.programming : Simple way to make POV-Ray for windows work in command line mode Server Time
22 Dec 2024 01:31:13 EST (-0500)
  Simple way to make POV-Ray for windows work in command line mode (Message 1 to 8 of 8)  
From: PerNyblom
Subject: Simple way to make POV-Ray for windows work in command line mode
Date: 1 Dec 2009 03:05:00
Message: <web.4b14cd5db06b1c31384d1150@news.povray.org>
Hello,

I just wanted to share how I solved the problem of making POV-Ray work in
command line mode in windows.

I added another windows command line switch "/CMDMODE" by adding a boolean
variable "command_line_mode" and the following code in pvtext.cpp:

if (stricmp (commandstr, "CMDMODE") == 0)
      {
        command_line_mode = true ;
        while (*s == ' ')
          s++ ;
        continue ;
      }


In pvengine.cpp I added the following piece of code after the "switch
(placement.showCmd)" part:



placement.showCmd = show_state ;
if (command_line_mode) {
    placement.showCmd = SW_HIDE;
}


I also removed the splash screen completely but you can test for
command_line_mode there as well I guess.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 1 Dec 2009 13:04:24
Message: <4b155aa8$1@news.povray.org>
PerNyblom wrote:
> I also removed the splash screen completely but you can test for
> command_line_mode there as well I guess.

Which makes that version violate the POV-Ray license if you distribute it.

	Thorsten, POV-Team


Post a reply to this message

From: PerNyblom
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 1 Dec 2009 18:35:00
Message: <web.4b15a71a2f1f1b7d1384d1150@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> PerNyblom wrote:
> > I also removed the splash screen completely but you can test for
> > command_line_mode there as well I guess.
>
> Which makes that version violate the POV-Ray license if you distribute it.
>
>  Thorsten, POV-Team

Yes, I know, but I just wanted to share this little piece of information if
anyone finds it useful. I am not going to distribute it, I will just use this
feature personally for calling POV-Ray from a Java program.

It is a bit difficult for me to understand why the windows version doesn't have
support for using it from the command line. I mean, it has this great editor
that the other versions don't have but doesn't have the command line mode which
was the original "spirit" of POV-Ray.

Don't get me wrong here, I really support that you protect this great piece of
software but I really can't understand this particular design decision.


Post a reply to this message

From: Darren New
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 1 Dec 2009 19:06:00
Message: <4b15af68@news.povray.org>
PerNyblom wrote:
> It is a bit difficult for me to understand why the windows version doesn't have
> support for using it from the command line. 

It does. I invoke it from C#. I don't really follow why you think it 
doesn't.  Yes, it *also* opens a window, if that's what you mean.

-- 
Darren New, San Diego CA, USA (PST)
   Human nature dictates that toothpaste tubes spend
   much longer being almost empty than almost full.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 1 Dec 2009 19:29:16
Message: <4b15b4dc@news.povray.org>
PerNyblom wrote:
> It is a bit difficult for me to understand why the windows version doesn't
> have support for using it from the command line. I mean, it has this great
> editor that the other versions don't have but doesn't have the command
> line mode which was the original "spirit" of POV-Ray.

You can compile POV-Ray without any GUI support at all. It behaves the same 
as the Unix version (except that, as far as I know, it won't even have a 
preview window). No need for any code change.

Last I checked, it was just another target in the Visual Studio solution.


Post a reply to this message

From: PerNyblom
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 2 Dec 2009 07:05:01
Message: <web.4b1656e72f1f1b7d1384d1150@news.povray.org>
>
> It does. I invoke it from C#. I don't really follow why you think it
> doesn't.  Yes, it *also* opens a window, if that's what you mean.
>

That was what I meant... I intend to call several separate instances in
parallel, which makes multiple windows appear all the time.

I am currently exploring that other target in Visual C++

Thanks!


Post a reply to this message

From: PerNyblom
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 2 Dec 2009 10:10:00
Message: <web.4b1682d22f1f1b7d1384d1150@news.povray.org>
>
> I am currently exploring that other target in Visual C++
>

I have struggled with nmake and the provided makefile.vc, which seems to have a
USE_GUI option (which I guess that you meant by target?), but eventually, after
two hours of frustation, I decided that its not worth the trouble.

I guess that my first ugly hack will have to do :(


Post a reply to this message

From: PerNyblom
Subject: Re: Simple way to make POV-Ray for windows work in command line mode
Date: 3 Dec 2009 07:30:01
Message: <web.4b17ae8a2f1f1b7d1384d1150@news.povray.org>
> two hours of frustation, I decided that its not worth the trouble.
>

I downloaded the beta source which seems to have more targets. I'll give it
another go!
And I am sorry for my previous, very depressing post :)
Thanks for all the help so far!


Post a reply to this message

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