summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2019-11-22 23:52:08 +0100
committerNicolas Schodet2019-11-23 20:00:13 +0100
commit7a80b3a140ced43f79f8c9c62aa2f286234342ff (patch)
tree6ff8510cae0611488f352a778dcf97d5152adf6a
parente85cdfe8a3b6645c10071fd39efff490b4e9401b (diff)
Build with meson, add icon and desktop file
-rw-r--r--.gitignore5
-rw-r--r--Makefile34
-rw-r--r--data/icons/hicolor/scalable/apps/org.eu.fr.ni.Camicro.svg230
-rw-r--r--data/meson.build22
-rw-r--r--data/org.eu.fr.ni.Camicro.desktop8
-rw-r--r--data/org.eu.fr.ni.Camicro.gresource.xml (renamed from gui_app.gresource.xml)2
-rw-r--r--data/window.ui (renamed from window.ui)0
-rw-r--r--meson.build26
-rw-r--r--meson_post_install.py10
-rw-r--r--src/cli.c (renamed from cli.c)0
-rw-r--r--src/cli.h (renamed from cli.h)0
-rw-r--r--src/device.c (renamed from device.c)0
-rw-r--r--src/device.h (renamed from device.h)0
-rw-r--r--src/gui_app.c (renamed from gui_app.c)4
-rw-r--r--src/gui_app.h (renamed from gui_app.h)0
-rw-r--r--src/gui_app_window.c (renamed from gui_app_window.c)4
-rw-r--r--src/gui_app_window.h (renamed from gui_app_window.h)0
-rw-r--r--src/image.c (renamed from image.c)0
-rw-r--r--src/image.h (renamed from image.h)0
-rw-r--r--src/main.c (renamed from main.c)0
-rw-r--r--src/meson.build29
-rw-r--r--src/moticam.c (renamed from moticam.c)0
-rw-r--r--src/moticam.h (renamed from moticam.h)0
-rw-r--r--src/options.c (renamed from options.c)0
-rw-r--r--src/options.h (renamed from options.h)0
-rw-r--r--src/usb_source.c (renamed from usb_source.c)0
-rw-r--r--src/usb_source.h (renamed from usb_source.h)0
-rw-r--r--src/utils.c (renamed from utils.c)0
-rw-r--r--src/utils.h (renamed from utils.h)0
29 files changed, 331 insertions, 43 deletions
diff --git a/.gitignore b/.gitignore
index 6d2da66..5c5b2d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,3 @@
-gui_resources.c
-*.o
-*.d
-camicro
+build
out*.png
out
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 49edf25..0000000
--- a/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-libs := libusb-1.0 libpng16 gtk+-3.0
-CFLAGS := -O3 -g -Wall \
- -flax-vector-conversions \
- $(shell pkg-config $(libs) --cflags)
-CPPFLAGS := -MMD
-LDLIBS := $(shell pkg-config $(libs) --libs)
-GLIB_COMPILE_RESOURCES = \
- $(shell pkg-config --variable=glib_compile_resources gio-2.0)
-
-SOURCES := \
- cli.c \
- device.c \
- image.c \
- gui_app.c \
- gui_app_window.c \
- gui_resources.c \
- main.c \
- moticam.c \
- options.c \
- usb_source.c \
- utils.c
-
-all: camicro
-
-gui_resources.c: gui_app.gresource.xml window.ui
- $(GLIB_COMPILE_RESOURCES) $< --target=$@ --sourcedir=. --generate-source
-
-camicro: $(SOURCES:%.c=%.o)
- $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
-
-clean:
- rm -f camicro $(SOURCES:%.c=%.o) $(SOURCES:%.c=%.d) gui_resources.c
-
--include $(SOURCES:%.c=%.d)
diff --git a/data/icons/hicolor/scalable/apps/org.eu.fr.ni.Camicro.svg b/data/icons/hicolor/scalable/apps/org.eu.fr.ni.Camicro.svg
new file mode 100644
index 0000000..d9c986f
--- /dev/null
+++ b/data/icons/hicolor/scalable/apps/org.eu.fr.ni.Camicro.svg
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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="48"
+ height="48"
+ viewBox="0 0 12.7 12.7"
+ version="1.1"
+ id="svg8"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ sodipodi:docname="org.eu.fr.ni.Camicro.svg">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.2810029"
+ inkscape:cx="17.685193"
+ inkscape:cy="37.290987"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:object-paths="true"
+ inkscape:snap-global="false"
+ showguides="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="1012"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ units="px" />
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-284.3)">
+ <g
+ id="g58"
+ transform="matrix(0.21402922,0,0,0.21402922,3.8072704,227.80816)">
+ <rect
+ y="271.86682"
+ x="-3.6527815"
+ height="3.5456769"
+ width="6.8496027"
+ id="rect874"
+ style="opacity:1;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ y="300.45941"
+ x="-10.18632"
+ height="1.7794693"
+ width="20.035505"
+ id="rect853"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26500002;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect857"
+ width="2.043093"
+ height="3.954376"
+ x="8.0038042"
+ y="302.5025" />
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 1.2800829,291.0405 2.31888,-0.36328 0.384027,2.45131 c 0,0 -0.714929,0.34696 -1.123513,0.41096 -0.408584,0.064 -1.195366,-0.0477 -1.195366,-0.0477 z"
+ id="path843"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccacc" />
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m -0.30533813,291.13134 1.79803503,-0.29034 0.653701,4.04825 c 0,0 -0.521051,0.47273 -0.837864,0.52389 -0.31681203,0.0512 -0.96017103,-0.23354 -0.96017103,-0.23354 z"
+ id="path847"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccacc" />
+ <path
+ sodipodi:nodetypes="cccacc"
+ inkscape:connector-curvature="0"
+ id="rect836"
+ d="m -3.3338721,291.35294 h 2.216764 v 3.19667 c 0,0 -0.71779,0.29905 -1.108382,0.29905 -0.390592,0 -1.108382,-0.29905 -1.108382,-0.29905 z"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="ccscsssccssscccc"
+ inkscape:connector-curvature="0"
+ id="rect824"
+ d="m -7.2005071,281.35156 2.645833,8.09253 c 0,0 6.570448,-0.0987 8.804629,-1.05834 0.982353,-0.42193 2.312385,-1.55323 3.173969,-2.34456 0.515209,1.90372 1.044249,3.98842 1.313613,5.47564 0.607177,3.35236 1.058334,6.75888 1.058334,10.16579 0,3.4069 -0.534033,6.79947 -1.058334,10.16578 -0.532667,3.42003 -2.116666,10.16579 -2.116666,10.16579 H 17.449666 V 311.8484 c 0,-3.38858 0.374391,-6.79794 0,-10.16578 -0.443688,-3.99121 -1.40349,-7.9345 -2.645833,-11.75329 -0.963547,-2.96183 -3.704167,-8.57777 -3.704167,-8.57777 h -2.8070621 -2.2009 z"
+ style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <ellipse
+ ry="2.0521584"
+ rx="4.4823456"
+ cy="313.67474"
+ cx="-2.2254896"
+ id="path818"
+ style="opacity:1;fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ y="312.64868"
+ x="-7.004859"
+ height="3.6182792"
+ width="9.5587378"
+ id="rect822"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="aacccccaa"
+ inkscape:connector-curvature="0"
+ id="rect10"
+ d="m -13.829974,315.54419 c 1.113785,-0.38337 2.290076,-0.56595 3.454251,-0.74536 1.3180449,-0.20312 3.9834179,-0.37268 3.9834179,-0.37268 H 10.570365 l 3.175,7.5882 h -30.750339 v -3.7941 c 0,0 0.382711,-1.12532 0.79375,-1.52437 0.632621,-0.61417 1.547543,-0.86472 2.38125,-1.15169 z"
+ style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="caaaaaccaaaaacc"
+ inkscape:connector-curvature="0"
+ d="m 4.3961249,288.31905 c 0,0 -0.555265,0.22113 -0.841875,0.30406 -0.384824,0.11135 -0.779571,0.18675 -1.173713,0.25845 -0.49723,0.0905 -0.998909,0.15578 -1.50066403,0.21629 -0.54015,0.0651 -1.082188,0.11472 -1.624536,0.1579 -0.70740897,0.0563 -1.41601097,0.0981 -2.12484997,0.13193 -0.561395,0.0268 -1.685161,0.0564 -1.685161,0.0564 l 0.170573,2.05147 c 0,0 1.009916,0.023 1.514588,0.009 0.709367,-0.0199 1.417441,-0.0756 2.12484997,-0.13193 0.542348,-0.0432 1.084386,-0.0928 1.624536,-0.1579 0.50175503,-0.0605 1.00343403,-0.12584 1.50066403,-0.21629 0.394142,-0.0717 0.788925,-0.14697 1.173713,-0.25845 0.408748,-0.11842 1.200469,-0.43446 1.200469,-0.43446 z"
+ style="fill:#666666;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path833" />
+ <circle
+ r="3.196454"
+ cy="306.55576"
+ cx="13.574803"
+ id="path849"
+ style="opacity:1;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <circle
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="circle851"
+ cx="13.574803"
+ cy="306.55576"
+ r="1.6476567" />
+ <rect
+ y="302.5025"
+ x="-5.6526136"
+ height="3.954376"
+ width="6.8542509"
+ id="rect859"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ ry="1.5396557"
+ rx="1.5396557"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect861"
+ width="6.8542509"
+ height="0.65906256"
+ x="-7.7692823"
+ y="303.03168" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path863"
+ d="m 2.0365679,275.15637 c 5.005411,0 9.0630981,2.77368 9.0630981,6.19519 H -7.1569341 l 2.926546,-5.99747 z"
+ style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:0.26499996;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ transform="rotate(25.738824)"
+ y="249.90982"
+ x="108.61192"
+ height="6.8481412"
+ width="7.2432261"
+ id="rect866"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2650007;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect870"
+ width="6.6719871"
+ height="3.5256739"
+ x="102.41149"
+ y="253.36058"
+ transform="matrix(0.90677381,0.42161744,-0.42456968,0.90539526,0,0)" />
+ <rect
+ transform="matrix(0.90677381,0.42161744,-0.42456968,0.90539526,0,0)"
+ y="254.26978"
+ x="101.91589"
+ height="3.5256739"
+ width="6.6719871"
+ id="rect872"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2650007;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="caaaaaaaaaaccsccccscsccccccccccssscccaaaaaaaaaac"
+ inkscape:connector-curvature="0"
+ id="path940"
+ d="m 3.6083632,270.72575 c 0,0 0.8528579,-0.0858 1.2787948,-0.1332 0.524383,-0.0584 1.0477923,-0.12526 1.5718525,-0.18649 1.003292,-0.11723 2.0045865,-0.25424 3.0104953,-0.34634 1.1700532,-0.10714 2.3417792,-0.22956 3.5166832,-0.23978 1.227039,-0.0107 2.476605,-0.0702 3.676533,0.18649 0.670862,0.14355 1.377892,0.3232 1.918192,0.74597 0.376439,0.29455 0.660525,0.72376 0.825889,1.17222 0.132681,0.35983 0.107892,0.76208 0.106566,1.14559 -5.29e-4,0.1785 0.03781,0.37933 -0.05328,0.53283 -0.08821,0.14865 -0.284276,0.19673 -0.428157,0.29251 -0.334692,0.22279 -0.412313,0.0676 -1.012042,0.65627 -0.257749,0.25298 -0.325802,0.35636 -0.396454,0.6022 -0.150622,0.52409 -0.0085,0.99568 0.433213,1.43738 0.463865,0.46387 1.046501,0.63786 1.973482,0.58933 0.733534,-0.0384 1.241335,-0.173 1.919692,-0.50884 1.092259,-0.54075 1.631665,-1.15888 1.785631,-2.04624 0.180993,-1.04313 -0.62039,-2.24048 -1.882571,-2.81279 -1.720371,-0.78005 -4.459359,-0.38337 -6.624312,0.95938 -1.146607,0.71114 -1.967135,1.5381 -2.356723,2.37517 -0.629584,1.35273 -0.28465,2.73491 0.988967,3.96286 0.668285,0.64432 1.450147,1.09543 2.52617,1.45753 0.321437,0.10816 0.630087,0.19688 0.685888,0.19741 0.102692,7.9e-4 1.080288,-0.67878 1.080288,-0.75091 0,-0.0215 -0.121409,-0.0534 -0.269798,-0.0708 -0.739892,-0.087 -1.952273,-0.47905 -2.546263,-0.82348 -0.505283,-0.293 -1.097573,-0.9109 -1.336244,-1.39403 -0.192831,-0.39037 -0.197593,-0.41238 -0.195212,-0.93027 0.0019,-0.45544 0.02085,-0.57442 0.133448,-0.84149 0.392465,-0.93085 1.298554,-1.78429 2.602466,-2.45126 1.787122,-0.91414 3.998272,-1.14823 5.147127,-0.54492 0.55453,0.29121 0.940012,0.8222 0.940012,1.29483 0,0.45798 -0.527881,1.04211 -1.273374,1.40906 -1.030425,0.50721 -2.303981,0.62607 -2.67993,0.25012 -0.191159,-0.19116 -0.161338,-0.39836 0.09378,-0.65164 0.187211,-0.18586 0.302606,-0.24169 0.930309,-0.45013 0.394123,-0.13088 0.71659,-0.26112 0.71659,-0.28942 0,0 0.240252,-0.28988 0.296169,-0.46491 0.105537,-0.33035 0.06596,-0.69246 0.05328,-1.03902 -0.01569,-0.42929 -0.02537,-0.8708 -0.159848,-1.27879 -0.153091,-0.4645 -0.389099,-0.91804 -0.719323,-1.2788 -0.392507,-0.4288 -0.901729,-0.76291 -1.438643,-0.98574 -0.70943,-0.29442 -1.500537,-0.34695 -2.264532,-0.42626 -0.848156,-0.0881 -1.704887,-0.0579 -2.557589,-0.0533 -0.844058,0.005 -1.688166,0.0333 -2.530946,0.0799 -0.898366,0.0497 -1.7952984,0.12585 -2.6907965,0.21313 -0.8452803,0.0824 -1.6872797,0.19554 -2.5309486,0.29306 -0.6926633,0.0801 -2.0780401,0.23977 -2.0780401,0.23977"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#800000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 19.031928,273.89555 c -0.334692,0.22279 -0.412313,0.0676 -1.012042,0.65627 -0.257749,0.25298 -0.325802,0.35636 -0.396454,0.6022 -0.150622,0.52409 -0.0085,0.99568 0.433213,1.43738 0.463865,0.46387 1.046501,0.63786 1.973482,0.58933 0.733534,-0.0384 1.241335,-0.173 1.919692,-0.50884 1.092259,-0.54075 1.631665,-1.15888 1.785631,-2.04624 0.180993,-1.04313 -0.62039,-2.24048 -1.882571,-2.81279 -1.720371,-0.78005 -4.459359,-0.38337 -6.624312,0.95938 -1.146607,0.71114 -1.967135,1.5381 -2.356723,2.37517 -0.629584,1.35273 -0.28465,2.73491 0.988967,3.96286 0.668285,0.64432 1.450147,1.09543 2.52617,1.45753 0.321437,0.10816 0.630087,0.19688 0.685888,0.19741 0.102692,7.9e-4 1.080288,-0.67878 1.080288,-0.75091 0,-0.0215 -0.121409,-0.0534 -0.269798,-0.0708 -0.739892,-0.087 -1.952273,-0.47905 -2.546263,-0.82348 -0.505283,-0.293 -1.097573,-0.9109 -1.336244,-1.39403 -0.192831,-0.39037 -0.197593,-0.41238 -0.195212,-0.93027 0.0019,-0.45544 0.02085,-0.57442 0.133448,-0.84149 0.392465,-0.93085 1.298554,-1.78429 2.602466,-2.45126 1.787122,-0.91414 3.998272,-1.14823 5.147127,-0.54492 0.55453,0.29121 0.940012,0.8222 0.940012,1.29483 0,0.45798 -0.527881,1.04211 -1.273374,1.40906 -1.030425,0.50721 -2.303981,0.62607 -2.67993,0.25012 -0.191159,-0.19116 -0.161338,-0.39836 0.09378,-0.65164 0.187211,-0.18586 0.302606,-0.24169 0.930309,-0.45013 0.394123,-0.13088 0.71659,-0.28942 0.71659,-0.28942"
+ id="path948"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccsccccscsccccccccccsssccc" />
+ <path
+ sodipodi:nodetypes="csssccsccsccsccccscccccccsscccscsccccccccccccccccccccccccccscaacccsccccccccccccccccccccccccccccccccccccccccccccccccccccaassccccccsccccccccscccccaccccccccccssccccccccscccc"
+ inkscape:connector-curvature="0"
+ d="m 17.899737,280.07099 c 0.04786,-0.0236 0.362313,-0.11481 0.518652,-0.15199 0.15634,-0.0372 0.3146,-0.0679 0.473949,-0.0919 0.318698,-0.0479 0.641755,-0.0687 0.962518,-0.0591 0.641525,0.0192 1.273879,0.15998 1.843859,0.44747 0.653068,0.3294 1.102746,0.75825 1.364408,1.30121 0.148159,0.30744 0.196599,0.50141 0.196599,0.78726 0,0.39669 -0.116827,0.74766 -0.386675,1.16164 -0.08191,0.12567 -0.145312,0.23159 -0.140886,0.23538 0.0044,0.004 0.246187,-0.0102 0.537242,-0.0311 0.291055,-0.0209 0.531731,-0.0344 0.534834,-0.0299 0.0031,0.004 0.102812,0.29281 0.221573,0.64082 0.165531,0.48506 0.206581,0.63273 0.175876,0.63273 -0.02201,0 -0.299926,0.0237 -0.617553,0.0528 -0.31763,0.029 -1.122992,0.10061 -1.789695,0.15911 -1.586267,0.13919 -1.732848,0.1548 -2.157965,0.22983 -0.425662,0.0751 -0.517716,0.0999 -0.632024,0.17002 -0.380227,0.23327 1.026047,1.1649 1.269567,1.21344 0.343901,0.0686 1.023157,-0.12086 1.798792,-0.19049 0.780348,-0.07 1.93569,0.0387 2.92323,0.27521 0.790931,0.18941 1.669902,0.44365 1.716773,0.49657 0.03192,0.036 0.09882,0.95183 0.08766,1.20004 l -0.0067,0.15036 -0.545611,-0.16949 c -0.570746,-0.1773 -1.493333,-0.39764 -1.52978,-0.36536 -0.01166,0.0103 0.163435,0.19412 0.389107,0.40842 1.302128,1.23653 1.776251,1.90243 1.743158,2.44824 -0.01613,0.26604 -0.105601,0.4299 -0.342661,0.62757 -0.299383,0.24963 -0.598254,0.34229 -1.319078,0.40895 l -0.19172,0.0177 0.596474,0.68764 c 1.109307,1.27884 1.367649,1.88324 1.048241,2.4524 -0.139961,0.2494 -0.353094,0.41476 -0.72188,0.56009 -0.419667,0.16537 -1.004857,0.11246 -2.13771,-0.19329 -1.096444,-0.29593 -1.63653,-0.3699 -1.886702,-0.2584 -0.225452,0.10048 -0.255768,0.23836 -0.113897,0.51798 0.205329,0.40468 1.587516,1.79729 1.736998,1.75009 0.118317,-0.0374 0.837028,-0.13178 1.337778,-0.17575 0.273506,-0.024 0.9965,-0.0258 1.606651,-0.004 l 1.109367,0.0397 0.17835,0.61196 c 0.09809,0.33657 0.168002,0.62112 0.155352,0.63232 -0.01266,0.0112 -0.465635,0.0156 -1.006641,0.01 -1.757552,-0.019 -2.749511,0.054 -3.489311,0.25657 -0.559057,0.15309 -0.815723,0.31803 -0.828729,0.53255 -0.01385,0.22837 0.642369,0.79706 1.65989,1.43847 l 0.56435,0.35576 0.23449,-0.0843 c 0.483753,-0.17387 1.048473,-0.23958 1.699028,-0.19771 1.520999,0.0979 2.600005,0.72954 3.050004,1.78548 0.167738,0.3936 0.160013,0.83853 -0.02013,1.15953 -0.321943,0.57368 -1.326234,0.92408 -2.107031,0.73515 -0.180421,-0.0436 -0.357637,-0.10024 -0.393816,-0.12575 -0.07985,-0.0563 -0.09667,-0.50734 -0.03052,-0.81857 l 0.04743,-0.22319 0.425597,0.0577 c 0.699055,0.0949 1.099522,-0.0554 1.121676,-0.42074 0.0221,-0.3645 -0.3352,-0.69186 -0.91283,-0.83633 -0.411547,-0.10294 -1.384312,-0.10935 -1.874044,-0.0124 -0.496127,0.0983 -1.067005,0.33553 -1.364867,0.56729 -0.47285,0.36792 -0.634077,0.96329 -0.407619,1.50525 0.336319,0.80489 1.648378,1.51 2.607342,2.06734 0.166268,0.0966 0.345026,0.18694 0.535225,0.21536 0.911211,0.13614 2.002913,-0.0502 2.753774,-0.23725 l 0.385121,-0.0959 0.0949,-0.23674 c 0.12764,-0.31842 0.348298,-0.57673 0.68187,-0.79821 0.36857,-0.24473 0.504674,-0.23396 0.830122,0.0657 0.323579,0.29792 0.517788,0.61201 0.464271,0.75085 -0.08721,0.22628 -0.331697,0.41362 -0.994707,0.76223 l -0.112024,0.0589 0.213991,0.52796 c 0.371666,0.91697 0.354937,1.33221 -0.07658,1.90063 -0.273395,0.36013 -0.652842,0.60931 -1.728726,1.13521 -0.961328,0.46992 -1.13616,0.58271 -1.145644,0.73912 -0.0069,0.1146 0.124099,0.2786 0.311988,0.39043 0.21692,0.12913 0.82613,0.25143 1.645504,0.33035 l 0.835126,0.0805 0.189775,-0.27762 c 0.104382,-0.15269 0.413122,-0.47734 0.6861,-0.72143 0.4392,-0.39272 0.557593,-0.46943 1.028658,-0.66657 0.699415,-0.29268 1.053189,-0.35895 1.699316,-0.31827 0.516475,0.0326 0.975415,0.15308 1.422328,0.37366 l 0.17958,0.0886 -0.23281,0.38169 c -0.19411,0.31822 -0.24891,0.37629 -0.329673,0.34925 -0.0533,-0.0179 -0.26645,-0.0679 -0.47374,-0.11138 -0.4929,-0.10322 -0.93243,-0.0585 -1.405646,0.14171 -0.48163,0.20421 -0.836389,0.49294 -1.210999,0.98562 -0.533552,0.7017 -0.804974,1.37879 -0.744813,1.85798 0.04214,0.33569 0.375819,0.64621 0.791553,0.73659 0.603548,0.13127 1.656975,-0.30978 2.237623,-0.93678 0.149302,-0.16122 0.222042,-0.2973 0.288272,-0.53924 0.15414,-0.56312 0.701913,-1.40469 1.183613,-1.81847 l 0.23735,-0.20388 0.46854,0.25227 c 0.45488,0.24492 0.46789,0.25671 0.4469,0.40473 -0.0577,0.40698 -0.61856,1.35158 -1.14445,1.9275 -0.15874,0.17385 -0.29049,0.34673 -0.29276,0.38418 -0.009,0.14291 0.36063,0.91294 0.52901,1.10304 0.28763,0.32476 0.77865,0.42506 1.36947,0.27974 0.1737,-0.0428 0.3191,-0.0728 0.3231,-0.0669 0.0214,0.0317 -0.59154,1.10649 -0.64916,1.1383 -0.11954,0.066 -0.74607,-0.004 -1.03249,-0.11469 l -4e-5,-1.3e-4 c -0.6145,-0.23835 -0.959963,-0.58046 -1.208823,-1.19708 l -0.1671,-0.41402 -0.268478,0.15962 c -0.922716,0.54864 -1.991322,0.75153 -2.796219,0.5309 -0.311508,-0.0854 -0.858,-0.37475 -1.116202,-0.59101 -0.443781,-0.3717 -0.690533,-1.06728 -0.596467,-1.6814 0.02681,-0.17503 0.06489,-0.36376 0.08464,-0.41942 0.03465,-0.0977 0.0147,-0.10359 -0.568964,-0.16974 -1.489089,-0.16873 -2.577104,-0.57511 -3.03136,-1.13209 -0.310737,-0.38102 -0.283699,-0.82096 0.07992,-1.29991 0.28882,-0.38044 0.658648,-0.61329 1.682471,-1.05928 0.472456,-0.2058 0.963347,-0.44429 1.090872,-0.52996 0.418502,-0.28116 0.577567,-0.7641 0.429444,-1.30385 -0.04976,-0.18131 -0.08549,-0.23393 -0.147426,-0.21711 -0.880993,0.23929 -2.008779,0.39763 -3.014091,0.30296 -0.381839,-0.036 -0.767242,-0.14177 -1.103208,-0.32676 -1.296319,-0.71377 -2.814584,-1.61426 -3.341537,-2.9229 -0.360379,-0.89497 -0.224547,-1.65707 0.41606,-2.33432 l 0.207849,-0.21973 -0.495409,-0.3334 c -1.20182,-0.80879 -2.179129,-1.96434 -2.144492,-2.5356 0.02047,-0.33766 0.345279,-0.65691 0.9234,-0.90758 l 0.332309,-0.14409 -0.294363,-0.28844 c -1.846676,-1.80953 -2.070089,-3.1439 -0.604671,-3.6115 0.425156,-0.13566 1.05368,-0.074 2.152143,0.21108 0.961795,0.24963 1.522299,0.35042 1.731018,0.31129 0.181579,-0.034 0.230003,-0.21669 0.113989,-0.42994 -0.09284,-0.17068 -0.940089,-1.13042 -1.58816,-1.79904 l -0.358011,-0.36936 -0.382117,-0.0555 c -0.433037,-0.0629 -2.724211,-0.45234 -2.739627,-0.46568 -0.02735,-0.0237 -0.08514,-1.28436 -0.0599,-1.30671 0.01608,-0.0142 0.605511,0.0909 1.309838,0.23361 3.093594,0.62691 3.99261,0.60077 3.634028,-0.10568 -0.132733,-0.2615 -0.814001,-1.0113 -1.621737,-1.78488 l -0.599181,-0.57384 -0.627211,0.0194 c -0.344965,0.0106 -0.979419,0.0454 -1.409898,0.0772 -0.430481,0.0318 -0.57299,0.0269 -0.850512,-0.032 -0.251431,-0.0534 -0.594558,-0.21699 -0.715901,-0.28649 v -10e-6 h 4e-6 c -0.568922,-0.42514 -1.014512,-0.86303 -1.407447,-1.24231 -0.303916,-0.29335 -0.461949,-0.49808 -0.586986,-0.76043 -0.08621,-0.18089 -0.09529,-0.22167 -0.09588,-0.43053 -5.29e-4,-0.21447 0.0051,-0.23884 0.08031,-0.346 0.152649,-0.21738 0.49216,-0.428 0.942322,-0.58457 l 0.250669,-0.0872 -0.144103,-0.0677 c -1.333143,-0.62584 -1.770877,-0.7538 -1.991847,-1.53636 -0.09644,-0.34153 -0.03485,-0.73194 0.06613,-1.09106 0.100977,-0.35912 0.317907,-0.66143 0.379012,-0.87781 m 3.920231,3.28835 c 0.43226,-0.0448 0.799886,-0.0862 0.816949,-0.0918 0.07542,-0.0249 0.524372,-0.87391 0.582853,-1.10218 0.128529,-0.5017 -0.233331,-1.06855 -0.876411,-1.3729 -0.862134,-0.40801 -1.924431,-0.41379 -2.849253,-0.0155 -0.482526,0.20781 -0.78677,0.44828 -0.92664,0.73239 -0.07251,0.14728 -0.0826,0.19247 -0.07261,0.32506 0.0064,0.0847 0.03342,0.19942 0.06008,0.25495 0.109064,0.22715 0.445381,0.51226 0.840652,0.71267 0.236305,0.11981 1.519008,0.63557 1.585172,0.63738 0.02931,7.9e-4 0.40695,-0.0352 0.839208,-0.0801 z"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#800000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path944" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path946"
+ d="m 30.070276,298.7203 c -0.19847,-0.0728 -0.313642,-0.20566 -0.428323,-0.49399 -0.10666,-0.26817 -0.117194,-0.52232 -0.02767,-0.66769 0.156135,-0.25355 1.132741,-0.30484 1.51245,-0.0794 0.250344,0.14861 0.391962,0.46251 0.370248,0.82065 -0.0196,0.32334 -0.116239,0.42078 -0.470705,0.47461 -0.297315,0.0451 -0.756249,0.0192 -0.955992,-0.0542 z"
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:#800000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect876"
+ width="9.5088606"
+ height="6.1243505"
+ x="-4.9824095"
+ y="265.98422" />
+ <path
+ sodipodi:nodetypes="caaacc"
+ inkscape:connector-curvature="0"
+ id="path951"
+ d="m 38.008325,316.25779 c 0,0 0.60181,-0.0975 0.90441,-0.13358 0.31157,-0.0372 0.62523,-0.0542 0.93745,-0.0855 0.17785,-0.0178 0.35516,-0.0409 0.53307,-0.0581 0.1904,-0.0184 0.57182,-0.0485 0.57182,-0.0485 v 0"
+ style="fill:none;stroke:#000000;stroke-width:1.3096875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..83019b4
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,22 @@
+resources_data = files(
+ 'window.ui',
+)
+
+gresource = 'org.eu.fr.ni.Camicro'
+
+resources = gnome.compile_resources(
+ gresource,
+ gresource + '.gresource.xml',
+ c_name: 'resources',
+ dependencies: resources_data,
+)
+
+install_data(
+ 'org.eu.fr.ni.Camicro.desktop',
+ install_dir: join_paths(get_option('datadir'), 'applications'),
+)
+
+install_data(
+ 'icons/hicolor/scalable/apps/org.eu.fr.ni.Camicro.svg',
+ install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
+)
diff --git a/data/org.eu.fr.ni.Camicro.desktop b/data/org.eu.fr.ni.Camicro.desktop
new file mode 100644
index 0000000..77222bf
--- /dev/null
+++ b/data/org.eu.fr.ni.Camicro.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Camicro
+Comment=Microscope camera viewer
+Exec=camicro
+Icon=org.eu.fr.ni.Camicro
+StartupNotify=true
+Categories=Science;
diff --git a/gui_app.gresource.xml b/data/org.eu.fr.ni.Camicro.gresource.xml
index f79e22f..8f237d2 100644
--- a/gui_app.gresource.xml
+++ b/data/org.eu.fr.ni.Camicro.gresource.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
- <gresource prefix="/org/eu/fr/ni/camicro">
+ <gresource prefix="/org/eu/fr/ni/Camicro">
<file preprocess="xml-stripblanks">window.ui</file>
</gresource>
</gresources>
diff --git a/window.ui b/data/window.ui
index 9eefa36..9eefa36 100644
--- a/window.ui
+++ b/data/window.ui
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..8b2bfbc
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,26 @@
+project(
+ 'camicro', 'c',
+ version : '0.1',
+ license: 'GPLv3+',
+ default_options: [
+ 'optimization=3',
+ 'werror=true',
+ ],
+)
+
+cc = meson.get_compiler('c')
+add_project_arguments(
+ cc.get_supported_arguments(['-Wall']),
+ language : 'c',
+)
+
+gnome = import('gnome')
+
+libusb = dependency('libusb-1.0')
+libpng = dependency('libpng16')
+gtk = dependency('gtk+-3.0')
+
+subdir('data')
+subdir('src')
+
+meson.add_install_script('meson_post_install.py')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..81b3fb0
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+import os
+import subprocess
+
+install_prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
+
+if not os.environ.get('DESTDIR'):
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
diff --git a/cli.c b/src/cli.c
index a5c20c7..a5c20c7 100644
--- a/cli.c
+++ b/src/cli.c
diff --git a/cli.h b/src/cli.h
index 01f2d8a..01f2d8a 100644
--- a/cli.h
+++ b/src/cli.h
diff --git a/device.c b/src/device.c
index 09a94e3..09a94e3 100644
--- a/device.c
+++ b/src/device.c
diff --git a/device.h b/src/device.h
index 7028ebb..7028ebb 100644
--- a/device.h
+++ b/src/device.h
diff --git a/gui_app.c b/src/gui_app.c
index e58e4ae..e7cc862 100644
--- a/gui_app.c
+++ b/src/gui_app.c
@@ -37,7 +37,7 @@ struct _GuiAppPrivate {
GSource *usb_source;
};
-G_DEFINE_TYPE_WITH_PRIVATE(GuiApp, gui_app, GTK_TYPE_APPLICATION);
+G_DEFINE_TYPE_WITH_PRIVATE(GuiApp, gui_app, GTK_TYPE_APPLICATION)
static gboolean
gui_app_usb_source_cb(gpointer user_data)
@@ -122,6 +122,6 @@ GuiApp *
gui_app_new(void)
{
return g_object_new(GUI_APP_TYPE,
- "application-id", "org.eu.fr.ni.camicro",
+ "application-id", "org.eu.fr.ni.Camicro",
NULL);
}
diff --git a/gui_app.h b/src/gui_app.h
index 8eeeff1..8eeeff1 100644
--- a/gui_app.h
+++ b/src/gui_app.h
diff --git a/gui_app_window.c b/src/gui_app_window.c
index b7c0d84..980daaa 100644
--- a/gui_app_window.c
+++ b/src/gui_app_window.c
@@ -61,7 +61,7 @@ struct _GuiAppWindowPrivate {
};
G_DEFINE_TYPE_WITH_PRIVATE(GuiAppWindow, gui_app_window,
- GTK_TYPE_APPLICATION_WINDOW);
+ GTK_TYPE_APPLICATION_WINDOW)
/* When input or output size change, recompute transformation matrix. */
static void
@@ -429,7 +429,7 @@ static void
gui_app_window_class_init(GuiAppWindowClass *class)
{
gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(class),
- "/org/eu/fr/ni/camicro/window.ui");
+ "/org/eu/fr/ni/Camicro/window.ui");
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(class),
GuiAppWindow, video);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(class),
diff --git a/gui_app_window.h b/src/gui_app_window.h
index 2f886db..2f886db 100644
--- a/gui_app_window.h
+++ b/src/gui_app_window.h
diff --git a/image.c b/src/image.c
index ec29751..ec29751 100644
--- a/image.c
+++ b/src/image.c
diff --git a/image.h b/src/image.h
index 0e36c02..0e36c02 100644
--- a/image.h
+++ b/src/image.h
diff --git a/main.c b/src/main.c
index 2abeeda..2abeeda 100644
--- a/main.c
+++ b/src/main.c
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..cf832e1
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,29 @@
+sources = [
+ 'device.c',
+ 'cli.c',
+ 'image.c',
+ 'options.c',
+ 'gui_app_window.c',
+ 'usb_source.c',
+ 'moticam.c',
+ 'main.c',
+ 'gui_app.c',
+ 'utils.c',
+]
+
+deps = [
+ libusb,
+ libpng,
+ gtk,
+]
+
+c_args = [
+ '-flax-vector-conversions',
+]
+
+executable('camicro',
+ sources + resources,
+ dependencies : deps,
+ c_args: c_args,
+ install : true,
+)
diff --git a/moticam.c b/src/moticam.c
index 232fb77..232fb77 100644
--- a/moticam.c
+++ b/src/moticam.c
diff --git a/moticam.h b/src/moticam.h
index b9eed99..b9eed99 100644
--- a/moticam.h
+++ b/src/moticam.h
diff --git a/options.c b/src/options.c
index cbdaf3c..cbdaf3c 100644
--- a/options.c
+++ b/src/options.c
diff --git a/options.h b/src/options.h
index 7a08619..7a08619 100644
--- a/options.h
+++ b/src/options.h
diff --git a/usb_source.c b/src/usb_source.c
index 761d103..761d103 100644
--- a/usb_source.c
+++ b/src/usb_source.c
diff --git a/usb_source.h b/src/usb_source.h
index 0b76ce8..0b76ce8 100644
--- a/usb_source.h
+++ b/src/usb_source.h
diff --git a/utils.c b/src/utils.c
index ddd044f..ddd044f 100644
--- a/utils.c
+++ b/src/utils.c
diff --git a/utils.h b/src/utils.h
index ef495e5..ef495e5 100644
--- a/utils.h
+++ b/src/utils.h