From 4d30c11f4c7ff59805c770ca972a24088c9f2604 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 6 Jul 2019 15:53:06 +0200 Subject: Move keybindings to a separate file --- Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 095024d..89cbf0c 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,8 @@ DATADIR = $(PREFIX)/share/badwolf PACKAGE = Badwolf DEPS = gtk+-3.0 webkit2gtk-4.0 -OBJS = badwolf +OBJS = keybindings.o +EXE = badwolf TRANS = fr.mo CC = cc @@ -15,7 +16,7 @@ CFLAGS = -g -Wall -Wextra -Wconversion -Wsign-conversion CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE LIBS = `pkg-config --libs $(DEPS)` -all: $(OBJS) $(TRANS) +all: $(EXE) $(TRANS) po/messages.pot: badwolf.c xgettext --keyword=_ --language=C -o $@ --add-comments --sort-output -j badwolf.c @@ -27,8 +28,14 @@ ${TRANS}: po/${@:.mo=.po} mkdir -p locale/${@:.mo=}/LC_MESSAGES msgfmt -o locale/${@:.mo=}/LC_MESSAGES/$(PACKAGE).mo po/${@:.mo=.po} +${EXE}: $(OBJS) + $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $(OBJS) $@.c + .c: - $(CC) -std=c11 $(CFLAGS) $(CDEPS) -o $@ $< $(LDFLAGS) $(LIBS) + $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $< + +.c.o: + $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -c -o $@ $< install: all mkdir -p $(DESTDIR)$(BINDIR) @@ -39,7 +46,7 @@ install: all cp -r locale/ $(DESTDIR)$(DATADIR) clean: - rm -fr locale $(OBJS) + rm -fr locale $(OBJS) $(EXE) format: *.c *.h clang-format -style=file -assume-filename=.clang-format -i *.c *.h -- cgit v1.3.1-23-gd82d From 768ad801aaac4012b94131f00040e3b9dc629773 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 23 Jul 2019 13:12:49 +0200 Subject: Add the git hash in the version when possible --- Makefile | 2 +- badwolf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 89cbf0c..bf27740 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ TRANS = fr.mo CC = cc CFLAGS = -g -Wall -Wextra -Wconversion -Wsign-conversion -CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE +CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE -DVERSION="$(shell ./version.sh)" LIBS = `pkg-config --libs $(DEPS)` all: $(EXE) $(TRANS) diff --git a/badwolf.c b/badwolf.c index f338b47..ca1b302 100644 --- a/badwolf.c +++ b/badwolf.c @@ -13,7 +13,7 @@ #include /* realpath(), malloc() */ const gchar *homepage = "https://hacktivis.me/projects/badwolf"; -const gchar *version = "0.3.0"; +const gchar *version = VERSION; static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data); static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView, -- cgit v1.3.1-23-gd82d From 809c1cdf80a701b3dd7fcca78ccaf211cac716c7 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 23 Jul 2019 13:20:18 +0200 Subject: Makefile: put VERSION into quotes --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bf27740..f910136 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ TRANS = fr.mo CC = cc CFLAGS = -g -Wall -Wextra -Wconversion -Wsign-conversion -CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE -DVERSION="$(shell ./version.sh)" +CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE -DVERSION=\"$(shell ./version.sh)\" LIBS = `pkg-config --libs $(DEPS)` all: $(EXE) $(TRANS) -- cgit v1.3.1-23-gd82d From 2ad6f1fb221ad94b4bf2f3cdf4c1795f6b5466a4 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 23 Jul 2019 13:42:03 +0200 Subject: Makefile: Move LIBS & LDFLAGS to badwolf creation Which fixes building with 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f910136..0152314 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ DATADIR = $(PREFIX)/share/badwolf PACKAGE = Badwolf DEPS = gtk+-3.0 webkit2gtk-4.0 -OBJS = keybindings.o +OBJS = keybindings.o badwolf.o EXE = badwolf TRANS = fr.mo @@ -28,14 +28,14 @@ ${TRANS}: po/${@:.mo=.po} mkdir -p locale/${@:.mo=}/LC_MESSAGES msgfmt -o locale/${@:.mo=}/LC_MESSAGES/$(PACKAGE).mo po/${@:.mo=.po} -${EXE}: $(OBJS) - $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $(OBJS) $@.c +badwolf: $(OBJS) + $(CC) -std=c11 -o $@ $(OBJS) $(LDFLAGS) $(LIBS) .c: $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $< .c.o: - $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -c -o $@ $< + $(CC) -std=c11 $(CFLAGS) $(CDEPS) -c -o $@ $< install: all mkdir -p $(DESTDIR)$(BINDIR) -- cgit v1.3.1-23-gd82d From 1eeb0bb995d109c8cafc730ef21ff4a1a2ef6c90 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 31 Oct 2019 13:02:49 +0100 Subject: Create and Install badwolf.desktop --- Makefile | 3 +++ badwolf.desktop | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 badwolf.desktop (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0152314..6a8fa9e 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PREFIX = /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man DATADIR = $(PREFIX)/share/badwolf +APPSDIR = $(PREFIX)/share/applications PACKAGE = Badwolf DEPS = gtk+-3.0 webkit2gtk-4.0 @@ -44,6 +45,8 @@ install: all cp -p badwolf.1 $(DESTDIR)$(MANDIR)/man1 mkdir -p $(DESTDIR)$(DATADIR)/locale cp -r locale/ $(DESTDIR)$(DATADIR) + mkdir -p $(DESTDIR)$(APPSDIR) + cp -p badwolf.desktop $(DESTDIR)$(APPSDIR)/ clean: rm -fr locale $(OBJS) $(EXE) diff --git a/badwolf.desktop b/badwolf.desktop new file mode 100644 index 0000000..2b0b21a --- /dev/null +++ b/badwolf.desktop @@ -0,0 +1,15 @@ +# https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/ +[Desktop Entry] +Version=1.1 +Type=Application +Categories=Network;WebBrowser +Comment=A minimalist and privacy-oriented web browser +Comment[fr]=Un navigateur web minimaliste et orienté vers le respect de la vie privée +Exec=badwolf %U +GenericName=Web Browser +GenericName[fr]=Navigateur Web +Icon=web-browser +Keywords=Internet;WWW;Browser;Web;WebKit;WebKitGTK +Keywords[fr]=Internet;WWW;Browser;Web;Surfer;Navigateur;WebKit;WebKitGTK +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https +Name=Badwolf -- cgit v1.3.1-23-gd82d From b2e5a2d97b1667bbcd1cc6e882d04f9a2538c26b Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 31 Oct 2019 14:13:02 +0100 Subject: messages.pot: webkit-web-extension message --- Makefile | 2 +- po/messages.pot | 47 +++++++++++++++++++++++++++++++---------------- 2 files changed, 32 insertions(+), 17 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a8fa9e..0a58cda 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ LIBS = `pkg-config --libs $(DEPS)` all: $(EXE) $(TRANS) po/messages.pot: badwolf.c - xgettext --keyword=_ --language=C -o $@ --add-comments --sort-output -j badwolf.c + xgettext --keyword=_ --language=C -o $@ --add-comments --sort-output -j --copyright-holder="Haelwenn (lanodan) Monnier " --package-name="$(PACKAGE)" --package-version="$(shell ./version.sh)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" badwolf.c po/%.po: po/messages.pot msgmerge --update $@ $< diff --git a/po/messages.pot b/po/messages.pot index 8266e03..6ce02bb 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,34 +6,36 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.1.1\n" -"POT-Creation-Date: 2019-05-11 05:03+0200\n" +"Project-Id-Version: Badwolf 0.3.0+gd88f2e7\n" +"Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" +"POT-Creation-Date: 2019-10-31 14:09+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: \"Haelwenn (lanodan) Monnier \"\n" -"Language: en\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: badwolf.c:527 badwolf.c:692 +#: badwolf.c:527 badwolf.c:692 badwolf.c:719 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:457 badwolf.c:621 +#: badwolf.c:457 badwolf.c:621 badwolf.c:643 msgid "New tab" msgstr "" -#: badwolf.c:549 badwolf.c:714 +#: badwolf.c:549 badwolf.c:714 badwolf.c:740 msgid "Open new tab" msgstr "" -#: badwolf.c:690 +#: badwolf.c:690 badwolf.c:717 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:532 badwolf.c:697 +#: badwolf.c:532 badwolf.c:697 badwolf.c:724 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" @@ -42,30 +44,43 @@ msgstr "" msgid "Toggle javascript" msgstr "" -#: badwolf.c:413 badwolf.c:572 +#: badwolf.c:382 +msgid "_Cancel" +msgstr "" + +#: badwolf.c:384 +msgid "_Save" +msgstr "" + +#: badwolf.c:413 badwolf.c:572 badwolf.c:573 msgid "search in current page" msgstr "" -#: badwolf.c:100 badwolf.c:234 +#: badwolf.c:100 badwolf.c:234 badwolf.c:118 msgid "the web process crashed.\n" msgstr "" -#: badwolf.c:104 badwolf.c:238 +#: badwolf.c:104 badwolf.c:238 badwolf.c:122 msgid "the web process exceeded the memory limit.\n" msgstr "" -#: badwolf.c:108 badwolf.c:242 +#: badwolf.c:108 badwolf.c:242 badwolf.c:126 msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:101 badwolf.c:235 +#: badwolf.c:101 badwolf.c:235 badwolf.c:119 msgid "title|Crashed" msgstr "" -#: badwolf.c:105 badwolf.c:239 +#: badwolf.c:105 badwolf.c:239 badwolf.c:123 msgid "title|Out of Memory" msgstr "" -#: badwolf.c:109 badwolf.c:243 +#: badwolf.c:109 badwolf.c:243 badwolf.c:127 msgid "title|Unknown Crash" msgstr "" + +#: badwolf.c:730 +#, c-format +msgid "webkit-web-extension directory set to: %s\n" +msgstr "" -- cgit v1.3.1-23-gd82d