delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/11/09/17:12:44

From: carl DOT johansson AT helsinki DOT fi ("Carl J R Johansson")
Subject: Re: Default linker output filename
9 Nov 1996 17:12:44 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199611092056.WAA29918.cygnus.gnu-win32@kantti.helsinki.fi>
Mime-Version: 1.0
Original-To: <hhemken AT cell DOT cinvestav DOT mx>, <gnu-win32 AT cygnus DOT com>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
X-MIME-Autoconverted: from 8bit to quoted-printable by kantti.helsinki.fi id WAA29918
Original-Sender: owner-gnu-win32 AT cygnus DOT com


----------
> From: Heinz Hemken <hhemken AT cell DOT cinvestav DOT mx>
> To: gnu-win32 AT cygnus DOT com
> Subject: Re: Default linker output filename
> Date:  den 7 november 1996 15:51
>=20
> Patrick Doyle wrote:
> > That works fine for simple cases.  Unfortunately, there are a lot of
> > makefiles and configure scripts for existing software that have:
> >    gcc -o blabla blabla.c foo.c bar.c
> > which makes porting these packages to W95 difficult.  Not difficult
> > in the sense of "how do I make this work", just difficult in the sens=
e
> > of "I have to repeatedly make this change in _every_ program I port t=
o
> > W95... gee it would be nice if some combination of gnu-win32/ld/gcc
> > would do this for me".
>=20
> Yet another little pointless omission by MS. These days, there doesn't
> seem to be much of a point to insist that executables have .exe, .com o=
r
> .bat extensions. Short of modifying every makefile you receive, a pain
> at best, it would have been better to be able to check the UNIXoid file
> properties, which don't really exist in W95, though bash does some sort
> of simulation. Find the latest file with "executable" turned on and giv=
e
> it an .exe extension.
>=20
> However, if the system were able to mark something as executable, there
> wouldn't be any point in changing the extension to .exe. Worse, I think
> (?) the same is true for NT, an ostensibly *real* OS.
>=20

I found that this _is_ actually possible with a small registry hack (on
W95).=20
 Just create a new key called '.out' (or whatever) under HKEY_CLASSES_ROO=
T
and copy the values for .exe there (Default : 'exefile', Content Type :
'application/x-msdownload').
I found that when I renamed DOS applications they wouldn't work (complain=
ed
about not finding the file), but that should be totally irrelevant to
gnu-win32.
I also found that I could not run them from a DOS window, but bash accept=
ed
them.=20

To get the 'executable' icon as well I had to create a separate key calle=
d
'UnixFile'
(or whatever) and refer to it instead of 'exefile' in '.out'.  Then I
copied exefiles'
values to UnixFile but modified 'DefaultIcon' to
'D:\WINDOWS\SYSTEM\shell32.dll,2'
(substitute path as appropriate).=20

It wasn't as easy with extensionless files though, it is possible to have=
 a
key called
'.' but when I modify it as above and try to execute them I get 'A requir=
ed
DLL file, *the executable*.EXE,=20
was not found' (in bash I got the same message). Maybe some additional
hacking would=20
remove this too (in the copies of 'exefiles' values) but this is as far a=
s
I want to go.=20
Thirdly a key called '*' can be created, on my system it was already in u=
se
by Winzip
so I didn't want to mess with it. I've seen some extensive books on the
registry, but=20
don't own one. Besides the registry architechture is of course different =
on
NT (don=B4t=20
ask me in what ways).=20

I have no idea whether this might have some unexpected side-effects, but =
to
me it seems
pretty safe (of course the fact that the file did not automatically get t=
he
'application' icon=20
might be a bit suspect, executables are perhaps dealt with somewhere else
too?).


cj=20

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019