texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Running Axiom in Texmacs for Windows (was:[Texmacs


From: Mike Thomas
Subject: RE: [Axiom-developer] Running Axiom in Texmacs for Windows (was:[Texmacs-dev] Plugins)
Date: Thu, 2 Dec 2004 22:01:53 +1000

Hi Bill/Dan.

I've attached some code which shows how to launch a subprocess with
redirected stdin/out on Windows, which you might like to incorporate into
tm_axiom.c.  I haven't run it for a couple of years but I recall that it
worked when last I tried!

The _spawn family of functions on Windows does almost exactly what fork/exec
does on Unix; you also have _dup2, _pipe etc.  The examples switchable by
macro to use the pure Win32 functions CreateProcess etc and also to redirect
stderr; I made these programs as a learning exercise at the time.  The
threading in this code is, I expect, not relevant to tm_axiom.c and can
safely be disregarded.

You can find the MSDN docs on these functions by googling for "msdn
_spawnvp" etc.

Best of luck,

Mike Thomas


| -----Original Message-----
| From: address@hidden
| [mailto:address@hidden
| rg]On Behalf Of Page, Bill
| Sent: Thursday, 2 December 2004 3:45 PM
| To: 'Dan Martens'
| Cc: 'Mike Thomas'; address@hidden Org; Root;
| address@hidden; Bill Page (E-mail)
| Subject: [Axiom-developer] Running Axiom in Texmacs for Windows
| (was:[Texmacs-dev] Plugins)
|
|
| Dan,
|
| I know this would not be considered a final solution, but
| I have found a way to work around the problems of compiling
| tm_axiom.c under windows. tm_axiom.c uses the unix-isms fork
| and pipe which are not available under vanilla windows so
| tm_axiom.c would have to be seriously re-written in order
| to run under native Windows.
|
| But I found that if I copied tm_axiom.exe from the cygwin
| distribution of texmacs (which I also happen to have on
| this system)
|
|   C:\cygwin\usr\sbin\TeXmacs\bin\tm_axiom.exe
|
| and the cygwin library
|
|   C:\cygwin\bin\cygwin1.dll library
|
| into
|
|   C:\Program Files\WinTeXmacs\TeXmacs\bin
|
| then the new version of Axiom for Windows works with Texmacs
| for Windows! Of course cygwin is providing the fork and pipe
| emulation that is needed for the unix version of tm_axiom.
|
| In principle, tm_axiom.c is a fairly simple filter program.
| Perhaps you or someone on the texmacs-dev list could point
| me to a simple example of a native Windows program that does
| the same thing? I could try to produce a new version of
| tm_axiom.c for the windows distribution.
|
| Regards,
| Bill Page.
|
|
| ----- Original Message -----
| From: "Page, Bill" <address@hidden>
| To: "'Dan Martens'" <address@hidden>
| Cc: "Bill Page (E-mail)" <address@hidden>
| Sent: Wednesday, December 01, 2004 11:01 PM
| Subject: RE: [Texmacs-dev] Plugins
|
| > Dan,
| >
| > Axiom uses a "helper" program, as do some of the other
| > external applications, but not all. I am not sure about
| > Pari. The Axiom helper program is called tm_axiom.c
| >
| > I just did a search for tm_axiom.exe and did not find it.
| > Perhaps this program is not being compiled? That would be
| > a problem. I will try to compile it and let you know what
| > happens.
| >
| > Regards,
| > Bill Page.
| >
| > > -----Original Message-----
| > > From: Dan Martens [mailto:address@hidden
| > > Sent: Wednesday, December 01, 2004 10:48 PM
| > > To: Page, Bill
| > > Subject: Re: [Texmacs-dev] Plugins
| > >
| > >
| > > Hi Bill,
| > >
| > > Currently we have Pari and Yacas working with Wintexmacs.
| > > I  am not quite sure why the pipe would fail.  Do you have
| > > an Axiom dist. I can download to debug and test?  Is this
| > > a 16bit or 32bit app?
| > >
| > > Dan
| >
| >
|
|
| -----Original Message-----
| From: Page, Bill
| Sent: Wednesday, December 01, 2004 10:49 PM
| To: 'Dan Martens'
| Cc: Page, Bill
| Subject: RE: [Texmacs-dev] Plugins
|
| > Dan,
| >
| > You can download it here:
| >
| > http://page.axiom-developer.org/zope/mathaction/AxiomDownload
| >
| > It was compiled with MinGW under MSYS. How do I tell if it is
| > a 16bit or 32bit app?
| >
| > Once you install Axiom just try something simple like:
| >
| >   1+1
| >
| > to quit type
| >
| >   )quit
| >
| > and answer Yes. Let me know if you have any problems.
| >
| > Is there anything you can suggest that I test?
| >
| > Thanks.
| >
| > Bill Page.
|
|
| ----- Original Message -----
| From: "Page, Bill" <address@hidden>
| To: <address@hidden>
| Sent: Wednesday, December 01, 2004 10:39 PM
| Subject: [Texmacs-dev] Plugins
|
| > Dan,
| >
| > What is the current situation with plugins for wintexmacs?
| > We now have a windows version of Axiom and I can run Axiom
| > from the MSDOS command line, but when I use
| >
| >  Insert/Session/Axiom
| >
| > (Yes, Axiom shows up in the menu)
| >
| > then I get a slightly smungged axiom] prompt and then a
| > message at the bottom that says
| >
| >  Error: Cound not creat pipe
| >
| > I looked at the pluginpaths.txt discussion and I have added
| > such a file but the behaviour did not change. (Axiom showed
| > up in the Insert/Session menu anyway I presume because I had
| > already added the Axiom directory to the system Path.
| >
| > I am trying this on a Windows 2000 system. Do you know of
| > any problems that might cause this?
| >
| > Is this really working with Pari? (I will install Pari next
| > and see.) If so, I wonder what could be the difference?
| >
| > Regards,
| > Bill Page.
| >
|
|
| _______________________________________________
| Axiom-developer mailing list
| address@hidden
| http://lists.nongnu.org/mailman/listinfo/axiom-developer
|
|

Attachment: runmaxima.c
Description: Binary data

Attachment: runwish.c
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]