Author Topic: PJSR creating subprocess  (Read 9396 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #15 on: 2010 April 30 05:37:40 »
Code: [Select]
../../SystemCommandInstance.cpp:24:20: aviso: QProcess: No existe el fichero o el directorio
../../SystemCommandInstance.cpp:25:17: aviso: QTime: No existe el fichero o el directorio
../../SystemCommandInstance.cpp: In member function ‘virtual bool pcl::SystemCommandInstance::ExecuteGlobal()’:
../../SystemCommandInstance.cpp:24:20: aviso: QProcess: No existe el fichero o el directorio

This looks as if the Qt4 development files are not installed on your system. I am currently not at my development system, so I can tell you only tonight what you should be looking for.

Regarding the problem in your the follow up message: I have no idea what happens there.

Georg
« Last Edit: 2010 April 30 05:43:51 by georg.viehoever »
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 986
    • View Profile
    • http://www.astrofoto.es/
Re: PJSR creating subprocess
« Reply #16 on: 2010 April 30 05:41:48 »
Hmmm... Qt4 files? What must I install? I thought that only the PCL was needed.


V.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #17 on: 2010 April 30 05:44:50 »
Vincent, I will check this tonight at my development system. I also thought I had not installed anything on top of the default...
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #18 on: 2010 April 30 06:25:07 »
...
Yes, I've installed the full PCL, of course. I don't know why this happens... if I put in .bashrc "$HOME/Pixinsight/bin" instead of "/home/vperis/Pixinsight/bin", then make doesn't find the files.
...

Maybe you are working as root/su (which is neither necessary nor recommended), not as vperis. You can check the setting of $HOME via "echo $HOME". If this is not /home/vperis, you are probably working as a different user.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #19 on: 2010 April 30 09:50:36 »
...
Code: [Select]
../../SystemCommandInstance.cpp:24:20: aviso: QProcess: No existe el fichero o el directorio
../../SystemCommandInstance.cpp:25:17: aviso: QTime: No existe el fichero o el directorio
....
What's happening??

Hi,

I updated the description in http://pixinsight.com/forum/index.php?topic=1791.msg10769#msg10769 (see the Post Scriptum). Current versions of SystemCommand also need the Qt development packages.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #20 on: 2010 April 30 10:00:04 »
...here is updated version of the module, with bugfixes and some steps towards new functionality...

I precompiled version for Fedora11-x64 is available on http://cid-c56e60845cfa6790.skydrive.live.com/self.aspx/Pixinsight/SystemCommand-pxm_20100430.zip . Put the unpacked file into your PI bin directory, check that permissions are as with all other *.so files, and add the module as previously described. Note: I have no idea on what kind of Linuxes this will run without problems. Use at your own risk.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 986
    • View Profile
    • http://www.astrofoto.es/
Re: PJSR creating subprocess
« Reply #21 on: 2010 May 03 02:08:45 »
Hi,

seems that my problem is that I'm under GNome, so it doesn't comes with Qt libraries.

Thanks you for the precompiled module! It's working in my Fedora10 x64. :)


Regards,
Vicent.

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • View Profile
    • Fotos
Re: PJSR creating subprocess
« Reply #22 on: 2010 June 09 03:22:39 »
Dear Georg,
thank you for your hints to the astrometry project. I also compiled and installed the software on my system.
I also tried your Fedora Library on my Suse 11.2 64bit Version of PI 1.6.0 and it also works fine  :D!
GREAT WORK !

PS: Would be great if this could be applied as a standard to future releases  of PI.

Thanks to all, who helped (see above) to make the software run.
Christoph
Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #23 on: 2010 June 09 03:38:16 »
Christoph,

thanks for your kind words  :) ! I still have a lot of ideas of what to do with this tool, but currently I dont have the time to work on it. We'll see what the future brings...

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #24 on: 2010 July 31 13:40:08 »
...
Code: [Select]
var commandsAllowed = Settings.readGlobal( "Security/AllowJavaScriptCommandExecution", DataType_Boolean );
...

Juan,

I tried your code in PI1.61, and it always produces a "false". I changed the settings, checked them again and again, reset the JS engine, restarted PI, nothing helped.

Code: [Select]
  var commandsAllowed = Settings.readGlobal( "Security/AllowJavaScriptCommandExecution", DataType_Boolean );
   if (!commandsAllowed){
      throw new Error("Cannot execute shell commands, please change Edit > Security Settings > Allow execution of commands from JavaScript scripts");
   }  //if not allowed

So what is wrong with the code?

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6828
    • View Profile
    • http://pixinsight.com/
Re: PJSR creating subprocess
« Reply #25 on: 2010 August 03 01:51:29 »
Absolutely nothing is wrong with your code. It is a bug (a regression) in PI 1.6.1, which I'm going to publish on the bug reports board after writing this message. Sorry!

Fortunately, the workaround is easy and works perfectly:

Code: [Select]
#include <pjsr/StdIcon.jsh>
#include <pjsr/DataType.jsh>

function canExecuteCommands()
{
#iflteq __PI_BUILD__ 625 // public final 1.6.1 release

   try
   {
      console.execute( "version" );
      return true;
   }
   catch ( e )
   {
      return false;
   }

#else

   return Settings.readGlobal( "Security/AllowJavaScriptCommandExecution", DataType_Boolean );

#endif
}

var commandsAllowed = canExecuteCommands();
if ( !commandsAllowed )
{
   (new MessageBox( "<p><b>Cannot execute shell commands</b></p>" +
                    "<p>Please change the state of the following global security item:</p>" +
                    "<p><i>Allow execution of commands from JavaScript scripts</i></p>" +
                    "<p>using the <i>Edit > Security Settings</i> main menu command.</p>",
                    "My Script", StdIcon_Error )).execute();
   throw new Error( "Global security directive: Command execution not allowed from scripts." );
}
else
{
   (new MessageBox( "<p>I can execute shell commands. Thanks!</p>",
                    "My Script", StdIcon_Information )).execute();
}

This bug will be fixed in the next version, but it will have to wait until September.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: PJSR creating subprocess
« Reply #26 on: 2010 August 03 01:53:19 »
Thanks a lot.
Note: It is also there in 1.60 (at least the Linux x64 version)
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)