| View previous topic :: View next topic |
| Author |
Message |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1980 Location: $TERM
|
Posted: Sat Dec 01, 2012 4:51 am Post subject: How do they make Windows executables? |
|
|
I was just wondering.
There're a lot of 'unofficial' Windows compilers like gcc, and various toolkits which will compile your project to Windows binaries, but, as we know, the Windows executable format is not standard and it's not known how they work.
So how do these compilers compile? _________________ Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Adobe, Autodesk, Pioneer, Kingston, WD, Yahoo, MSI, XFX
My blog |
|
| Back to top |
|
 |
dmitchell Veteran


Joined: 17 May 2003 Posts: 1154 Location: Austin, Texas
|
Posted: Sat Dec 01, 2012 5:05 am Post subject: Re: How do they make Windows executables? |
|
|
| dE_logics wrote: | | as we know, the Windows executable format is not standard and it's not known how they work. |
I did not know that. Now I am wondering too.
A few weeks ago I had to cross compile for windows for the first time. I used mxe and it worked. What do others use for building windows executables? _________________ Your argument is invalid. |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1980 Location: $TERM
|
Posted: Sat Dec 01, 2012 8:48 am Post subject: |
|
|
If their format was known, making WINE would've been a lot easier. But they've to reverse engineer. _________________ Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Adobe, Autodesk, Pioneer, Kingston, WD, Yahoo, MSI, XFX
My blog |
|
| Back to top |
|
 |
erm67 Tux's lil' helper


Joined: 01 Nov 2005 Posts: 130 Location: somewhere in Berlusconia.
|
Posted: Sat Dec 01, 2012 9:08 am Post subject: |
|
|
http://en.wikipedia.org/wiki/Portable_Executable
| Quote: | | PE is a modified version of the Unix COFF file format. PE/COFF is an alternative term in Windows development. |
Spec of the format, freely available here:
http://msdn.microsoft.com/en-us/windows/hardware/gg463119.aspx
| Quote: | Microsoft PE and COFF Specification
Updated: October 5, 2010
This specification describes the structure of executable (image) files and object files under the Windows family of operating systems. These files are referred to as Portable Executable (PE) and Common Object File Format (COFF) files, respectively.
.......
|
Its a subset at the core of the API used in Windows that is not freely available and had to be reverse engineered for wine.
Or maybe you are referring to this note in the specs:
| Quote: | | Note: This document is provided to aid in the development of tools and applications for Windows but is not guaranteed to be a complete specification in all respects. Microsoft reserves the right to alter this document without notice. |
_________________ Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ |
|
| Back to top |
|
 |
szczerb Veteran

Joined: 24 Feb 2007 Posts: 1626 Location: Poland => Lodz
|
Posted: Sat Dec 01, 2012 1:24 pm Post subject: |
|
|
| AFAIK the hardest part of reimplementing WinAPI for Wine was getting the bugs right. I've read somewhere that there is lots of Windows software that has to work around some minor bugs that'll never get fixed, so there is also some software using those bugs for convenience. Bugs as in "we missed the spec a bit" not as in "crush and burn". |
|
| Back to top |
|
 |
mcgruff Tux's lil' helper


Joined: 28 Dec 2004 Posts: 137
|
Posted: Sat Dec 01, 2012 1:57 pm Post subject: |
|
|
A genuine Windows executable must have 10 major security flaws for every thousand lines of code otherwise the program will die with a "security alert: this program is secure" warning. _________________ the underlay overlay |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1980 Location: $TERM
|
Posted: Sat Dec 01, 2012 4:44 pm Post subject: |
|
|
| erm67 wrote: | http://en.wikipedia.org/wiki/Portable_Executable
| Quote: | | PE is a modified version of the Unix COFF file format. PE/COFF is an alternative term in Windows development. |
Spec of the format, freely available here:
http://msdn.microsoft.com/en-us/windows/hardware/gg463119.aspx
| Quote: | Microsoft PE and COFF Specification
Updated: October 5, 2010
This specification describes the structure of executable (image) files and object files under the Windows family of operating systems. These files are referred to as Portable Executable (PE) and Common Object File Format (COFF) files, respectively.
.......
|
Its a subset at the core of the API used in Windows that is not freely available and had to be reverse engineered for wine.
Or maybe you are referring to this note in the specs:
| Quote: | | Note: This document is provided to aid in the development of tools and applications for Windows but is not guaranteed to be a complete specification in all respects. Microsoft reserves the right to alter this document without notice. |
|
Yeah, I saw that, but that was just a part.
So all these compilers work on these specifications. Including ICC.
If you wanna really program on Windows, you HAVE to use .NET. _________________ Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Adobe, Autodesk, Pioneer, Kingston, WD, Yahoo, MSI, XFX
My blog |
|
| Back to top |
|
 |
erm67 Tux's lil' helper


Joined: 01 Nov 2005 Posts: 130 Location: somewhere in Berlusconia.
|
Posted: Sat Dec 01, 2012 7:09 pm Post subject: |
|
|
| dE_logics wrote: |
Yeah, I saw that, but that was just a part. |
What part is missing? regarding the executables I mean?
| dE_logics wrote: |
So all these compilers work on these specifications. Including ICC.
If you wanna really program on Windows, you HAVE to use .NET. |
| Quote: | | The .NET Framework (pronounced dot net) is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for the .NET Framework execute in a software environment (as contrasted to hardware environment), known as the Common Language Runtime (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework. |
It is a lot easier to program using .NET but even if the library is huge you might need (or want to use) lower level APIs for speed. Also the CRL is a limitation since only a subset of all API available for a platform are available, the advantage is that it runs on a broad range of systems.
It is just a way for M$ to drop legacy API, so if you want that your program works on a broad range of platforms (and M$ means flavours of windows with platforms) you have to use .NET. _________________ Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ |
|
| Back to top |
|
 |
John-Boy Guru


Joined: 23 Jun 2004 Posts: 436 Location: Desperately seeking Moksha in all the wrong places
|
Posted: Sat Dec 01, 2012 7:20 pm Post subject: |
|
|
| erm67 wrote: | | you have to use .NET. |
Thought that was deprecated now, Javascript & HTML 5 being the future ? _________________ When you break rules, break 'em good and hard |
|
| Back to top |
|
 |
erm67 Tux's lil' helper


Joined: 01 Nov 2005 Posts: 130 Location: somewhere in Berlusconia.
|
Posted: Sat Dec 01, 2012 9:12 pm Post subject: |
|
|
| John-Boy wrote: | | erm67 wrote: | | you have to use .NET. |
Thought that was deprecated now, Javascript & HTML 5 being the future ? |
More or less. For the desktop .net is still a choice that will probably stay.
http://community.devexpress.com/blogs/ctodx/Windows8Architecture_485458D4.png _________________ Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1980 Location: $TERM
|
Posted: Sun Dec 02, 2012 12:38 pm Post subject: |
|
|
| John-Boy wrote: | | erm67 wrote: | | you have to use .NET. |
Thought that was deprecated now, Javascript & HTML 5 being the future ? |
What, in .net? _________________ Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Adobe, Autodesk, Pioneer, Kingston, WD, Yahoo, MSI, XFX
My blog |
|
| Back to top |
|
 |
wswartzendruber Veteran


Joined: 23 Mar 2004 Posts: 1197 Location: Jefferson, USA
|
Posted: Sun Dec 02, 2012 4:58 pm Post subject: |
|
|
In no way is .NET deprecated. You have three choices for writing Windows 8 apps:
1. HTML5/JavaScript
2. .NET (C#)
3. C++ |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|