1. include paths
- Posted by George Henry <ghenryca at HOTMAIL.COM> Jan 15, 2001
- 404 views
Hi all, esp. Rob. I think the interpreter should include in its search path for include files the current directory (or folder) of the file currently being read, plus it should use some sort of path statement to find include files in a wide variety of directories. I just switched to win32lib version 0.55, which includes files tk_something.e, one or more of which in turn include w32keys.e. Now, all of these files are together in their own directory, where I wish to keep them. But no, either I have to change the source to include explicit paths, or move them into either the \euphoria\include directory or my main project directory. This is an irritant. In contrast, most C compilers (and I suspect, other languages as well) allow you to list the all folders where include files might be found, and search all the specified folders. Limiting includes to 1. the \euphoria\include directory; 2. the user's project directory; and 3. paths given explicitly in the source seems unreasonably hampering. A large library like win32lib should be decomposable into as many files as the authors think appropriate, and all of those files should be able to reside together in their own folder (any folder chosen by the user), separate from the user's project and separate from the standard include files. I will implement whatever awkward workaround I have to in order to get things to work, but the point is that awkward workarounds should not be necessary. George Henry _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
2. Re: include paths
- Posted by Kat <gertie at PELL.NET> Jan 14, 2001
- 387 views
- Last edited Jan 15, 2001
On 15 Jan 2001, at 2:09, George Henry wrote: > Hi all, esp. Rob. > > I think the interpreter should include in its search path for include files > the current directory (or folder) of the file currently being read, plus it > should use some sort of path statement to find include files in a wide variety > of directories. > > I just switched to win32lib version 0.55, which includes files > tk_something.e, one or more of which in turn include w32keys.e. Now, all of > these files are together in their own directory, where I wish to keep them. > But no, either I have to change the source to include explicit paths, or move > them into either the \euphoria\include directory or my main project directory. > This is an irritant. > > In contrast, most C compilers (and I suspect, other languages as well) allow > you to list the all folders where include files might be found, and search all > the specified folders. Limiting includes to 1. the \euphoria\include > directory; 2. the user's project directory; and 3. paths given explicitly in > the source seems unreasonably hampering. How about the C:\Eu_project_1\include D:\Eu_project_2\include directories? Kat
3. Re: include paths
- Posted by Ray Smith <smithr at IX.NET.AU> Jan 14, 2001
- 371 views
- Last edited Jan 15, 2001
Hi, >I think the interpreter should include in its search path for include files >the current directory (or folder) of the file currently being read, plus it >should use some sort of path statement to find include files in a wide >variety of directories. > >I just switched to win32lib version 0.55, which includes files >tk_something.e, one or more of which in turn include w32keys.e. Now, all of >these files are together in their own directory, where I wish to keep them. >But no, either I have to change the source to include explicit paths, or >move them into either the \euphoria\include directory or my main project >directory. This is an irritant. Yes I have had this problem as well. Also you want to keep multiple versions of the library ... the only way to do this know is to copy all the include files into every directory where you want it to be used. > >In contrast, most C compilers (and I suspect, other languages as well) allow >you to list the all folders where include files might be found, and search >all the specified folders. Limiting includes to >1. the \euphoria\include directory; >2. the user's project directory; and >3. paths given explicitly in the source >seems unreasonably hampering. My proposal would be: Allow the runtimes to use a -I switch or environment variable like C: eg. exw -Ic:\euphoria\include\win32lib.54 test.exw or set EUINCLUDE=c:\euphoria\include\win32lib.54 exw test.exw The -I or EUINCLUDE can contain semicolon seperated paths. (or colon on unix? What is the standard for cross platform projects?) eg. EUINCLUDE=c:\euphoria\my_includes;h:\share\euphoria\includes; Then the search path presidence would be: 1. Current Directory 2. Any directories specified with -I 3. Any directories specified with EUINCLUDE environment variabe 4. The standard include directory (%EUDIR%\include) Any other ideas? Ray Smith
4. include paths
- Posted by gwalters at sc.rr.com Mar 17, 2002
- 379 views
Is there a way to use a variable as an argument of an include statement. It seems a little restricteive to have to hard code an absolute path or accept the default search relative path of EU. I would like to do something like Path = getenv("EUDIR") &"/MyInclude/stuff.e" include Path george
5. Re: include paths
- Posted by gwalters at sc.rr.com Mar 17, 2002
- 389 views
another option would be for EU to recognize the double dot for backing up include ../MyInclude/stuff.e george ----- Original Message ----- From: <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Subject: include paths > > Is there a way to use a variable as an argument of an include statement. It > seems a little restricteive to have to hard code an absolute path or accept > the default search relative path of EU. > > I would like to do something like > > Path = getenv("EUDIR") &"/MyInclude/stuff.e" > > include Path > > george > > > >
6. Re: include paths
- Posted by gwalters at sc.rr.com Mar 17, 2002
- 384 views
Chris, did you ever get a response on a solution? the problem I'm trying to solve is that of having a development lib and a production lib. I don't want to mix and dork up production programs with new development programs. as well as keep my stuff separate from EU stuff w/o having to change hardcoded paths. george ----- Original Message ----- From: <bensler at mail.com> To: "EUforum" <EUforum at topica.com> Subject: RE: include paths > > I've mentioned the same thing a few times before, to no avail. > There is no way to use any form of equation to define an include. > > You can have dynamic includes by calling your includes from a secondary > include file that was generated on the fly. > > pseudo-code: > open include2.e for writing > add the include lines, using the custom path > close include2.e > > include include2.e > > > Chris > > > gwalters at sc.rr.com wrote: > > Is there a way to use a variable as an argument of an include statement. > > It > > seems a little restricteive to have to hard code an absolute path or > > accept > > the default search relative path of EU. > > > > I would like to do something like > > > > Path = getenv("EUDIR") &"/MyInclude/stuff.e" > > > > include Path > > > > george > > > > > > >
7. Re: include paths
- Posted by Robert Craig <rds at RapidEuphoria.com> Mar 17, 2002
- 388 views
George Walters writes: > the problem I'm trying to solve is that of having a development lib and a > production lib. I don't want to mix and dork up production programs with new > development programs. as well as keep my stuff separate from EU stuff w/o > having to change hardcoded paths. In Euphoria 2.3, you can define a new environment variable, called EUINC. You can set EUINC to a list of directories that Euphoria will search for included files. e.g. SET EUINC=C:\MYDEVELOPMENTLIB;C:\EUSTUFF\WIN32LIB Euphoria will search first in the same directory as the main .exw or .ex file, then it will search the directories listed in EUINC (left to right), then it will search your euphoria\include directory. I have a separate directory in EUINC for Win32lib.ew and friends for example. That way I don't have to mix them in with euphoria\include. If I want to try a new release of Win32Lib, I can change my EUINC to list the new release first. Later I can rename that new directory, or remove it from EUINC, and go back to using the original Win32Lib. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
8. Re: include paths
- Posted by gwalters at sc.rr.com Mar 17, 2002
- 401 views
I beleive that will work fine.... thanks.. george ----- Original Message ----- From: "Robert Craig" <rds at RapidEuphoria.com> To: "EUforum" <EUforum at topica.com> Subject: Re: include paths > > George Walters writes: > > the problem I'm trying to solve is that of having a development lib and a > > production lib. I don't want to mix and dork up production programs with new > > development programs. as well as keep my stuff separate from EU stuff w/o > > having to change hardcoded paths. > > In Euphoria 2.3, you can define a new environment variable, > called EUINC. You can set EUINC to a list of directories > that Euphoria will search for included files. e.g. > > SET EUINC=C:\MYDEVELOPMENTLIB;C:\EUSTUFF\WIN32LIB > > Euphoria will search first in the same directory as > the main .exw or .ex file, then it will search the directories > listed in EUINC (left to right), > then it will search your euphoria\include directory. > > I have a separate directory in EUINC for Win32lib.ew and friends > for example. That way I don't have to mix them in with euphoria\include. > If I want to try a new release of Win32Lib, I can change my EUINC > to list the new release first. Later I can rename that new directory, > or remove it from EUINC, and go back to using the original Win32Lib. > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > >
9. Re: include paths
- Posted by "Carl R. White" <euphoria at carlw.legend.uk.com> Mar 18, 2002
- 409 views
Kat wrote: > But as for include paths, have you tried the ole dos "subst"? Oops, can't do > neat things like that in windoze or *nix. I had inordinately long paths to some > files back in my pascal days, and would subst drive letters for them. > "E:\DCTDATA\DCTWORK\TESTCTRL.H13\084-KN.N13" would become > "X:\084-KN.N13" SUBST works fine under Windows9x, either from a command prompt, or the Start-menu's Run dialog. You just have to make sure that you use an equally arcane piece of wisdom beforehand; Set the LASTDRIVE parameter in your CONFIG.SYS to a value higher than or equal to the highest drive letter you want to use. LASTDRIVE=Z is your best bet. IIRC, Win3.x isn't quite as good in this regard, and you have to set up your SUBSTs before loading Windows. For WinNT4, 2000 and XP, just use SUBST. Fiddling with CONFIG.SYS is not required. :) For all Windows & Dos, type 'SUBST /?' at a command prompt. Finally, for Unix/Linux ( ooh, and BSD ;) ) go to a console and type 'man ln'. Links (ln) are a wonderful thing, and infinitely better than SUBST, IMO. Carl
10. include paths
- Posted by bensler at mail.com Jan 09, 2002
- 389 views
I spose this is mostly for Rob, but opinions are quite welcome. I finally got around to checking v2.3, and was very much looking forward to the EUINC variable. Being limited to the single include directory was quite cumbersome, and a nuisance. EUINC certainly makes life easier, but I was still hoping for more ;P Is there a reason you chose not to make the euphoria\include directory non-recursive? I try to keep my files organized as much as I can, and for me, that means I put all my library files into the inlude directory, where they belong, BUT, I would like to be able to have seperate directories for major API's. This is what my EUINC var currently looks like, after one day of setting up my EU environment.. EUINC=c:\euphoria\include\w320551;c:\euphoria\include\eX17;c:\euphoria\include\mylibs As you can see, it's going to get quite long, quite fast. You can see what I'm getting at.. This should be automatic IMHO. If the include path was recursive even 1 level, it would be much easier to organize things. I DO prefer to have the EUINC var, it will be great for distributing unbound apps, and adjusting the include paths to relate with the users personal setup, and not confined to either having all my libs in my program directory or moving them to the users include directory. On another note.. Rob had mentioned before about updating the trace facility, so one could view specific elements, or a range of elements for a sequence. Do we gotta wait for v2.4? This and the include path are the only things I looked forward to, other than my wish list. I guess my question is, if and when these things will be implemented. And where's the 'surprises'? Chris
11. Re: include paths
- Posted by Robert Craig <rds at RapidEuphoria.com> Jan 09, 2002
- 381 views
Chris Bensler writes: > Is there a reason you chose not to make the euphoria\include directory > non-recursive? I try to keep my files organized as much as I can, and > for me, that means I put all my library files into the inlude directory, > where they belong, BUT, I would like to be able to have seperate > directories for major API's. I'm not sure I understand your use of the word "recursive", but the way I chose to implement EUINC is simple and straightforward, and is the same as the way PATH works. I know that some people like to add or modify files in the euphoria\include directory, and now some people will build subdirectories in euphoria\include, but I don't see any reason to promote this practice. In fact, it's probably somewhat better if you put your include files in a separate place, rather than contaminating my precious euphoria\include directory > As you can see, it's going to get quite long, quite fast. There may have been a limit in the distant past on environment variable line-length, but I don't think it applies anymore. > Rob had mentioned before about updating the trace facility, so one could > view specific elements, or a range of elements for a sequence. > Do we gotta wait for v2.4? I guess so. > And where's the 'surprises'? Well, I guess I leaked most of the stuff before the release. Hopefully, the momentum will pick up a bit now that numerous people have copies of the interpreter (ex, exw, exu) source. Already, the 2.3 beta release will feature a bug fix carefully tracked down in the interpreter source code by Euman, and I've had useful feedback on the source from other people, who have looked at parts of it in surprising depth. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
12. Re: include paths
- Posted by rolf.schroeder at desy.de Jan 10, 2002
- 398 views
bensler at mail.com wrote: > ... > I'm just guessing, but I think I CAN permanently modify the environment > variables, using windows calls, but that's beyond me. > Using eu's set_env(), is through DOS, which makes it only temporary, > because a dos box has it's own environment, seperate from the windows > environment, from what I understand. > ... Chris, you have not to change the path settings on your system! For WinNT I'm using the following method: put the following script file "exw.bat" into a directory where the 'standard' path is set to (no Euphoria related paths are set on my system!). Then, if you call 'exw' in a command window (i.e. DOS window), a new instance of the (win32-)command interpreter 'cmd.exe' will be started, which has the necessary variables for 'exw.exe' temporarily. After ending of 'exw.exe' the 'cmd.exe' and all its environment variables are unloaded. In the example below I assumed your Euphoria directory is: "C:\EUPHORIA" and your EUINC-dirs are "C:\EU\ADDONS", "C:\EU\JD", and "C:\EU\CHRIS". Try it. Make different scripts for each EU-tool like "EDW.BAT" etc. ---------------------------------------------------------------- @ECHO OFF :: *** EXW.BAT *** :: ¯¯¯¯¯¯¯ :: Call EUPHORIA interpreter for WIN32 :: IF "%1"=="#@!001" GOTO LBL1 %COMSPEC% /E:1024 /C %0 #@!001 %1 %2 %3 %4 %5 GOTO ENDE :LBL1 SHIFT PATH C:\EUPHORIA\BIN;%PATH% SET EUDIR=C:\EUPHORIA SET EUINC=C:\EU\ADDONS;C:\EU\JD;C:\EU\ROLFS PROMPT EUW$G$P$G :: Next line calls the Eu-tool you want to start, here EXE.EXE EXW.EXE %1 %2 %3 %4 %5 :ENDE ---------------------------------------------------------------- Have a nice day, Rolf