Merge remote-tracking branch 'vanilla/next' into gaps-next
Ingo Bürk
3 years ago
0 | .git |
39 | 39 | i3-command-parser.stamp |
40 | 40 | i3-config-parser.stamp |
41 | 41 | .clang_complete |
42 | compile_commands.json | |
43 | /.ccls-cache | |
44 | /.clangd | |
42 | 45 | LAST_VERSION |
43 | 46 | build |
47 | ||
48 | # We recommend building in a subdirectory called build. | |
49 | # If you chose a different directory name, | |
50 | # it is up to you to arrange for it to be ignored by git, | |
51 | # e.g. by listing your directory in .git/info/exclude. | |
52 | /build | |
53 | ||
54 | # TODO(autotools-removal): remove autotools from .gitignore: | |
44 | 55 | |
45 | 56 | ################################################################################ |
46 | 57 | # https://raw.githubusercontent.com/github/gitignore/master/Autotools.gitignore |
30 | 30 | script: |
31 | 31 | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-safe-wrappers.sh |
32 | 32 | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-formatting.sh |
33 | # # TODO(autotools-removal): autoconf build has to keep working until i3 4.19 | |
34 | # is released, so we keep building it in travis. | |
33 | 35 | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common"' |
36 | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address && ninja -v && mkdir ../distbuild && cd ../distbuild && meson .. -Ddocs=true -Dmans=true && ninja -v dist' | |
34 | 37 | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-spelling.pl |
35 | 38 | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} ./travis/run-tests.sh |
36 | 39 | - ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/debian-build.sh deb/debian-amd64/DIST |
4 | 4 | |
5 | 5 | bin_PROGRAMS = \ |
6 | 6 | i3 \ |
7 | i3bar/i3bar \ | |
8 | i3-config-wizard/i3-config-wizard \ | |
9 | i3-dump-log/i3-dump-log \ | |
10 | i3-input/i3-input \ | |
11 | i3-msg/i3-msg \ | |
12 | i3-nagbar/i3-nagbar | |
7 | i3bar \ | |
8 | i3-config-wizard \ | |
9 | i3-dump-log \ | |
10 | i3-input \ | |
11 | i3-msg \ | |
12 | i3-nagbar | |
13 | 13 | |
14 | 14 | install-exec-hook: |
15 | 15 | $(LN_S) -f i3 $(DESTDIR)$(bindir)/i3-with-shmlog |
330 | 330 | libi3/strndup.c \ |
331 | 331 | libi3/ucs2_conversion.c |
332 | 332 | |
333 | i3_dump_log_i3_dump_log_CFLAGS = \ | |
333 | i3_dump_log_CFLAGS = \ | |
334 | 334 | $(AM_CFLAGS) \ |
335 | 335 | $(PTHREAD_CFLAGS) \ |
336 | 336 | $(libi3_CFLAGS) |
337 | 337 | |
338 | i3_dump_log_i3_dump_log_LDADD = \ | |
338 | i3_dump_log_LDADD = \ | |
339 | 339 | $(PTHREAD_LIBS) \ |
340 | 340 | $(libi3_LIBS) |
341 | 341 | |
342 | i3_dump_log_i3_dump_log_SOURCES = \ | |
342 | i3_dump_log_SOURCES = \ | |
343 | 343 | i3-dump-log/main.c |
344 | 344 | |
345 | i3_input_i3_input_CFLAGS = \ | |
345 | i3_input_CFLAGS = \ | |
346 | 346 | $(AM_CFLAGS) \ |
347 | 347 | $(libi3_CFLAGS) |
348 | 348 | |
349 | i3_input_i3_input_LDADD = \ | |
349 | i3_input_LDADD = \ | |
350 | 350 | $(libi3_LIBS) \ |
351 | 351 | $(XCB_UTIL_KEYSYMS_LIBS) |
352 | 352 | |
353 | i3_input_i3_input_SOURCES = \ | |
353 | i3_input_SOURCES = \ | |
354 | 354 | i3-input/i3-input.h \ |
355 | 355 | i3-input/keysym2ucs.c \ |
356 | 356 | i3-input/keysym2ucs.h \ |
357 | 357 | i3-input/main.c |
358 | 358 | |
359 | i3_msg_i3_msg_CFLAGS = \ | |
359 | i3_msg_CFLAGS = \ | |
360 | 360 | $(AM_CFLAGS) \ |
361 | 361 | $(libi3_CFLAGS) |
362 | 362 | |
363 | i3_msg_i3_msg_LDADD = \ | |
363 | i3_msg_LDADD = \ | |
364 | 364 | $(libi3_LIBS) |
365 | 365 | |
366 | i3_msg_i3_msg_SOURCES = \ | |
366 | i3_msg_SOURCES = \ | |
367 | 367 | i3-msg/main.c |
368 | 368 | |
369 | i3_nagbar_i3_nagbar_CFLAGS = \ | |
369 | i3_nagbar_CFLAGS = \ | |
370 | 370 | $(AM_CFLAGS) \ |
371 | 371 | $(LIBSN_CFLAGS) \ |
372 | 372 | $(libi3_CFLAGS) |
373 | 373 | |
374 | i3_nagbar_i3_nagbar_LDADD = \ | |
374 | i3_nagbar_LDADD = \ | |
375 | 375 | $(libi3_LIBS) \ |
376 | 376 | $(LIBSN_LIBS) \ |
377 | 377 | $(XCB_UTIL_CURSOR_LIBS) |
378 | 378 | |
379 | i3_nagbar_i3_nagbar_SOURCES = \ | |
380 | i3-nagbar/atoms.xmacro \ | |
379 | i3_nagbar_SOURCES = \ | |
380 | i3-nagbar/i3-nagbar-atoms.xmacro.h \ | |
381 | 381 | i3-nagbar/main.c |
382 | 382 | |
383 | i3bar_i3bar_CPPFLAGS = \ | |
383 | i3bar_CPPFLAGS = \ | |
384 | 384 | $(AM_CPPFLAGS) \ |
385 | 385 | -I$(top_srcdir)/i3bar/include |
386 | 386 | |
387 | i3bar_i3bar_CFLAGS = \ | |
387 | i3bar_CFLAGS = \ | |
388 | 388 | $(AM_CFLAGS) \ |
389 | 389 | $(libi3_CFLAGS) \ |
390 | 390 | $(XCB_CFLAGS) \ |
392 | 392 | $(PANGOCAIRO_CFLAGS) \ |
393 | 393 | $(YAJL_CFLAGS) |
394 | 394 | |
395 | i3bar_i3bar_LDADD = \ | |
395 | i3bar_LDADD = \ | |
396 | 396 | $(libi3_LIBS) \ |
397 | 397 | $(XCB_LIBS) \ |
398 | 398 | $(XCB_UTIL_CURSOR_LIBS) \ |
400 | 400 | $(PANGOCAIRO_LIBS) \ |
401 | 401 | $(YAJL_LIBS) |
402 | 402 | |
403 | i3bar_i3bar_SOURCES = \ | |
403 | i3bar_SOURCES = \ | |
404 | 404 | i3bar/include/child.h \ |
405 | 405 | i3bar/include/common.h \ |
406 | 406 | i3bar/include/configuration.h \ |
423 | 423 | i3bar/src/workspaces.c \ |
424 | 424 | i3bar/src/xcb.c |
425 | 425 | |
426 | i3_config_wizard_i3_config_wizard_CFLAGS = \ | |
426 | i3_config_wizard_CFLAGS = \ | |
427 | 427 | $(AM_CFLAGS) \ |
428 | 428 | $(libi3_CFLAGS) \ |
429 | 429 | $(LIBSN_CFLAGS) \ |
430 | 430 | $(XKBCOMMON_CFLAGS) |
431 | 431 | |
432 | i3_config_wizard_i3_config_wizard_LDADD = \ | |
432 | i3_config_wizard_LDADD = \ | |
433 | 433 | $(libi3_LIBS) \ |
434 | 434 | $(LIBSN_LIBS) \ |
435 | 435 | $(XCB_UTIL_KEYSYMS_LIBS) \ |
436 | 436 | $(XKBCOMMON_LIBS) |
437 | 437 | |
438 | i3_config_wizard_i3_config_wizard_SOURCES = \ | |
439 | i3-config-wizard/atoms.xmacro \ | |
438 | i3_config_wizard_SOURCES = \ | |
439 | i3-config-wizard/i3-config-wizard-atoms.xmacro.h \ | |
440 | 440 | i3-config-wizard/main.c \ |
441 | 441 | i3-config-wizard/xcb.h |
442 | 442 | |
443 | i3_config_wizard_i3_config_wizard_DEPENDENCIES = \ | |
443 | i3_config_wizard_DEPENDENCIES = \ | |
444 | 444 | $(top_builddir)/libi3.a |
445 | 445 | |
446 | 446 | test_inject_randr15_CPPFLAGS = \ |
499 | 499 | i3_SOURCES = \ |
500 | 500 | include/all.h \ |
501 | 501 | include/assignments.h \ |
502 | include/atoms_NET_SUPPORTED.xmacro \ | |
503 | include/atoms_rest.xmacro \ | |
504 | include/atoms.xmacro \ | |
502 | include/i3-atoms_NET_SUPPORTED.xmacro.h \ | |
503 | include/i3-atoms_rest.xmacro.h \ | |
505 | 504 | include/bindings.h \ |
506 | 505 | include/click.h \ |
507 | 506 | include/cmdparse.h \ |
620 | 619 | ################################################################################ |
621 | 620 | |
622 | 621 | anyevent-i3.stamp: AnyEvent-I3/lib/AnyEvent/I3.pm |
623 | $(AM_V_BUILD) (cd $(top_srcdir)/AnyEvent-I3 && perl Makefile.PL && make) | |
622 | $(AM_V_BUILD) (cp -r $(top_srcdir)/AnyEvent-I3 . && cd AnyEvent-I3 && perl Makefile.PL && make) | |
624 | 623 | $(AM_V_at) touch $@ |
625 | 624 | |
626 | 625 | CLEANFILES = \ |
4 | 4 | |
5 | 5 | This is i3 v4.19. This version is considered stable. All users of i3 are |
6 | 6 | strongly encouraged to upgrade. |
7 | ||
8 | In this release, we switched from the autotools build system to the meson build | |
9 | system (https://mesonbuild.com/). Check https://github.com/i3/i3/issues/4086 for | |
10 | details. If this causes problems for you, you can revert the commit which | |
11 | removed autotools from the tree: we tried our best to keep both build systems | |
12 | working. Please reach out to us in that case! | |
7 | 13 | |
8 | 14 | ┌────────────────────────────┐ |
9 | 15 | │ Changes in i3 v4.19 │ |
4 | 4 | AC_INIT([i3], [4.18.1], [https://github.com/i3/i3/issues]) |
5 | 5 | # For AX_EXTEND_SRCDIR |
6 | 6 | AX_ENABLE_BUILDDIR |
7 | AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2]) | |
7 | AM_INIT_AUTOMAKE([foreign -Wall no-dist-gzip dist-bzip2]) | |
8 | 8 | # Default to silent rules, use V=1 to get verbose compilation output. |
9 | 9 | AM_SILENT_RULES([yes]) |
10 | 10 | # Make it possible to disable maintainer mode to disable re-generation of build |
1 | 1 | Section: x11 |
2 | 2 | Priority: extra |
3 | 3 | Maintainer: Michael Stapelberg <[email protected]> |
4 | Build-Depends: debhelper (>= 9), | |
5 | dh-autoreconf, | |
4 | Build-Depends: debhelper (>= 10), | |
5 | meson, | |
6 | 6 | libx11-dev, |
7 | 7 | libxcb-util0-dev (>= 0.3.8), |
8 | 8 | libxcb-keysyms1-dev, |
0 | docs/debugging.html | |
1 | docs/hacking-howto.html | |
2 | docs/i3bar-protocol.html | |
3 | docs/userguide.html | |
4 | docs/bigpicture.png | |
5 | docs/single_terminal.png | |
6 | docs/snapping.png | |
7 | docs/two_columns.png | |
8 | docs/two_terminals.png | |
9 | docs/modes.png | |
10 | docs/ipc.html | |
11 | docs/multi-monitor.html | |
12 | docs/wsbar.html | |
13 | docs/wsbar.png | |
14 | docs/keyboard-layer1.png | |
15 | docs/keyboard-layer2.png | |
16 | docs/testsuite.html | |
17 | docs/i3-sync-working.png | |
18 | docs/i3-sync.png | |
19 | docs/tree-layout1.png | |
20 | docs/tree-layout2.png | |
21 | docs/tree-shot1.png | |
22 | docs/tree-shot2.png | |
23 | docs/tree-shot3.png | |
24 | docs/tree-shot4.png | |
25 | docs/refcard.html | |
26 | docs/refcard_style.css | |
27 | docs/logo-30.png | |
28 | docs/lib-i3test.html | |
29 | docs/lib-i3test-test.html | |
30 | docs/layout-saving.html | |
31 | docs/layout-saving-1.png |
0 | man/i3.1 | |
1 | man/i3-msg.1 | |
2 | man/i3-input.1 | |
3 | man/i3-nagbar.1 | |
4 | man/i3-config-wizard.1 | |
5 | man/i3-dump-log.1 | |
6 | man/i3-migrate-config-to-v4.1 | |
7 | man/i3-sensible-pager.1 | |
8 | man/i3-sensible-editor.1 | |
9 | man/i3-sensible-terminal.1 | |
10 | man/i3-dmenu-desktop.1 | |
11 | man/i3-save-tree.1 | |
12 | man/i3bar.1 |
12 | 12 | override_dh_auto_test: |
13 | 13 | # TODO: enable tests |
14 | 14 | |
15 | # TODO(autotools-removal): remove this override: | |
16 | override_dh_autoreconf: | |
17 | # Not needed with meson, but not a no-op either until we get rid of the | |
18 | # autotools files. | |
19 | ||
15 | 20 | override_dh_auto_configure: |
16 | # The default is /usr/share/doc/i3 | |
17 | dh_auto_configure -- --docdir=/usr/share/doc/i3-wm | |
21 | # Set -Ddocdir; the default is /usr/share/doc/i3 | |
22 | dh_auto_configure -- -Ddocdir=/usr/share/doc/i3-wm | |
18 | 23 | |
19 | 24 | override_dh_builddeb: |
20 | 25 | # bintray does not support xz currently. |
21 | 26 | dh_builddeb -- -Zgzip |
22 | 27 | |
23 | 28 | %: |
24 | dh $@ --parallel --builddirectory=build --with=autoreconf | |
29 | dh $@ --buildsystem=meson |
22 | 22 | |
23 | 23 | == Building i3 |
24 | 24 | |
25 | You can build i3 like you build any other software package which uses autotools. | |
25 | You can build i3 like you build any other software package which uses meson. | |
26 | 26 | Here’s a memory refresher: |
27 | 27 | |
28 | $ autoreconf -fi | |
29 | 28 | $ mkdir -p build && cd build |
30 | $ ../configure | |
31 | $ make -j8 | |
32 | ||
33 | The autoreconf -fi step is unnecessary if you are building from a release | |
34 | tarball, but shouldn’t hurt either. | |
29 | $ meson .. | |
30 | $ ninja | |
35 | 31 | |
36 | 32 | === Build system features |
37 | 33 | |
253 | 249 | Handlers to update X11 window properties like +WM_CLASS+, +_NET_WM_NAME+, |
254 | 250 | +CLIENT_LEADER+, etc. |
255 | 251 | |
256 | include/atoms.xmacro:: | |
252 | include/*.xmacro.*:: | |
257 | 253 | A file containing all X11 atoms which i3 uses. This file will be included |
258 | 254 | various times (for defining, requesting and receiving the atoms), each time |
259 | 255 | with a different definition of xmacro(). |
0 | xmacro(_NET_WM_NAME) | |
1 | xmacro(_NET_WM_WINDOW_TYPE) | |
2 | xmacro(_NET_WM_WINDOW_TYPE_DIALOG) | |
3 | xmacro(ATOM) | |
4 | xmacro(CARDINAL) | |
5 | xmacro(UTF8_STRING) |
0 | // clang-format off | |
1 | #define CONFIG_WIZARD_ATOMS_XMACRO \ | |
2 | xmacro(_NET_WM_NAME) \ | |
3 | xmacro(_NET_WM_WINDOW_TYPE) \ | |
4 | xmacro(_NET_WM_WINDOW_TYPE_DIALOG) \ | |
5 | xmacro(ATOM) \ | |
6 | xmacro(CARDINAL) \ | |
7 | xmacro(UTF8_STRING) |
49 | 49 | #include <X11/XKBlib.h> |
50 | 50 | #include <X11/Xlib.h> |
51 | 51 | #include <X11/keysym.h> |
52 | ||
53 | #include "i3-config-wizard-atoms.xmacro.h" | |
52 | 54 | |
53 | 55 | /* We need SYSCONFDIR for the path to the keycode config template, so raise an |
54 | 56 | * error if it’s not defined for whatever reason */ |
842 | 844 | /* Place requests for the atoms we need as soon as possible */ |
843 | 845 | #define xmacro(atom) \ |
844 | 846 | xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom); |
845 | #include "atoms.xmacro" | |
847 | CONFIG_WIZARD_ATOMS_XMACRO | |
846 | 848 | #undef xmacro |
847 | 849 | |
848 | 850 | /* Init startup notification. */ |
899 | 901 | A_##name = reply->atom; \ |
900 | 902 | free(reply); \ |
901 | 903 | } while (0); |
902 | #include "atoms.xmacro" | |
904 | CONFIG_WIZARD_ATOMS_XMACRO | |
903 | 905 | #undef xmacro |
904 | 906 | |
905 | 907 | /* Set dock mode */ |
2 | 2 | /* from X11/keysymdef.h */ |
3 | 3 | #define XCB_NUM_LOCK 0xff7f |
4 | 4 | |
5 | #include "i3-config-wizard-atoms.xmacro.h" | |
6 | ||
5 | 7 | #define xmacro(atom) xcb_atom_t A_##atom; |
6 | #include "atoms.xmacro" | |
8 | CONFIG_WIZARD_ATOMS_XMACRO | |
7 | 9 | #undef xmacro |
0 | xmacro(_NET_WM_WINDOW_TYPE) | |
1 | xmacro(_NET_WM_WINDOW_TYPE_DOCK) | |
2 | xmacro(_NET_WM_STRUT_PARTIAL) | |
3 | xmacro(I3_SOCKET_PATH) | |
4 | xmacro(ATOM) | |
5 | xmacro(CARDINAL) |
0 | // clang-format off | |
1 | #define NAGBAR_ATOMS_XMACRO \ | |
2 | xmacro(_NET_WM_WINDOW_TYPE) \ | |
3 | xmacro(_NET_WM_WINDOW_TYPE_DOCK) \ | |
4 | xmacro(_NET_WM_STRUT_PARTIAL) \ | |
5 | xmacro(I3_SOCKET_PATH) \ | |
6 | xmacro(ATOM) \ | |
7 | xmacro(CARDINAL) |
34 | 34 | #define SN_API_NOT_YET_FROZEN 1 |
35 | 35 | #include <libsn/sn-launchee.h> |
36 | 36 | |
37 | #include "i3-nagbar-atoms.xmacro.h" | |
38 | ||
37 | 39 | #define MSG_PADDING logical_px(8) |
38 | 40 | #define BTN_PADDING logical_px(3) |
39 | 41 | #define BTN_BORDER logical_px(3) |
42 | 44 | #define BAR_BORDER logical_px(2) |
43 | 45 | |
44 | 46 | #define xmacro(atom) xcb_atom_t A_##atom; |
45 | #include "atoms.xmacro" | |
47 | NAGBAR_ATOMS_XMACRO | |
46 | 48 | #undef xmacro |
47 | 49 | |
48 | 50 | #define die(...) errx(EXIT_FAILURE, __VA_ARGS__); |
425 | 427 | /* Place requests for the atoms we need as soon as possible */ |
426 | 428 | #define xmacro(atom) \ |
427 | 429 | xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom); |
428 | #include "atoms.xmacro" | |
430 | NAGBAR_ATOMS_XMACRO | |
429 | 431 | #undef xmacro |
430 | 432 | |
431 | 433 | /* Init startup notification. */ |
507 | 509 | A_##name = reply->atom; \ |
508 | 510 | free(reply); \ |
509 | 511 | } while (0); |
510 | #include "atoms.xmacro" | |
512 | NAGBAR_ATOMS_XMACRO | |
511 | 513 | #undef xmacro |
512 | 514 | |
513 | 515 | /* Set dock mode */ |
0 | xmacro(_NET_SUPPORTED) | |
1 | xmacro(_NET_SUPPORTING_WM_CHECK) | |
2 | xmacro(_NET_WM_NAME) | |
3 | xmacro(_NET_WM_VISIBLE_NAME) | |
4 | xmacro(_NET_WM_MOVERESIZE) | |
5 | xmacro(_NET_WM_STATE_STICKY) | |
6 | xmacro(_NET_WM_STATE_FULLSCREEN) | |
7 | xmacro(_NET_WM_STATE_DEMANDS_ATTENTION) | |
8 | xmacro(_NET_WM_STATE_MODAL) | |
9 | xmacro(_NET_WM_STATE_HIDDEN) | |
10 | xmacro(_NET_WM_STATE_FOCUSED) | |
11 | xmacro(_NET_WM_STATE) | |
12 | xmacro(_NET_WM_WINDOW_TYPE) | |
13 | xmacro(_NET_WM_WINDOW_TYPE_NORMAL) | |
14 | xmacro(_NET_WM_WINDOW_TYPE_DOCK) | |
15 | xmacro(_NET_WM_WINDOW_TYPE_DIALOG) | |
16 | xmacro(_NET_WM_WINDOW_TYPE_UTILITY) | |
17 | xmacro(_NET_WM_WINDOW_TYPE_TOOLBAR) | |
18 | xmacro(_NET_WM_WINDOW_TYPE_SPLASH) | |
19 | xmacro(_NET_WM_WINDOW_TYPE_MENU) | |
20 | xmacro(_NET_WM_WINDOW_TYPE_DROPDOWN_MENU) | |
21 | xmacro(_NET_WM_WINDOW_TYPE_POPUP_MENU) | |
22 | xmacro(_NET_WM_WINDOW_TYPE_TOOLTIP) | |
23 | xmacro(_NET_WM_WINDOW_TYPE_NOTIFICATION) | |
24 | xmacro(_NET_WM_DESKTOP) | |
25 | xmacro(_NET_WM_STRUT_PARTIAL) | |
26 | xmacro(_NET_CLIENT_LIST) | |
27 | xmacro(_NET_CLIENT_LIST_STACKING) | |
28 | xmacro(_NET_CURRENT_DESKTOP) | |
29 | xmacro(_NET_NUMBER_OF_DESKTOPS) | |
30 | xmacro(_NET_DESKTOP_NAMES) | |
31 | xmacro(_NET_DESKTOP_VIEWPORT) | |
32 | xmacro(_NET_ACTIVE_WINDOW) | |
33 | xmacro(_NET_CLOSE_WINDOW) | |
34 | xmacro(_NET_MOVERESIZE_WINDOW) |
0 | xmacro(_NET_WM_USER_TIME) | |
1 | xmacro(_NET_STARTUP_ID) | |
2 | xmacro(_NET_WORKAREA) | |
3 | xmacro(WM_PROTOCOLS) | |
4 | xmacro(WM_DELETE_WINDOW) | |
5 | xmacro(UTF8_STRING) | |
6 | xmacro(WM_STATE) | |
7 | xmacro(WM_CLIENT_LEADER) | |
8 | xmacro(WM_TAKE_FOCUS) | |
9 | xmacro(WM_WINDOW_ROLE) | |
10 | xmacro(I3_SOCKET_PATH) | |
11 | xmacro(I3_CONFIG_PATH) | |
12 | xmacro(I3_SYNC) | |
13 | xmacro(I3_SHMLOG_PATH) | |
14 | xmacro(I3_PID) | |
15 | xmacro(I3_FLOATING_WINDOW) | |
16 | xmacro(_NET_REQUEST_FRAME_EXTENTS) | |
17 | xmacro(_NET_FRAME_EXTENTS) | |
18 | xmacro(_MOTIF_WM_HINTS) | |
19 | xmacro(WM_CHANGE_STATE) |
0 | // clang-format off | |
1 | #define I3_NET_SUPPORTED_ATOMS_XMACRO \ | |
2 | xmacro(_NET_SUPPORTED) \ | |
3 | xmacro(_NET_SUPPORTING_WM_CHECK) \ | |
4 | xmacro(_NET_WM_NAME) \ | |
5 | xmacro(_NET_WM_VISIBLE_NAME) \ | |
6 | xmacro(_NET_WM_MOVERESIZE) \ | |
7 | xmacro(_NET_WM_STATE_STICKY) \ | |
8 | xmacro(_NET_WM_STATE_FULLSCREEN) \ | |
9 | xmacro(_NET_WM_STATE_DEMANDS_ATTENTION) \ | |
10 | xmacro(_NET_WM_STATE_MODAL) \ | |
11 | xmacro(_NET_WM_STATE_HIDDEN) \ | |
12 | xmacro(_NET_WM_STATE_FOCUSED) \ | |
13 | xmacro(_NET_WM_STATE) \ | |
14 | xmacro(_NET_WM_WINDOW_TYPE) \ | |
15 | xmacro(_NET_WM_WINDOW_TYPE_NORMAL) \ | |
16 | xmacro(_NET_WM_WINDOW_TYPE_DOCK) \ | |
17 | xmacro(_NET_WM_WINDOW_TYPE_DIALOG) \ | |
18 | xmacro(_NET_WM_WINDOW_TYPE_UTILITY) \ | |
19 | xmacro(_NET_WM_WINDOW_TYPE_TOOLBAR) \ | |
20 | xmacro(_NET_WM_WINDOW_TYPE_SPLASH) \ | |
21 | xmacro(_NET_WM_WINDOW_TYPE_MENU) \ | |
22 | xmacro(_NET_WM_WINDOW_TYPE_DROPDOWN_MENU) \ | |
23 | xmacro(_NET_WM_WINDOW_TYPE_POPUP_MENU) \ | |
24 | xmacro(_NET_WM_WINDOW_TYPE_TOOLTIP) \ | |
25 | xmacro(_NET_WM_WINDOW_TYPE_NOTIFICATION) \ | |
26 | xmacro(_NET_WM_DESKTOP) \ | |
27 | xmacro(_NET_WM_STRUT_PARTIAL) \ | |
28 | xmacro(_NET_CLIENT_LIST) \ | |
29 | xmacro(_NET_CLIENT_LIST_STACKING) \ | |
30 | xmacro(_NET_CURRENT_DESKTOP) \ | |
31 | xmacro(_NET_NUMBER_OF_DESKTOPS) \ | |
32 | xmacro(_NET_DESKTOP_NAMES) \ | |
33 | xmacro(_NET_DESKTOP_VIEWPORT) \ | |
34 | xmacro(_NET_ACTIVE_WINDOW) \ | |
35 | xmacro(_NET_CLOSE_WINDOW) \ | |
36 | xmacro(_NET_MOVERESIZE_WINDOW) |
0 | // clang-format off | |
1 | #define I3_REST_ATOMS_XMACRO \ | |
2 | xmacro(_NET_WM_USER_TIME) \ | |
3 | xmacro(_NET_STARTUP_ID) \ | |
4 | xmacro(_NET_WORKAREA) \ | |
5 | xmacro(WM_PROTOCOLS) \ | |
6 | xmacro(WM_DELETE_WINDOW) \ | |
7 | xmacro(UTF8_STRING) \ | |
8 | xmacro(WM_STATE) \ | |
9 | xmacro(WM_CLIENT_LEADER) \ | |
10 | xmacro(WM_TAKE_FOCUS) \ | |
11 | xmacro(WM_WINDOW_ROLE) \ | |
12 | xmacro(I3_SOCKET_PATH) \ | |
13 | xmacro(I3_CONFIG_PATH) \ | |
14 | xmacro(I3_SYNC) \ | |
15 | xmacro(I3_SHMLOG_PATH) \ | |
16 | xmacro(I3_PID) \ | |
17 | xmacro(I3_FLOATING_WINDOW) \ | |
18 | xmacro(_NET_REQUEST_FRAME_EXTENTS) \ | |
19 | xmacro(_NET_FRAME_EXTENTS) \ | |
20 | xmacro(_MOTIF_WM_HINTS) \ | |
21 | xmacro(WM_CHANGE_STATE) |
100 | 100 | #if !defined(DLOG) |
101 | 101 | void debuglog(char *fmt, ...) |
102 | 102 | __attribute__((format(printf, 1, 2))); |
103 | #define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, STRIPPED__FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) | |
103 | #define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) | |
104 | 104 | #endif |
105 | 105 | |
106 | 106 | /** |
25 | 25 | is, delete the preceding comma */ |
26 | 26 | #define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__) |
27 | 27 | #define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__) |
28 | #define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, STRIPPED__FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) | |
28 | #define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) | |
29 | 29 | |
30 | 30 | extern char *errorfilename; |
31 | 31 | extern char *shmlogname; |
48 | 48 | XCB_EVENT_MASK_FOCUS_CHANGE | \ |
49 | 49 | XCB_EVENT_MASK_ENTER_WINDOW) |
50 | 50 | |
51 | #include "i3-atoms_rest.xmacro.h" | |
52 | #include "i3-atoms_NET_SUPPORTED.xmacro.h" | |
53 | ||
51 | 54 | #define xmacro(atom) extern xcb_atom_t A_##atom; |
52 | #include "atoms.xmacro" | |
55 | I3_NET_SUPPORTED_ATOMS_XMACRO | |
56 | I3_REST_ATOMS_XMACRO | |
53 | 57 | #undef xmacro |
54 | 58 | |
55 | 59 | extern unsigned int xcb_numlock_mask; |
15 | 15 | */ |
16 | 16 | bool is_debug_build(void) { |
17 | 17 | /* i3_version contains either something like this: |
18 | * "4.0.2 (2011-11-11, branch "release")". | |
19 | * or: "4.0.2-123-gCOFFEEBABE (2011-11-11, branch "next")". | |
18 | * "4.0.2 (2011-11-11)" (release version) | |
19 | * or: "4.0.2-123-gC0FFEE" (debug version) | |
20 | 20 | * |
21 | 21 | * So we check for the offset of the first opening round bracket to |
22 | 22 | * determine whether this is a git version or a release version. */ |
23 | if (strchr(I3_VERSION, '(') == NULL) { | |
24 | return true; // e.g. 4.0.2-123-gC0FFEE | |
25 | } | |
26 | /* In practice, debug versions do not contain parentheses at all, | |
27 | * but leave the logic as it was before so that we can re-add | |
28 | * parentheses if we chose to. */ | |
23 | 29 | return ((strchr(I3_VERSION, '(') - I3_VERSION) > 10); |
24 | 30 | } |
0 | #!/bin/sh | |
1 | ||
2 | set -eu | |
3 | ||
4 | cd "${MESON_DIST_ROOT}" | |
5 | ||
6 | # Delete everything we do not want to have in the release tarballs: | |
7 | rm -rf \ | |
8 | contrib/banner.svg \ | |
9 | contrib/show-download-count.sh \ | |
10 | contrib/sticker-7x5cm-stickma.tif.lzma \ | |
11 | contrib/sticker_stickma_black.svg \ | |
12 | debian/ \ | |
13 | docs/GPN-2009-06-27/ \ | |
14 | docs/NoName-2009-03-12/ \ | |
15 | docs/slides-2012-01-25/ \ | |
16 | docs/slides-2012-03-16/ \ | |
17 | testcases/.gitignore \ | |
18 | travis/ \ | |
19 | .clang-format \ | |
20 | .editorconfig \ | |
21 | i3bar/.gitignore \ | |
22 | .travis.yml \ | |
23 | logo.svg \ | |
24 | README.md \ | |
25 | RELEASE-NOTES-next \ | |
26 | release.sh | |
27 | ||
28 | mkdir build | |
29 | cd build | |
30 | meson .. -Dprefix=/usr -Ddocs=true -Dmans=true | |
31 | ninja | |
32 | cp *.1 ../man/ | |
33 | cp *.html ../docs/ | |
34 | cd .. | |
35 | rm -rf build |
0 | # -*- mode: meson -*- | |
1 | ||
2 | # Style objective: be consistent with what mesonbuild.com documents/uses, and/or | |
3 | # the meson book: https://meson-manual.com/ | |
4 | ||
5 | project( | |
6 | 'i3', | |
7 | 'c', | |
8 | version: '4.18.1', | |
9 | default_options: [ | |
10 | 'c_std=c11', | |
11 | 'warning_level=1', # enable all warnings (-Wall) | |
12 | # TODO(https://github.com/i3/i3/issues/4087): switch to | |
13 | # 'buildtype=debugoptimized', | |
14 | ], | |
15 | # Ubuntu 18.04 (supported until 2023) has meson 0.45. | |
16 | # We can revisit our minimum supported meson version | |
17 | # if it turns out to be too hard to maintain. | |
18 | meson_version: '>=0.45.0', | |
19 | ) | |
20 | ||
21 | cc = meson.get_compiler('c') | |
22 | add_project_arguments(cc.get_supported_arguments(['-Wunused-value']), language: 'c') | |
23 | ||
24 | if meson.version().version_compare('>=0.48.0') | |
25 | # https://github.com/mesonbuild/meson/issues/2166#issuecomment-629696911 | |
26 | meson.add_dist_script('meson/meson-dist-script') | |
27 | else | |
28 | message('meson <0.48.0 detected, dist tarballs will not be filtered') | |
29 | endif | |
30 | ||
31 | ################################################################################ | |
32 | # Version handling | |
33 | ################################################################################ | |
34 | ||
35 | cdata = configuration_data() | |
36 | ||
37 | version_array = meson.project_version().split('.') | |
38 | cdata.set('MAJOR_VERSION', version_array[0].to_int()) | |
39 | cdata.set('MINOR_VERSION', version_array[1].to_int()) | |
40 | if version_array.length() > 2 | |
41 | cdata.set('PATCH_VERSION', version_array[2].to_int()) | |
42 | else | |
43 | cdata.set('PATCH_VERSION', 0) | |
44 | endif | |
45 | cdata.set_quoted('I3_VERSION', '@VCS_TAG@') | |
46 | cdata.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir'))) | |
47 | ||
48 | if get_option('b_sanitize').split(',').contains('address') | |
49 | cdata.set('I3_ASAN_ENABLED', 1) | |
50 | endif | |
51 | ||
52 | cdata.set('HAVE_STRNDUP', cc.has_function('strndup')) | |
53 | cdata.set('HAVE_MKDIRP', cc.has_function('mkdirp')) | |
54 | ||
55 | # Instead of generating config.h directly, make vcs_tag generate it so that | |
56 | # @VCS_TAG@ is replaced. | |
57 | config_h_in = configure_file( | |
58 | output: 'config.h.in', | |
59 | configuration: cdata, | |
60 | ) | |
61 | config_h = declare_dependency( | |
62 | sources: vcs_tag( | |
63 | input: config_h_in, | |
64 | output: 'config.h', | |
65 | fallback: meson.project_version() + '-non-git', | |
66 | ) | |
67 | ) | |
68 | ||
69 | ################################################################################ | |
70 | # docs generation | |
71 | ################################################################################ | |
72 | ||
73 | docdir = get_option('docdir') | |
74 | if docdir == '' | |
75 | docdir = join_paths(get_option('datadir'), 'doc', 'i3') | |
76 | endif | |
77 | ||
78 | if get_option('docs') | |
79 | asciidoc = find_program('asciidoc') | |
80 | doc_toc_inputs = [ | |
81 | 'docs/hacking-howto', | |
82 | 'docs/userguide', | |
83 | 'docs/ipc', | |
84 | 'docs/multi-monitor', | |
85 | 'docs/wsbar', | |
86 | 'docs/testsuite', | |
87 | 'docs/i3bar-protocol', | |
88 | 'docs/layout-saving', | |
89 | ] | |
90 | foreach m : doc_toc_inputs | |
91 | custom_target( | |
92 | m.underscorify()+'_asciidoc', | |
93 | input: m, | |
94 | output: '@[email protected]', | |
95 | command: [ | |
96 | asciidoc, | |
97 | '-a', 'toc', | |
98 | '-n', | |
99 | '-o', '@OUTPUT@', | |
100 | '@INPUT@', | |
101 | ], | |
102 | install: true, | |
103 | install_dir: docdir, | |
104 | ) | |
105 | endforeach | |
106 | ||
107 | doc_notoc_inputs = [ | |
108 | 'docs/debugging', | |
109 | ] | |
110 | foreach m : doc_notoc_inputs | |
111 | custom_target( | |
112 | m.underscorify()+'_asciidoc', | |
113 | input: m, | |
114 | output: '@[email protected]', | |
115 | command: [ | |
116 | asciidoc, | |
117 | '-n', | |
118 | '-o', '@OUTPUT@', | |
119 | '@INPUT@', | |
120 | ], | |
121 | install: true, | |
122 | install_dir: docdir, | |
123 | ) | |
124 | endforeach | |
125 | ||
126 | else | |
127 | install_data( | |
128 | [ | |
129 | 'docs/hacking-howto.html', | |
130 | 'docs/userguide.html', | |
131 | 'docs/ipc.html', | |
132 | 'docs/multi-monitor.html', | |
133 | 'docs/wsbar.html', | |
134 | 'docs/testsuite.html', | |
135 | 'docs/i3bar-protocol.html', | |
136 | 'docs/layout-saving.html', | |
137 | 'docs/debugging.html', | |
138 | ], | |
139 | install_dir: docdir, | |
140 | ) | |
141 | endif | |
142 | ||
143 | install_data( | |
144 | [ | |
145 | 'docs/bigpicture.png', | |
146 | 'docs/single_terminal.png', | |
147 | 'docs/snapping.png', | |
148 | 'docs/two_columns.png', | |
149 | 'docs/two_terminals.png', | |
150 | 'docs/modes.png', | |
151 | 'docs/wsbar.png', | |
152 | 'docs/keyboard-layer1.png', | |
153 | 'docs/keyboard-layer2.png', | |
154 | 'docs/i3-sync-working.png', | |
155 | 'docs/i3-sync.png', | |
156 | 'docs/tree-layout1.png', | |
157 | 'docs/tree-layout2.png', | |
158 | 'docs/tree-shot1.png', | |
159 | 'docs/tree-shot2.png', | |
160 | 'docs/tree-shot3.png', | |
161 | 'docs/tree-shot4.png', | |
162 | 'docs/refcard.html', | |
163 | 'docs/refcard_style.css', | |
164 | 'docs/logo-30.png', | |
165 | 'docs/layout-saving-1.png', | |
166 | ], | |
167 | install_dir: docdir, | |
168 | ) | |
169 | ||
170 | if meson.version().version_compare('>=0.53') | |
171 | summary('build docs (-Ddocs)', get_option('docs')) | |
172 | endif | |
173 | ||
174 | ################################################################################ | |
175 | # manpages | |
176 | ################################################################################ | |
177 | ||
178 | man1 = join_paths(get_option('mandir'), 'man1') | |
179 | ||
180 | if get_option('mans') | |
181 | asciidoc = find_program('asciidoc') | |
182 | asciidoc_cdata = configuration_data() | |
183 | asciidoc_cdata.set('PACKAGE_VERSION', meson.project_version()) | |
184 | asciidoc_conf = configure_file( | |
185 | input: 'man/asciidoc.conf.in', | |
186 | output: 'asciidoc.conf', | |
187 | configuration: asciidoc_cdata, | |
188 | ) | |
189 | ||
190 | xmlto = find_program('xmlto') | |
191 | ||
192 | pod2man = find_program('pod2man') | |
193 | ||
194 | man_inputs = [ | |
195 | 'man/i3.man', | |
196 | 'man/i3bar.man', | |
197 | 'man/i3-msg.man', | |
198 | 'man/i3-input.man', | |
199 | 'man/i3-nagbar.man', | |
200 | 'man/i3-config-wizard.man', | |
201 | 'man/i3-migrate-config-to-v4.man', | |
202 | 'man/i3-sensible-editor.man', | |
203 | 'man/i3-sensible-pager.man', | |
204 | 'man/i3-sensible-terminal.man', | |
205 | 'man/i3-dump-log.man', | |
206 | ] | |
207 | ||
208 | foreach m : man_inputs | |
209 | xml = custom_target( | |
210 | m.underscorify()+'_asciidoc', | |
211 | input: m, | |
212 | output: '@[email protected]', | |
213 | command: [ | |
214 | asciidoc, | |
215 | '-d', 'manpage', | |
216 | '-b', 'docbook', | |
217 | '-f', asciidoc_conf, | |
218 | '-o', '@OUTPUT@', | |
219 | '@INPUT@', | |
220 | ], | |
221 | ) | |
222 | ||
223 | custom_target( | |
224 | m.underscorify()+'_xmlto', | |
225 | input: xml, | |
226 | output: '@[email protected]', | |
227 | command: [ | |
228 | xmlto, | |
229 | 'man', | |
230 | '-o', | |
231 | '@OUTDIR@', | |
232 | '@INPUT@', | |
233 | ], | |
234 | # We should use install and install_dir instead of install_man as per: | |
235 | # https://github.com/mesonbuild/meson/issues/4981#issuecomment-467084867 | |
236 | # https://github.com/mesonbuild/meson/issues/1550#issuecomment-370164307 | |
237 | install: true, | |
238 | install_dir: man1, | |
239 | ) | |
240 | endforeach | |
241 | ||
242 | pod2man_inputs = [ | |
243 | 'i3-dmenu-desktop', | |
244 | 'i3-save-tree', | |
245 | ] | |
246 | foreach m : pod2man_inputs | |
247 | custom_target( | |
248 | m.underscorify()+'_pod2man', | |
249 | input: m, | |
250 | output: '@[email protected]', | |
251 | command: [ | |
252 | pod2man, | |
253 | '--utf8', | |
254 | '@INPUT@', | |
255 | '@OUTPUT@', | |
256 | ], | |
257 | # We should use install and install_dir instead of install_man as per: | |
258 | # https://github.com/mesonbuild/meson/issues/4981#issuecomment-467084867 | |
259 | # https://github.com/mesonbuild/meson/issues/1550#issuecomment-370164307 | |
260 | install: true, | |
261 | install_dir: man1, | |
262 | ) | |
263 | endforeach | |
264 | ||
265 | else | |
266 | install_data( | |
267 | [ | |
268 | 'man/i3.1', | |
269 | 'man/i3bar.1', | |
270 | 'man/i3-msg.1', | |
271 | 'man/i3-input.1', | |
272 | 'man/i3-nagbar.1', | |
273 | 'man/i3-config-wizard.1', | |
274 | 'man/i3-migrate-config-to-v4.1', | |
275 | 'man/i3-sensible-editor.1', | |
276 | 'man/i3-sensible-pager.1', | |
277 | 'man/i3-sensible-terminal.1', | |
278 | 'man/i3-dump-log.1', | |
279 | 'man/i3-dmenu-desktop.1', | |
280 | 'man/i3-save-tree.1', | |
281 | ], | |
282 | install_dir: man1, | |
283 | ) | |
284 | endif | |
285 | ||
286 | if meson.version().version_compare('>=0.53') | |
287 | summary('build manpages (-Dmans)', get_option('docs')) | |
288 | endif | |
289 | ||
290 | # Required for e.g. struct ucred to be defined as per unix(7). | |
291 | add_project_arguments('-D_GNU_SOURCE', language: 'c') | |
292 | ||
293 | # https://mesonbuild.com/howtox.html#add-math-library-lm-portably | |
294 | m_dep = cc.find_library('m', required: false) | |
295 | rt_dep = cc.find_library('rt', required: false) | |
296 | iconv_dep = cc.find_library('iconv', required: false) | |
297 | ||
298 | libsn_dep = dependency('libstartup-notification-1.0', method: 'pkg-config') | |
299 | xcb_dep = dependency('xcb', method: 'pkg-config') | |
300 | xcb_xkb_dep = dependency('xcb-xkb', method: 'pkg-config') | |
301 | xcb_xinerama_dep = dependency('xcb-xinerama', method: 'pkg-config') | |
302 | xcb_randr_dep = dependency('xcb-randr', method: 'pkg-config') | |
303 | xcb_shape_dep = dependency('xcb-shape', method: 'pkg-config') | |
304 | xcb_util_dep = dependency('xcb-util', method: 'pkg-config') | |
305 | xcb_util_cursor_dep = dependency('xcb-cursor', method: 'pkg-config') | |
306 | xcb_util_keysyms_dep = dependency('xcb-keysyms', method: 'pkg-config') | |
307 | xcb_util_wm_dep = dependency('xcb-icccm', method: 'pkg-config') | |
308 | xcb_util_xrm_dep = dependency('xcb-xrm', method: 'pkg-config') | |
309 | xkbcommon_dep = dependency('xkbcommon', method: 'pkg-config') | |
310 | xkbcommon_x11_dep = dependency('xkbcommon-x11', method: 'pkg-config') | |
311 | yajl_dep = dependency('yajl', method: 'pkg-config') | |
312 | libpcre_dep = dependency('libpcre', version: '>=8.10', method: 'pkg-config') | |
313 | cairo_dep = dependency('cairo', version: '>=1.14.4', method: 'pkg-config') | |
314 | pangocairo_dep = dependency('pangocairo', method: 'pkg-config') | |
315 | glib_dep = dependency('glib-2.0', method: 'pkg-config') | |
316 | gobject_dep = dependency('gobject-2.0', method: 'pkg-config') | |
317 | ||
318 | ev_dep = cc.find_library('ev') | |
319 | ||
320 | inc = include_directories('include') | |
321 | ||
322 | libi3srcs = [ | |
323 | 'libi3/dpi.c', | |
324 | 'libi3/draw_util.c', | |
325 | 'libi3/fake_configure_notify.c', | |
326 | 'libi3/font.c', | |
327 | 'libi3/format_placeholders.c', | |
328 | 'libi3/get_colorpixel.c', | |
329 | 'libi3/get_config_path.c', | |
330 | 'libi3/get_exe_path.c', | |
331 | 'libi3/get_mod_mask.c', | |
332 | 'libi3/get_process_filename.c', | |
333 | 'libi3/get_visualtype.c', | |
334 | 'libi3/g_utf8_make_valid.c', | |
335 | 'libi3/ipc_connect.c', | |
336 | 'libi3/ipc_recv_message.c', | |
337 | 'libi3/ipc_send_message.c', | |
338 | 'libi3/is_debug_build.c', | |
339 | 'libi3/resolve_tilde.c', | |
340 | 'libi3/root_atom_contents.c', | |
341 | 'libi3/safewrappers.c', | |
342 | 'libi3/string.c', | |
343 | 'libi3/ucs2_conversion.c', | |
344 | ] | |
345 | ||
346 | if not cdata.get('HAVE_STRNDUP') | |
347 | libi3srcs += 'libi3/strndup.c' | |
348 | endif | |
349 | ||
350 | if not cdata.get('HAVE_MKDIRP') | |
351 | libi3srcs += 'libi3/mkdirp.c' | |
352 | endif | |
353 | ||
354 | libi3 = static_library( | |
355 | 'i3', | |
356 | libi3srcs, | |
357 | include_directories: inc, | |
358 | dependencies: [ | |
359 | pangocairo_dep, | |
360 | config_h, | |
361 | ], | |
362 | ) | |
363 | ||
364 | i3srcs = [ | |
365 | 'src/assignments.c', | |
366 | 'src/bindings.c', | |
367 | 'src/click.c', | |
368 | 'src/commands.c', | |
369 | 'src/commands_parser.c', | |
370 | 'src/con.c', | |
371 | 'src/config.c', | |
372 | 'src/config_directives.c', | |
373 | 'src/config_parser.c', | |
374 | 'src/display_version.c', | |
375 | 'src/drag.c', | |
376 | 'src/ewmh.c', | |
377 | 'src/fake_outputs.c', | |
378 | 'src/floating.c', | |
379 | 'src/handlers.c', | |
380 | 'src/ipc.c', | |
381 | 'src/key_press.c', | |
382 | 'src/load_layout.c', | |
383 | 'src/log.c', | |
384 | 'src/main.c', | |
385 | 'src/manage.c', | |
386 | 'src/match.c', | |
387 | 'src/move.c', | |
388 | 'src/output.c', | |
389 | 'src/randr.c', | |
390 | 'src/regex.c', | |
391 | 'src/render.c', | |
392 | 'src/resize.c', | |
393 | 'src/restore_layout.c', | |
394 | 'src/scratchpad.c', | |
395 | 'src/sd-daemon.c', | |
396 | 'src/sighandler.c', | |
397 | 'src/startup.c', | |
398 | 'src/sync.c', | |
399 | 'src/tree.c', | |
400 | 'src/util.c', | |
401 | 'src/version.c', | |
402 | 'src/window.c', | |
403 | 'src/workspace.c', | |
404 | 'src/x.c', | |
405 | 'src/xcb.c', | |
406 | 'src/xcursor.c', | |
407 | 'src/xinerama.c', | |
408 | ] | |
409 | ||
410 | # Verify the perl interpreter is present for running parser_gen, | |
411 | # ensuring a good error message when it isn’t: | |
412 | perl = find_program('perl') | |
413 | parser_gen = find_program('generate-command-parser.pl') | |
414 | ||
415 | command_parser = custom_target( | |
416 | 'command_parser', | |
417 | input: 'parser-specs/commands.spec', | |
418 | output: [ | |
419 | 'GENERATED_command_enums.h', | |
420 | 'GENERATED_command_tokens.h', | |
421 | 'GENERATED_command_call.h', | |
422 | ], | |
423 | command: [perl, parser_gen, '--input=@INPUT@', '--prefix=command'], | |
424 | ) | |
425 | ||
426 | i3srcs += command_parser | |
427 | ||
428 | config_parser = custom_target( | |
429 | 'config_parser', | |
430 | input: 'parser-specs/config.spec', | |
431 | output: [ | |
432 | 'GENERATED_config_enums.h', | |
433 | 'GENERATED_config_tokens.h', | |
434 | 'GENERATED_config_call.h', | |
435 | ], | |
436 | command: [parser_gen, '--input=@INPUT@', '--prefix=config'], | |
437 | ) | |
438 | ||
439 | i3srcs += config_parser | |
440 | ||
441 | # src/log.c uses threading primitives for synchronization | |
442 | thread_dep = dependency('threads') | |
443 | ||
444 | common_deps = [ | |
445 | thread_dep, | |
446 | m_dep, | |
447 | iconv_dep, | |
448 | rt_dep, | |
449 | libsn_dep, | |
450 | xcb_dep, | |
451 | xcb_xkb_dep, | |
452 | xcb_xinerama_dep, | |
453 | xcb_randr_dep, | |
454 | xcb_shape_dep, | |
455 | xcb_util_dep, | |
456 | xcb_util_cursor_dep, | |
457 | xcb_util_keysyms_dep, | |
458 | xcb_util_wm_dep, | |
459 | xcb_util_xrm_dep, | |
460 | xkbcommon_dep, | |
461 | xkbcommon_x11_dep, | |
462 | yajl_dep, | |
463 | libpcre_dep, | |
464 | cairo_dep, | |
465 | pangocairo_dep, | |
466 | glib_dep, | |
467 | gobject_dep, | |
468 | ev_dep, | |
469 | config_h, | |
470 | ] | |
471 | ||
472 | executable( | |
473 | 'i3', | |
474 | i3srcs, | |
475 | install: true, | |
476 | include_directories: inc, | |
477 | dependencies: common_deps, | |
478 | link_with: libi3, | |
479 | ) | |
480 | ||
481 | # This is the only currently working way of installing a symbolic link: | |
482 | meson.add_install_script( | |
483 | 'meson/meson-install-i3-with-shmlog', | |
484 | get_option('bindir'), | |
485 | ) | |
486 | ||
487 | executable( | |
488 | 'i3bar', | |
489 | [ | |
490 | 'i3bar/src/child.c', | |
491 | 'i3bar/src/config.c', | |
492 | 'i3bar/src/ipc.c', | |
493 | 'i3bar/src/main.c', | |
494 | 'i3bar/src/mode.c', | |
495 | 'i3bar/src/outputs.c', | |
496 | 'i3bar/src/parse_json_header.c', | |
497 | 'i3bar/src/workspaces.c', | |
498 | 'i3bar/src/xcb.c', | |
499 | ], | |
500 | install: true, | |
501 | include_directories: include_directories('include', 'i3bar/include'), | |
502 | dependencies: common_deps, | |
503 | link_with: libi3, | |
504 | ) | |
505 | ||
506 | executable( | |
507 | 'i3-config-wizard', | |
508 | [ | |
509 | 'i3-config-wizard/i3-config-wizard-atoms.xmacro.h', | |
510 | 'i3-config-wizard/main.c', | |
511 | 'i3-config-wizard/xcb.h', | |
512 | ], | |
513 | install: true, | |
514 | include_directories: include_directories('include', 'i3-config-wizard'), | |
515 | dependencies: common_deps, | |
516 | link_with: libi3, | |
517 | ) | |
518 | ||
519 | executable( | |
520 | 'i3-dump-log', | |
521 | 'i3-dump-log/main.c', | |
522 | install: true, | |
523 | include_directories: inc, | |
524 | dependencies: common_deps, | |
525 | link_with: libi3, | |
526 | ) | |
527 | ||
528 | executable( | |
529 | 'i3-input', | |
530 | [ | |
531 | 'i3-input/i3-input.h', | |
532 | 'i3-input/keysym2ucs.h', | |
533 | 'i3-input/keysym2ucs.c', | |
534 | 'i3-input/main.c', | |
535 | ], | |
536 | install: true, | |
537 | include_directories: inc, | |
538 | dependencies: common_deps, | |
539 | link_with: libi3, | |
540 | ) | |
541 | ||
542 | executable( | |
543 | 'i3-msg', | |
544 | 'i3-msg/main.c', | |
545 | install: true, | |
546 | include_directories: inc, | |
547 | dependencies: common_deps, | |
548 | link_with: libi3, | |
549 | ) | |
550 | ||
551 | executable( | |
552 | 'i3-nagbar', | |
553 | [ | |
554 | 'i3-nagbar/i3-nagbar-atoms.xmacro.h', | |
555 | 'i3-nagbar/main.c', | |
556 | ], | |
557 | install: true, | |
558 | include_directories: include_directories('include', 'i3-nagbar'), | |
559 | dependencies: common_deps, | |
560 | link_with: libi3, | |
561 | ) | |
562 | ||
563 | install_data( | |
564 | [ | |
565 | 'i3-dmenu-desktop', | |
566 | 'i3-migrate-config-to-v4', | |
567 | 'i3-save-tree', | |
568 | 'i3-sensible-editor', | |
569 | 'i3-sensible-pager', | |
570 | 'i3-sensible-terminal', | |
571 | ], | |
572 | install_dir: 'bin', | |
573 | ) | |
574 | ||
575 | install_subdir( | |
576 | 'etc', | |
577 | strip_directory: true, | |
578 | install_dir: join_paths(get_option('sysconfdir'), 'i3'), | |
579 | ) | |
580 | ||
581 | install_subdir( | |
582 | 'share/', | |
583 | strip_directory: true, | |
584 | install_dir: get_option('datadir'), | |
585 | ) | |
586 | ||
587 | install_headers( | |
588 | 'include/i3/ipc.h', | |
589 | subdir: 'i3', | |
590 | ) | |
591 | ||
592 | # We cannot use configure_file for complete-run.pl.in and i3test.pm.in | |
593 | # because configure_file strips the backslash in e.g. \@display, | |
594 | # resulting in @display, breaking our Perl code: | |
595 | # https://github.com/mesonbuild/meson/issues/7165 | |
596 | sed = find_program('sed') | |
597 | replace_dirs = [ | |
598 | sed, | |
599 | '-e', | |
600 | 's,@abs_top_builddir@,'+meson.current_build_dir()+',g;s,@abs_top_srcdir@,'+meson.current_source_dir()+',g', | |
601 | '@INPUT@', | |
602 | ] | |
603 | complete_run = custom_target( | |
604 | 'complete-run', | |
605 | input: ['testcases/complete-run.pl.in'], | |
606 | output: ['complete-run.pl'], | |
607 | capture: true, | |
608 | command: replace_dirs, | |
609 | ) | |
610 | i3test_pm = custom_target( | |
611 | 'i3test-pm', | |
612 | input: ['testcases/lib/i3test.pm.in'], | |
613 | output: ['i3test.pm'], | |
614 | capture: true, | |
615 | command: replace_dirs, | |
616 | ) | |
617 | ||
618 | if get_option('docs') | |
619 | i3_pod2html = find_program('docs/i3-pod2html') | |
620 | ||
621 | custom_target( | |
622 | 'lib-i3test.html', | |
623 | input: i3test_pm, | |
624 | output: 'lib-i3test.html', | |
625 | command: [ | |
626 | i3_pod2html, | |
627 | '@INPUT@', | |
628 | '@OUTPUT@', | |
629 | ], | |
630 | install: true, | |
631 | install_dir: join_paths(get_option('datadir'), 'doc', 'i3'), | |
632 | ) | |
633 | ||
634 | custom_target( | |
635 | 'lib-i3test-test.html', | |
636 | input: 'testcases/lib/i3test/Test.pm', | |
637 | output: 'lib-i3test-test.html', | |
638 | command: [ | |
639 | i3_pod2html, | |
640 | '@INPUT@', | |
641 | '@OUTPUT@', | |
642 | ], | |
643 | install: true, | |
644 | install_dir: join_paths(get_option('datadir'), 'doc', 'i3'), | |
645 | ) | |
646 | endif | |
647 | ||
648 | executable( | |
649 | 'test.inject_randr15', | |
650 | 'testcases/inject_randr1.5.c', | |
651 | include_directories: inc, | |
652 | dependencies: common_deps, | |
653 | link_with: libi3, | |
654 | ) | |
655 | ||
656 | executable( | |
657 | 'test.commands_parser', | |
658 | 'src/commands_parser.c', | |
659 | include_directories: inc, | |
660 | c_args: '-DTEST_PARSER', | |
661 | dependencies: common_deps, | |
662 | link_with: libi3, | |
663 | ) | |
664 | ||
665 | executable( | |
666 | 'test.config_parser', | |
667 | 'src/config_parser.c', | |
668 | include_directories: inc, | |
669 | c_args: '-DTEST_PARSER', | |
670 | dependencies: common_deps, | |
671 | link_with: libi3, | |
672 | ) | |
673 | ||
674 | anyevent_i3 = custom_target( | |
675 | 'anyevent-i3', | |
676 | # Should be AnyEvent-I3/blib/lib/AnyEvent/I3.pm, | |
677 | # but see https://github.com/mesonbuild/meson/issues/2320 | |
678 | output: 'AnyEvent-I3.stamp', | |
679 | command: [ | |
680 | 'sh', | |
681 | '-c', | |
682 | 'cp -r @0@/AnyEvent-I3 . && cd AnyEvent-I3 && perl Makefile.PL && make && touch ../AnyEvent-I3.stamp'.format(meson.current_source_dir()), | |
683 | ], | |
684 | ) | |
685 | ||
686 | if meson.version().version_compare('>=0.46.0') | |
687 | test( | |
688 | 'complete-run', | |
689 | perl, | |
690 | args: [complete_run], | |
691 | depends: [ | |
692 | # i3test.pm is generated at meson configure time, | |
693 | # so no explicit dependency is required. | |
694 | anyevent_i3, | |
695 | ], | |
696 | ) | |
697 | else | |
698 | # meson < 0.46.0 does not support the depends arg in test targets. | |
699 | # Just hope for the best. | |
700 | test( | |
701 | 'complete-run', | |
702 | perl, | |
703 | args: [complete_run], | |
704 | ) | |
705 | message('meson < 0.46 detected, you might need to run ninja test twice') | |
706 | endif |
0 | # -*- mode: meson -*- | |
1 | ||
2 | option('docs', type: 'boolean', value: false, | |
3 | description: 'Build documentation from source (release tarballs contain a generated copy)') | |
4 | ||
5 | option('mans', type: 'boolean', value: false, | |
6 | description: 'Build manpages from source (release tarballs contain a generated copy)') | |
7 | ||
8 | option('docdir', type: 'string', value: '', | |
9 | description: 'documentation directory (default: $datadir/docs/i3)') |
54 | 54 | cp "${STARTDIR}/RELEASE-NOTES-${RELEASE_VERSION}" "RELEASE-NOTES-${RELEASE_VERSION}" |
55 | 55 | git add RELEASE-NOTES-${RELEASE_VERSION} |
56 | 56 | git rm RELEASE-NOTES-${PREVIOUS_VERSION} |
57 | sed -i "s,RELEASE-NOTES-${PREVIOUS_VERSION},RELEASE-NOTES-${RELEASE_VERSION},g" Makefile.am | |
58 | sed -i "s/AC_INIT(\[i3\], \[${PREVIOUS_VERSION}\]/AC_INIT([i3], [${RELEASE_VERSION}]/" configure.ac | |
59 | echo "${RELEASE_VERSION} ($(date +%F))" > I3_VERSION | |
60 | git add I3_VERSION | |
57 | sed -i "s/^\s*version: '${PREVIOUS_VERSION}'/ version: '${RELEASE_VERSION}'/" meson.build | |
61 | 58 | git commit -a -m "release i3 ${RELEASE_VERSION}" |
62 | 59 | git tag "${RELEASE_VERSION}" -m "release i3 ${RELEASE_VERSION}" --sign --local-user=0x4AC8EE1D |
63 | 60 | |
64 | autoreconf -fi | |
65 | 61 | mkdir build |
66 | (cd build && ../configure && make dist-bzip2 -j8) | |
67 | cp build/i3-${RELEASE_VERSION}.tar.bz2 . | |
62 | (cd build && meson .. && ninja dist) | |
63 | cp build/meson-build/i3-${RELEASE_VERSION}.tar.xz . | |
68 | 64 | |
69 | 65 | echo "Differences in the release tarball file lists:" |
70 | 66 | |
71 | 67 | diff --color -u \ |
72 | <(tar tf ../i3-${PREVIOUS_VERSION}.tar.bz2 | sed "s,i3-${PREVIOUS_VERSION}/,,g" | sort) \ | |
73 | <(tar tf i3-${RELEASE_VERSION}.tar.bz2 | sed "s,i3-${RELEASE_VERSION}/,,g" | sort) | |
74 | ||
75 | gpg --armor -b i3-${RELEASE_VERSION}.tar.bz2 | |
68 | <(tar tf ../i3-${PREVIOUS_VERSION}.tar.xz | sed "s,i3-${PREVIOUS_VERSION}/,,g" | sort) \ | |
69 | <(tar tf i3-${RELEASE_VERSION}.tar.xz | sed "s,i3-${RELEASE_VERSION}/,,g" | sort) | |
70 | ||
71 | gpg --armor -b i3-${RELEASE_VERSION}.tar.xz | |
76 | 72 | |
77 | 73 | echo "${RELEASE_VERSION}-non-git" > I3_VERSION |
78 | 74 | git add I3_VERSION |
112 | 108 | FROM debian:sid |
113 | 109 | RUN sed -i 's,^deb \(.*\),deb \1\ndeb-src \1,g' /etc/apt/sources.list |
114 | 110 | RUN apt-get update && apt-get install -y dpkg-dev devscripts |
115 | COPY i3/i3-${RELEASE_VERSION}.tar.bz2 /usr/src/i3-wm_${RELEASE_VERSION}.orig.tar.bz2 | |
111 | COPY i3/i3-${RELEASE_VERSION}.tar.xz /usr/src/i3-wm_${RELEASE_VERSION}.orig.tar.xz | |
116 | 112 | WORKDIR /usr/src/ |
117 | RUN tar xf i3-wm_${RELEASE_VERSION}.orig.tar.bz2 | |
113 | RUN tar xf i3-wm_${RELEASE_VERSION}.orig.tar.xz | |
118 | 114 | WORKDIR /usr/src/i3-${RELEASE_VERSION} |
119 | 115 | COPY i3/debian /usr/src/i3-${RELEASE_VERSION}/debian/ |
120 | 116 | RUN mkdir debian/source |
158 | 154 | git add docs/${PREVIOUS_VERSION} |
159 | 155 | git commit -a -m "save docs for ${PREVIOUS_VERSION}" |
160 | 156 | |
161 | cp ${TMPDIR}/i3/i3-${RELEASE_VERSION}.tar.bz2* downloads/ | |
162 | git add downloads/i3-${RELEASE_VERSION}.tar.bz2* | |
157 | cp ${TMPDIR}/i3/i3-${RELEASE_VERSION}.tar.xz* downloads/ | |
158 | git add downloads/i3-${RELEASE_VERSION}.tar.xz* | |
163 | 159 | cp ${TMPDIR}/i3/RELEASE-NOTES-${RELEASE_VERSION} downloads/RELEASE-NOTES-${RELEASE_VERSION}.txt |
164 | 160 | git add downloads/RELEASE-NOTES-${RELEASE_VERSION}.txt |
165 | 161 | sed -i "s,<h2>Documentation for i3 v[^<]*</h2>,<h2>Documentation for i3 v${RELEASE_VERSION}</h2>,g" docs/index.html |
166 | 162 | sed -i "s,<span style=\"margin-left: 2em; color: #c0c0c0\">[^<]*</span>,<span style=\"margin-left: 2em; color: #c0c0c0\">${RELEASE_VERSION}</span>,g" index.html |
167 | 163 | sed -i "s,The current stable version is .*$,The current stable version is ${RELEASE_VERSION}.,g" downloads/index.html |
168 | sed -i "s,<tbody>,<tbody>\n <tr>\n <td>${RELEASE_VERSION}</td>\n <td><a href=\"/downloads/i3-${RELEASE_VERSION}.tar.bz2\">i3-${RELEASE_VERSION}.tar.bz2</a></td>\n <td>$(LC_ALL=en_US.UTF-8 ls -lh ../i3/i3-${RELEASE_VERSION}.tar.bz2 | awk -F " " {'print $5'} | sed 's/K$/ KiB/g' | sed 's/M$/ MiB/g')</td>\n <td><a href=\"/downloads/i3-${RELEASE_VERSION}.tar.bz2.asc\">signature</a></td>\n <td>$(date +'%Y-%m-%d')</td>\n <td><a href=\"/downloads/RELEASE-NOTES-${RELEASE_VERSION}.txt\">release notes</a></td>\n </tr>\n,g" downloads/index.html | |
164 | sed -i "s,<tbody>,<tbody>\n <tr>\n <td>${RELEASE_VERSION}</td>\n <td><a href=\"/downloads/i3-${RELEASE_VERSION}.tar.xz\">i3-${RELEASE_VERSION}.tar.xz</a></td>\n <td>$(LC_ALL=en_US.UTF-8 ls -lh ../i3/i3-${RELEASE_VERSION}.tar.xz | awk -F " " {'print $5'} | sed 's/K$/ KiB/g' | sed 's/M$/ MiB/g')</td>\n <td><a href=\"/downloads/i3-${RELEASE_VERSION}.tar.xz.asc\">signature</a></td>\n <td>$(date +'%Y-%m-%d')</td>\n <td><a href=\"/downloads/RELEASE-NOTES-${RELEASE_VERSION}.txt\">release notes</a></td>\n </tr>\n,g" downloads/index.html | |
169 | 165 | |
170 | 166 | git commit -a -m "add ${RELEASE_VERSION} release" |
171 | 167 |
7 | 7 | * |
8 | 8 | */ |
9 | 9 | #include "all.h" |
10 | ||
11 | #include "i3-atoms_NET_SUPPORTED.xmacro.h" | |
10 | 12 | |
11 | 13 | xcb_window_t ewmh_window; |
12 | 14 | |
304 | 306 | void ewmh_setup_hints(void) { |
305 | 307 | xcb_atom_t supported_atoms[] = { |
306 | 308 | #define xmacro(atom) A_##atom, |
307 | #include "atoms_NET_SUPPORTED.xmacro" | |
309 | I3_NET_SUPPORTED_ATOMS_XMACRO | |
308 | 310 | #undef xmacro |
309 | 311 | }; |
310 | 312 |
30 | 30 | |
31 | 31 | #include "sd-daemon.h" |
32 | 32 | |
33 | #include "i3-atoms_NET_SUPPORTED.xmacro.h" | |
34 | #include "i3-atoms_rest.xmacro.h" | |
35 | ||
33 | 36 | /* The original value of RLIMIT_CORE when i3 was started. We need to restore |
34 | 37 | * this before starting any other process, since we set RLIMIT_CORE to |
35 | 38 | * RLIM_INFINITY for i3 debugging versions. */ |
97 | 100 | |
98 | 101 | /* Define all atoms as global variables */ |
99 | 102 | #define xmacro(atom) xcb_atom_t A_##atom; |
100 | #include "atoms.xmacro" | |
103 | I3_NET_SUPPORTED_ATOMS_XMACRO | |
104 | I3_REST_ATOMS_XMACRO | |
101 | 105 | #undef xmacro |
102 | 106 | |
103 | 107 | /* |
375 | 379 | char *socket_path = root_atom_contents("I3_SOCKET_PATH", NULL, 0); |
376 | 380 | if (socket_path) { |
377 | 381 | printf("%s\n", socket_path); |
382 | /* With -O2 (i.e. the buildtype=debugoptimized meson | |
383 | * option, which we set by default), gcc 9.2.1 optimizes | |
384 | * away socket_path at this point, resulting in a Leak | |
385 | * Sanitizer report. An explicit free helps: */ | |
386 | free(socket_path); | |
378 | 387 | exit(EXIT_SUCCESS); |
379 | 388 | } |
380 | 389 | |
558 | 567 | /* Place requests for the atoms we need as soon as possible */ |
559 | 568 | #define xmacro(atom) \ |
560 | 569 | xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom); |
561 | #include "atoms.xmacro" | |
570 | I3_NET_SUPPORTED_ATOMS_XMACRO | |
571 | I3_REST_ATOMS_XMACRO | |
562 | 572 | #undef xmacro |
563 | 573 | |
564 | 574 | root_depth = root_screen->root_depth; |
604 | 614 | A_##name = reply->atom; \ |
605 | 615 | free(reply); \ |
606 | 616 | } while (0); |
607 | #include "atoms.xmacro" | |
617 | I3_NET_SUPPORTED_ATOMS_XMACRO | |
618 | I3_REST_ATOMS_XMACRO | |
608 | 619 | #undef xmacro |
609 | 620 | |
610 | 621 | load_configuration(override_configpath, C_LOAD); |
50 | 50 | Output *output; |
51 | 51 | bool get_primary = (strcasecmp("primary", name) == 0); |
52 | 52 | TAILQ_FOREACH (output, &outputs, outputs) { |
53 | if (require_active && !output->active) { | |
54 | continue; | |
55 | } | |
53 | 56 | if (output->primary && get_primary) { |
54 | 57 | return output; |
55 | } | |
56 | if (require_active && !output->active) { | |
57 | continue; | |
58 | 58 | } |
59 | 59 | struct output_name *output_name; |
60 | 60 | SLIST_FOREACH (output_name, &output->names_head, names) { |
17 | 17 | use IO::Handle; |
18 | 18 | |
19 | 19 | # these are shipped with the testsuite |
20 | use lib qw(@abs_top_builddir@/testcases/lib @abs_top_srcdir@/testcases/lib @abs_top_srcdir@/AnyEvent-I3/blib/lib); | |
20 | use lib qw(@abs_top_builddir@ @abs_top_builddir@/testcases/lib @abs_top_srcdir@/testcases/lib @abs_top_builddir@/AnyEvent-I3/blib/lib); | |
21 | 21 | use i3test::Util qw(slurp); |
22 | 22 | use StartXServer; |
23 | 23 | use StatusLine; |
77 | 77 | # Check for missing executables |
78 | 78 | my @binaries = qw( |
79 | 79 | @abs_top_builddir@/i3 |
80 | @abs_top_builddir@/i3bar/i3bar | |
81 | @abs_top_builddir@/i3-config-wizard/i3-config-wizard | |
82 | @abs_top_builddir@/i3-dump-log/i3-dump-log | |
83 | @abs_top_builddir@/i3-input/i3-input | |
84 | @abs_top_builddir@/i3-msg/i3-msg | |
85 | @abs_top_builddir@/i3-nagbar/i3-nagbar | |
80 | @abs_top_builddir@/i3bar | |
81 | @abs_top_builddir@/i3-config-wizard | |
82 | @abs_top_builddir@/i3-dump-log | |
83 | @abs_top_builddir@/i3-input | |
84 | @abs_top_builddir@/i3-msg | |
85 | @abs_top_builddir@/i3-nagbar | |
86 | 86 | ); |
87 | 87 | |
88 | 88 | foreach my $binary (@binaries) { |
102 | 102 | } |
103 | 103 | |
104 | 104 | $ENV{PATH} = join(':', |
105 | '@abs_top_builddir@/i3-nagbar', | |
106 | '@abs_top_builddir@/i3-msg', | |
107 | '@abs_top_builddir@/i3-input', | |
108 | '@abs_top_builddir@/i3-dump-log', | |
109 | '@abs_top_builddir@/i3-config-wizard', | |
110 | '@abs_top_builddir@/i3bar', | |
111 | 105 | '@abs_top_builddir@', |
112 | 106 | '@abs_top_srcdir@', |
113 | 107 | $ENV{PATH}); |
6 | 6 | |
7 | 7 | use Test::More; |
8 | 8 | use i3test::Util qw(get_socket_path); |
9 | use lib qw(@abs_top_srcdir@/AnyEvent-I3/blib/lib); | |
9 | use lib qw(@abs_top_builddir@/AnyEvent-I3/blib/lib); | |
10 | 10 | use AnyEvent::I3; |
11 | 11 | use ExtUtils::PkgConfig; |
12 | 12 |
6 | 6 | use X11::XCB::Rect; |
7 | 7 | use X11::XCB::Window; |
8 | 8 | use X11::XCB qw(:all); |
9 | use lib qw(@abs_top_srcdir@/AnyEvent-I3/blib/lib); | |
9 | use lib qw(@abs_top_builddir@/AnyEvent-I3/blib/lib); | |
10 | 10 | use AnyEvent::I3; |
11 | 11 | use List::Util qw(first); |
12 | 12 | use Time::HiRes qw(sleep); |
31 | 31 | |
32 | 32 | is(int($version->{minor}), $version->{minor}, 'minor version is an integer'); |
33 | 33 | is(int($version->{patch}), $version->{patch}, 'patch version is an integer'); |
34 | like($version->{human_readable}, qr/branch/, 'human readable version contains branch name'); | |
35 | 34 | |
36 | 35 | done_testing; |
32 | 32 | }; |
33 | 33 | my @binaries = qw( |
34 | 34 | build/i3 |
35 | build/i3-config-wizard/i3-config-wizard | |
36 | build/i3-dump-log/i3-dump-log | |
37 | build/i3-input/i3-input | |
38 | build/i3-msg/i3-msg | |
39 | build/i3-nagbar/i3-nagbar | |
40 | build/i3bar/i3bar | |
35 | build/i3-config-wizard | |
36 | build/i3-dump-log | |
37 | build/i3-input | |
38 | build/i3-msg | |
39 | build/i3-nagbar | |
40 | build/i3bar | |
41 | 41 | ); |
42 | 42 | for my $binary (@binaries) { |
43 | 43 | check_spelling(slurp($binary), $binary_spelling_exceptions, sub { |
4 | 4 | |
5 | 5 | DEST=$1 |
6 | 6 | |
7 | mkdir -p build | |
8 | 7 | cd build |
9 | ../configure | |
10 | make echo-version > ../I3_VERSION | |
11 | make dist-bzip2 | |
12 | 8 | # unpack dist tarball |
13 | 9 | mkdir -p "${DEST}" |
14 | tar xf *.tar.bz2 -C "${DEST}" --strip-components=1 | |
10 | tar xf meson-dist/*.tar.xz -C "${DEST}" --strip-components=1 | |
15 | 11 | cp -r ../debian "${DEST}" |
16 | 12 | sed -i '/^\s*libxcb-xrm-dev/d' deb/ubuntu-*/DIST/debian/control || true |
17 | 13 | cd "${DEST}" |
3 | 3 | |
4 | 4 | BASENAME=$1 |
5 | 5 | DOCKERFILE=$2 |
6 | ||
7 | # .dockerignore is created on demand so that release.sh and other scripts are | |
8 | # not influenced by our travis setup. | |
9 | echo .git > .dockerignore | |
10 | 6 | |
11 | 7 | docker build --pull --no-cache --rm -t=${BASENAME} -f ${DOCKERFILE} . |
12 | 8 | # For pull requests, travis does not add secure environment variables to the |
25 | 25 | |
26 | 26 | # Try running the tests in parallel so that the common case (tests pass) is |
27 | 27 | # quick, but fall back to running them in sequence to make debugging easier. |
28 | if ! make check | |
28 | if ! ninja test | |
29 | 29 | then |
30 | ./testcases/complete-run.pl --parallel=1 || (cat latest/complete-run.log; false) | |
30 | ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false) | |
31 | 31 | fi |