Files
2021-05-21 12:46:33 +02:00

39 lines
1.4 KiB
Markdown

# About
This is the client component of `advotracker`.
## Windows specific
We like to support an icon an object attributes for the compiled
version of `advotracker`. While searching for a solution, the description of this
[Web link][https://graphicdesign.stackexchange.com/questions/77359/how-to-convert-a-square-svg-to-all-size-ico]
was adapted and combined with a `windres` crate.
### Icon creation
This commandline solution will create an icon that can be linked into the Windows binary.
* create the `svg` art file
You may use `inkscape`, a versitile and user frendly
tool to create your vector graphics art. Save it as `advotracker.svg`. Next export the scaled png files.
```
inkscape -w 16 -h 16 -o advotracker_16.png -l advotracker.svg
inkscape -w 32 -h 32 -o advotracker_32.png -l advotracker.svg
inkscape -w 48 -h 48 -o advotracker_48.png -l advotracker.svg
inkscape -w 64 -h 64 -o advotracker_64.png -l advotracker.svg
```
* create the `ico` file
The ico format can handle multiple layes with different resolutions.
We make use of ImageMagick to create the icon file like this:
```
convert advotracker_16.png advotracker_32.png advotracker_48.png advotracker_64.png advotracker.ico
```
* link in the icon
rust offers the `windres` crate, that will handle the linking of icons
as well as the definition of binary objet resources. `advotracker`
will define the needed settings in its `build.rs` file.