Allow to fill Details tab for exe files
Hi there,
Here is a serie of patch to allow get a details properties tab filled on exe files using windres tool.
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exe
Signature · 1 line
Beber
PATCH 1/4 WIN32: Check for windres tool
--- configure.ac | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 1 files changed, 1 insertions(+), 0 deletions(-)
configure.ac +1 -0
@@ -356,6 +356,7 @@ if test "${WIN32}" = "yes"; then AC_ARG_VAR([MAN2HTML], [man2html utility]) AC_CHECK_PROGS([MAN2HTML], [man2html]) test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32]) + AC_CHECK_TOOL(WINDRES, windres) fi dnl Checks for header files.
Signature · 1 line
1.7.6
Re: [Openvpn-devel] [PATCH 1/4] WIN32: Check for windres tool
configure.ac if test "${WIN32}" = "yes"; then · line 359
Quoted 1 line · On Sunday 07 August 2011 12:59:14 Bertrand Jacquin wrote:
configure.ac +1
-0+ AC_CHECK_TOOL(WINDRES, windres)
The values should be quoted in square brackets besides that ACK.
Heiko
Signature · 8 lines
Heiko Hund | Software Engineer | Phone +49-721-25516-237 | Fax -200 Astaro a Sophos Company | Amalienbadstr. 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRA 702710 | Headquarter Location: Karlsruhe Represented by the General Partner Astaro Verwaltungs GmbH Amalienbadstraße 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRB 708248 | Executive Board: Gert Hansen, Markus Hennig, Jan Hichert, Günter Junk, Dr. Frank Nellissen
PATCH 2/4 Win32: Add OpenVPN RC file to add fill "Details" exe properties tabs
In reply to Bertrand Jacquin--- openvpn-res.rc | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) 1 files changed, 8 insertions(+), 0 deletions(-)
openvpn-res.rc new file +8 -0
@@ -0,0 +1,8 @@ +/* + * (c) 2011 Bertrand Jacquin <[email protected]...> + */ + +#include <windows.h> + +1 VERSIONINFO +
Signature · 1 line
1.7.6
PATCH 1/3 Win32: Add OpenVPN RC file to add fill "Details" exe properties tabs
First patch was incomplete
--- openvpn-res.rc | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) 1 files changed, 35 insertions(+), 0 deletions(-)
openvpn-res.rc new file +35 -0
@@ -0,0 +1,35 @@ +/* + * (c) 2011 Bertrand Jacquin <[email protected]...> + */ + +#include <windows.h> +#include "config.h" + +1 VERSIONINFO + FILEVERSION _VERSION_ + PRODUCTVERSION _VERSION_ + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" /* en_US, Unicode */ + BEGIN + // required + VALUE "CompanyName", PACKAGE_NAME "\0" + VALUE "FileDescription", PACKAGE_NAME "\0" + VALUE "FileVersion", PACKAGE_VERSION "\0" + VALUE "InternalName", PACKAGE_TARNAME "\0" + VALUE "OriginalFilename", PACKAGE_TARNAME ".exe\0" + VALUE "ProductName", PACKAGE_NAME "\0" + VALUE "ProductVersion", PACKAGE_VERSION "\0" + // optional + VALUE "LegalCopyright", "(C) 2002-2010 " PACKAGE_NAME " Technologies, Inc.\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 0x4b0 + END +END
Signature · 1 line
1.7.6
Re: [Openvpn-devel] [PATCH 1/3] Win32: Add OpenVPN RC file to add fill "Details" exe properties tabs
Quoted 1 line · On Sunday 07 August 2011 13:08:22 Bertrand Jacquin wrote:
+1 VERSIONINFO
Could use VS_VERSION_INFO instead of 1
openvpn-res.rc line 10
Quoted 2 lines
openvpn-res.rc new file +2
-0+ FILEVERSION _VERSION_ + PRODUCTVERSION _VERSION_
See my other mail about the version.
Quoted 1 line
+ BLOCK "
040904b0" /*en_US, Unicode */
Openvpn itself is not compiled as Unicode binary, so 04090000 for ASCII would be more precise.
Quoted 9 lines
openvpn-res.rc new file +8
-0+ VALUE "CompanyName", PACKAGE_NAME "\0" + VALUE "FileDescription", PACKAGE_NAME "\0" + VALUE "FileVersion", PACKAGE_VERSION "\0" + VALUE "InternalName", PACKAGE_TARNAME "\0" + VALUE "OriginalFilename", PACKAGE_TARNAME ".exe\0" + VALUE "ProductName", PACKAGE_NAME "\0" + VALUE "ProductVersion", PACKAGE_VERSION "\0" + VALUE "LegalCopyright", "(C) 2002-2010 " PACKAGE_NAME "Technologies, Inc.\0"
The \0's are not needed here.
Quoted 1 line
+ VALUE "Translation",
0x409,0x4b0
Same, no Unicode.
Heiko
Signature · 8 lines
Heiko Hund | Software Engineer | Phone +49-721-25516-237 | Fax -200 Astaro a Sophos Company | Amalienbadstr. 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRA 702710 | Headquarter Location: Karlsruhe Represented by the General Partner Astaro Verwaltungs GmbH Amalienbadstraße 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRB 708248 | Executive Board: Gert Hansen, Markus Hennig, Jan Hichert, Günter Junk, Dr. Frank Nellissen
PATCH 3/4 Win32: Fill "Details" properties for openvpn.exe
In reply to Bertrand Jacquin--- Makefile.am | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) 1 files changed, 12 insertions(+), 0 deletions(-)
Makefile.am +12 -0
@@ -146,6 +146,13 @@ openvpn_SOURCES = \ win32.h win32.c \ cryptoapi.h cryptoapi.c +if WIN32 +openvpn_SOURCES += openvpn-res.rc + +openvpn_LDADD = openvpn-res.o +endif + + nodist_openvpn_SOURCES = configure.h options.$(OBJEXT): configure.h
@@ -161,6 +168,11 @@ dist_noinst_DATA += openvpn.8 nodist_html_DATA = openvpn.8.html openvpn.8.html: $(srcdir)/openvpn.8 $(MAN2HTML) < $(srcdir)/openvpn.8 > openvpn.8.html + +comma = , + +%.o: %.rc + $(WINDRES) -D _VERSION_=$(subst .,$(comma),$(VERSION)),0 -i $< -o $@ else dist_man_MANS = openvpn.8 endif
Signature · 1 line
1.7.6
Re: [Openvpn-devel] [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe
Makefile.am dist_noinst_DATA += openvpn.8 · line 178
Quoted 12 lines · On Sunday 07 August 2011 12:59:16 Bertrand Jacquin wrote:
Makefile.am +5
-0@@ -161,6 +168,11 @@ dist_noinst_DATA += openvpn.8 nodist_html_DATA = openvpn.8.html openvpn.8.html: $(srcdir)/openvpn.8 $(MAN2HTML) < $(srcdir)/openvpn.8 > openvpn.8.html + +comma = , + +%.o: %.rc + $(WINDRES) -D _VERSION_=$(subst .,$(comma),$(VERSION)),0 -i $< -o $@ else dist_man_MANS = openvpn.8 endif
This will at least break compilation on master where
#define VERSION "2.x-master"
_VERSION_ needs needs to be stricly numerical. Maybe we could define a WINDOWS_VERSION a,b,c,0 in version.m4 for this. Or even have separate major, minor and patch version definitions in there that could be used to build the versions in the .rc file itself.
Heiko
Signature · 8 lines
Heiko Hund | Software Engineer | Phone +49-721-25516-237 | Fax -200 Astaro a Sophos Company | Amalienbadstr. 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRA 702710 | Headquarter Location: Karlsruhe Represented by the General Partner Astaro Verwaltungs GmbH Amalienbadstraße 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRB 708248 | Executive Board: Gert Hansen, Markus Hennig, Jan Hichert, Günter Junk, Dr. Frank Nellissen
PATCH 4/4 Win32: Fill "Details" properties for openvpnserv.exe
In reply to Bertrand Jacquin--- service-win32/Makefile.am | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) 1 files changed, 8 insertions(+), 0 deletions(-)
service-win32/Makefile.am +8 -0
@@ -32,6 +32,14 @@ openvpnserv_SOURCES = \ openvpnserv.c \ service.h service.c +openvpnserv_LDADD = \ + ../openvpn-res.o + +comma = , + +%.o: %.rc + $(WINDRES) -D _VERSION_=$(subst .,$(comma),$(VERSION)),0 -i $< -o $@ + else dist_noinst_DATA = \
Signature · 1 line
1.7.6
Quoted 9 lines · Bertrand Jacquin
Hi there,
Here is a serie of patch to allow get a details properties tab filled on exe files using windres tool.
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exe
I just can't figure out why my patch are not diffused even when SF MX say they have been accepted.
Patches can be found there http://git.meleeweb.net/cgit.cgi/openvpn.git/
Hi,
Quoted 7 lines · Bertrand Jacquin
Quoted 4 lines
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exeI just can't figure out why my patch are not diffused even when SF MX say they have been accepted.
Your patches have arrived here just fine.
I think the functionality is useful, but don't know enough about windows to give this a full technical ACK.
Two questions:
- what happens if windres is not found? will the compilation break? (I'm not sure whether windres will always be there or not)
- if I read this right, it will only work for the autoconf / mingw based build, but not for the msvc++ / python based build, right? will it co-exist, or break the python build?
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...D'ar sul 07 a viz Eost 2011 e 19 eur 51, « Gert Doering » he deus skrivet :
Quoted 8 lines
Hi,
Quoted 5 lines · Bertrand Jacquin
Quoted 4 lines
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exe
Quoted 7 lines
Quoted 2 lines
I just can't figure out why my patch are not diffused even when SF MX say they have been accepted.
Your patches have arrived here just fine.
I think the functionality is useful, but don't know enough about windows to give this a full technical ACK.
Oh, ok, maybe some huge spool on SF, doono
Quoted 4 lines
Two questions:
- what happens if windres is not found? will the compilation break? (I'm not sure whether windres will always be there or not)
In the present configure.ac, it's only needed when WIN32 = yes, so it's windows/mingw only.
Quoted 3 lines
- if I read this right, it will only work for the autoconf / mingw based build, but not for the msvc++ / python based build, right? will it co-exist, or break the python build?
I have to say that I didn't test with msvc++/python as I only use to cross compile applications. But if I read well the build process for msvc++/python it does not use autotools stuffs.
Signature · 1 line
Beber
Hi,
Quoted 7 lines · Bertrand Jacquin
Quoted 4 lines
Two questions:
- what happens if windres is not found? will the compilation break? (I'm not sure whether windres will always be there or not)
In the present configure.ac, it's only needed when WIN32 = yes, so it's windows/mingw only.
Yes. So mingw always has "windres"? Otherwise the produced Makefiles won't work.
Quoted 7 lines
Quoted 3 lines
- if I read this right, it will only work for the autoconf / mingw based build, but not for the msvc++ / python based build, right? will it co-exist, or break the python build?
I have to say that I didn't test with msvc++/python as I only use to cross compile applications. But if I read well the build process for msvc++/python it does not use autotools stuffs.
Indeed. David / Samuli: how is the python Makefile built? How does this build system know which files to compile?
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...D'ar sul 07 a viz Eost 2011 e 20 eur 11, « Gert Doering » he deus skrivet :
Quoted 5 lines
Hi,
Quoted 2 lines · Bertrand Jacquin
Quoted 2 lines
Two questions:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
- what happens if windres is not found? will the compilation break? (I'm not sure whether windres will always be there or not)
In the present configure.ac, it's only needed when WIN32 = yes, so it's windows/mingw only.
Yes. So mingw always has "windres"? Otherwise the produced Makefiles won't work.
It always have, it's provided by bintutils
Quoted 10 lines
Quoted 7 lines
Quoted 3 lines
- if I read this right, it will only work for the autoconf / mingw based build, but not for the msvc++ / python based build, right? will it co-exist, or break the python build?
I have to say that I didn't test with msvc++/python as I only use to cross compile applications. But if I read well the build process for msvc++/python it does not use autotools stuffs.
Indeed. David / Samuli: how is the python
Makefilebuilt? How does this build system know which files to compile?
Looking to install-win32/makeopenvpn, it run autotools and configure, this may need some tweak :
*inux)
+ export WINDRES=i586-mingw32msvc-windres
Is there a windres equivalent for msvc ?
Signature · 1 line
Beber
Quoted 8 lines
Looking to install-win32/makeopenvpn, it run autotools and configure, this may need some tweak :
*inux)
+ export WINDRES=i586-mingw32msvc-windresIs there a windres equivalent for msvc ?
There certainly a way to do the same thing using msvc or Python code that runs after the build. Does windres simply convert the resource file to another format? Or does it also embed it to the executable? Looks to me as if embedding/linking is triggered by the new linker flags (openvpn_LDADD), but then again my automake-fu is _very_ limited.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
D'ar lun 08 a viz Eost 2011 e 10 eur 10, « Samuli Seppänen » he deus skrivet :
Quoted 6 lines
Quoted 6 lines
Looking to install-win32/makeopenvpn, it run autotools and configure, this may need some tweak :
*inux)
+ export WINDRES=i586-mingw32msvc-windres
I've updated my branch with a fix for that
Quoted 4 lines
Quoted 1 line
Is there a windres equivalent for msvc ?
There certainly a way to do the same thing using msvc or Python code that runs after the build. Does windres simply convert the resource file to another format?
Yes and check the format :
$ file openvpn-res.o openvpn-res.o: ACB archive data
Quoted 1 line
Or does it also embed it to the executable?
It need to be embed in the executable yes, as a classic object.
Quoted 3 lines
Looks to
me as if embedding/linking is triggered by the new linker flags (openvpn_LDADD), but then again my automake-fu is _very_ limited.
It does. If you add openvpn-res.rc to openvpn_SOURCES it will never be build as not a classic extension. So it's define as a link dependencies, and manual conversion is precise. I didn't find a way to use only automake syntax to build rc file using windres.
Also, the openvpn-res.rc is shared between openvpn.exe and openvpnserv.exe, they may need to be duplicated, I need some advise from the project about this.
Signature · 2 lines
Beber On Lady Voodoo
Quoted 9 lines · On Monday 08 August 2011 10:17:48 Bertrand Jacquin wrote:
Quoted 4 lines
Quoted 1 line
Is there a windres equivalent for msvc ?
There certainly a way to do the same thing using msvc or Python code that runs after the build. Does windres simply convert the resource file to another format?
Yes and check the format :
$ file openvpn-res.o openvpn-res.o: ACB archive data
See http://msdn.microsoft.com/en-us/library/aa381055%28v=VS.85%29.aspx for information on how to invoke the Platform SDK Ressource Compiler.
Heiko
Signature · 8 lines
Heiko Hund | Software Engineer | Phone +49-721-25516-237 | Fax -200 Astaro a Sophos Company | Amalienbadstr. 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRA 702710 | Headquarter Location: Karlsruhe Represented by the General Partner Astaro Verwaltungs GmbH Amalienbadstraße 41 Bau 52 | 76227 Karlsruhe | Germany Commercial Register: Mannheim HRB 708248 | Executive Board: Gert Hansen, Markus Hennig, Jan Hichert, Günter Junk, Dr. Frank Nellissen
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
- if I read this right, it will only work for the autoconf / mingw based build, but not for the msvc++ / python based build, right? will it co-exist, or break the python build?
I have to say that I didn't test with msvc++/python as I only use to cross compile applications. But if I read well the build process for msvc++/python it does not use autotools stuffs.
Indeed. David / Samuli: how is the python
Makefilebuilt? How does this build system know which files to compile?gert
The Python-based buildsystem gets the list of files to build from Makefile.am's openvpn_SOURCES section (see win/wb.py and win/msvc.mak.in). These patches should not affect it, but won't do it any good, either :). I'm unable to test building atm, as the Windows build computer is being migrated to a better server. When that's finished, I'll try building Bertrand's Git tree and report back.
Bertrand: what kind of information goes to the "Details" fields?
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Il 08/08/2011 10:36, Samuli Seppänen ha scritto:
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
- if I read this right, it will only work for the autoconf / mingw based build, but not for the msvc++ / python based build, right? will it co-exist, or break the python build?
I have to say that I didn't test with msvc++/python as I only use to cross compile applications. But if I read well the build process for msvc++/python it does not use autotools stuffs.
Indeed. David / Samuli: how is the python
Makefilebuilt? How does this build system know which files to compile?gert
Quoted 9 lines
The Python-based buildsystem gets the list of files to build from Makefile.am's
openvpn_SOURCESsection (seewin/wb.pyand win/msvc.mak.in). These patches should not affect it, but won't do it any good, either :). I'm unable to test building atm, as the Windows build computer is being migrated to a better server. When that's finished, I'll try building Bertrand's Git tree and report back.Bertrand: what kind of information goes to the "Details" fields?
Sorry, did not notice the fixed patch at first. Please ignore me :).
Samuli
[Openvpn-devel] d Re: Allow to fill Details tab for exe files
In reply to Bertrand JacquinQuoted 11 lines
Hi there,
Here is a serie of patch to allow get a details properties tab filled on exe files using windres tool.
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exe
I just tested these patches with the Python-based buildsystem and there were no negative side-effects (=build worked as intended).
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Re: [Openvpn-devel] d Re: Allow to fill Details tab for exe files
D'ar yaou 11 a viz Eost 2011 e 17 eur 32, « Samuli Seppänen » he deus skrivet :
Quoted 6 lines
Quoted 6 lines
Hi there,
Here is a serie of patch to allow get a details properties tab filled on exe files using windres tool.
Quoted 7 lines
Quoted 5 lines
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exeI just tested these patches with the Python-based buildsystem and there were no negative side-effects (=build worked as intended).
Is the intented feature is effective with that kind of build ?
Signature · 2 lines
Beber On Lady Voodoo
Re: [Openvpn-devel] d Re: Allow to fill Details tab for exe files
Il 11/08/2011 18:45, Bertrand Jacquin ha scritto:
Quoted 6 lines
D'ar yaou 11 a viz Eost 2011 e 17 eur 32, « Samuli Seppänen » he deus skrivet :
Quoted 5 lines
Quoted 5 lines
Hi there,
Here is a serie of patch to allow get a details properties tab filled on exe files using windres tool.
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
[PATCH 1/4] WIN32: Check for windres tool
[PATCH 2/4] Win32: Add OpenVPN RC file to add fill "Details" exe [PATCH 3/4] Win32: Fill "Details" properties for openvpn.exe [PATCH 4/4] Win32: Fill "Details" properties for openvpnserv.exeI just tested these patches with the Python-based buildsystem and there were no negative side-effects (=build worked as intended).
Is the intented feature is effective with that kind of build ?
No, the Python-based buildsystem will require some glue to embed the resource files to executable with windres or similar. I'll check out how easy that'd be.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock