Re: How to install Euphoria on a USB flash drive?
- Posted by Patrick Barnes <mrtrick at gmail.com> Nov 23, 2005
- 558 views
Well, there is the command-line tool 'set'. So, if you have a batch file for the program you want to run: (Assuming that there is a bin folder and a include folder inside the directory you run the batch file from) <runmyprog.bat> set PATH="%PATH%";"%CD%\bin" set EUDIR="%CD%\bin" set EUINC="%CD%\include" set MYPROGRAMSTUFFLOCATION="%CD%\myprogram\myprogramsstuff" exw myprogram\myprogram.exw </runmyprog.bat> (%CD% is a batch file thing containing the current directory.) Now, the set command only sticks for the current session, so if you use set in a batch script, it's effects are only felt within that script. If you want to have a batch file that you run on connecting the drive, and from then on everything works fine, then use setx - you need more priveleges to use the command, but it is a permanent addition. http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setx-o.= asp Hope that helps... On 11/23/05, Juergen Luethje <j.lue at gmx.de> wrote: > I would really like to carry all my important programs and documents > with me in my pocket! This includes Euphoria, of course. > > So how can Euphoria be installed on a USB flash drive? As I see it, the > problem is how to set the PATH, EUDIR and EUINC environment variables > properly. When I connect my USB flash drive to the computer of a friend, > of course I don't want to edit the 'autoexec.bat' file and reboot the > system in order to be able to run Euphoria. > > I would appreciate it very much, if someone knows a solution right now > for Eu 2.5 (or below). > > If there is no solution currently, maybe something could be done in the > next Euphoria release? I think the EUDIR and EUINC variables are "only" > used by Euphoria itself. So as far as I can see it's not necessary to > implement them as environment variables. The same effect can be achieved > by a file say '.....\euphoria\bin\euphoria.ini', that contains something > like: > [Directories] > EUDIR=... > EUINC=... > If I am right, this way of setting the variables is more portable than > setting these variables as environment variables of the OS. > > So the remaining problem is the PATH. Well, if there is no solution, I > think for me personally this would be not a big problem (I only talk > about DOS/Windows, since I know almost nothing about Linux/FreeBSD), > becazse I can use *relative* names in batch files to call my Euphoria > programs on the USB flash drive. > > What do you all think? > > Regards, > Juergen > > -- > A: Because it considerably reduces the readability of the text. > Q: Why? > A: Top posting. > Q: What is annoying in e-mail and news? > > > > -- MrTrick ----------