cleanup: Move inkscape.desktop.* out of root dir

Bug #1710332 reported by Bryce Harrington
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Low
Qantas94Heavy

Bug Description

We have both inkscape.desktop.in and inkscape.desktop.template in Inkscape's root directory. The files look duplicative; we probably only need one, and it should be moved into the packaging subdirectory.

Bryce Harrington (bryce)
summary: - cleanup: Move inkscape.desktop.* out of root dir
+ cleanup: Move inkscape.desktop.* and inkscape.appdata.xml.in out of root
+ dir
summary: - cleanup: Move inkscape.desktop.* and inkscape.appdata.xml.in out of root
- dir
+ cleanup: Move inkscape.desktop.* out of root dir
Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
description: updated
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

The inkscape.desktop.template file is used by po/CMakeLists.txt but I
haven't found a user of inkscape.desktop.in, but I'm not sure if it is
safe to delete. Also, it looks to me like po/CMakeLists.txt could be
made to load the file from packaging/ instead of the root dir, but I'm
not certain. This would be worth further investigation.

Revision history for this message
Mc (mc...) wrote :

not safe to delete one (depends on 'supported' gettext), but safe to move to another dir with the correct fixes to po/CMakeLists.txt and CMakeScripts/inkscape-desktop.cmake.

new versions of gettext (>0.19) are capable of generating a translated .in file, but a version of it is present for older versions. (cf if/then/else of po/CMakeLists.txt)

Then the generated file with the .in is used by CMakeScripts/inkscape-desktop.cmake

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the quick response, Mc!

Good to hear moving it is feasible to do, that will solve the primary objective here. :-)

What do you think about changing the intermediary filename so it's a bit clearer how the processing works? To me "template" seems synonymous with ".in", so I was a bit confused by it at first look.

How about the initial file kept in version control as the input be ${CMAKE_SOURCE_DIR}/packaging/inkscape.desktop.in, then po/CMakeLists.txt processes that file into ${CMAKE_BINARY_DIR}/packaging/inkscape.desktop.translated (or even just .tmp). Then CMakeScripts/inkscape-desktop.cmake translates the latter file into ${CMAKE_BINARY_DIR}/inkscape.desktop ?

Also, would it be possible to move the gettext translation code for inkscape.desktop from po/CMakeLists.txt to CMakeScripts/inkscape-desktop.cmake, just to keep all of this file's processing together in one place? It might help make the processing logic a bit easier to follow.

Revision history for this message
Mc (mc...) wrote :

yeah but "template" is processes by gettext and ".in" is processed by cmake.

As for the gettext versions, trusty(Ubuntu 14.04LTS) and wheezy(Debian oldoldstable) still have 0.18 so we have to keep both (and people on these systems won't have the .desktop translated)

The script is in po/ because that's where all the translation process is kept and it uses the "current source dir" to tell gettext where to find the translations (I think it makes sense to keep all the translation stuff in one place but the other way can be logical too)

For now, translation is done before cmake variables replacement but it could be the other way too.

Where would you move the input files ?

Changed in inkscape:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Qantas94Heavy (qantas94heavy)
milestone: none → 1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.