Re: set PATH=%PATH%...

new topic     » goto parent     » topic index » view thread      » older message » newer message

Ron Weidner wrote:
> 
> I'm building a build system for a java game I'm
> writing and it is in it's early stages.  I'm having a
> problem
> with setting the PATH var...
> 
> The code generates a "set PATH=..." sequence to send
> to the command prompt.  If I run the generated
> sequence from the command line, the path becomes
> correctly set.
> 
> Does anyone see what I'm doing wrong? 
> <pre>
> 
> -- OS = windows xp
> -- Euphoria Interpreter 2.5 for 32-bit DOS.
> -- string_cat() appends sequence 1 with each char from
> 
> -- sequence 2, one at a time.
> 
> constant JAVAC = "C:\\Program
> Files\\Java\\jdk1.5.0_05\\bin"
> 
> procedure build_all()
>   object return_code
>   sequence path, cmd
>   path = "%PATH%;"
>   path = string_cat(path, JAVAC)
>   cmd = string_cat("set PATH=", path)
>   puts (1,"\n\n")
>   puts (1, "procedure build_all()\n")
>   puts(1,cmd)
>   return_code = system_exec(cmd, 2)
>   if (return_code < 0) then
>     puts(1, "\n!!! command failed\n\n")
>   end if
>   path = getenv("PATH")
>   puts (1, "\n\n")
>   puts (1, "final path\n")
>   puts(1, path)
>   --build_client()
>   --build_server()
> end procedure
> 
> ----
> -- output 
> --
> --
> 
> procedure build_all()
> set PATH=%PATH%;C:\Program Files\Java\jdk1.5.0_05\bin
> !!! command failed
> 
> final path
>
> C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\ATITEC~1\ATI
> CON~1;c:\PROGRA~1\MI6841~1\90\Tools\binn\;C:\EUPHORIA\BIN;
> 
> 
> </pre>
> 
> 
> --
> Ronald Weidner
> <a href="http://www.techport80.com">http://www.techport80.com</a>
> PHP Software developer for hire.
> 
> 
> 		
> 
> 
Can you try 'system()' instead of 'system_exec()' ?


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu