summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2016-10-17 20:48:49 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2018-05-13 18:21:59 +0100
commitc1813fc001c7a7a75f8c69ba4c4f07c2b4ecb0b5 (patch)
tree63d5f66dbec6d809522ef7d5e99c36ea4db2a7ac
parent0d9eac9faa2c8a28994a75fe26b2ed4bd20c75db (diff)
Update X.org logo icon
Generate icon from X.org logo SVG, rather than using a hand-crafted icon. This SVG has been tweaked to put a thin white border around the X, so it is visible on a black background. v2: Also generate from svg in meson.build Install ImageMagick in CI for convert tool XXX: compile_resources() lacks a depend: keyword to make it depend on the logo icon conversion. It's also not clear how the directory into which the output of the custom target is generated should be obtained to give to windres as an include directory.... See https://github.com/mesonbuild/meson/issues/2789
-rw-r--r--.appveyor.yml3
-rw-r--r--hw/xwin/Makefile.am3
-rw-r--r--hw/xwin/X.icobin25214 -> 0 bytes
-rw-r--r--hw/xwin/X.svg91
-rw-r--r--hw/xwin/meson.build11
5 files changed, 106 insertions, 2 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 3ed7c4f39..f8c694ae3 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -15,7 +15,7 @@ install:
- if "%BUILD%"=="i686-pc-cygwin" set SETUP=setup-x86.exe && set CYGWIN_ROOT=C:\cygwin
- curl -fsSL https://gist.githubusercontent.com/jon-turney/0338af595313f598bfab15a0ac0df847/raw/bd0eeca6be899e7846aa988fbcf15e4e12f5f842/zp_libtool_cleanlafiles.sh -o %CYGWIN_ROOT%\etc\postinstall\zp_libtool_cleanlafiles.sh
- echo Updating Cygwin and installing build prerequisites
-- '%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "meson,binutils,bison,bzip2,diffutils,fileutils,findutils,flex,gawk,gcc-core,make,patch,pkg-config,python3,sed,tar,xorgproto,windowsdriproto,libdmx-devel,libfontenc-devel,libfreetype-devel,libGL-devel,libpixman1-devel,libX11-devel,libXRes-devel,libXau-devel,libXaw-devel,libXdmcp-devel,libXext-devel,libXfont2-devel,libXi-devel,libXinerama-devel,libXmu-devel,libXpm-devel,libXrender-devel,libXtst-devel,libxcb-ewmh-devel,libxcb-icccm-devel,libxcb-image-devel,libxcb-keysyms-devel,libxcb-randr-devel,libxcb-render-devel,libxcb-render-util-devel,libxcb-shape-devel,libxcb-util-devel,libxcb-xkb-devel,libxkbfile-devel,zlib,font-util,khronos-opengl-registry,python3-lxml,xorg-util-macros,xtrans,xkbcomp,xkeyboard-config,libnettle-devel,libepoxy-devel,libtirpc-devel,libxcb-composite-devel"'
+- '%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "meson,binutils,bison,bzip2,diffutils,fileutils,findutils,flex,gawk,gcc-core,make,patch,pkg-config,python3,sed,tar,xorgproto,windowsdriproto,libdmx-devel,libfontenc-devel,libfreetype-devel,libGL-devel,libpixman1-devel,libX11-devel,libXRes-devel,libXau-devel,libXaw-devel,libXdmcp-devel,libXext-devel,libXfont2-devel,libXi-devel,libXinerama-devel,libXmu-devel,libXpm-devel,libXrender-devel,libXtst-devel,libxcb-ewmh-devel,libxcb-icccm-devel,libxcb-image-devel,libxcb-keysyms-devel,libxcb-randr-devel,libxcb-render-devel,libxcb-render-util-devel,libxcb-shape-devel,libxcb-util-devel,libxcb-xkb-devel,libxkbfile-devel,zlib,font-util,khronos-opengl-registry,python3-lxml,xorg-util-macros,xtrans,xkbcomp,xkeyboard-config,libnettle-devel,libepoxy-devel,libtirpc-devel,libxcb-composite-devel,ImageMagick"'
- echo Install done
cache:
- C:\cache
@@ -23,6 +23,7 @@ build_script:
- SET PATH=%CYGWIN_ROOT%/bin
- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; meson setup --prefix=/usr -Dxv=false -Dxf86bigfont=true -Ddmx=true -Dxephyr=true -Dxnest=true -Dxvfb=true -Dxwin=true -Dxorg=true -Dhal=false -Dudev=false -Dpciaccess=false -Dint10=false build"'
- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; meson configure build"'
+- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; ninja -C build hw/xwin/X.ico"'
- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; ninja -C build"'
test_script:
- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; ninja -C build test"'
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index fc228ffef..faf7a8f73 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -130,6 +130,9 @@ XWin_LDFLAGS = -mwindows -Wl,--disable-stdcall-fixup $(LD_EXPORT_SYMBOLS_FLAG)
XWin.o: XWin.rc XWin.exe.manifest X.ico
+X.ico: X.svg
+ $(AM_V_GEN)convert -background transparent $(srcdir)/X.svg -trim -define icon:auto-resize X.ico
+
winprefsyacc.h: winprefsyacc.c
winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
diff --git a/hw/xwin/X.ico b/hw/xwin/X.ico
deleted file mode 100644
index 5d69818b5..000000000
--- a/hw/xwin/X.ico
+++ /dev/null
Binary files differ
diff --git a/hw/xwin/X.svg b/hw/xwin/X.svg
new file mode 100644
index 000000000..3acf88367
--- /dev/null
+++ b/hw/xwin/X.svg
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="431"
+ height="345"
+ version="1.1"
+ id="svg4136"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="X.svg">
+ <metadata
+ id="metadata4158">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1680"
+ inkscape:window-height="1027"
+ id="namedview4156"
+ showgrid="true"
+ showguides="false"
+ inkscape:zoom="2.0179613"
+ inkscape:cx="174.54161"
+ inkscape:cy="178.21329"
+ inkscape:window-x="1920"
+ inkscape:window-y="53"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4136">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4190" />
+ </sodipodi:namedview>
+ <style
+ type="text/css"
+ id="style4138"><![CDATA[
+#P1 {fill:url(#LO)}
+rect {opacity:.40740739;fill:#000cff;width:.50507629;height:0}
+]]></style>
+ <defs
+ id="defs4140">
+ <linearGradient
+ id="LO"
+ gradientUnits="userSpaceOnUse"
+ x1="319.20822"
+ y1="235.14877"
+ x2="657.65295"
+ y2="269.49396"
+ gradientTransform="translate(-270.9263,-65.70092)">
+ <stop
+ style="stop-color:#e54c18"
+ offset="0"
+ id="stop4143" />
+ <stop
+ style="stop-color:#fec350"
+ offset="1"
+ id="stop4145" />
+ </linearGradient>
+ </defs>
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 54.716797 20 C 92.8921 73.307631 131.06849 126.61448 169.24414 179.92188 C 132.25755 228.28102 95.27244 276.64136 58.285156 325 L 108.53516 325 C 137.10238 287.40883 165.66766 249.81618 194.23438 212.22461 C 221.28032 249.81661 248.32766 287.40759 275.37305 325 L 373.49609 325 C 335.76255 272.13742 298.02719 219.27614 260.29297 166.41406 C 297.59705 117.6094 334.9008 68.804499 372.20508 20 L 322.54102 20 L 235.40625 133.77148 C 207.88404 95.847705 180.36205 57.923771 152.83984 20 L 54.716797 20 z "
+ id="rect5173" />
+ <path
+ d="M 71.1476,325.00127 182.24488,179.74507 67.86815,20.032093 l 73.51436,0.06108 91.13801,125.582867 -136.27013,179.32523 -25.10279,0 z m 217.44779,0.10271 -90.5088,-125.79846 137.40484,-179.409507 24.48173,0 -111.55067,145.941547 113.68843,159.26642 -73.51553,0 z"
+ id="path4151"
+ inkscape:connector-curvature="0" />
+ <path
+ id="P1"
+ d="m 215.48441,78.12559 c -8.85103,0 -18.30729,0.68536 -26.82011,1.50253 15.16593,19.77999 27.75007,36.52951 42.23287,55.55188 -8.12876,-17.49293 -24.83564,-34.26759 -19.05997,-42.89467 5.71717,-8.53969 16.25107,-7.10232 17.05346,-7.10232 16.88849,0 33.14525,1.90739 48.34375,5.4375 l 3.5625,-4.90625 C 260.5261,80.496 238.50842,78.12559 215.48441,78.12559 Z m 91.46875,15.96367 -3.28125,4.6875 c 46.8258,18.33664 78.5,53.36029 78.5,93.49999 0,59.10603 -68.66485,107.0625 -153.28125,107.0625 -84.6164,-10e-6 -153.3125,-47.95648 -153.3125,-107.0625 1e-5,-32.18776 20.37158,-61.08002 52.59375,-80.71874 l -9.90625,-15.09375 c -50.54614,21.43183 -84.09374,59.04962 -84.09375,101.87499 0,66.63368 81.2225,120.6875 181.3125,120.6875 100.08999,0 181.34374,-54.05381 181.34375,-120.6875 0,-44.43292 -36.12255,-83.29245 -89.875,-104.24999 z"
+ style="fill:url(#LO)"
+ inkscape:connector-curvature="0" />
+</svg>
diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build
index 70c406cab..280af9414 100644
--- a/hw/xwin/meson.build
+++ b/hw/xwin/meson.build
@@ -104,10 +104,19 @@ srcs_windows += [
'../../mi/miinitext.c',
]
+convert = find_program('convert')
+custom_target(
+ 'xlogo-icon',
+ command: [convert, '-background', 'transparent', '-trim', '-define', 'icon:auto-resize', '@INPUT@', '@OUTPUT@'],
+ input: 'X.svg',
+ output: 'X.ico',
+)
+
rsrc = windows.compile_resources(
'XWin.rc',
args: ['--use-temp-file', '-DHOST="@0@-@1@"'.format(host_machine.system(), host_machine.cpu_family())],
- include_directories: include_directories('../../include/'))
+ include_directories: [include_directories('.'), include_directories('../../include/')],
+)
srcs_windows += rsrc
flex = find_program('flex')