#!/bin/bash

inkscape --export-width=2048 --export-filename="icon.png" "$1"

magick -density 300 -define icon:auto-resize=256,128,96,64,48,32,16 -background none "$1" "icons/icon.ico"

inkscape --export-width=512 --export-filename="icons/playstore.png" "$1"
inkscape --export-width=1024 --export-filename="icons/appstore.png" "$1"

inkscape --export-width=48 --export-filename="icons/android/mipmap-mdpi/ic_launcher.png" "$1"
inkscape --export-width=72 --export-filename="icons/android/mipmap-hdpi/ic_launcher.png" "$1"
inkscape --export-width=96 --export-filename="icons/android/mipmap-xhdpi/ic_launcher.png" "$1"
inkscape --export-width=144 --export-filename="icons/android/mipmap-xxhdpi/ic_launcher.png" "$1"
inkscape --export-width=192 --export-filename="icons/android/mipmap-xxxhdpi/ic_launcher.png" "$1"

inkscape --export-width=16 --export-filename="Assets.xcassets/AppIcon.appiconset/16.png" "$1"
inkscape --export-width=20 --export-filename="Assets.xcassets/AppIcon.appiconset/20.png" "$1"
inkscape --export-width=29 --export-filename="Assets.xcassets/AppIcon.appiconset/29.png" "$1"
inkscape --export-width=32 --export-filename="Assets.xcassets/AppIcon.appiconset/32.png" "$1"
inkscape --export-width=40 --export-filename="Assets.xcassets/AppIcon.appiconset/40.png" "$1"
inkscape --export-width=48 --export-filename="Assets.xcassets/AppIcon.appiconset/48.png" "$1"
inkscape --export-width=50 --export-filename="Assets.xcassets/AppIcon.appiconset/50.png" "$1"
inkscape --export-width=55 --export-filename="Assets.xcassets/AppIcon.appiconset/55.png" "$1"
inkscape --export-width=57 --export-filename="Assets.xcassets/AppIcon.appiconset/57.png" "$1"
inkscape --export-width=58 --export-filename="Assets.xcassets/AppIcon.appiconset/58.png" "$1"
inkscape --export-width=60 --export-filename="Assets.xcassets/AppIcon.appiconset/60.png" "$1"
inkscape --export-width=64 --export-filename="Assets.xcassets/AppIcon.appiconset/64.png" "$1"
inkscape --export-width=72 --export-filename="Assets.xcassets/AppIcon.appiconset/72.png" "$1"
inkscape --export-width=76 --export-filename="Assets.xcassets/AppIcon.appiconset/76.png" "$1"
inkscape --export-width=80 --export-filename="Assets.xcassets/AppIcon.appiconset/80.png" "$1"
inkscape --export-width=87 --export-filename="Assets.xcassets/AppIcon.appiconset/87.png" "$1"
inkscape --export-width=88 --export-filename="Assets.xcassets/AppIcon.appiconset/88.png" "$1"
inkscape --export-width=100 --export-filename="Assets.xcassets/AppIcon.appiconset/100.png" "$1"
inkscape --export-width=114 --export-filename="Assets.xcassets/AppIcon.appiconset/114.png" "$1"
inkscape --export-width=120 --export-filename="Assets.xcassets/AppIcon.appiconset/120.png" "$1"
inkscape --export-width=128 --export-filename="Assets.xcassets/AppIcon.appiconset/128.png" "$1"
inkscape --export-width=144 --export-filename="Assets.xcassets/AppIcon.appiconset/144.png" "$1"
inkscape --export-width=152 --export-filename="Assets.xcassets/AppIcon.appiconset/152.png" "$1"
inkscape --export-width=167 --export-filename="Assets.xcassets/AppIcon.appiconset/167.png" "$1"
inkscape --export-width=172 --export-filename="Assets.xcassets/AppIcon.appiconset/172.png" "$1"
inkscape --export-width=180 --export-filename="Assets.xcassets/AppIcon.appiconset/180.png" "$1"
inkscape --export-width=196 --export-filename="Assets.xcassets/AppIcon.appiconset/196.png" "$1"
inkscape --export-width=216 --export-filename="Assets.xcassets/AppIcon.appiconset/216.png" "$1"
inkscape --export-width=256 --export-filename="Assets.xcassets/AppIcon.appiconset/256.png" "$1"
inkscape --export-width=512 --export-filename="Assets.xcassets/AppIcon.appiconset/512.png" "$1"
inkscape --export-width=1024 --export-filename="Assets.xcassets/AppIcon.appiconset/1024.png" "$1"

inkscape --export-width=16 --export-filename="icons/linux/hicolor/16x16/apps/app.lith.Lith.png" "$1"
inkscape --export-width=22 --export-filename="icons/linux/hicolor/22x22/apps/app.lith.Lith.png" "$1"
inkscape --export-width=24 --export-filename="icons/linux/hicolor/24x24/apps/app.lith.Lith.png" "$1"
inkscape --export-width=32 --export-filename="icons/linux/hicolor/32x32/apps/app.lith.Lith.png" "$1"
inkscape --export-width=48 --export-filename="icons/linux/hicolor/48x48/apps/app.lith.Lith.png" "$1"
inkscape --export-width=64 --export-filename="icons/linux/hicolor/64x64/apps/app.lith.Lith.png" "$1"
inkscape --export-width=96 --export-filename="icons/linux/hicolor/96x96/apps/app.lith.Lith.png" "$1"
inkscape --export-width=128 --export-filename="icons/linux/hicolor/128x128/apps/app.lith.Lith.png" "$1"
inkscape --export-width=192 --export-filename="icons/linux/hicolor/192x192/apps/app.lith.Lith.png" "$1"
inkscape --export-width=256 --export-filename="icons/linux/hicolor/256x256/apps/app.lith.Lith.png" "$1"
inkscape --export-width=512 --export-filename="icons/linux/hicolor/512x512/apps/app.lith.Lith.png" "$1"


