]> git.sur5r.net Git - i3/i3/commitdiff
enable shmlog when invoked as i3-with-shmlog, install symlink + .desktop file
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 4 Jan 2014 11:15:50 +0000 (12:15 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 4 Jan 2014 11:18:45 +0000 (12:18 +0100)
Makefile
common.mk
i3-with-shmlog.xsession.desktop [new file with mode: 0644]
src/i3.mk
src/main.c

index b0f49e34d4062ba1c04c78e2317a725a8951cf70..ff10dcb5012e00d488ba092387e6d01b7a176868 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ dist: distclean
        [ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
        [ ! -e i3-${VERSION}.tar.bz2 ] || rm i3-${VERSION}.tar.bz2
        mkdir i3-${VERSION}
-       cp i3-migrate-config-to-v4 generate-command-parser.pl i3-sensible-* i3-dmenu-desktop i3.config.keycodes DEPENDS LICENSE PACKAGE-MAINTAINER RELEASE-NOTES-${VERSION} i3.config i3.xsession.desktop i3.applications.desktop pseudo-doc.doxygen common.mk Makefile i3-${VERSION}
+       cp i3-migrate-config-to-v4 generate-command-parser.pl i3-sensible-* i3-dmenu-desktop i3.config.keycodes DEPENDS LICENSE PACKAGE-MAINTAINER RELEASE-NOTES-${VERSION} i3.config i3.xsession.desktop i3-with-shmlog.xsession.desktop i3.applications.desktop pseudo-doc.doxygen common.mk Makefile i3-${VERSION}
        cp -r src libi3 i3-msg i3-nagbar i3-config-wizard i3bar i3-dump-log yajl-fallback include man parser-specs testcases i3-${VERSION}
        # Only copy toplevel documentation (important stuff)
        mkdir i3-${VERSION}/docs
index 23ac8e34f0efb59492647f1fda2b745f55ce7304..b946206d2319971ad928e664e694467ba3a5db04 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -2,6 +2,7 @@ UNAME=$(shell uname)
 DEBUG=1
 COVERAGE=0
 INSTALL=install
+LN=ln
 ifndef PREFIX
   PREFIX=/usr
 endif
diff --git a/i3-with-shmlog.xsession.desktop b/i3-with-shmlog.xsession.desktop
new file mode 100644 (file)
index 0000000..8cd9431
--- /dev/null
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Name=i3 (with debug log)
+Comment=improved dynamic tiling window manager
+Exec=i3-with-shmlog
+Type=Application
index 395b4cfaf96ea84b2977db3624fdf74715ce011d..523959df99e074552374ddc9ac7a74a7f13a31d1 100644 (file)
--- a/src/i3.mk
+++ b/src/i3.mk
@@ -74,6 +74,7 @@ install-i3: i3
        $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions
        $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/applications
        $(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/
+       $(LN) -s i3 $(DESTDIR)$(PREFIX)/bin/i3-with-shmlog
        $(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
        $(INSTALL) -m 0755 i3-sensible-editor $(DESTDIR)$(PREFIX)/bin/
        $(INSTALL) -m 0755 i3-sensible-pager $(DESTDIR)$(PREFIX)/bin/
index 6028e1ddf92aab87168f3f156b1967c97b78281e..9f92207b0b29d2cabe89bfe4d2c5bba2debb450b 100644 (file)
@@ -295,7 +295,7 @@ int main(int argc, char *argv[]) {
     init_logging();
 
     /* On release builds, disable SHM logging by default. */
-    shmlog_size = (is_debug_build() ? default_shmlog_size : 0);
+    shmlog_size = (is_debug_build() || strstr(argv[0], "i3-with-shmlog") != NULL ? default_shmlog_size : 0);
 
     start_argv = argv;