On 3/4/08, Alejandro Jakubi <[EMAIL PROTECTED]> wrote: > Hi Bill and Alfredo > > My question is about setting up WinTexmacs to run also an OpenAxiom 1.1 > session. Indeed OpenAxiom 1.1 opens fine within a cmd box, just clicking on > the desktop icon, which for my setting executes: > > C:\math\OpenAxiom\bin\open-axiom.exe > --system="C:\math\OpenAxiom\lib\open-axiom\i686-pc-mingw32\1.1.0" > > So, I know that no environment variable needs to be set up to run from the > cmd > box. But, on the other hand Bill's version of tm_axiom.c uses the enviroment > variable AXIOM: > > === > ... > /* e.g. AXIOM=c:/Program Files/axiom/mnt/windows */ > if (pAXIOM=getenv("AXIOM")) { > strcpy(AXIOM_exe,pAXIOM); strcat(AXIOM_exe,"/bin/AXIOMsys.exe"); > strcpy(AXIOM_cmd,pAXIOM); strcat(AXIOM_cmd, "/bin/AXIOMsys.exe"); > strcpy(ENV_AXIOM,"AXIOM="); strcat(ENV_AXIOM, pAXIOM); > } else { /* We need the AXIOM variable! */ > printf("You must set the AXIOM environment variable, e.g.\n"); > printf(" AXIOM=c:/Program Files/axiom/mnt/windows\n"); > exit(1); > }; > ... > === > > Hence, apparently, one way to adapt it for a tm_openaxiom.c would be to > replace here AXIOM by OPENAXIOM and set a fake enviroment variable OPENAXIOM > pointing to openaxiom.exe. > > Well, I have thought that Bill, or someone else, had already looked at it. >
No, sorry. But if you are interested I am willing to help. I don't think "faking it" is a good idea. Instead, we should probably change the code something like this: /* e.g. OPENAXIOM="C:/Program Files/OpenAxiom/lib/open-axiom/i686-pc-mingw32/1.1.0 */ if (pAXIOM=getenv("OPENAXIOM")) { strcpy(AXIOM_exe,pAXIOM); strcat(AXIOM_exe,"/../../../../bin/open-axiom.exe"); strcpy(AXIOM_cmd,pAXIOM); strcat(AXIOM_cmd, "/../../../../bin/open-axiom.exe"); strcat(AXIOM_cmd," --system=\""; strcat(AXIOM_cmd,pAXIOM); strcat(AXIOM_cmd,"\""); strcpy(ENV_AXIOM,"OPENAXIOM="); strcat(ENV_AXIOM, pAXIOM); } else { /* We need the AXIOM variable! */ printf("You must set the OPENAXIOM environment variable, e.g.\n"); printf(" OPENAXIOM=C:/Program Files/OpenAxiom/lib/open-axiom/i686-pc-mingw32/1.1.0\n"); exit(1); }; Then the user would have to set the OPENAXIOM environment variable appropriately for their installation. The /../../../.. prefix allows the open-axiom.exe to be located relative to this path and the path itself is passed via the --system option. Warning: I haven't tested this, but I may get a chance to try it later tonight. One question is: Do you want to be able to run both the original Axiom and OpenAxiom in the same TeXmacs session? Or is configuring it for just one or the other sufficient? If you want both (or maybe all three? :-) then we need to do a little more work. Regards, Bill Page. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel