ActiveState Community

Cross-platform inconsistencies in command-line options

Posted by phgrosjean on 2008-06-28 00:21
OS: All / Any

Hello,

I appreciate the following command-line options (of course, besides the usual loading of files through command-line, which works similarly on all supported platforms:

- komodo -V. A separate program or script can check which version of Komodo is installed and takes required actions if it is the wrong version,... but, under Windows, you got a dialog box instead of the string returned to stdout. Impossible to "capture" and use the string displayed in that dialog box. Why is it different from the Linux/Mac OS X behavior?

- komodo myExt-ko.xpi. It prompts the user to install the extension. This is very critical for my application (integration of the R language with Komodo), because I would like R to install a specific extension in Komodo if it is missing. The user still can cancel installation in the dialog box that appears, so, this is not too invasive I think... but wait... why doesn't it work under Windows (the command just activates Komodo, but nothing happens, may be is it a bug)?

- Under Mac OS X, I have to create a symbolic link manually. Shouldn't this be a job for an installer?

Best,

Philippe Grosjean

shanec | Mon, 2008-06-30 10:50

You should be able to just do this:

ko.open.URI("http://mysite.com/path/to/extension.xpi");

Unless there is something I am not understanding from the description of what you are doing.

BTW, you should add your extension to our addons list (http://community.activestate.com/addons). See http://community.activestate.com/node/add/xpi

phgrosjean | Mon, 2008-06-30 12:39

shanec wrote:

You should be able to just do this:

ko.open.URI("http://mysite.com/path/to/extension.xpi");

Yes, I know. It works on my Mac OS X and on my Ubuntu, but not on my Windows XP. That said, I want to install the extension that initiates a communication between Komodo and R. So, at this stage, I cannot run a JavaScript command in Komodo from R, but I have access to the command line instruction (the goal being a semi-automatic configuration of Komodo piloted by R).

I will contribute the addons to both http://community.activestate.com/addons, and http://cran.r-project.org (the R equivalent), once it will be finished. For the moment, it is just available on our development site. If you want, you can visit http://www.sciviews.org/SciViews-K and http://r-forge.r-project.org/sciviews.

I hope that a support for R will be an interesting addition to Komodo: R (i.e., the S language) is a respected authority among the scientific community.

shanec | Mon, 2008-06-30 13:12

On windows, komodo.exe is a subsystem windows build, but you can also use ko.exe to get the console subsystem. You can use ko.exe to get the version, but use komodo.exe to launch the UI.

PD | Wed, 2008-07-09 07:23

It is a bit of off topic, but I downloaded your extension because on your page (http://www.sciviews.org/SciViews-K/index.html) you have a Komodo window with R source code highlighting. I thought that after installing the extension I will get that, but no luck. Is it part of the xpi file, or is it something completely separate?