mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-08 21:51:55 -05:00
Add icon
This commit is contained in:
parent
2068dc50bb
commit
356b4475b6
6 changed files with 73 additions and 0 deletions
2
packaging/.gitignore
vendored
Normal file
2
packaging/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/ScratchDesktop.iconset
|
||||
/tmp
|
BIN
packaging/ScratchDesktop.icns
Normal file
BIN
packaging/ScratchDesktop.icns
Normal file
Binary file not shown.
BIN
packaging/ScratchDesktop.ico
Normal file
BIN
packaging/ScratchDesktop.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
51
packaging/make-icon.sh
Executable file
51
packaging/make-icon.sh
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
SRC=../src/icon/ScratchDesktop.svg
|
||||
OUT_ICONSET=ScratchDesktop.iconset
|
||||
OUT_ICNS=ScratchDesktop.icns
|
||||
OUT_ICO=ScratchDesktop.ico
|
||||
TMP_ICO=tmp
|
||||
|
||||
ICO_BASIC_SIZES="16 24 32 48 256"
|
||||
ICO_EXTRA_SIZES="20 30 36 40 60 64 72 80 96 512"
|
||||
|
||||
if command -v convert >/dev/null 2>&1; then
|
||||
# Mac
|
||||
if command -v iconutil >/dev/null 2>&1; then
|
||||
mkdir -p "${OUT_ICONSET}"
|
||||
for SIZE in 16 32 128 256 512; do
|
||||
SIZE2=`expr "${SIZE}" '*' 2`
|
||||
convert -background none -density 72 -units PixelsPerInch -resize "!${SIZE}x${SIZE}" "${SRC}" "${OUT_ICONSET}/icon_${SIZE}x${SIZE}.png"
|
||||
convert -background none -density 144 -units PixelsPerInch -resize "!${SIZE2}x${SIZE2}" "${SRC}" "${OUT_ICONSET}/icon_${SIZE}x${SIZE}@2x.png"
|
||||
# sips doesn't support SVG
|
||||
#sips -s dpiWidth 72 -s dpiHeight 72 -z "${SIZE}" "${SIZE}" "${SRC}" --out "${OUT_ICONSET}/icon_${SIZE}x${SIZE}.png"
|
||||
#sips -s dpiWidth 144 -s dpiHeight 144 -z "${SIZE2}" "${SIZE2}" "${SRC}" --out "${OUT_ICONSET}/icon_${SIZE}x${SIZE}@2x.png"
|
||||
done
|
||||
if command -v pngcrush >/dev/null 2>&1; then
|
||||
for PNG in "${OUT_ICONSET}"/icon_*.png; do
|
||||
pngcrush -new -brute -ow "${PNG}"
|
||||
done
|
||||
else
|
||||
echo "pngcrush is not available - skipping PNG optimization"
|
||||
fi
|
||||
iconutil -c icns --output "${OUT_ICNS}" "${OUT_ICONSET}"
|
||||
else
|
||||
echo "iconutil is not available - skipping ICNS and ICONSET"
|
||||
fi
|
||||
|
||||
# Windows
|
||||
mkdir -p "${TMP_ICO}"
|
||||
for SIZE in ${ICO_BASIC_SIZES} ${ICO_EXTRA_SIZES}; do
|
||||
convert -background none -resize "!${SIZE}x${SIZE}" "${SRC}" "${TMP_ICO}/icon_${SIZE}x${SIZE}.png"
|
||||
done
|
||||
if command -v pngcrush >/dev/null 2>&1; then
|
||||
for PNG in "${TMP_ICO}"/icon_*.png; do
|
||||
pngcrush -new -brute -ow "${PNG}"
|
||||
done
|
||||
else
|
||||
echo "pngcrush is not available - skipping PNG optimization"
|
||||
fi
|
||||
# Asking for "Zip" compression actually results in PNG compression
|
||||
convert "${TMP_ICO}"/icon_*.png -colorspace sRGB -compress Zip "${OUT_ICO}"
|
||||
else
|
||||
echo "ImageMagick is not available - cannot convert icons"
|
||||
fi
|
BIN
src/icon/ScratchDesktop.png
Normal file
BIN
src/icon/ScratchDesktop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
20
src/icon/ScratchDesktop.svg
Normal file
20
src/icon/ScratchDesktop.svg
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Master 1024x1024</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Master-1024x1024" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Icon" transform="translate(64.000000, 32.000000)">
|
||||
<g id="Block">
|
||||
<path d="M-7.26878332e-14,142.867346 L-5.25801624e-13,784 C-5.2147296e-13,819.346224 28.653776,848 64,848 L177.303316,848 C186.632666,848 195.497478,852.071354 201.576695,859.148069 L268.846609,937.455835 C281.005045,951.609264 298.734668,959.751973 317.393369,959.751973 L578.606631,959.751973 C597.265332,959.751973 614.994955,951.609264 627.153391,937.455835 L694.423305,859.148069 C700.502522,852.071354 709.367334,848 718.696684,848 L832,848 C867.346224,848 896,819.346224 896,784 L896,129.15306 C896,93.8068364 867.346224,65.1530604 832,65.1530604 C831.619086,65.1530604 831.238179,65.1564611 830.857325,65.1632621 L62.857325,78.8775478 C27.9621096,79.5006766 -1.02461891e-13,107.966568 -1.13686838e-13,142.867346 Z" id="block-shadow" fill="#CF8B17"></path>
|
||||
<path d="M-1.90311766e-12,64 L-2.55795385e-13,736 C-1.25891707e-13,771.346224 28.653776,800 64,800 L192.173943,800 C202.148075,800 211.551826,804.650759 217.605625,812.577602 L268.788751,879.596769 C280.896348,895.450454 299.703851,904.751973 319.652114,904.751973 L576.347886,904.751973 C596.296149,904.751973 615.103652,895.450454 627.211249,879.596769 L678.394375,812.577602 C684.448174,804.650759 693.851925,800 703.826057,800 L832,800 C867.346224,800 896,771.346224 896,736 L896,64 C896,28.653776 867.346224,-2.098882e-11 832,-2.0982327e-11 L64,-2.11173301e-11 C28.653776,-2.11108371e-11 -2.05069174e-12,28.653776 -2.04636308e-12,64 Z" id="block" fill="#FFAB19"></path>
|
||||
<path d="M32,64 L32,736 C32,753.673112 46.326888,768 64,768 L192.173943,768 C212.122207,768 230.929709,777.301519 243.037306,793.155203 L294.220433,860.174371 C300.274231,868.101213 309.677983,872.751973 319.652114,872.751973 L576.347886,872.751973 C586.322017,872.751973 595.725769,868.101213 601.779567,860.174371 L652.962694,793.155203 C665.070291,777.301519 683.877793,768 703.826057,768 L832,768 C849.673112,768 864,753.673112 864,736 L864,64 C864,46.326888 849.673112,32 832,32 L64,32 C46.326888,32 32,46.326888 32,64 Z M-2.04636308e-12,64 C-2.05069174e-12,28.653776 28.653776,-2.11108371e-11 64,-2.11173301e-11 L832,-2.0982327e-11 C867.346224,-2.098882e-11 896,28.653776 896,64 L896,736 C896,771.346224 867.346224,800 832,800 L703.826057,800 C693.851925,800 684.448174,804.650759 678.394375,812.577602 L627.211249,879.596769 C615.103652,895.450454 596.296149,904.751973 576.347886,904.751973 L319.652114,904.751973 C299.703851,904.751973 280.896348,895.450454 268.788751,879.596769 L217.605625,812.577602 C211.551826,804.650759 202.148075,800 192.173943,800 L64,800 C28.653776,800 -1.25891707e-13,771.346224 -2.55795385e-13,736 L-2.04636308e-12,64 Z" id="block-outline" fill-opacity="0.2" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
<g id="Scratch-S" transform="translate(233.000000, 112.000000)">
|
||||
<path d="M447.040199,386.119317 C447.784506,448.504968 420.860009,508.556404 373.224361,550.740188 C335.313246,584.678653 287.483431,604.175219 237.744307,606.072817 C214.751693,624.796909 186.872542,635.930606 157.019359,637.895376 C153.831783,638.113684 150.644208,638.248027 147.456632,638.248027 C71.1975259,638.248027 7.02531818,576.433336 1.1841263,497.506671 C1.11940396,496.599854 1.05468161,495.323594 0.989959261,493.694681 C0.909056326,493.140516 0.844333979,492.569557 0.844333979,491.948219 C-0.644280017,458.715056 0.100026981,431.258652 1.05468161,413.777236 C1.9284333,397.656045 2.47857326,368.654694 2.5432956,361.903945 L2.5432956,361.484122 C2.94781028,337.890088 8.57865452,314.867012 18.820966,294.228529 C15.9084604,271.138281 15.9731827,246.435915 19.096036,220.524459 L19.5005507,216.494161 C19.5814536,216.007167 19.5814536,215.436208 19.6299954,214.949213 C19.7108983,214.529391 19.7756207,214.042396 19.840343,213.555402 C22.4130563,191.506315 26.8950789,155.384771 45.8910879,118.356411 C77.5079547,56.2562394 137.48939,19.2110859 206.273065,19.2110859 L209.185571,19.2110859 C230.835196,6.6835771 255.18698,0 280.218348,0 L282.871964,0 C362.512813,1.47777584 427.299883,69.7745298 427.299883,152.294876 C427.299883,153.201693 424.581544,252.195882 421.523413,286.067176 C438.011431,315.992137 446.700406,349.930602 447.040199,386.119317" id="scratch-white-outline" fill="#FFFFFF"></path>
|
||||
<path d="M379.345453,386.495657 C379.895593,427.823002 361.579168,468.243529 329.072369,497.043365 C301.468288,521.762525 266.194609,535.415159 229.901552,535.415159 C223.655846,535.347987 217.345417,534.995336 211.164433,534.138898 C209.740541,536.120461 208.251927,538.018059 206.698591,539.848486 C192.718564,556.255157 173.447484,565.97825 152.412722,567.237718 C150.794663,567.372061 149.225146,567.439233 147.607087,567.439233 C106.556938,567.439233 72.0275658,534.071726 68.9694348,491.552085 C68.9047125,490.712439 68.8399901,489.856001 68.8399901,488.949184 L68.7752678,488.311054 C67.4160985,458.033442 68.0956831,433.112767 68.9047125,417.545742 C69.9240895,399.526953 70.4742294,368.89669 70.5389518,362.280284 C70.8787441,341.57463 78.5321617,322.783367 90.9588524,308.47581 C84.7778682,286.309172 82.8038366,259.692414 86.6062746,228.222506 L87.0916922,223.638042 C87.1564145,223.285391 87.1564145,222.93274 87.2211369,222.580089 C89.3893355,204.141476 92.6416335,176.886588 106.006798,150.840789 C125.957462,111.696522 162.590311,89.2276119 206.423521,89.2276119 C208.866789,89.2276119 211.439503,89.2947835 214.093119,89.4459197 C218.704586,89.7313991 223.380776,90.2855651 227.927521,91.1420033 C242.166437,77.8252278 261.097724,69.5799104 281.857417,70.0165259 C324.735972,70.7889997 359.605137,107.531881 359.605137,151.898742 C359.605137,152.872731 355.802699,271.380277 353.974293,281.657537 C352.890193,288.072427 351.061787,294.185045 348.683241,299.961806 C368.423557,323.623012 379.070383,353.12815 379.345453,386.495657" id="scratch-orange-outline" fill="#F9A83A"></path>
|
||||
<path d="M208.175207,301.929302 C187.83621,298.637892 176.979036,284.515057 182.367171,240.819912 L182.998214,235.546939 C187.528779,197.578176 191.331216,189.131343 208.935695,190.122125 C214.081122,190.457983 220.019397,193.833357 225.941492,198.888022 C231.442891,205.487635 243.659235,214.035225 250.535984,230.962475 C255.471063,243.389227 257.170025,251.500201 257.88197,260.21572 L258.96607,270.912802 L258.96607,270.862423 C260.422323,278.184131 265.826639,284.195992 273.30207,285.505838 C282.929519,287.336265 292.217176,280.686274 293.899957,270.694494 C294.126485,269.502198 298.479063,154.420404 298.479063,152.539598 C298.479063,142.396682 290.647659,134.168158 280.809862,134.000229 C271.004426,133.94985 263.043578,142.228753 263.043578,152.338083 C263.043578,152.556391 262.995036,168.442482 262.671424,184.462915 C248.691397,168.677582 230.795668,154.537954 210.764101,153.312072 C157.141636,150.339728 151.284264,201.507716 147.756896,230.996061 L147.222937,236.218655 C139.990214,294.490044 158.727334,331.249718 202.72235,338.386703 C250.535984,346.178612 282.460282,357.580996 282.751532,388.110502 C282.929519,399.983087 276.910341,412.157945 266.40914,421.528387 C253.755921,432.695671 236.831027,437.71675 220.876968,434.996299 C215.925709,434.207032 211.28188,432.796428 206.832219,431.268274 C200.570332,427.641006 184.794259,417.682812 176.784869,406.17967 C170.037564,396.47337 167.691379,381.22541 166.963253,371.552695 C167.044156,367.220125 167.060336,364.348538 167.060336,364.029473 C167.238323,353.836178 159.358377,345.540482 149.650025,345.305381 C139.796047,345.07028 131.705754,353.298805 131.527767,363.475307 C131.527767,363.811165 131.090891,399.865537 129.812625,421.578766 C127.984219,456.558392 129.812625,486.18108 129.812625,487.474134 C130.540751,497.633843 138.954657,505.291409 148.760092,504.619693 C158.533167,504.08232 165.976237,495.282836 165.296652,485.106334 C165.296652,484.938405 164.4229,470.58047 164.536165,450.748046 C177.545356,459.362808 194.632056,467.742468 214.971054,471.33615 C241.507216,475.9542 268.642061,467.994362 289.369393,449.505371 C307.928526,433.031529 318.559171,410.51224 318.267921,387.724265 C317.636878,319.696198 243.659235,307.739648 208.175207,301.929302" id="scratch-white-fill" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.6 KiB |
Loading…
Reference in a new issue