diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-16 22:02:38 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-17 02:06:27 +0000 |
| commit | 721b9516f964784331a0ae89216120625f74f3f1 (patch) | |
| tree | 430070d32143851d0483dfcda6aed0db8d631700 /src | |
| parent | cmake: fix 'dist' target to actually include INKSCAPE_REVISION (diff) | |
| download | inkscape-721b9516f964784331a0ae89216120625f74f3f1.tar.gz inkscape-721b9516f964784331a0ae89216120625f74f3f1.zip | |
cmake: autogenerate Windows .rc files for inkscape and inkview
- inkscape.rc/inkview.rc are automatically configured with the
correct program name, version number and copyright year
- use one common file for all four configurations
(inkscape/inkview, x86/x64)
which should make it much easier to maintain and keep in sync
- fix/update/add some fields in the resource file, see
https://msdn.microsoft.com/library/windows/desktop/aa381058.aspx
- also unify inkscape-manifest.xml
As a result all configurations will use dpiAware=True now
(x86 and inkview did not have that setting yet)
This does not matter in gtk3 but is known know to cause tiny icons
on gtk2. It's still the preferred option as everything else
(including canvas) is properly scaled; if bitmap interpolation
is more desirable instead the setting can be overriden in the
compatibility tab of the executables properties dialog
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | src/inkscape-manifest-x64.xml | 15 | ||||
| -rw-r--r-- | src/inkscape-manifest.xml | 28 | ||||
| -rw-r--r-- | src/inkscape-x64.rc | 30 | ||||
| -rw-r--r-- | src/inkscape.rc | 36 | ||||
| -rw-r--r-- | src/inkview-manifest-x64.xml | 10 | ||||
| -rw-r--r-- | src/inkview-manifest.xml | 10 | ||||
| -rw-r--r-- | src/inkview-x64.rc | 29 | ||||
| -rw-r--r-- | src/inkview.rc | 29 |
9 files changed, 55 insertions, 158 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ed89c73a9..66c8b3af6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -472,22 +472,30 @@ set(inkscape_SRC set(main_SRC main.cpp) set(view_SRC inkview.cpp) -if(WIN32) +if(WIN32) # Sources for the inkscape executable on Windows. list(APPEND main_SRC registrytool.h registrytool.cpp winmain.cpp ) + + # Configure and add the platform specific resource files (enabling the app icon). + string(TIMESTAMP COPYRIGHT_YEAR %Y) + + set(FILE_NAME inkscape) + set(PROGRAM_NAME Inkscape) + set(PROGRAM_DESCRIPTION "Vector graphics editor") + configure_file(inkscape.rc ${CMAKE_BINARY_DIR}/src/inkscape.rc) + configure_file(inkscape-manifest.xml ${CMAKE_BINARY_DIR}/src/inkscape-manifest.xml) + list(APPEND main_SRC ${CMAKE_BINARY_DIR}/src/inkscape.rc) - # Add the platform specific resource files (enabling the app icon). - if(${HAVE_MINGW64}) - list(APPEND main_SRC inkscape-x64.rc) - list(APPEND view_SRC inkscape-x64.rc) - else() - list(APPEND main_SRC inkscape.rc) - list(APPEND view_SRC inkscape.rc) - endif() + set(FILE_NAME inkview) + set(PROGRAM_NAME Inkview) + set(PROGRAM_DESCRIPTION "Vector graphics viewer") + configure_file(inkscape.rc ${CMAKE_BINARY_DIR}/src/inkview.rc) + configure_file(inkscape-manifest.xml ${CMAKE_BINARY_DIR}/src/inkview-manifest.xml) + list(APPEND view_SRC ${CMAKE_BINARY_DIR}/src/inkview.rc) # Build console applications as wrappers around inkscape/inkview.exe as GUI applications can't print to the console. add_executable(inkscape_com winconsole.cpp) diff --git a/src/inkscape-manifest-x64.xml b/src/inkscape-manifest-x64.xml deleted file mode 100644 index b5a6f11f2..000000000 --- a/src/inkscape-manifest-x64.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <application xmlns="urn:schemas-microsoft-com:asm.v3"> - <windowsSettings> - <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware> - </windowsSettings> - </application> -<dependency> -<dependentAssembly> -<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" - version="6.0.0.0" processorArchitecture="amd64" - publicKeyToken="6595b64144ccf1df" language="*"/> -</dependentAssembly> -</dependency> -</assembly>
\ No newline at end of file diff --git a/src/inkscape-manifest.xml b/src/inkscape-manifest.xml index f9ca4617f..61756f034 100644 --- a/src/inkscape-manifest.xml +++ b/src/inkscape-manifest.xml @@ -1,10 +1,22 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> -<dependency> -<dependentAssembly> -<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" - version="6.0.0.0" processorArchitecture="X86" - publicKeyToken="6595b64144ccf1df" language="*"/> -</dependentAssembly> -</dependency> -</assembly>
\ No newline at end of file + + <assemblyIdentity type="win32" name="${PROGRAM_NAME}" + version="${INKSCAPE_VERSION_MAJOR}.${INKSCAPE_VERSION_MINOR}.${INKSCAPE_VERSION_PATCH}.0"/> + <description>${PROGRAM_DESCRIPTION}</description> + + <application xmlns="urn:schemas-microsoft-com:asm.v3"> + <windowsSettings> + <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware> + </windowsSettings> + </application> + + <dependency> + <dependentAssembly> + <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" language="*"/> + </dependentAssembly> + </dependency> + +</assembly> diff --git a/src/inkscape-x64.rc b/src/inkscape-x64.rc deleted file mode 100644 index ae1312d89..000000000 --- a/src/inkscape-x64.rc +++ /dev/null @@ -1,30 +0,0 @@ - -APPLICATION_ICON ICON DISCARDABLE "../share/branding/inkscape.ico" -1 24 DISCARDABLE "./inkscape-manifest-x64.xml" - -1 VERSIONINFO - FILEVERSION 0,93,0,0 - PRODUCTVERSION 0,93,0,0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040901b5" - BEGIN - VALUE "Comments", "Published under the GNU GPL" - VALUE "CompanyName", "inkscape.org" - VALUE "FileDescription", "Inkscape" - VALUE "FileVersion", "0.92+devel" - VALUE "InternalName", "Inkscape" - VALUE "LegalCopyright", "© 2016 Inkscape" - VALUE "ProductName", "Inkscape" - VALUE "ProductVersion", "0.92+devel" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 1033, 437 - END -END - -1000 BITMAP "./show-preview.bmp" - diff --git a/src/inkscape.rc b/src/inkscape.rc index 50daf0bda..677dfb19b 100644 --- a/src/inkscape.rc +++ b/src/inkscape.rc @@ -1,30 +1,30 @@ - -APPLICATION_ICON ICON DISCARDABLE "../share/branding/inkscape.ico" -1 24 DISCARDABLE "./inkscape-manifest.xml" +APPLICATION_ICON ICON "${CMAKE_SOURCE_DIR}/share/branding/inkscape.ico" +1000 BITMAP "${CMAKE_SOURCE_DIR}/src/show-preview.bmp" +1 24 "${CMAKE_BINARY_DIR}/src/${FILE_NAME}-manifest.xml" 1 VERSIONINFO - FILEVERSION 0,93,0,0 - PRODUCTVERSION 0,93,0,0 + FILEVERSION ${INKSCAPE_VERSION_MAJOR},${INKSCAPE_VERSION_MINOR},${INKSCAPE_VERSION_PATCH},0 + PRODUCTVERSION ${INKSCAPE_VERSION_MAJOR},${INKSCAPE_VERSION_MINOR},${INKSCAPE_VERSION_PATCH},0 + FILEOS 0x40004 + FILETYPE 1 BEGIN BLOCK "StringFileInfo" BEGIN - BLOCK "040901b5" + BLOCK "040904E4" BEGIN - VALUE "Comments", "Published under the GNU GPL" - VALUE "CompanyName", "inkscape.org" - VALUE "FileDescription", "Inkscape" - VALUE "FileVersion", "0.92+devel" - VALUE "InternalName", "Inkscape" - VALUE "LegalCopyright", "© 2016 Inkscape" - VALUE "ProductName", "Inkscape" - VALUE "ProductVersion", "0.92+devel" + VALUE "Comments", "Published under the GNU GPL" + VALUE "CompanyName", "Inkscape project" + VALUE "FileDescription", "${PROGRAM_DESCRIPTION}" + VALUE "FileVersion", "${INKSCAPE_VERSION}" + VALUE "InternalName", "${PROGRAM_NAME}" + VALUE "LegalCopyright", "© ${COPYRIGHT_YEAR} Inkscape project" + VALUE "OriginalFilename", "${FILE_NAME}.exe" + VALUE "ProductName", "${PROGRAM_NAME}" + VALUE "ProductVersion", "${INKSCAPE_VERSION}" END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 1033, 437 + VALUE "Translation", 0x0409, 1252 END END - -1000 BITMAP "./show-preview.bmp" - diff --git a/src/inkview-manifest-x64.xml b/src/inkview-manifest-x64.xml deleted file mode 100644 index 38526cfe6..000000000 --- a/src/inkview-manifest-x64.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> -<dependency> -<dependentAssembly> -<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" - version="6.0.0.0" processorArchitecture="amd64" - publicKeyToken="6595b64144ccf1df" language="*"/> -</dependentAssembly> -</dependency> -</assembly>
\ No newline at end of file diff --git a/src/inkview-manifest.xml b/src/inkview-manifest.xml deleted file mode 100644 index f9ca4617f..000000000 --- a/src/inkview-manifest.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> -<dependency> -<dependentAssembly> -<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" - version="6.0.0.0" processorArchitecture="X86" - publicKeyToken="6595b64144ccf1df" language="*"/> -</dependentAssembly> -</dependency> -</assembly>
\ No newline at end of file diff --git a/src/inkview-x64.rc b/src/inkview-x64.rc deleted file mode 100644 index c1745095e..000000000 --- a/src/inkview-x64.rc +++ /dev/null @@ -1,29 +0,0 @@ - -APPLICATION_ICON ICON DISCARDABLE "../share/branding/inkscape.ico" -1 24 DISCARDABLE "./inkview-manifest-x64.xml" - -1 VERSIONINFO - FILEVERSION 0,93,0,0 - PRODUCTVERSION 0,93,0,0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040901b5" - BEGIN - VALUE "Comments", "Published under the GNU GPL" - VALUE "CompanyName", "inkscape.org" - VALUE "FileDescription", "Inkview" - VALUE "FileVersion", "0.92+devel" - VALUE "InternalName", "Inkview" - VALUE "LegalCopyright", "© 2016 Inkscape" - VALUE "ProductName", "Inkview" - VALUE "ProductVersion", "0.92+devel" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 1033, 437 - END -END - -1000 BITMAP "./show-preview.bmp" diff --git a/src/inkview.rc b/src/inkview.rc deleted file mode 100644 index f8a2e2054..000000000 --- a/src/inkview.rc +++ /dev/null @@ -1,29 +0,0 @@ - -APPLICATION_ICON ICON DISCARDABLE "../share/branding/inkscape.ico" -1 24 DISCARDABLE "./inkview-manifest.xml" - -1 VERSIONINFO - FILEVERSION 0,93,0,0 - PRODUCTVERSION 0,93,0,0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040901b5" - BEGIN - VALUE "Comments", "Published under the GNU GPL" - VALUE "CompanyName", "inkscape.org" - VALUE "FileDescription", "Inkview" - VALUE "FileVersion", "0.92+devel" - VALUE "InternalName", "Inkview" - VALUE "LegalCopyright", "© 2016 Inkscape" - VALUE "ProductName", "Inkview" - VALUE "ProductVersion", "0.92+devel" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 1033, 437 - END -END - -1000 BITMAP "./show-preview.bmp" |
