1. Problems with directory length

Hello,

I have a problem with the directory length of a bound program or just 'backendw.exe'. What happens is that a bound program (and backendw.exe) work just fine then the directory length is less than say about 128 characters, but when the name length gets long the bound program, instead of opening up normally, will post the "Euphoria Interpreter, enter file name to execute" message screen that normally only opens when the interp. is opened by itself. Backendw.exe opens stating "can not open .exe. file". This is easy to duplicate...make a very long directory name possibly with some spaces in some of the sub dir names and put in a bound file or just backendw.exe and try to run it. The error message comes up. What happened was someone i sent a bound program to complained that the program would not run under the chosen sub dir but it ran ok under the C:\ drive, so i tried it with a long name and sure enough it didnt open properly.

Thanks and take care, Al

new topic     » topic index » view message » categorize

2. Re: Problems with directory length

Put the path/filename in quotes. Spaces are delimiters, so the system will consider everything up to the first space as the file (which it cannot find), and everything after that as illegal parameters.

useless

new topic     » goto parent     » topic index » view message » categorize

3. Re: Problems with directory length

MrAl002 said...

I have a problem with the directory length of a bound program or just 'backendw.exe'. What happens is that a bound program (and backendw.exe) work just fine then the directory length is less than say about 128 characters, but when the name length gets long the bound program, instead of opening up normally, will post the "Euphoria Interpreter, enter file name to execute" message screen that normally only opens when the interp. is opened by itself. Backendw.exe opens stating "can not open .exe. file".

What operating system and shell are you using? It sounds like you are probably using command.com. According to this KB article, the limit for cmd.exe is between 2047 and 8191, depending on which version of windows you're running.

Matt

new topic     » goto parent     » topic index » view message » categorize

4. Re: Problems with directory length

Hi Matt,

Thanks for the link, that's good to know too, but the way the programs (both bound and backendw.exe) are being run by double clicking the .exe file in Windows Explorer, of course after navigating to the sub directory and finding the file.

This is easy to dup...make a long dir name from several sub dirs, put a bound file or just backendw.exe under that last sub dir, then double click it. Watch what pops up on screen. I was surprised that this could happen after so many years of Euphoria users, but then again most of us probably use somewhat shorter names for directories. The person i sent this to happened to use long dir names because of the way they organize their computer information, but i've recreated the problem on my own machine too by simply making a directory like: C:\Thisdir\Thatdir\...\...\Thiswith a few spaces\...\lastdir\boundfile.exe (or backendw.exe). The total length of the directory name written out like that without the file name is something like 128 or so characters, but if needed i can post the actual directory name too.

The way many people use their computer is to either double click the exe file or else use a shortcut, so i double clicked it like the problem user did with their machine. I also tried making a short cut but that didnt work either.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Problems with directory length

MrAl002 said...

Thanks for the link, that's good to know too, but the way the programs (both bound and backendw.exe) are being run by double clicking the .exe file in Windows Explorer, of course after navigating to the sub directory and finding the file.

Ok, but what operating system are you using?

Matt

new topic     » goto parent     » topic index » view message » categorize

6. Re: Problems with directory length

Well, ignore me, but i have no problems reading and writing this sort of filename 100's of times a day:

M:\radar pics\intellicast\katl Atlanta, GA\2009\September\normal\2009-09-01-+-00-15 - katl LocalWeather RadarImagery Radar.gif

And that's 133 characters.

useless

new topic     » goto parent     » topic index » view message » categorize

7. Re: Problems with directory length

MrAl002 said...

I have a problem with the directory length of a bound program ...

I can confirm that there is a problem here, just as you described it.

I am running Windows XP SP3 and created this file ...

C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\EN\a very long\directory name\to test this supposed\bug the MrAl002 brought up\linklist.exe

By using the BIND program.

When I double click on it I get the message ...

<0299>:: Can't open executable file 

When opening a console and moving to the folder that the .exe resides in, then typing in the exe's name, I get the exact same error message.

The issue has nothing to do with spaces in the path name as I tried the same thing in a folder path that has spaces but is shorter then 128 characters and it works fine in that case.

The problem seems to only depend on the length of the path.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Problems with directory length

Hi again,

Thanks for trying this Derek...

Here is the actual directory (with some names replaced with x's) and it turns out it was longer than i estimated:

(if this doesnt come out all on one line note that the second line is part of it too)

C:\Temp\New Folder(3)\Xxxxxx Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx xxxxx Final Year Thesis - ENSPolytech\Download from Al

new topic     » goto parent     » topic index » view message » categorize

9. Re: Problems with directory length

MrAl002 said...

Hi again,

Thanks for trying this Derek...

Here is the actual directory (with some names replaced with x's) and it turns out it was longer than i estimated:

(if this doesnt come out all on one line note that the second line is part of it too)

C:\Temp\New Folder(3)\Xxxxxx Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx xxxxx Final Year Thesis - ENSPolytech\Download from Al

Oh yeah, op sys is XP SP2, and the other user has XP too but not sure what SP but i could find out if needed.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Problems with directory length

MrAl002 said...

C:\Temp\New Folder(3)\Xxxxxx Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx xxxxx Final Year Thesis - ENSPolytech\Download from Al

Ok, some more questions:

  1. Was this a 3.1 bound executable?
  2. Can you try writing a separate program that opens the file for reading?
  3. Is it a windows or DOS executable?

It looks like it's hitting some limit of fopen, but I thought the limit was 255 for single byte file names, at least for windows.

Matt

new topic     » goto parent     » topic index » view message » categorize

11. Re: Problems with directory length

mattlewis said...
MrAl002 said...

C:\Temp\New Folder(3)\Xxxxxx Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx xxxxx Final Year Thesis - ENSPolytech\Download from Al

Ok, some more questions:

  1. 1 Was this a 3.1 bound executable?
  2. 2 Can you try writing a separate program that opens the file for reading?
  3. 3 Is it a windows or DOS executable?

It looks like it's hitting some limit of fopen, but I thought the limit was 255 for single byte file names, at least for windows.

Matt

Hi Matt,

[1] No, bound on XP. [2] No Euphoria bound program will open in that directory, but other programs work fine. [3] It is a Windows exw type bound into .exe.

My guess is that the backendw.exe can not handle a long directory name like that. For example, when i put backendw.exe under a shorter directory name and double click it it complains: "no Euphoria code to execute" which is what i would expect since it is not bound to anything yet. However, putting it under a long directory name it complains: "Can't open .exe file"
and
"Press Enter"
on separate lines.

What is really strange though is that a completely bound exw program causes the program to open up with:
Euphoria Interpreter 2.4 for 32-bit Windows.
etc.
file name to execute?

which is the interp asking for a file name, even though it is bound to code already.

Take care, Al

new topic     » goto parent     » topic index » view message » categorize

12. Re: Problems with directory length

(see previous post first, thanks) BTW it happens with all of the backendw.exe's i have tried up to and including the most recent one available yesterday on the RDS site.

new topic     » goto parent     » topic index » view message » categorize

13. Re: Problems with directory length

MrAl said...

[1] No, bound on XP.

Sorry, I should have been more specific. Was this with euphoria v3.1, was what I was after.

MrAl said...

[2] No Euphoria bound program will open in that directory, but other programs work fine.

When you say that other programs work, can they open the file when you pass the full path? I ask, because here's how the bound program tries to open itself for reading:

 -- open our own .exe file 
if ELINUX then 
    current_db = e_path_open(cl[1], "rb") 
else 
    current_db = open(cl[1], "rb") 
end if 

Matt

new topic     » goto parent     » topic index » view message » categorize

14. Re: Problems with directory length

Hello again,

No, it was bound with an earlier version but like i already said, the backendw.exe of either version does not work properly, so i wouldnt expect 3.1 to work any better, and Derek also found the bound program to be a problem in this scenario.

BTW, i did try to open another file in that directory with Euphoria as an exw and it did open that file for reading "r" and actually read the first line of the file to verify that it did work. So, the exw can open files when given the full path but the backendw.exe can not seem to handle this.

Any ideas?

new topic     » goto parent     » topic index » view message » categorize

15. Re: Problems with directory length

MrAl said...

Hello again,

No, it was bound with an earlier version but like i already said, the backendw.exe of either version does not work properly, so i wouldnt expect 3.1 to work any better, and Derek also found the bound program to be a problem in this scenario.

BTW, i did try to open another file in that directory with Euphoria as an exw and it did open that file for reading "r" and actually read the first line of the file to verify that it did work. So, the exw can open files when given the full path but the backendw.exe can not seem to handle this.

Any ideas?

What version was used to bind? If it's before 3.0, then it was using a C front end, and I'm not sure what it did to open the file. Of course, Derek has found this to be a problem with 4.0, so there's something else going on.

If you really need to run this program, I'd suggest either moving it to a shorter named directory, or possibly creating a batch file in the directory to run it from the local directory.

I suppose the only other question would be whether the error is due to the command line being truncated or by the call to open failing. I'm not near a windows box right now. Perhaps Derek (or someone else) can add some output to his local copy of backend.ex, so we can see what's going on. Given that open() seems to cope with this, I'm leaning toward some sort of command line limitation when coming from explorer.

Matt

new topic     » goto parent     » topic index » view message » categorize

16. Re: Problems with directory length

mattlewis said...

Ok, some more questions:

  1. Was this a 3.1 bound executable?
  2. Can you try writing a separate program that opens the file for reading?
  3. Is it a windows or DOS executable?

It looks like it's hitting some limit of fopen, but I thought the limit was 255 for single byte file names, at least for windows.

Matt

  1. Using latest v4 build.
  2. Did this (see below) and it worked fine.
sequence cmd = command_line() 
integer fh = open(cmd[3], "r") 
? fh 
close(fh) 

Output was

c:\temp>eui test "C:\temp\Test Folder for Long Path Names\Xxxxxx Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx x 
xxxx Final Year Thesis - ENSPolytech\Download from Al\gametest.txt" 
3 
 
c:\temp> 
c:\temp>bind -con test.ex 
deleted 0 unused routines and 0 unused variables. 
You may now run test.exe 
 
Press Enter 
c:\temp>test "C:\temp\Test Folder for Long Path Names\Xxxxxx Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx xxxxx 
 Final Year Thesis - ENSPolytech\Download from Al\gametest.txt" 
4 
 
c:\temp> 

  1. Didn't seem to matter. Both Windows and DOS failed when double clicking bound exe.
new topic     » goto parent     » topic index » view message » categorize

17. Re: Problems with directory length

mattlewis said...

... I'm leaning toward some sort of command line limitation when coming from explorer.

You may be correct. I changed the binder to give a better error message and this is what I got ...

<0299>:: Can't open executable file 'C:\temp\Test Folder for Long Path Names\Xxxxxx 
Xxxxxx xxxxx\My Documents\xxxxx\YEAR 5\END OF YEAR PROJECT\xxxxxx xxxxx Final Yea' 
As you can see, the file name got truncated by Explorer.

new topic     » goto parent     » topic index » view message » categorize

18. Re: Problems with directory length

Hello again,

What compiled the 'binder'?

The reason i ask is because every other .exe file i put in there runs just fine, it's only the Euphoria bound .exe's the give that problem. I even tried an old old program made for Windows 3.1 and it opened just as usual, without a problem.

I also tried a C program compiled with Watcom and it worked well too, and it had to work with files that it made in the same directory too. That is, write the files and read them as well... all from that same directory.

new topic     » goto parent     » topic index » view message » categorize

19. Re: Problems with directory length

MrAl said...

What compiled the 'binder'?

The reason i ask is because every other .exe file i put in there runs just fine, it's only the Euphoria bound .exe's the give that problem. I even tried an old old program made for Windows 3.1 and it opened just as usual, without a problem.

The way that bound programs work, is that the compressed IL of your program is appended to the backend runner (the same executable that you use to run a shrouded program). When the backend runner starts, the first thing it does is to check to see if it's a bound program or if it should look at the command line for a shrouded file.

So it opens itself up to read itself and check to see if it was bound. It figures out who it is (i.e., the actual path to the executable being run) by looking at the command line. So it begins executing just fine, but since the command line is apparently being truncated, it doesn't have the full path to open itself up.

I believe that when you run the program from the command line, in the same directory, you get a relative path in the command line, thus it has no problem in opening itself up. I wasn't able to figure out, via google, the specifics of the command line limits of double clicking on a program from within explorer.

Matt

new topic     » goto parent     » topic index » view message » categorize

20. Re: Problems with directory length

the MAX_PATH is 256 charaters in WIN32 API.
I met that problem at work in the past . A secretary was trying to open a file in word by browsing in the open file dialog box. She was seeing the file in the dialog but was getting an error when trying to open it. I told her to shorten her folders names an it solved the problem.

Jacques

new topic     » goto parent     » topic index » view message » categorize

21. Re: Problems with directory length

Hello,

Yeah sure, we can put our files in a shorter directory name, but that's not really the right way to get to the solution. The right way is to fix this smile

It's not Windows Explorer either. It's the way the base .exe file handles the command line like Matt said.

Ok, so that said, how can i make a new 'backendw.exe' myself so i can fix this, or if someone else wants to volunteer to fix this that's cool too smile

Either way i think it's a good idea to fix this dont you guys? People dont want to be bothered to have to limit their directory names when they buy an op sys that is made to handle nice long names, and they usually dont have a problem. Note that it is not really too much of a problem for me myself because i use rather short names too, but some people like to organize their computer files differently than i do and then that's where the problem starts.

So, how can i (or someone else) make a new 'backendw.exe' ?

Thanks for the previous replies and the ideas...

Al

new topic     » goto parent     » topic index » view message » categorize

22. Re: Problems with directory length

MrAl said...

It's not Windows Explorer either. It's the way the base .exe file handles the command line like Matt said.

I'll write up a ticket for it.

The C program below, compiled with Watcom, does not exhibit this problem, so it must be something that Euphoria is doing.

#include <stdio.h> 
int main(int argc, char **argv) 
{ 
    printf("'%s'\n", argv[0]); 
    return 0; 
} 

new topic     » goto parent     » topic index » view message » categorize

23. Re: Problems with directory length

DerekParnell said...
MrAl said...

It's not Windows Explorer either. It's the way the base .exe file handles the command line like Matt said.

The C program below, compiled with Watcom, does not exhibit this problem, so it must be something that Euphoria is doing.

#include <stdio.h> 
int main(int argc, char **argv) 
{ 
    printf("'%s'\n", argv[0]); 
    return 0; 
} 

I think line 4929 of be_runtime.c (in function make_arg_cv() ) is the culprit.

DerekParnell said...

I'll write up a ticket for it.

Didn't see it, else I would have replied there.

new topic     » goto parent     » topic index » view message » categorize

24. Re: Problems with directory length

I think jimcbrown is right. I changed the values on lines 4928,4929 to 260 and 256 and recompiled. This is on build 2850. The problem seems to have dissapeared.

Also, I have an application that was crashing on startup when bound. With the change this does not occur.

My knowledge of C is very limited. My numbers may not be correct and there may be other such problems.

Larry Miller

new topic     » goto parent     » topic index » view message » categorize

25. Re: Problems with directory length

jimcbrown said...

I think line 4929 of be_runtime.c (in function make_arg_cv() ) is the culprit.

DerekParnell said...

I'll write up a ticket for it.

Didn't see it, else I would have replied there.

Yes, you found the problem area.

I had to suddenly leave the house for a couple of hours just after I wrote about creating a ticket. It's there now as ticket:71

new topic     » goto parent     » topic index » view message » categorize

26. Re: Problems with directory length

DerekParnell said...

It's there now as ticket:71

Fixed. It can now handle path lengths of any size. Will be in the next release.

new topic     » goto parent     » topic index » view message » categorize

27. Re: Problems with directory length

DerekParnell said...

Fixed. It can now handle path lengths of any size. Will be in the next release.

Way to go you guys!

With this dev team, I'm thinking we can solve world hunger. grin

new topic     » goto parent     » topic index » view message » categorize

28. Re: Problems with directory length

euphoric said...
DerekParnell said...

Fixed. It can now handle path lengths of any size. Will be in the next release.

Way to go you guys!

With this dev team, I'm thinking we can solve world hunger. grin

I agree, and i hope i don't need to explain that.

useless

new topic     » goto parent     » topic index » view message » categorize

29. Re: Problems with directory length

DerekParnell said...
DerekParnell said...

It's there now as ticket:71

Fixed. It can now handle path lengths of any size. Will be in the next release.

Hello again,

It's been a while since i looked this this stuff... How can i build a backendw.exe for use when binding my programs now? I have the Watcom compiler.

Take care, Al


Forked into: Building Euphoria v4

new topic     » goto parent     » topic index » view message » categorize

30. Re: Problems with directory length

MrAl said...

It's been a while since i looked this this stuff... How can i build a backendw.exe for use when binding my programs now? I have the Watcom compiler.

In 4.0, the name has changed to eub.exe (or eubw.exe for the non-console version). First, you'll need a 4.0 binary. You can install the second beta, or get the latest released build from Jeremy's eubins. You'll need to checkout the source code using subversion (or download a tarball). The wiki wiki has some more detailed instructions on how to do that.

Then, from the source directory, run configure.bat, and then wmake. It should build all of the 4.0 binaries for you.

Matt

new topic     » goto parent     » topic index » view message » categorize

31. Re: Problems with directory length

Hi again,

Thanks. Right now i would like to try it first with v3.11 because i have that installed already. Later i may want to move to the other version though. Any way i can do it with v3.11 first?

Al

new topic     » goto parent     » topic index » view message » categorize

32. Re: Problems with directory length

Hello again,

Ok, it worked smile

I used Derek's solution of modifying the runtime file that handled the command line. Now i guess the question 'begged' is, just how many bytes need to be allocated in order to satisfy the most demanding user/system? I used 600 bytes just to test it out, but im thinking maybe 2048 or a little more, like 2050, but maybe even 4096 plus two so say 4100 to make it even, to handle unicode chars too (but i havent actually looked into this yet).

Any other ideas?

new topic     » goto parent     » topic index » view message » categorize

33. Re: Problems with directory length

MrAl said...

Hello again,

Ok, it worked smile

I used Derek's solution of modifying the runtime file that handled the command line. Now i guess the question 'begged' is, just how many bytes need to be allocated in order to satisfy the most demanding user/system? I used 600 bytes just to test it out, but im thinking maybe 2048 or a little more, like 2050, but maybe even 4096 plus two so say 4100 to make it even, to handle unicode chars too (but i havent actually looked into this yet).

Any other ideas?

So you didn't use my solution then blink And I assume you are patching the version 3 Euphoria.

My solution enables it to use any length at all. I didn't code a fixed length. Instead, I start at 64 bytes, and continue the get the exe's path until I get all of it, adding 32 bytes at a time to the buffer area.

Here is my code ...

	int ns; 
	int bs; 
 
	// don't use EMalloc yet: 
	argv = (char **)malloc((strlen(cmdline)/2+3) * sizeof(char *)); 
#ifdef EWINDOWS 
	if (*argc == 1) { 
		argv[0] = 0; 
		bs = 32; 
		ns = bs; 
		/* If ns equals bs it means that we have not gotten  
		   the complete path string yet */ 
		while (ns == bs) { 
			bs += 32; 
			if (argv[0] != 0) 
				free((void *)argv[0]); 
				 
			argv[0] = (char *)malloc(bs + 2); 
			ns = GetModuleFileName(NULL, (LPTSTR)argv[0], bs); 
		} 
		if (ns == 0) 
			argv[0] = "eui.exe"; 
		w = 1; 
	} 
	else 
#endif 

which replaced this ...

	// don't use EMalloc yet: 
	argv = (char **)malloc((strlen(cmdline)/2+3) * sizeof(char *)); 
#ifdef EWINDOWS 
	if (*argc == 1) { 
		argv[0] = malloc(130); 
		if (GetModuleFileName(NULL, (LPTSTR)argv[0], 128) == 0) 
			argv[0] = "EXW.EXE"; 
		w = 1; 
	} 
	else 
#endif 

new topic     » goto parent     » topic index » view message » categorize

34. Re: Problems with directory length

DerekParnell said...
MrAl said...

Hello again,

Ok, it worked smile

I used Derek's solution of modifying the runtime file that handled the command line. Now i guess the question 'begged' is, just how many bytes need to be allocated in order to satisfy the most demanding user/system? I used 600 bytes just to test it out, but im thinking maybe 2048 or a little more, like 2050, but maybe even 4096 plus two so say 4100 to make it even, to handle unicode chars too (but i havent actually looked into this yet).

Any other ideas?

So you didn't use my solution then blink And I assume you are patching the version 3 Euphoria.

My solution enables it to use any length at all. I didn't code a fixed length. Instead, I start at 64 bytes, and continue the get the exe's path until I get all of it, adding 32 bytes at a time to the buffer area.

Here is my code ...

	int ns; 
	int bs; 
 
	// don't use EMalloc yet: 
	argv = (char **)malloc((strlen(cmdline)/2+3) * sizeof(char *)); 
#ifdef EWINDOWS 
	if (*argc == 1) { 
		argv[0] = 0; 
		bs = 32; 
		ns = bs; 
		/* If ns equals bs it means that we have not gotten  
		   the complete path string yet */ 
		while (ns == bs) { 
			bs += 32; 
			if (argv[0] != 0) 
				free((void *)argv[0]); 
				 
			argv[0] = (char *)malloc(bs + 2); 
			ns = GetModuleFileName(NULL, (LPTSTR)argv[0], bs); 
		} 
		if (ns == 0) 
			argv[0] = "eui.exe"; 
		w = 1; 
	} 
	else 
#endif 

which replaced this ...

	// don't use EMalloc yet: 
	argv = (char **)malloc((strlen(cmdline)/2+3) * sizeof(char *)); 
#ifdef EWINDOWS 
	if (*argc == 1) { 
		argv[0] = malloc(130); 
		if (GetModuleFileName(NULL, (LPTSTR)argv[0], 128) == 0) 
			argv[0] = "EXW.EXE"; 
		w = 1; 
	} 
	else 
#endif 

Hello again,

Oh ok, so i didnt use your solution exactly (i didnt actually see it until now), so i improvised a little smile

I like your solution better actually, with a tiny modification...
I think i would make the increment a little larger (i am not afraid to use a little more mem here) so i would start by using malloc with say 128 bytes and then in the loop use realloc instead so i dont have a bunch of lost pointers with associated lost memory. I like the idea though of allocating on the fly so that we can always be sure that we are going to satisfy the demands of the system/user. I think i should implement this change too. Oh yeah, it was with 3.11, at least for now.

new topic     » goto parent     » topic index » view message » categorize

35. Re: Problems with directory length

MrAl said...

I like your solution better actually, with a tiny modification...
I think i would make the increment a little larger (i am not afraid to use a little more mem here) so i would start by using malloc with say 128 bytes and then in the loop use realloc instead so i dont have a bunch of lost pointers with associated lost memory.

Yeah, my code is a little conservative with its memory and a larger increment would be fine too. Also, my code doesn't have "lost pointers" - notice the free() call? It's a little (tiny, actually) faster than using realloc().

new topic     » goto parent     » topic index » view message » categorize

36. Re: Problems with directory length

Hi again,

Oh ok sorry Derek, i missed the free call. You think that calling free and malloc is faster than calling realloc then?

new topic     » goto parent     » topic index » view message » categorize

37. Re: Problems with directory length

Hello again,

I looked up the definitions and found that realloc wants to copy the old mem contents sometimes, so i will go with free and malloc also. I changed the increment to 256 so it gets most paths in one shot too. It tested ok with these changes.

The only other strange thing left then is that the new backendw.exe file comes out more than twice as big as the previous backendw.exe, that came with 3.11, which is a lot bigger. The 3.11 file was about 74k and the new file is 179k. I wonder why the new file is so much bigger? Is there a switch or something?

Al

new topic     » goto parent     » topic index » view message » categorize

38. Re: Problems with directory length

MrAl said...

Hello again,

I looked up the definitions and found that realloc wants to copy the old mem contents sometimes, so i will go with free and malloc also. I changed the increment to 256 so it gets most paths in one shot too. It tested ok with these changes.

The only other strange thing left then is that the new backendw.exe file comes out more than twice as big as the previous backendw.exe, that came with 3.11, which is a lot bigger. The 3.11 file was about 74k and the new file is 179k. I wonder why the new file is so much bigger? Is there a switch or something?

Al

I think it's probably because the older versions of Euphoria used UPX to compress its executables.

new topic     » goto parent     » topic index » view message » categorize

39. Re: Problems with directory length

MrAl said...

Hello again,

I looked up the definitions and found that realloc wants to copy the old mem contents sometimes, so i will go with free and malloc also. I changed the increment to 256 so it gets most paths in one shot too. It tested ok with these changes.

The only other strange thing left then is that the new backendw.exe file comes out more than twice as big as the previous backendw.exe, that came with 3.11, which is a lot bigger. The 3.11 file was about 74k and the new file is 179k. I wonder why the new file is so much bigger? Is there a switch or something?

Al

Why is the new backendw.exe bigger? Because it has to do more, a lot more. There are new control structures, a more complex include system, and many new internal functions. A portion of the new regular expression system plus network sockets is also internel.

new topic     » goto parent     » topic index » view message » categorize

40. Re: Problems with directory length

jaygade said...

I think it's probably because the older versions of Euphoria used UPX to compress its executables.

When we distribute for Windows, 4.0 installers will use UPX binaries as well.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

41. Re: Problems with directory length

MrAl said...

The only other strange thing left then is that the new backendw.exe file comes out more than twice as big as the previous backendw.exe, that came with 3.11, which is a lot bigger. The 3.11 file was about 74k and the new file is 179k. I wonder why the new file is so much bigger? Is there a switch or something?

Hm. Two questions...

  1. When you say the new backendw.exe... Do you mean eubw.exe? 4.0 does not produce a backendw.exe any longer, it has been renamed to eubw.exe.
  2. How did you get it to 179k? Even with UPX, I can only get it down to 289k.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

42. Re: Problems with directory length

I think he's using 3.11 source and binaries.

new topic     » goto parent     » topic index » view message » categorize

43. Re: Problems with directory length

Hi again,

Yes didnt i mention that i was using 3.11 for now? I need something stable enough to ship to someone so i have to go with that at least for now.

Oh yeah, i found out it *was* because of the missing upx which doesnt seem to ship with Eu 3.11, so i had to download that and put it in the directory and then it shrunk back down to about 70k (was 67k previously). I guess everything is working now so it should be ok for a while. I used Derek's solution for the command line problem and tested everything and so i guess that ends this issue.

Thanks to everyone who replied with ideas and suggestions and everything.

Take care, Al

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu