-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I'm still undecided whether we should handle conversion of the Dia source projects to SVG via Rake or not.
Ideally, Rake could handle:
- A
diatask to build all the SVG images (optimized via SVGO), thus replacing the current conversion script. - Thanks to autogenerated file tasks, it would always rebuild SVG images when a their source Dia project has changed.
- Downloading the correct Dia version and unpacking it somewhere, so it can be used for the task (without interfering with another Dia version present on the end user machine). I.e. basically replacing the current installer script (which is Win only).
The problem here is the strict requirement for a specific Dia version (0.97) which apparently is only available for Windows (see alan-if/alan-docs/wiki/Dia-Diagrams and #12), which would then make the Rakefile unusable on other OSs (including Travis CI), especially if we enforce (2), which would automatically try to rebuild any SVG when its Dia source has changed, or if Rake is invoked via -B, or after clobbering.
Definitely, the Rake tasks will have to check the Dia version before attempting conversion, and skip the operation if the version is not the exact one required.
Before deciding on this, we need to find out if there's a Dia version for Linux and macOS that produces identical SVGs files from the same source projects β i.e. so that no changes are detected by Git after rebuilding an SVG from an unchanged project. If this was the case, we could then perform different version checks based on the OS (we could settle with covering Linux only right now, until we find a macOS user who can carry out the tests for us).
Alternatively, we should find a way to disable the Dia related tasks for those OSs for which we don't have a matching Dia version β this can be done, programmatically, via Ruby code, but detecting the host OS in Ruby requires some hacks that are not bullet-proof (we need to ensure that any Windows, Linux or Mac operating system is detected correctly).
Either way, we ultimately need to decide how to handle this