From a7192d5e5c18ff9e27a511c81374e99395f73e07 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 17 Mar 2024 21:31:11 -0300 Subject: typos & use /opt/rosenrot folder --- config.h | 4 ++-- makefile | 5 +++-- plugins/readability/readability.c | 3 ++- plugins/style/style.c | 2 +- rosenrot | Bin 40216 -> 40120 bytes 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config.h b/config.h index 729f926..5b6d678 100644 --- a/config.h +++ b/config.h @@ -34,8 +34,8 @@ To disable plugins: 3. recompile To remove plugins completely; -1. Remove the corresponding code in this file by looking for the variables above. -2. Remove PLUGIN and $(PLUGIN) from the makefiel +1. Remove the corresponding code in the rosenrot.c by looking for the variables above. +2. Remove PLUGIN and $(PLUGIN) from the makefile 3. Recompile */ diff --git a/makefile b/makefile index ab23dcd..bd59e59 100644 --- a/makefile +++ b/makefile @@ -48,6 +48,8 @@ runtime_files: sudo mkdir -p /opt/rosenrot/ sudo cp style.css /opt/rosenrot/ sudo cp -r images/flower-imgs /opt/rosenrot/ + sudo cp plugins/style/style.js /opt/rosenrot/ + sudo cp plugins/readability/readability.js /opt/rosenrot/ install: rosenrot runtime_files cp -f rosenrot /usr/bin @@ -67,8 +69,7 @@ format: $(SRC) $(PLUGINS) $(FORMATTER) $(SRC) $(PLUGINS) $(rosenrot.h) lint: - clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.1'` -o rosenrot `pkg-config --libs 'webkit2gtk-4.1'` - + clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 $(INCS) -o rosenrot $(LIBS) ## A few more commands: fast: $(SRC) $(PLUGINS) $(CONFIG) diff --git a/plugins/readability/readability.c b/plugins/readability/readability.c index 822e7c2..33df917 100644 --- a/plugins/readability/readability.c +++ b/plugins/readability/readability.c @@ -5,9 +5,10 @@ void read_readability_js(char* string) { - FILE* fp = fopen("/home/nuno/Documents/workspace/rosenrot/plugins/readability/readability.js", "r"); + FILE* fp = fopen("/opt/rosenrot/readability.js", "r"); if (!fp) { // fp is NULL, fopen failed fprintf(stderr, "Failed to open file\n"); + fprintf(stderr, "Consider running $ sudo make runtime_files\n"); string = NULL; return; } diff --git a/plugins/style/style.c b/plugins/style/style.c index bd40f6d..1c19ae1 100644 --- a/plugins/style/style.c +++ b/plugins/style/style.c @@ -5,7 +5,7 @@ void read_style_js(char* string) { - FILE* fp = fopen("/home/nuno/Documents/workspace/rosenrot/plugins/style/style.js", "r"); + FILE* fp = fopen("/opt/rosenrot/style.js", "r"); if (!fp) { // fp is NULL, fopen failed fprintf(stderr, "Failed to open file\n"); string = NULL; diff --git a/rosenrot b/rosenrot index 607788f..5170089 100755 Binary files a/rosenrot and b/rosenrot differ -- cgit v1.2.3