summaryrefslogtreecommitdiff
path: root/src/fruits
diff options
context:
space:
mode:
Diffstat (limited to 'src/fruits')
-rw-r--r--src/fruits/cmc/meson.build5
-rw-r--r--src/fruits/cmsrv/cmsrv.c2
-rw-r--r--src/fruits/cmv/cmv.c19
-rw-r--r--src/fruits/meson.build24
4 files changed, 21 insertions, 29 deletions
diff --git a/src/fruits/cmc/meson.build b/src/fruits/cmc/meson.build
index bb9d38d..0728532 100644
--- a/src/fruits/cmc/meson.build
+++ b/src/fruits/cmc/meson.build
@@ -19,8 +19,9 @@ if use_tui
cmc_deps += [notcurses, notcurses_core, codecs_client]
endif
+cmc_link_args = []
if is_windows and not is_msvc
- cmc_args += ['-static', '-static-libgcc', '-static-libstdc++', '-mwindows', '-municode']
+ cmc_link_args += ['-mconsole', '-municode', '-static', '-static-libgcc', '-static-libstdc++']
endif
-executable('cmc', cmc_src, dependencies: cmc_deps, c_args: cmc_args, link_args: cmc_args, install: true)
+executable('cmc', cmc_src, dependencies: cmc_deps, c_args: cmc_args, link_args: cmc_link_args, install: true)
diff --git a/src/fruits/cmsrv/cmsrv.c b/src/fruits/cmsrv/cmsrv.c
index 53fbc98..b0793d1 100644
--- a/src/fruits/cmsrv/cmsrv.c
+++ b/src/fruits/cmsrv/cmsrv.c
@@ -1,7 +1,9 @@
#define AL_LOG_SECTION "cmsrv"
#include <al/log.h>
#include <nnwt/common.h>
+#ifndef NAUNET_ON_WINDOWS
#define CMSRV_LOCAL_SOCKET
+#endif
#ifdef CMSRV_LOCAL_SOCKET
#include <nnwt/line_processor.h>
#endif
diff --git a/src/fruits/cmv/cmv.c b/src/fruits/cmv/cmv.c
index a525377..58c8e32 100644
--- a/src/fruits/cmv/cmv.c
+++ b/src/fruits/cmv/cmv.c
@@ -109,12 +109,20 @@ s32 window_system_main(u32 argc, str *argv, void *extra)
{
(void)extra;
- bool local = argc > 1;
+ bool local;
#ifdef CAMU_SINK_ONLY
+ local = argc > 1;
if (local) {
log_warn("Got arguments in a sink-only configuration.");
return EXIT_FAILURE;
}
+#else
+ char *SINK_SERVER = getenv("SINK_SERVER");
+ if (SINK_SERVER && al_strscmp(SINK_SERVER, "1") == 0) {
+ local = true;
+ } else {
+ local = argc > 1;
+ }
#endif
#ifdef CAMU_HAVE_FFMPEG
@@ -177,14 +185,7 @@ s32 window_system_main(u32 argc, str *argv, void *extra)
}
#endif
- char *home_env = getenv("HOME");
- if (home_env) {
- str color_palette;
- al_str_from(&color_palette, home_env);
- al_str_cat(&color_palette, &al_str_c("/.config/colors.json"));
- camu_colors_maybe_init(&color_palette);
- al_str_free(&color_palette);
- }
+ camu_colors_default_init();
str window_name;
al_str_from(&window_name, "Sink (");
diff --git a/src/fruits/meson.build b/src/fruits/meson.build
index f53a653..b152990 100644
--- a/src/fruits/meson.build
+++ b/src/fruits/meson.build
@@ -1,6 +1,6 @@
-use_tuis = not is_windows
-
-if use_tuis and (get_option('server').enabled() or get_option('client').enabled())
+use_tuis = not is_windows and not is_android
+use_tuis = use_tuis and ('cmsrv' in get_option('fruits') or 'cmc' in get_option('fruits'))
+if use_tuis
notcurses = dependency('notcurses', required: false, allow_fallback: false)
notcurses_core = dependency('notcurses-core', required: false, allow_fallback: false)
if not notcurses.found() or not notcurses_core.found()
@@ -26,18 +26,6 @@ if use_tuis and (get_option('server').enabled() or get_option('client').enabled(
endif
endif
-if get_option('server').enabled()
- subdir('cmsrv')
-endif
-
-if get_option('client').enabled()
- subdir('cmc')
-endif
-
-if get_option('sink').enabled()
- if is_android
- subdir('ctv')
- else
- subdir('cmv')
- endif
-endif
+foreach fruit : get_option('fruits')
+ subdir(fruit)
+endforeach