cross platform OS-level commands


    Apr 12 2007 | 4:55 pm
    I currently am using mxj within a Pluggo to do some specific OS-level things:
    1) Make a directory
    2) Retrieve path to current user's home directory
    With mxj and Java, this works nicely in a platform-independent way.
    My question: is there a way I can perform these tasks without
    reliance on Java? I know about Bill Orcutt's shell, but that's OS X
    only. And it looks like Francois Eudes' DOSHack for Windows is based
    on mxj (though I see some reference to a C version??)
    Thanks,
    Dan
    --
    Dan Nigrin
    Defective Records
    202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
    Malfunction
    http://www.defectiverecords.com

    • Apr 15 2007 | 7:09 pm
      Any ideas??
      At 12:55 PM -0400 4/12/07, Dan Nigrin wrote:
      >I currently am using mxj within a Pluggo to do some specific OS-level things:
      >
      >1) Make a directory
      >2) Retrieve path to current user's home directory
      >
      >With mxj and Java, this works nicely in a platform-independent way.
      >
      >My question: is there a way I can perform these tasks without
      >reliance on Java? I know about Bill Orcutt's shell, but that's OS X
      >only. And it looks like Francois Eudes' DOSHack for Windows is
      >based on mxj (though I see some reference to a C version??)
      >
      >Thanks,
      >Dan
      --
      Dan Nigrin
      Defective Records
      202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
      Malfunction
      http://www.defectiverecords.com
    • Apr 16 2007 | 8:06 am
    • Apr 17 2007 | 7:44 am
    • Apr 19 2007 | 7:47 am
      Dan Nigrin schrieb:
      > ; max launchbrowser file:///Applications/Utilities/Terminal.app (Mac)
      > or
      > ; max launchbrowser "file://C:/Program Files/Cycling '74/MaxMSP
      > 4.6/max.exe" (Windows)
      >
      > But no hope of passing arguments with it... too bad!!
      Usually there is no need to pass arguments, as on the easy operating
      system level users double click a file and never pass arguments. If you
      point to a file (not an application) it will open its associated
      application: xxx.pdf will open the assigned PDF reader and xxx.pat will
      eventually open Photoshop... ;-)
      Stefan
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com
    • Apr 19 2007 | 7:57 am
    • Apr 19 2007 | 11:24 am
      >>; max launchbrowser file:///Applications/Utilities/Terminal.app (Mac)
      >>or
      >>; max launchbrowser "file://C:/Program Files/Cycling '74/MaxMSP
      >>4.6/max.exe" (Windows)
      >>
      >>But no hope of passing arguments with it... too bad!!
      >
      >Usually there is no need to pass arguments, as on the easy operating
      >system level users double click a file and never pass arguments. If
      >you point to a file (not an application) it will open its associated
      >application: xxx.pdf will open the assigned PDF reader and xxx.pat
      >will eventually open Photoshop... ;-)
      Thanks Stefan - but you forget what my original tasks are:
      1) Make a directory
      2) Retrieve path to current user's home directory
      I think you'll agree that I'll need to pass some arguments to an app
      to be able to do those things...
      --
      Dan Nigrin
      Defective Records
      202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
      Malfunction
      http://www.defectiverecords.com
    • Apr 19 2007 | 8:01 pm
      what about mkdir by bill orcutt, and possibly getenv by Jasch?
    • Apr 19 2007 | 10:04 pm
      At 1:01 PM -0700 4/19/07, jamez wrote:
      >what about mkdir by bill orcutt
      Would've been perfect, but no UB Mac version available to my
      knowledge. In general Bill, are any of your Mac objects UB yet??
      >and possibly getenv by Jasch?
      The Mac version is dependent on shell, which again, is not UB yet I think...
      Thanks nonetheless for the suggestions...
      Dan
      --
      Dan Nigrin
      Defective Records
      202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
      Malfunction
      http://www.defectiverecords.com
    • Apr 20 2007 | 7:03 am
      f.e schrieb:
      > Yes, but he needs to do "; max launchbrowser cmd.exe /a /c rm c:temp",
      > and it would be great he could.
      does cmd.exe understand scripts? maybe its possible to write a script
      and then call this script which would then call cmd.exe...
      In general all parameter passing to applications is part of a shell
      culture. And thus it will be platform/shell specific always...
      But it should be possible to create something like a shell command
      translator, which creates a script file which can be called by
      launchbrowser...
      Is there an extension which is assigned to cmd.exe on windows?
      Stefan
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com
    • Apr 20 2007 | 12:51 pm
      Interesting though guys, I'll give it a look.
      I may have found a workaround in the meantime anyway; one of my
      primary reasons in wanting to move away from the Java-based solution
      that I already use (and which works well), is that on Win I can't
      guarantee that there will be a Java environment on hand for my
      apps/plugins that I distribute. Relying on end-users to do so is
      asking for trouble, IMHO.
      So what I may do is use Windows-specific externals like mkdir and
      getenv, and then on the Mac side, stick with Java (since it's by
      default in OS X).
      Less elegant, but workable.
      Dan
      At 11:04 AM +0200 4/20/07, f.e wrote:
      >For sure. On Win box, Dan could write a simple text file saved as
      >.bat, then launch it from Max. Not sexy, but probably working.
      --
      Dan Nigrin
      Defective Records
      202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
      Malfunction
      http://www.defectiverecords.com
    • Apr 20 2007 | 1:32 pm
      if you like, you could try my new [getpaths] on OS X and [getenv] on XP
      www.jasch.ch/dl/beta/getpaths_20070420.zip
      cheers
      /*j
      On 20/04/2007, at 14:51:28, Dan Nigrin wrote:
      > Interesting though guys, I'll give it a look.
      >
      > I may have found a workaround in the meantime anyway; one of my
      > primary reasons in wanting to move away from the Java-based
      > solution that I already use (and which works well), is that on Win
      > I can't guarantee that there will be a Java environment on hand for
      > my apps/plugins that I distribute. Relying on end-users to do so
      > is asking for trouble, IMHO.
      >
      > So what I may do is use Windows-specific externals like mkdir and
      > getenv, and then on the Mac side, stick with Java (since it's by
      > default in OS X).
      >
      > Less elegant, but workable.
      >
      > Dan
      >
      > At 11:04 AM +0200 4/20/07, f.e wrote:
      >> For sure. On Win box, Dan could write a simple text file saved
      >> as .bat, then launch it from Max. Not sexy, but probably working.
      >
      > --
      > Dan Nigrin
      > Defective Records
      > 202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X /
      > Major Malfunction
      > http://www.defectiverecords.com
      > http://www.jackosx.com
      >
    • Apr 20 2007 | 1:51 pm
      Very nice Jasch, will take a look.
      I presume your "_" object/abstraction is just "prepend set"?
      Thanks,
      Dan
      At 3:32 PM +0200 4/20/07, jasch wrote:
      >if you like, you could try my new [getpaths] on OS X and [getenv] on XP
      >
      >www.jasch.ch/dl/beta/getpaths_20070420.zip
      >
      >cheers
      >
      >/*j
      --
      Dan Nigrin
      Defective Records
      202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
      Malfunction
      http://www.defectiverecords.com
    • Apr 20 2007 | 2:16 pm
      x-actly
      > I presume your "_" object/abstraction is just "prepend set"?