core: add binary weechat-headless to run WeeChat without interface (closes #1120)

The optional command line option "--daemon" runs WeeChat like a daemon
(fork, new process group, file descriptors closed).
This commit is contained in:
Sébastien Helleu 2018-03-11 09:59:39 +01:00
parent 0126b03f47
commit 805717e9ec
68 changed files with 1844 additions and 680 deletions

View File

@ -82,7 +82,8 @@ else()
set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
endif() endif()
option(ENABLE_NCURSES "Enable Ncurses interface" ON) option(ENABLE_NCURSES "Compile the Ncurses interface" ON)
option(ENABLE_HEADLESS "Compile the headless binary (required for tests)" ON)
option(ENABLE_NLS "Enable Native Language Support" ON) option(ENABLE_NLS "Enable Native Language Support" ON)
option(ENABLE_GNUTLS "Enable SSLv3/TLS support" ON) option(ENABLE_GNUTLS "Enable SSLv3/TLS support" ON)
option(ENABLE_LARGEFILE "Enable Large File Support" ON) option(ENABLE_LARGEFILE "Enable Large File Support" ON)
@ -114,6 +115,11 @@ option(ENABLE_MAN "Enable build of man page" OFF)
option(ENABLE_DOC "Enable build of documentation" OFF) option(ENABLE_DOC "Enable build of documentation" OFF)
option(ENABLE_TESTS "Enable tests" OFF) option(ENABLE_TESTS "Enable tests" OFF)
# headless mode is required for tests
if(ENABLE_TESTS AND NOT ENABLE_HEADLESS)
message(FATAL_ERROR "Headless mode is required for tests.")
endif()
# option WEECHAT_HOME # option WEECHAT_HOME
if(NOT DEFINED WEECHAT_HOME OR "${WEECHAT_HOME}" STREQUAL "") if(NOT DEFINED WEECHAT_HOME OR "${WEECHAT_HOME}" STREQUAL "")
set(WEECHAT_HOME "~/.weechat") set(WEECHAT_HOME "~/.weechat")

View File

@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features:: New features::
* core: add binary weechat-headless to run WeeChat without interface, with optional daemon mode (command line option "--daemon") (issue #1120)
* core: add options "-newbuffer", "-free" and "-switch" in command /print (issue #1113) * core: add options "-newbuffer", "-free" and "-switch" in command /print (issue #1113)
* core: add option "-y" in command /print, add support of buffers with free content * core: add option "-y" in command /print, add support of buffers with free content
* core: add option "add" in command /buffer (issue #1113) * core: add option "add" in command /buffer (issue #1113)

View File

@ -137,6 +137,7 @@ AH_VERBATIM([CA_FILE], [#define CA_FILE "/etc/ssl/certs/ca-certificates.crt"])
# Arguments for ./configure # Arguments for ./configure
AC_ARG_ENABLE(ncurses, [ --disable-ncurses turn off ncurses interface (default=compiled if found)],enable_ncurses=$enableval,enable_ncurses=yes) AC_ARG_ENABLE(ncurses, [ --disable-ncurses turn off ncurses interface (default=compiled if found)],enable_ncurses=$enableval,enable_ncurses=yes)
AC_ARG_ENABLE(headless, [ --disable-headless turn off headless binary (default=compiled), this is required for tests],enable_headless=$enableval,enable_headless=yes)
AC_ARG_ENABLE(gnutls, [ --disable-gnutls turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes) AC_ARG_ENABLE(gnutls, [ --disable-gnutls turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Support (default=on)],enable_largefile=$enableval,enable_largefile=yes) AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Support (default=on)],enable_largefile=$enableval,enable_largefile=yes)
AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes) AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes)
@ -185,6 +186,10 @@ AC_DEFINE_UNQUOTED(CA_FILE, "$CA_FILE")
not_asked="" not_asked=""
not_found="" not_found=""
if test "x$enable_headless" != "xyes" && test "x$enable_tests" = "xyes"; then
AC_MSG_ERROR([*** Headless mode is required for tests.])
fi
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# pkg-config # pkg-config
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -241,6 +246,14 @@ else
not_asked="$not_asked ncurses" not_asked="$not_asked ncurses"
fi fi
# ------------------------------------------------------------------------------
# headless
# ------------------------------------------------------------------------------
if test "x$enable_headless" != "xyes" ; then
not_asked="$not_asked headless"
fi
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# iconv # iconv
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -1375,6 +1388,7 @@ AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes") AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
AM_CONDITIONAL(HAVE_EAT_NEWLINE_GLITCH, test "$enable_eatnewlineglitch" = "yes") AM_CONDITIONAL(HAVE_EAT_NEWLINE_GLITCH, test "$enable_eatnewlineglitch" = "yes")
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes") AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
AM_CONDITIONAL(HEADLESS, test "$enable_headless" = "yes")
AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes") AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes") AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
AM_CONDITIONAL(PLUGIN_BUFLIST, test "$enable_buflist" = "yes") AM_CONDITIONAL(PLUGIN_BUFLIST, test "$enable_buflist" = "yes")
@ -1437,6 +1451,8 @@ AC_OUTPUT([Makefile
src/plugins/xfer/Makefile src/plugins/xfer/Makefile
src/gui/Makefile src/gui/Makefile
src/gui/curses/Makefile src/gui/curses/Makefile
src/gui/curses/normal/Makefile
src/gui/curses/headless/Makefile
tests/Makefile tests/Makefile
intl/Makefile intl/Makefile
po/Makefile.in]) po/Makefile.in])
@ -1449,11 +1465,14 @@ listgui=""
if test "x$enable_ncurses" = "xyes" ; then if test "x$enable_ncurses" = "xyes" ; then
listgui="$listgui ncurses" listgui="$listgui ncurses"
fi fi
if test "x$enable_headless" = "xyes" ; then
listgui="$listgui headless"
fi
if test "x$listgui" = "x" ; then if test "x$listgui" = "x" ; then
AC_MSG_ERROR([ AC_MSG_ERROR([
*** No interface specified... *** No interface specified...
*** Please enable at least ncurses.]) *** Please enable at least ncurses or headless.])
fi fi
listplugins="" listplugins=""

View File

@ -1,4 +1,7 @@
usr/bin/weechat usr/bin/weechat
usr/bin/weechat-headless
debian/weechat.xpm usr/share/pixmaps debian/weechat.xpm usr/share/pixmaps
usr/share/man/man1/weechat.1 usr/share/man/man1/weechat.1
usr/share/man/*/man1/weechat.1 usr/share/man/*/man1/weechat.1
usr/share/man/man1/weechat-headless.1
usr/share/man/*/man1/weechat-headless.1

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (cs)" COMMENT "Building weechat.1 (cs)"
) )
add_custom_target(doc-man-cs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-cs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/cs/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/cs/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.cs.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.cs.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (cs)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/cs/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,11 @@
*-c*, *--colors*:: *-c*, *--colors*::
Zobraz defaultní barvy v terminálu. Zobraz defaultní barvy v terminálu.
// TRANSLATION MISSING
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
*-d*, *--dir* _<path>_:: *-d*, *--dir* _<path>_::
Nastav cestu jako dovmský adresář pro WeeChat (použitou pro konfigurační Nastav cestu jako dovmský adresář pro WeeChat (použitou pro konfigurační
soubory, logy, uživatelské pluginy a skripty), výchozí hodnota je soubory, logy, uživatelské pluginy a skripty), výchozí hodnota je

View File

@ -20,12 +20,18 @@ weechat - the extensible chat client
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== POPIS == POPIS
WeeChat (Wee Enhanced Environment for Chat) je svobodný chatovací klient. WeeChat (Wee Enhanced Environment for Chat) je svobodný chatovací klient.
Je lehký, plně konfigurovatelný a lehce rozšiřitelný pomocí pluginů a scriptů Je lehký, plně konfigurovatelný a lehce rozšiřitelný pomocí pluginů a scriptů
v obvyklých sciptovacích jazycích. v obvyklých sciptovacích jazycích.
// TRANSLATION MISSING
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== VOLBY == VOLBY

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (de)" COMMENT "Building weechat.1 (de)"
) )
add_custom_target(doc-man-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/de/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/de/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.de.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.de.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (de)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/de/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,11 @@
*-c*, *--colors*:: *-c*, *--colors*::
zeigt die Standardfarben im Terminal an. zeigt die Standardfarben im Terminal an.
// TRANSLATION MISSING
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
*-d*, *--dir* _<path>_:: *-d*, *--dir* _<path>_::
legt den Konfigurationsordner für WeeChat fest in welchem die Erweiterungen, legt den Konfigurationsordner für WeeChat fest in welchem die Erweiterungen,
Skripten, Protokolldateien etc.pp. gesichert werden (Voreinstellung: "~/.weechat"). Skripten, Protokolldateien etc.pp. gesichert werden (Voreinstellung: "~/.weechat").

View File

@ -19,12 +19,18 @@ weechat - der erweiterbare Chat Client
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== BESCHREIBUNG == BESCHREIBUNG
WeeChat (Wee Enhanced Environment for Chat) ist ein freier, schneller und WeeChat (Wee Enhanced Environment for Chat) ist ein freier, schneller und
schlanker Chat-Client der für unterschiedliche Betriebssysteme entwickelt wird. schlanker Chat-Client der für unterschiedliche Betriebssysteme entwickelt wird.
Durch Skripten ist das Hauptprogramm äußerst flexibel und erweiterbar. Durch Skripten ist das Hauptprogramm äußerst flexibel und erweiterbar.
// TRANSLATION MISSING
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== OPTIONEN == OPTIONEN
include::cmdline_options.de.adoc[] include::cmdline_options.de.adoc[]

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (en)" COMMENT "Building weechat.1 (en)"
) )
add_custom_target(doc-man-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.en.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.en.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (en)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,10 @@
*-c*, *--colors*:: *-c*, *--colors*::
Display default colors in terminal. Display default colors in terminal.
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
*-d*, *--dir* _<path>_:: *-d*, *--dir* _<path>_::
Set path as home for WeeChat (used for configuration files, logs, user Set path as home for WeeChat (used for configuration files, logs, user
plugins and scripts), default value is "~/.weechat" (note: directory is plugins and scripts), default value is "~/.weechat" (note: directory is

View File

@ -19,12 +19,17 @@ weechat - the extensible chat client
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== DESCRIPTION == DESCRIPTION
WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and
light, designed for many operating systems. light, designed for many operating systems.
It is highly customizable and extensible with scripts. It is highly customizable and extensible with scripts.
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== OPTIONS == OPTIONS
include::cmdline_options.en.adoc[] include::cmdline_options.en.adoc[]

View File

@ -60,41 +60,43 @@ The main WeeChat directories are:
[width="100%",cols="1m,3",options="header"] [width="100%",cols="1m,3",options="header"]
|=== |===
| Directory | Description | Directory | Description
| src/ | Root of sources. | src/ | Root of sources.
|    core/ | Core functions: entry point, internal structures. |    core/ | Core functions: entry point, internal structures.
|    gui/ | Functions for buffers, windows, ... (used by all interfaces). |    gui/ | Functions for buffers, windows, ... (used by all interfaces).
|       curses/ | Curses interface. |       curses/ | Curses interface.
|    plugins/ | Plugin and scripting API. |          headless/ | Headless mode (no interface).
|       alias/ | Alias plugin. |          normal/ | Curses interface.
|       aspell/ | Aspell plugin. |    plugins/ | Plugin and scripting API.
|       buflist/ | Buflist plugin. |       alias/ | Alias plugin.
|       charset/ | Charset plugin. |       aspell/ | Aspell plugin.
|       exec/ | Exec plugin. |       buflist/ | Buflist plugin.
|       fifo/ | Fifo plugin (FIFO pipe used to remotely send commands to WeeChat). |       charset/ | Charset plugin.
|       fset/ | Fset (Fast Set) plugin. |       exec/ | Exec plugin.
|       guile/ | Guile (scheme) scripting API. |       fifo/ | Fifo plugin (FIFO pipe used to remotely send commands to WeeChat).
|       irc/ | IRC (Internet Relay Chat) plugin. |       fset/ | Fset (Fast Set) plugin.
|       javascript/ | JavaScript scripting API. |       guile/ | Guile (scheme) scripting API.
|       logger/ | Logger plugin (write messages displayed to files). |       irc/ | IRC (Internet Relay Chat) plugin.
|       lua/ | Lua scripting API. |       javascript/ | JavaScript scripting API.
|       perl/ | Perl scripting API. |       logger/ | Logger plugin (write messages displayed to files).
|       php/ | PHP scripting API. |       lua/ | Lua scripting API.
|       python/ | Python scripting API. |       perl/ | Perl scripting API.
|       relay/ | Relay plugin (irc proxy + relay for remote interfaces). |       php/ | PHP scripting API.
|       ruby/ | Ruby scripting API. |       python/ | Python scripting API.
|       script/ | Script manager. |       relay/ | Relay plugin (irc proxy + relay for remote interfaces).
|       tcl/ | Tcl scripting API. |       ruby/ | Ruby scripting API.
|       trigger/ | Trigger plugin. |       script/ | Script manager.
|       xfer/ | Xfer plugin (IRC DCC file/chat). |       tcl/ | Tcl scripting API.
| tests/ | Tests. |       trigger/ | Trigger plugin.
|    scripts/ | Scripting API tests. |       xfer/ | Xfer plugin (IRC DCC file/chat).
|       python/ | Python scripts to generate and run the scripting API tests. | tests/ | Tests.
|    unit/ | Unit tests. |    scripts/ | Scripting API tests.
|       core/ | Unit tests for core functions. |       python/ | Python scripts to generate and run the scripting API tests.
| doc/ | Documentation. |    unit/ | Unit tests.
| po/ | Translations files (gettext). |       core/ | Unit tests for core functions.
| debian/ | Debian packaging. | doc/ | Documentation.
| po/ | Translations files (gettext).
| debian/ | Debian packaging.
|=== |===
[[sources]] [[sources]]
@ -168,7 +170,11 @@ WeeChat "core" is located in following directories:
|       gui-curses-mouse.c | Mouse. |       gui-curses-mouse.c | Mouse.
|       gui-curses-term.c | Functions about terminal. |       gui-curses-term.c | Functions about terminal.
|       gui-curses-window.c | Windows. |       gui-curses-window.c | Windows.
|       main.c | Entry point. |       headless/ | Headless mode (no interface).
|          main.c | Entry point for headless mode.
|          ncurses-fake.c | Fake ncurses library.
|       normal/ | Curses interface.
|          main.c | Entry point for Curses interface.
|=== |===
[[sources_plugins]] [[sources_plugins]]

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (fr)" COMMENT "Building weechat.1 (fr)"
) )
add_custom_target(doc-man-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/fr/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/fr/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.fr.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.fr.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (fr)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/fr/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,10 @@
*-c*, *--colors*:: *-c*, *--colors*::
Afficher les couleurs par défaut du terminal. Afficher les couleurs par défaut du terminal.
*--daemon*::
Lancer WeeChat en tâche de fond, comme un daemon (fonctionne seulement avec
la commande *weechat-headless*).
*-d*, *--dir* _<répertoire>_:: *-d*, *--dir* _<répertoire>_::
Définir le répertoire comme étant la base de WeeChat Définir le répertoire comme étant la base de WeeChat
(utilisé pour les fichiers de configuration, logs, extensions (utilisé pour les fichiers de configuration, logs, extensions

View File

@ -19,12 +19,18 @@ weechat - le client de discussion extensible
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== DESCRIPTION == DESCRIPTION
WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre, WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre,
rapide et léger, conçu pour différents systèmes d'exploitation. rapide et léger, conçu pour différents systèmes d'exploitation.
Il est hautement paramétrable et extensible avec des scripts. Il est hautement paramétrable et extensible avec des scripts.
La commande *weechat-headless* lance WeeChat en mode « headless » (sans interface).
Elle peut être utilisée pour des tests ou lancer WeeChat en daemon
avec l'option "--daemon".
== OPTIONS == OPTIONS
include::cmdline_options.fr.adoc[] include::cmdline_options.fr.adoc[]

View File

@ -62,41 +62,43 @@ Les répertoires principaux de WeeChat sont :
[width="100%",cols="1m,3",options="header"] [width="100%",cols="1m,3",options="header"]
|=== |===
| Répertoire | Description | Répertoire | Description
| src/ | Racine des sources. | src/ | Racine des sources.
|    core/ | Fonctions du cœur : point d'entrée, structures internes. |    core/ | Fonctions du cœur : point d'entrée, structures internes.
|    gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces). |    gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces).
|       curses/ | Interface Curses. |       curses/ | Interface Curses.
|    plugins/ | API extension/script. |          headless/ | Mode sans interface (« headless »).
|       alias/ | Extension Alias. |          normal/ | Interface Curses.
|       aspell/ | Extension Aspell. |    plugins/ | API extension/script.
|       buflist/ | Extension Buflist. |       alias/ | Extension Alias.
|       charset/ | Extension Charset. |       aspell/ | Extension Aspell.
|       exec/ | Extension Exec. |       buflist/ | Extension Buflist.
|       fifo/ | Extension Fifo (tube FIFO utilisé pour envoyer des commandes à WeeChat). |       charset/ | Extension Charset.
|       fset/ | Extension Fset (Fast Set). |       exec/ | Extension Exec.
|       guile/ | API script Guile (scheme). |       fifo/ | Extension Fifo (tube FIFO utilisé pour envoyer des commandes à WeeChat).
|       irc/ | Extension IRC (Internet Relay Chat). |       fset/ | Extension Fset (Fast Set).
|       javascript/ | API script JavaScript. |       guile/ | API script Guile (scheme).
|       logger/ | Extension Logger (enregistrer les messages affichés dans des fichiers). |       irc/ | Extension IRC (Internet Relay Chat).
|       lua/ | API script Lua. |       javascript/ | API script JavaScript.
|       perl/ | API script Perl. |       logger/ | Extension Logger (enregistrer les messages affichés dans des fichiers).
|       php/ | API script PHP. |       lua/ | API script Lua.
|       python/ | API script Python. |       perl/ | API script Perl.
|       relay/ | Extension Relay (proxy IRC + relai pour interfaces distantes). |       php/ | API script PHP.
|       ruby/ | API script Ruby. |       python/ | API script Python.
|       script/ | Gestionnaire de scripts. |       relay/ | Extension Relay (proxy IRC + relai pour interfaces distantes).
|       tcl/ | API script Tcl. |       ruby/ | API script Ruby.
|       trigger/ | Extension Trigger. |       script/ | Gestionnaire de scripts.
|       xfer/ | Extension Xfer (IRC DCC fichier/discussion). |       tcl/ | API script Tcl.
| tests/ | Tests. |       trigger/ | Extension Trigger.
|    scripts/ | Tests de l'API script. |       xfer/ | Extension Xfer (IRC DCC fichier/discussion).
|       python/ | Scripts Python pour générer et lancer les tests de l'API script. | tests/ | Tests.
|    unit/ | Tests unitaires. |    scripts/ | Tests de l'API script.
|       core/ | Tests unitaires pour les fonctions du cœur. |       python/ | Scripts Python pour générer et lancer les tests de l'API script.
| doc/ | Documentation. |    unit/ | Tests unitaires.
| po/ | Fichiers de traductions (gettext). |       core/ | Tests unitaires pour les fonctions du cœur.
| debian/ | Empaquetage Debian. | doc/ | Documentation.
| po/ | Fichiers de traductions (gettext).
| debian/ | Empaquetage Debian.
|=== |===
[[sources]] [[sources]]
@ -170,7 +172,11 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|       gui-curses-mouse.c | Souris. |       gui-curses-mouse.c | Souris.
|       gui-curses-term.c | Fonctions pour le terminal. |       gui-curses-term.c | Fonctions pour le terminal.
|       gui-curses-window.c | Fenêtres. |       gui-curses-window.c | Fenêtres.
|       main.c | Point d'entrée. |       headless/ | Mode sans interface (« headless »).
|          main.c | Point d'entrée pour le mode sans interface.
|          ncurses-fake.c | Fausse bibliothèque ncurses.
|       normal/ | Interface Curses.
|          main.c | Point d'entrée pour l'interface Curses.
|=== |===
[[sources_plugins]] [[sources_plugins]]

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (it)" COMMENT "Building weechat.1 (it)"
) )
add_custom_target(doc-man-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/it/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/it/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.it.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.it.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (it)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/it/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,11 @@
*-c*, *--colors*:: *-c*, *--colors*::
Mostra i colori prefefiniti nel terminale. Mostra i colori prefefiniti nel terminale.
// TRANSLATION MISSING
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
// TRANSLATION MISSING // TRANSLATION MISSING
*-d*, *--dir* _<path>_:: *-d*, *--dir* _<path>_::
Imposta una directory come home per WeeChat (utilizzata per i file di Imposta una directory come home per WeeChat (utilizzata per i file di

View File

@ -21,6 +21,8 @@ weechat - the extensible chat client
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== DESCRIPTION == DESCRIPTION
// TRANSLATION MISSING // TRANSLATION MISSING
@ -28,6 +30,10 @@ WeeChat (Wee Enhanced Environment for Chat) è un client di chat
libero, veloce e leggero, realizzato per diversi sistemi operativi. libero, veloce e leggero, realizzato per diversi sistemi operativi.
It is highly customizable and extensible with scripts. It is highly customizable and extensible with scripts.
// TRANSLATION MISSING
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== OPTIONS == OPTIONS
include::cmdline_options.it.adoc[] include::cmdline_options.it.adoc[]

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (ja)" COMMENT "Building weechat.1 (ja)"
) )
add_custom_target(doc-man-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/ja/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/ja/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.ja.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.ja.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (ja)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/ja/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,11 @@
*-c*, *--colors*:: *-c*, *--colors*::
端末にデフォルト色を表示 端末にデフォルト色を表示
// TRANSLATION MISSING
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
*-d*, *--dir* _<path>_:: *-d*, *--dir* _<path>_::
WeeChat のホームディレクトリを path に設定 (設定ファイル、ログ、 WeeChat のホームディレクトリを path に設定 (設定ファイル、ログ、
ユーザプラグイン、スクリプトに利用される)、初期値は "~/.weechat" 。 ユーザプラグイン、スクリプトに利用される)、初期値は "~/.weechat" 。

View File

@ -19,12 +19,18 @@ weechat - 拡張可能なチャットクライアント
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== 説明 == 説明
WeeChat (Wee Enhanced Environment for Chat) はフリーのチャットクライアントです。 WeeChat (Wee Enhanced Environment for Chat) はフリーのチャットクライアントです。
高速で軽量、多くのオペレーティングシステムで動くように設計されています。 高速で軽量、多くのオペレーティングシステムで動くように設計されています。
スクリプトを使って高度にカスタマイズと拡張可能です。 スクリプトを使って高度にカスタマイズと拡張可能です。
// TRANSLATION MISSING
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== オプション == オプション
include::cmdline_options.ja.adoc[] include::cmdline_options.ja.adoc[]

View File

@ -66,41 +66,44 @@ qweechat::
[width="100%",cols="1m,3",options="header"] [width="100%",cols="1m,3",options="header"]
|=== |===
| ディレクトリ | 説明 | ディレクトリ | 説明
| src/ | ソースコードのルートディレクトリ | src/ | ソースコードのルートディレクトリ
|    core/ | コア関数: エントリポイント、内部構造体 |    core/ | コア関数: エントリポイント、内部構造体
|    gui/ | バッファ、ウィンドウ、... を操作する関数 (全てのインターフェイスで使う) |    gui/ | バッファ、ウィンドウ、... を操作する関数 (全てのインターフェイスで使う)
|       curses/ | curses インターフェイス |       curses/ | curses インターフェイス
|    plugins/ | プラグインとスクリプト向け API // TRANSLATION MISSING
|       alias/ | alias プラグイン |          headless/ | Headless mode (no interface).
|       aspell/ | aspell プラグイン |          normal/ | curses インターフェイス
|       buflist/ | buflist プラグイン |    plugins/ | プラグインとスクリプト向け API
|       charset/ | charset プラグイン |       alias/ | alias プラグイン
|       exec/ | exec プラグイン |       aspell/ | aspell プラグイン
|       fifo/ | fifo プラグイン (WeeChat にコマンドを送信する FIFO パイプ) |       buflist/ | buflist プラグイン
|       fset/ | fset (高速設定) プラグイン |       charset/ | charset プラグイン
|       guile/ | guile (scheme) スクリプト用 API |       exec/ | exec プラグイン
|       irc/ | IRC (Internet Relay Chat) プラグイン |       fifo/ | fifo プラグイン (WeeChat にコマンドを送信する FIFO パイプ)
|       javascript/ | javascript スクリプト用 API |       fset/ | fset (高速設定) プラグイン
|       logger/ | logger プラグイン (表示されたメッセージをファイルに書き込む) |       guile/ | guile (scheme) スクリプト用 API
|       lua/ | lua スクリプト用 API |       irc/ | IRC (Internet Relay Chat) プラグイン
|       perl/ | perl スクリプト用 API |       javascript/ | javascript スクリプト用 API
|       php/ | php スクリプト用 API |       logger/ | logger プラグイン (表示されたメッセージをファイルに書き込む)
|       python/ | python スクリプト用 API |       lua/ | lua スクリプト用 API
|       relay/ | relay プラグイン (irc プロキシ + リモートインターフェイス用の中継) |       perl/ | perl スクリプト用 API
|       ruby/ | ruby スクリプト用 API |       php/ | php スクリプト用 API
|       script/ | スクリプトマネージャ |       python/ | python スクリプト用 API
|       tcl/ | tcl スクリプト用 API |       relay/ | relay プラグイン (irc プロキシ + リモートインターフェイス用の中継)
|       trigger/ | trigger プラグイン |       ruby/ | ruby スクリプト用 API
|       xfer/ | xfer (IRC DCC ファイル/チャット) |       script/ | スクリプトマネージャ
| tests/ | テスト |       tcl/ | tcl スクリプト用 API
|    scripts/ | スクリプト API テスト |       trigger/ | trigger プラグイン
|       python/ | スクリプト API テストを生成、実行する Python スクリプト |       xfer/ | xfer (IRC DCC ファイル/チャット)
|    unit/ | 単体テスト | tests/ | テスト
|       core/ | コア関数の単体テスト |    scripts/ | スクリプト API テスト
| doc/ | 文書 |       python/ | スクリプト API テストを生成、実行する Python スクリプト
| po/ | 翻訳ファイル (gettext) |    unit/ | 単体テスト
| debian/ | Debian パッケージ用 |       core/ | コア関数の単体テスト
| doc/ | 文書
| po/ | 翻訳ファイル (gettext)
| debian/ | Debian パッケージ用
|=== |===
[[sources]] [[sources]]
@ -174,7 +177,16 @@ WeeChat "core" は以下のディレクトリに配置されています:
|       gui-curses-mouse.c | マウス |       gui-curses-mouse.c | マウス
|       gui-curses-term.c | 端末についての関数 |       gui-curses-term.c | 端末についての関数
|       gui-curses-window.c | ウィンドウ |       gui-curses-window.c | ウィンドウ
|       main.c | エントリポイント // TRANSLATION MISSING
|       headless/ | Headless mode (no interface).
// TRANSLATION MISSING
|          main.c | Entry point for headless mode.
// TRANSLATION MISSING
|          ncurses-fake.c | Fake ncurses library.
// TRANSLATION MISSING
|       normal/ | Curses interface.
// TRANSLATION MISSING
|          main.c | Entry point for Curses interface.
|=== |===
[[sources_plugins]] [[sources_plugins]]

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (pl)" COMMENT "Building weechat.1 (pl)"
) )
add_custom_target(doc-man-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/pl/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/pl/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.pl.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.pl.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (pl)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/pl/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,11 @@
*-c*, *--colors*:: *-c*, *--colors*::
Wyświetla domślne kolory w terminalu. Wyświetla domślne kolory w terminalu.
// TRANSLATION MISSING
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
*-d*, *--dir* _<ścieżka>_:: *-d*, *--dir* _<ścieżka>_::
Ustawia ścieżkę jako katalog domowy WeeChat (używany dla plików Ustawia ścieżkę jako katalog domowy WeeChat (używany dla plików
konfiguracyjnych, logów, wtyczek użytkownika i skryptów), domyślna wartość konfiguracyjnych, logów, wtyczek użytkownika i skryptów), domyślna wartość

View File

@ -19,12 +19,18 @@ weechat - rozszerzalny klient rozmów
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== OPIS == OPIS
WeeChat (Wee Enhanced Environment for Chat) to darmowy klient rozmów, szybki WeeChat (Wee Enhanced Environment for Chat) to darmowy klient rozmów, szybki
i lekki, przeznaczony dla wielu systemów operacyjnych. i lekki, przeznaczony dla wielu systemów operacyjnych.
Posiada dużo opcji konfiguracyjnych i dodatkowych wtyczek. Posiada dużo opcji konfiguracyjnych i dodatkowych wtyczek.
// TRANSLATION MISSING
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== OPCJE == OPCJE
include::cmdline_options.pl.adoc[] include::cmdline_options.pl.adoc[]

View File

@ -28,8 +28,22 @@ if(ENABLE_MAN)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building weechat.1 (ru)" COMMENT "Building weechat.1 (ru)"
) )
add_custom_target(doc-man-ru ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1) add_custom_target(doc-man-weechat-ru ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/ru/man1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.1 DESTINATION ${MANDIR}/ru/man1)
# symbolic link weechat-headless.1 -> weechat.1
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-headless.1"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat.1" "weechat-headless.1"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat.1.ru.adoc
${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.ru.adoc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link weechat-headless.1 (ru)"
)
add_custom_target(doc-man-weechat-headless-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-headless.1 DESTINATION ${MANDIR}/ru/man1)
endif() endif()
if(ENABLE_DOC) if(ENABLE_DOC)

View File

@ -4,6 +4,11 @@
*-c*, *--colors*:: *-c*, *--colors*::
Вывести в терминал умолчальные цвета. Вывести в терминал умолчальные цвета.
// TRANSLATION MISSING
*--daemon*::
Run WeeChat in background, as a daemon (works only with the command
*weechat-headless*).
*-d*, *--dir* _<путь>_:: *-d*, *--dir* _<путь>_::
Установить <путь> как домашнюю директорию для WeeChat (используется для Установить <путь> как домашнюю директорию для WeeChat (используется для
конфигурационных файлов, логов, пользовательских плагинов и скриптов). конфигурационных файлов, логов, пользовательских плагинов и скриптов).

View File

@ -20,12 +20,18 @@ weechat - расширяемый чат-клиент
*weechat* [-l|--license] *weechat* [-l|--license]
*weechat* [-v|--version] *weechat* [-v|--version]
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
== ОПИСАНИЕ == ОПИСАНИЕ
WeeChat (Wee Enhanced Environment for Chat) это свободный чат-клиент - быстрый и легкий, WeeChat (Wee Enhanced Environment for Chat) это свободный чат-клиент - быстрый и легкий,
он подходит для большинства операционных систем. он подходит для большинства операционных систем.
Его легко настроить, кроме того, вы можете расширить его функицонал при помощи скриптов. Его легко настроить, кроме того, вы можете расширить его функицонал при помощи скриптов.
// TRANSLATION MISSING
The command *weechat-headless* runs WeeChat in a headless mode (no interface).
It can be used for tests or to daemonize WeeChat with the option "--daemon".
== ПАРАМЕТРЫ == ПАРАМЕТРЫ
include::cmdline_options.ru.adoc[] include::cmdline_options.ru.adoc[]

View File

@ -55,7 +55,8 @@
./src/gui/curses/gui-curses-main.c ./src/gui/curses/gui-curses-main.c
./src/gui/curses/gui-curses-mouse.c ./src/gui/curses/gui-curses-mouse.c
./src/gui/curses/gui-curses-window.c ./src/gui/curses/gui-curses-window.c
./src/gui/curses/main.c ./src/gui/curses/normal/main.c
./src/gui/curses/headless/main.c
./src/gui/gui-bar.c ./src/gui/gui-bar.c
./src/gui/gui-bar.h ./src/gui/gui-bar.h
./src/gui/gui-bar-item.c ./src/gui/gui-bar-item.c

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -173,6 +173,19 @@ msgstr ""
" -v, --version\t\t\t\tzobraz verzi WeeChatu\n" " -v, --version\t\t\t\tzobraz verzi WeeChatu\n"
" plugin:option\t\t\t\tvolba pro plugin (viz: man weechat)\n" " plugin:option\t\t\t\tvolba pro plugin (viz: man weechat)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Chyba: chybí argument pro volbu \"%s\"\n" msgstr "Chyba: chybí argument pro volbu \"%s\"\n"
@ -194,6 +207,9 @@ msgstr "Chyba: domovský adresář (%s) není adresářem\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Chyba: nemohu vytvořit adresář \"%s\"\n" msgstr "Chyba: nemohu vytvořit adresář \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
#, fuzzy #, fuzzy
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
@ -4423,6 +4439,18 @@ msgstr "Myš je vypnuta"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', velikost: %dx%d" msgstr " TERM='%s', velikost: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "chyba"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -12069,9 +12097,6 @@ msgstr "poslán"
msgid "received from" msgid "received from"
msgstr "obdržen od" msgstr "obdržen od"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "SELHALO" msgstr "SELHALO"

View File

@ -24,7 +24,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-22 20:54+0100\n" "PO-Revision-Date: 2018-02-22 20:54+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n" "Language-Team: German <kde-i18n-de@kde.org>\n"
@ -182,6 +182,19 @@ msgstr ""
" plugin:option Einstellungen für Erweiterungen (siehe man " " plugin:option Einstellungen für Erweiterungen (siehe man "
"weechat)\n" "weechat)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Fehler: fehlendes Argument für die Einstellung \"%s\"\n" msgstr "Fehler: fehlendes Argument für die Einstellung \"%s\"\n"
@ -205,6 +218,9 @@ msgstr "Fehler: HOME (%s) ist kein Verzeichnis\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Fehler: Das Verzeichnis \"%s\" kann nicht anlegt werden\n" msgstr "Fehler: Das Verzeichnis \"%s\" kann nicht anlegt werden\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -5283,6 +5299,18 @@ msgstr "Maus ist inaktiv"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', Größe: %dx%d" msgstr " TERM='%s', Größe: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "Fehler"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -14111,9 +14139,6 @@ msgstr "gesendet an"
msgid "received from" msgid "received from"
msgstr "empfangen von" msgstr "empfangen von"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "FEHLGESCHLAGEN" msgstr "FEHLGESCHLAGEN"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -184,6 +184,19 @@ msgstr ""
" (ver la documentación del plugin para más información\n" " (ver la documentación del plugin para más información\n"
" sobre posibles opciones)\n" " sobre posibles opciones)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Error: falta un argumento para la opción \"%s\"\n" msgstr "Error: falta un argumento para la opción \"%s\"\n"
@ -206,6 +219,9 @@ msgstr "Error: home (%s) no es un directorio\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Error: no es posible crear el directorio \"%s\"\n" msgstr "Error: no es posible crear el directorio \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -4616,6 +4632,18 @@ msgstr "Ratón desactivado"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', tamaño: %dx%d" msgstr " TERM='%s', tamaño: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "error"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -12342,9 +12370,6 @@ msgstr "enviado a"
msgid "received from" msgid "received from"
msgstr "recibido de" msgstr "recibido de"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "FALLÓ" msgstr "FALLÓ"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 12:03+0100\n"
"PO-Revision-Date: 2018-02-19 21:27+0100\n" "PO-Revision-Date: 2018-03-10 12:06+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n" "Language: fr\n"
@ -173,6 +173,23 @@ msgstr ""
" -v, --version afficher la version de WeeChat\n" " -v, --version afficher la version de WeeChat\n"
" extension:option option pour une extension (voir man weechat)\n" " extension:option option pour une extension (voir man weechat)\n"
msgid "Extra options in headless mode:\n"
msgstr "Options supplémentaires en mode sans interface (« headless ») :\n"
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
" --daemon lancer WeeChat comme un « daemon » (fork, nouveau "
"groupe pour le processus, fermeture des descripteurs de fichiers);\n"
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
" (par défaut en mode sans interface WeeChat est "
"bloquant et ne tourne pas en tâche de fond)\n"
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Erreur : paramètre manquant pour l'option \"%s\"\n" msgstr "Erreur : paramètre manquant pour l'option \"%s\"\n"
@ -196,6 +213,9 @@ msgstr "Erreur : la base (%s) n'est pas un répertoire\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Erreur : impossible de créer le répertoire \"%s\"\n" msgstr "Erreur : impossible de créer le répertoire \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr "WeeChat tourne sans interface (« headless »)."
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -5159,6 +5179,18 @@ msgstr "La souris est désactivée"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', taille : %dx%d" msgstr " TERM='%s', taille : %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr "Lancement de WeeChat en tâche de fond..."
#, c-format
msgid "fork error"
msgstr "erreur de fork"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -13819,9 +13851,6 @@ msgstr "envoyé à"
msgid "received from" msgid "received from"
msgstr "reçu de" msgstr "reçu de"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "ÉCHOUÉ" msgstr "ÉCHOUÉ"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-01-06 13:50+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -177,6 +177,19 @@ msgstr ""
" -v, --version WeeChat verziójának mutatása\n" " -v, --version WeeChat verziójának mutatása\n"
" -w, --weechat-commands WeeChat parancsok mutatása\n" " -w, --weechat-commands WeeChat parancsok mutatása\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, fuzzy, c-format #, fuzzy, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
@ -200,6 +213,9 @@ msgstr ""
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n" msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -3990,6 +4006,18 @@ msgstr "Nincs aliasz definiálva.\n"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr "" msgstr ""
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "%sSzerver: %s%s\n"
#, c-format
msgid "OK"
msgstr "Rendben"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -11365,9 +11393,6 @@ msgstr " fogadó fél: "
msgid "received from" msgid "received from"
msgstr " küldő fél: " msgstr " küldő fél: "
msgid "OK"
msgstr "Rendben"
msgid "FAILED" msgid "FAILED"
msgstr "SIKERTELEN" msgstr "SIKERTELEN"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -176,6 +176,19 @@ msgstr ""
" -v. --version mostra la versione di WeeChat\n" " -v. --version mostra la versione di WeeChat\n"
" plugin:opzione opzione per il plugin (consultare man weechat)\n" " plugin:opzione opzione per il plugin (consultare man weechat)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Errore: argomento mancante per l'opzione \"%s\"\n" msgstr "Errore: argomento mancante per l'opzione \"%s\"\n"
@ -198,6 +211,9 @@ msgstr "Errore: home (%s) non è una directory\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Errore: impossibile creare la directory \"%s\"\n" msgstr "Errore: impossibile creare la directory \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -4746,6 +4762,18 @@ msgstr "Mouse disabilitato"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', dimensione %dx%d" msgstr " TERM='%s', dimensione %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "errore"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -12561,9 +12589,6 @@ msgstr "inviato a"
msgid "received from" msgid "received from"
msgstr "ricevuto da" msgstr "ricevuto da"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "FALLITO" msgstr "FALLITO"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-03-06 09:00+0900\n" "PO-Revision-Date: 2018-03-06 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -171,6 +171,19 @@ msgstr ""
" plugin:option プラグイン用オプション (man weechat を参照してくだ" " plugin:option プラグイン用オプション (man weechat を参照してくだ"
"さい)\n" "さい)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "エラー: \"%s\" オプションの引数がありません\n" msgstr "エラー: \"%s\" オプションの引数がありません\n"
@ -194,6 +207,9 @@ msgstr "エラー: ホーム (%s) はディレクトリではありません\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "エラー: ディレクトリ \"%s\" の作成に失敗しました\n" msgstr "エラー: ディレクトリ \"%s\" の作成に失敗しました\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -4928,6 +4944,18 @@ msgstr "マウスを無効化しました"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s'、サイズ: %dx%d" msgstr " TERM='%s'、サイズ: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "エラー"
#, c-format
msgid "OK"
msgstr "成功"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -13297,9 +13325,6 @@ msgstr "送信先"
msgid "received from" msgid "received from"
msgstr "受信元" msgstr "受信元"
msgid "OK"
msgstr "成功"
msgid "FAILED" msgid "FAILED"
msgstr "失敗" msgstr "失敗"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -173,6 +173,19 @@ msgstr ""
" -v, --version pokaż wersję WeeChat\n" " -v, --version pokaż wersję WeeChat\n"
" wtyczka:opcje opcje dla wtyczki (zobacz man weechat)\n" " wtyczka:opcje opcje dla wtyczki (zobacz man weechat)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Błąd: brak argumentu dla opcji \"%s\"\n" msgstr "Błąd: brak argumentu dla opcji \"%s\"\n"
@ -195,6 +208,9 @@ msgstr "Błąd: %s nie jest katalogiem\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Błąd: nie można utworzyć katalogu \"%s\"\n" msgstr "Błąd: nie można utworzyć katalogu \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -5040,6 +5056,18 @@ msgstr "Obsługa myszy wyłączona"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', rozmiar: %dx%d" msgstr " TERM='%s', rozmiar: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "błąd"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -10616,8 +10644,8 @@ msgid ""
"%s%s: invalid fingerprint for server \"%s\", it must contain only " "%s%s: invalid fingerprint for server \"%s\", it must contain only "
"hexadecimal digits (0-9, a-f)" "hexadecimal digits (0-9, a-f)"
msgstr "" msgstr ""
"%s%s: niepoprawny skrót dla serwera \"%s\", może on zawierać tylko " "%s%s: niepoprawny skrót dla serwera \"%s\", może on zawierać tylko znaki "
"znaki heksadecymalne (0-9, a-f)" "heksadecymalne (0-9, a-f)"
#, c-format #, c-format
msgid "%s%s: error when allocating new server" msgid "%s%s: error when allocating new server"
@ -13521,9 +13549,6 @@ msgstr "wysłano do"
msgid "received from" msgid "received from"
msgstr "otrzymano od" msgstr "otrzymano od"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "NIEUDANY" msgstr "NIEUDANY"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n" "Language-Team: Portuguese <>\n"
@ -174,6 +174,19 @@ msgstr ""
" -v, --version mostrar a versão do Weechat\n" " -v, --version mostrar a versão do Weechat\n"
" plugin:opção opção de um plugin (ver man weechat)\n" " plugin:opção opção de um plugin (ver man weechat)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Erro: falta o argumento da opção \"%s\"\n" msgstr "Erro: falta o argumento da opção \"%s\"\n"
@ -196,6 +209,9 @@ msgstr "Erro: a base (%s) não é um diretório\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Erro: não é possível criar o diretório \"%s\"\n" msgstr "Erro: não é possível criar o diretório \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
#, fuzzy #, fuzzy
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
@ -5011,6 +5027,18 @@ msgstr "O rato está desativado"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', tamanho: %dx%d" msgstr " TERM='%s', tamanho: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "erro"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -13204,9 +13232,6 @@ msgstr "enviado para"
msgid "received from" msgid "received from"
msgstr "recebido de" msgstr "recebido de"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "FALHOU" msgstr "FALHOU"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-02-05 21:30+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -208,6 +208,19 @@ msgstr ""
" -v, --version mostra a versão do WeeChat\n" " -v, --version mostra a versão do WeeChat\n"
" plugin:option opção para o plugin (veja o manual do WeeChat)\n" " plugin:option opção para o plugin (veja o manual do WeeChat)\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "Erro: faltando argumento para opção \"%s\"\n" msgstr "Erro: faltando argumento para opção \"%s\"\n"
@ -230,6 +243,9 @@ msgstr "Erro: (%s) não é um diretório\n"
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Erro: não foi possível criar o diretório \"%s\"\n" msgstr "Erro: não foi possível criar o diretório \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -4598,6 +4614,18 @@ msgstr "Mouse está desabilitado"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', tamanho: %dx%d" msgstr " TERM='%s', tamanho: %dx%d"
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "%s%s: erro: %s"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -11818,9 +11846,6 @@ msgstr "enviado para"
msgid "received from" msgid "received from"
msgstr "recebido de" msgstr "recebido de"
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "FALHOU" msgstr "FALHOU"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2018-01-06 13:50+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -186,6 +186,19 @@ msgstr ""
" -v, --version отобразить версию WeeChat\n" " -v, --version отобразить версию WeeChat\n"
" -w, --weechat-commands отобразить команды WeeChat\n" " -w, --weechat-commands отобразить команды WeeChat\n"
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, fuzzy, c-format #, fuzzy, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "%s нет аргумента для параметра \"%s\"\n" msgstr "%s нет аргумента для параметра \"%s\"\n"
@ -209,6 +222,9 @@ msgstr "%s домашний каталог (%s) не является дирек
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "%s не могу создать директорию \"%s\"\n" msgstr "%s не могу создать директорию \"%s\"\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -4023,6 +4039,18 @@ msgstr "Сокращения не заданы.\n"
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr "" msgstr ""
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "%sСервер: %s%s\n"
#, c-format
msgid "OK"
msgstr "OK"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -11400,9 +11428,6 @@ msgstr " отправлен "
msgid "received from" msgid "received from"
msgstr " получен от " msgstr " получен от "
msgid "OK"
msgstr "OK"
msgid "FAILED" msgid "FAILED"
msgstr "НЕУДАЧА" msgstr "НЕУДАЧА"

View File

@ -56,7 +56,8 @@ SET(WEECHAT_SOURCES
./src/gui/curses/gui-curses-main.c ./src/gui/curses/gui-curses-main.c
./src/gui/curses/gui-curses-mouse.c ./src/gui/curses/gui-curses-mouse.c
./src/gui/curses/gui-curses-window.c ./src/gui/curses/gui-curses-window.c
./src/gui/curses/main.c ./src/gui/curses/normal/main.c
./src/gui/curses/headless/main.c
./src/gui/gui-bar.c ./src/gui/gui-bar.c
./src/gui/gui-bar.h ./src/gui/gui-bar.h
./src/gui/gui-bar-item.c ./src/gui/gui-bar-item.c

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n" "PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -148,6 +148,19 @@ msgid ""
" plugin:option option for plugin (see man weechat)\n" " plugin:option option for plugin (see man weechat)\n"
msgstr "" msgstr ""
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "" msgstr ""
@ -169,6 +182,9 @@ msgstr ""
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "Hata: \"%s\" dizini oluşturulamaz\n" msgstr "Hata: \"%s\" dizini oluşturulamaz\n"
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -3627,6 +3643,18 @@ msgstr ""
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr "" msgstr ""
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, fuzzy, c-format
msgid "fork error"
msgstr "hata"
#, c-format
msgid "OK"
msgstr "TAMAM"
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -10386,9 +10414,6 @@ msgstr ""
msgid "received from" msgid "received from"
msgstr "" msgstr ""
msgid "OK"
msgstr "TAMAM"
msgid "FAILED" msgid "FAILED"
msgstr "BAŞARISIZ" msgstr "BAŞARISIZ"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2018-02-19 21:27+0100\n" "POT-Creation-Date: 2018-03-10 19:09+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -146,6 +146,19 @@ msgid ""
" plugin:option option for plugin (see man weechat)\n" " plugin:option option for plugin (see man weechat)\n"
msgstr "" msgstr ""
msgid "Extra options in headless mode:\n"
msgstr ""
msgid ""
" --daemon run WeeChat as a daemon (fork, new process group, "
"file descriptors closed);\n"
msgstr ""
msgid ""
" (by default in headless mode WeeChat is blocking "
"and does not run in background)\n"
msgstr ""
#, c-format #, c-format
msgid "Error: missing argument for \"%s\" option\n" msgid "Error: missing argument for \"%s\" option\n"
msgstr "" msgstr ""
@ -167,6 +180,9 @@ msgstr ""
msgid "Error: cannot create directory \"%s\"\n" msgid "Error: cannot create directory \"%s\"\n"
msgstr "" msgstr ""
msgid "WeeChat is running in headless mode."
msgstr ""
msgid "" msgid ""
"Welcome to WeeChat!\n" "Welcome to WeeChat!\n"
"\n" "\n"
@ -3617,6 +3633,18 @@ msgstr ""
msgid " TERM='%s', size: %dx%d" msgid " TERM='%s', size: %dx%d"
msgstr "" msgstr ""
#, c-format
msgid "Running WeeChat in background..."
msgstr ""
#, c-format
msgid "fork error"
msgstr ""
#, c-format
msgid "OK"
msgstr ""
#, c-format #, c-format
msgid "" msgid ""
"%sUnable to change bar type: you must delete bar and create another to do " "%sUnable to change bar type: you must delete bar and create another to do "
@ -10240,9 +10268,6 @@ msgstr ""
msgid "received from" msgid "received from"
msgstr "" msgstr ""
msgid "OK"
msgstr ""
msgid "FAILED" msgid "FAILED"
msgstr "" msgstr ""

View File

@ -20,32 +20,33 @@
# #
set(LIB_CORE_SRC set(LIB_CORE_SRC
weechat.c weechat.h weechat.c weechat.h
wee-arraylist.c wee-arraylist.h wee-arraylist.c wee-arraylist.h
wee-backtrace.c wee-backtrace.h wee-backtrace.c wee-backtrace.h
wee-command.c wee-command.h wee-command.c wee-command.h
wee-completion.c wee-completion.h wee-completion.c wee-completion.h
wee-config.c wee-config.h wee-config.c wee-config.h
wee-config-file.c wee-config-file.h wee-config-file.c wee-config-file.h
wee-debug.c wee-debug.h wee-debug.c wee-debug.h
wee-eval.c wee-eval.h wee-eval.c wee-eval.h
wee-hashtable.c wee-hashtable.h wee-hashtable.c wee-hashtable.h
wee-hdata.c wee-hdata.h wee-hdata.c wee-hdata.h
wee-hook.c wee-hook.h wee-hook.c wee-hook.h
wee-infolist.c wee-infolist.h wee-infolist.c wee-infolist.h
wee-input.c wee-input.h wee-input.c wee-input.h
wee-list.c wee-list.h wee-list.c wee-list.h
wee-log.c wee-log.h wee-log.c wee-log.h
wee-network.c wee-network.h wee-network.c wee-network.h
wee-proxy.c wee-proxy.h wee-proxy.c wee-proxy.h
wee-secure.c wee-secure.h wee-secure.c wee-secure.h
wee-string.c wee-string.h wee-string.c wee-string.h
wee-upgrade.c wee-upgrade.h wee-upgrade.c wee-upgrade.h
wee-upgrade-file.c wee-upgrade-file.h wee-upgrade-file.c wee-upgrade-file.h
wee-url.c wee-url.h wee-url.c wee-url.h
wee-utf8.c wee-utf8.h wee-utf8.c wee-utf8.h
wee-util.c wee-util.h wee-util.c wee-util.h
wee-version.c wee-version.h) wee-version.c wee-version.h
)
# Check for flock support # Check for flock support
include(CheckSymbolExists) include(CheckSymbolExists)

View File

@ -79,6 +79,7 @@
#include "../plugins/plugin-api.h" #include "../plugins/plugin-api.h"
int weechat_headless = 0; /* 1 if running headless (no GUI) */
int weechat_debug_core = 0; /* debug level for core */ int weechat_debug_core = 0; /* debug level for core */
char *weechat_argv0 = NULL; /* WeeChat binary file name (argv[0])*/ char *weechat_argv0 = NULL; /* WeeChat binary file name (argv[0])*/
int weechat_upgrading = 0; /* =1 if WeeChat is upgrading */ int weechat_upgrading = 0; /* =1 if WeeChat is upgrading */
@ -160,6 +161,21 @@ weechat_display_usage ()
" -v, --version display WeeChat version\n" " -v, --version display WeeChat version\n"
" plugin:option option for plugin (see man weechat)\n")); " plugin:option option for plugin (see man weechat)\n"));
string_fprintf (stdout, "\n"); string_fprintf (stdout, "\n");
/* extra options in headless mode */
if (weechat_headless)
{
string_fprintf (stdout, _("Extra options in headless mode:\n"));
string_fprintf (
stdout,
_(" --daemon run WeeChat as a daemon (fork, "
"new process group, file descriptors closed);\n"));
string_fprintf (
stdout,
_(" (by default in headless mode "
"WeeChat is blocking and does not run in background)\n"));
string_fprintf (stdout, "\n");
}
} }
/* /*
@ -403,6 +419,12 @@ weechat_create_home_dir ()
void void
weechat_startup_message () weechat_startup_message ()
{ {
if (weechat_headless)
{
string_fprintf (stdout, _("WeeChat is running in headless mode."));
string_fprintf (stdout, "\n");
}
if (CONFIG_BOOLEAN(config_startup_display_logo)) if (CONFIG_BOOLEAN(config_startup_display_logo))
{ {
gui_chat_printf ( gui_chat_printf (
@ -600,15 +622,12 @@ weechat_shutdown (int return_code, int crash)
} }
/* /*
* Initializes WeeChat. * Initializes gettext.
*/ */
void void
weechat_init (int argc, char *argv[], void (*gui_init_cb)()) weechat_init_gettext ()
{ {
weechat_first_start_time = time (NULL); /* initialize start time */
gettimeofday (&weechat_current_start_timeval, NULL);
weechat_locale_ok = (setlocale (LC_ALL, "") != NULL); /* init gettext */ weechat_locale_ok = (setlocale (LC_ALL, "") != NULL); /* init gettext */
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
bindtextdomain (PACKAGE, LOCALEDIR); bindtextdomain (PACKAGE, LOCALEDIR);
@ -622,6 +641,17 @@ weechat_init (int argc, char *argv[], void (*gui_init_cb)())
weechat_local_charset = strdup (""); weechat_local_charset = strdup ("");
#endif /* HAVE_LANGINFO_CODESET */ #endif /* HAVE_LANGINFO_CODESET */
utf8_init (); utf8_init ();
}
/*
* Initializes WeeChat.
*/
void
weechat_init (int argc, char *argv[], void (*gui_init_cb)())
{
weechat_first_start_time = time (NULL); /* initialize start time */
gettimeofday (&weechat_current_start_timeval, NULL);
/* catch signals */ /* catch signals */
util_catch_signal (SIGINT, SIG_IGN); /* signal ignored */ util_catch_signal (SIGINT, SIG_IGN); /* signal ignored */

View File

@ -97,6 +97,7 @@
#define WEECHAT_EXTRA_LIBDIR "WEECHAT_EXTRA_LIBDIR" #define WEECHAT_EXTRA_LIBDIR "WEECHAT_EXTRA_LIBDIR"
/* global variables and functions */ /* global variables and functions */
extern int weechat_headless;
extern int weechat_debug_core; extern int weechat_debug_core;
extern char *weechat_argv0; extern char *weechat_argv0;
extern int weechat_upgrading; extern int weechat_upgrading;
@ -115,6 +116,7 @@ extern char *weechat_startup_commands;
extern void weechat_term_check (); extern void weechat_term_check ();
extern void weechat_shutdown (int return_code, int crash); extern void weechat_shutdown (int return_code, int crash);
extern void weechat_init_gettext ();
extern void weechat_init (int argc, char *argv[], void (*gui_init_cb)()); extern void weechat_init (int argc, char *argv[], void (*gui_init_cb)());
extern void weechat_end (void (*gui_end_cb)(int clean_exit)); extern void weechat_end (void (*gui_end_cb)(int clean_exit));

View File

@ -18,32 +18,31 @@
# #
set(LIB_GUI_COMMON_SRC set(LIB_GUI_COMMON_SRC
gui-bar.c gui-bar.h gui-bar.c gui-bar.h
gui-bar-item.c gui-bar-item.h gui-bar-item.c gui-bar-item.h
gui-bar-window.c gui-bar-window.h gui-bar-window.c gui-bar-window.h
gui-buffer.c gui-buffer.h gui-buffer.c gui-buffer.h
gui-chat.c gui-chat.h gui-chat.c gui-chat.h
gui-color.c gui-color.h gui-color.c gui-color.h
gui-completion.c gui-completion.h gui-completion.c gui-completion.h
gui-cursor.c gui-cursor.h gui-cursor.c gui-cursor.h
gui-filter.c gui-filter.h gui-filter.c gui-filter.h
gui-focus.c gui-focus.h gui-focus.c gui-focus.h
gui-history.c gui-history.h gui-history.c gui-history.h
gui-hotlist.c gui-hotlist.h gui-hotlist.c gui-hotlist.h
gui-input.c gui-input.h gui-input.c gui-input.h
gui-key.c gui-key.h gui-key.c gui-key.h
gui-layout.c gui-layout.h gui-layout.c gui-layout.h
gui-line.c gui-line.h gui-line.c gui-line.h
gui-main.h gui-main.h
gui-mouse.c gui-mouse.h gui-mouse.c gui-mouse.h
gui-nick.c gui-nick.h gui-nick.c gui-nick.h
gui-nicklist.c gui-nicklist.h gui-nicklist.c gui-nicklist.h
gui-window.c gui-window.h) gui-window.c gui-window.h
)
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})
add_library(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC}) add_library(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
list(APPEND STATIC_LIBS weechat_gui_common) list(APPEND STATIC_LIBS weechat_gui_common)
if(ENABLE_NCURSES) subdirs(curses)
subdirs(curses)
endif()

View File

@ -63,10 +63,6 @@ lib_weechat_gui_common_a_SOURCES = gui-bar.c \
gui-window.c \ gui-window.c \
gui-window.h gui-window.h
if GUI_NCURSES SUBDIRS = . curses
curses_dir=curses
endif
SUBDIRS = . $(curses_dir)
EXTRA_DIST = CMakeLists.txt EXTRA_DIST = CMakeLists.txt

View File

@ -19,40 +19,8 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
# #
set(LIB_GUI_CURSES_SRC if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND HAVE_BACKTRACE)
gui-curses.h list(APPEND EXTRA_LIBS "execinfo")
gui-curses-bar-window.c
gui-curses-chat.c
gui-curses-color.c
gui-curses-key.c
gui-curses-main.c
gui-curses-mouse.c
gui-curses-term.c
gui-curses-window.c)
set(WEECHAT_CURSES_MAIN_SRC
main.c)
set(EXECUTABLE weechat)
find_package(Ncurses)
if(NCURSES_FOUND)
check_include_files(ncursesw/ncurses.h NCURSESW_HEADERS)
if(NCURSESW_HEADERS)
add_definitions(-DHAVE_NCURSESW_CURSES_H)
else()
check_include_files(ncurses.h NCURSES_HEADERS)
if(NCURSES_HEADERS)
add_definitions(-DHAVE_NCURSES_H)
endif()
endif()
list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
if(HAVE_BACKTRACE)
list(APPEND EXTRA_LIBS "execinfo")
endif()
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
@ -78,34 +46,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND EXTRA_LIBS "resolv") list(APPEND EXTRA_LIBS "resolv")
endif() endif()
include_directories(.. ../../core ../../plugins ${NCURSES_INCLUDE_PATH}) if(ENABLE_NCURSES)
subdirs(normal)
endif()
add_library(weechat_gui_curses STATIC ${LIB_GUI_CURSES_SRC}) if(ENABLE_HEADLESS)
subdirs(headless)
add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_SRC}) endif()
add_dependencies(${EXECUTABLE} weechat_gui_curses)
# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a
target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses ${EXTRA_LIBS} ${STATIC_LIBS})
# Create a symbolic link weechat-curses -> weechat
# This link is created for compatibility with old versions on /upgrade.
# It may be removed in future.
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX}
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat${CMAKE_EXECUTABLE_SUFFIX}" "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
DEPENDS ${EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link ${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX}"
)
add_custom_target(${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX} ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX}
)
add_dependencies(${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX} ${EXECUTABLE})
list(APPEND CMAKE_INSTALL_MANIFEST_FILES "${CMAKE_INSTALL_PREFIX}/bin/weechat-curses${CMAKE_EXECUTABLE_SUFFIX}")
# Install executable and symbolic link
install(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin)

View File

@ -17,46 +17,14 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
# #
AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" $(NCURSES_CFLAGS) if GUI_NCURSES
normal_dir=normal
endif
noinst_LIBRARIES = lib_weechat_gui_curses.a if HEADLESS
headless_dir=headless
endif
lib_weechat_gui_curses_a_SOURCES = gui-curses-bar-window.c \ SUBDIRS = . $(normal_dir) $(headless_dir)
gui-curses-chat.c \
gui-curses-color.c \
gui-curses-key.c \
gui-curses-main.c \
gui-curses-mouse.c \
gui-curses-term.c \
gui-curses-window.c \
gui-curses.h
bin_PROGRAMS = weechat
# Due to circular references, we must link two times with libweechat_core.a
# (and with two different path/names to be kept by linker)
weechat_LDADD = ./../../core/lib_weechat_core.a \
../../plugins/lib_weechat_plugins.a \
../lib_weechat_gui_common.a \
lib_weechat_gui_curses.a \
../../core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \
$(NCURSES_LFLAGS) \
$(GCRYPT_LFLAGS) \
$(GNUTLS_LFLAGS) \
$(CURL_LFLAGS) \
-lm
weechat_SOURCES = main.c
EXTRA_DIST = CMakeLists.txt EXTRA_DIST = CMakeLists.txt
# Create a symbolic link weechat-curses -> weechat
# This link is created for compatibility with old versions on /upgrade.
# It may be removed in future.
install-exec-hook:
(cd '$(DESTDIR)$(bindir)' && rm -f weechat-curses$(EXEEXT) && $(LN_S) weechat weechat-curses$(EXEEXT))
# Remove symbolic link on uninstall
uninstall-hook:
(cd '$(DESTDIR)$(bindir)' && rm -f weechat-curses$(EXEEXT))

View File

@ -78,12 +78,20 @@ gui_main_get_password (const char **prompt, char *password, int size)
{ {
int line, i, ch; int line, i, ch;
memset (password, '\0', size);
if (weechat_headless)
{
password[0] = ' ';
return;
}
initscr (); initscr ();
cbreak (); cbreak ();
noecho (); noecho ();
raw (); raw ();
clear(); clear ();
line = 0; line = 0;
@ -96,7 +104,6 @@ gui_main_get_password (const char **prompt, char *password, int size)
mvaddstr (line, 0, "=> "); mvaddstr (line, 0, "=> ");
refresh (); refresh ();
memset (password, '\0', size);
i = 0; i = 0;
while (i < size - 1) while (i < size - 1)
{ {
@ -432,11 +439,19 @@ gui_main_loop ()
send_signal_sigwinch = 0; send_signal_sigwinch = 0;
/* catch SIGWINCH signal: redraw screen */ /* catch SIGWINCH signal: redraw screen */
util_catch_signal (SIGWINCH, &gui_main_signal_sigwinch); if (!weechat_headless)
util_catch_signal (SIGWINCH, &gui_main_signal_sigwinch);
/* hook stdin (read keyboard) */ /* hook stdin (read keyboard) */
hook_fd_keyboard = hook_fd (NULL, STDIN_FILENO, 1, 0, 0, if (weechat_headless)
&gui_key_read_cb, NULL, NULL); {
hook_fd_keyboard = NULL;
}
else
{
hook_fd_keyboard = hook_fd (NULL, STDIN_FILENO, 1, 0, 0,
&gui_key_read_cb, NULL, NULL);
}
gui_window_ask_refresh (1); gui_window_ask_refresh (1);
@ -486,7 +501,8 @@ gui_main_loop ()
} }
/* remove keyboard hook */ /* remove keyboard hook */
unhook (hook_fd_keyboard); if (hook_fd_keyboard)
unhook (hook_fd_keyboard);
} }
/* /*

View File

@ -22,6 +22,9 @@
#include <time.h> #include <time.h>
#ifdef WEECHAT_HEADLESS
#include "ncurses-fake.h"
#else
#ifdef HAVE_NCURSESW_CURSES_H #ifdef HAVE_NCURSESW_CURSES_H
#include <ncursesw/ncurses.h> #include <ncursesw/ncurses.h>
#elif HAVE_NCURSES_H #elif HAVE_NCURSES_H
@ -29,6 +32,7 @@
#else #else
#include <curses.h> #include <curses.h>
#endif /* HAVE_NCURSESW_CURSES_H */ #endif /* HAVE_NCURSESW_CURSES_H */
#endif /* WEECHAT_HEADLESS */
struct t_gui_buffer; struct t_gui_buffer;
struct t_gui_line; struct t_gui_line;

View File

@ -0,0 +1,57 @@
#
# Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
add_definitions(-DWEECHAT_HEADLESS)
# fake ncurses lib (for headless mode and tests)
set(LIB_WEECHAT_NCURSES_FAKE_SRC
ncurses-fake.h
ncurses-fake.c
)
add_library(weechat_ncurses_fake STATIC ${LIB_WEECHAT_NCURSES_FAKE_SRC})
set(LIB_GUI_CURSES_SRC
../gui-curses.h
../gui-curses-bar-window.c
../gui-curses-chat.c
../gui-curses-color.c
../gui-curses-key.c
../gui-curses-main.c
../gui-curses-mouse.c
../gui-curses-term.c
../gui-curses-window.c
)
include_directories(. .. ../../core ../../plugins)
add_library(weechat_gui_headless STATIC ${LIB_GUI_CURSES_SRC})
set(WEECHAT_CURSES_MAIN_HEADLESS_SRC main.c)
set(EXECUTABLE weechat-headless)
add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_HEADLESS_SRC})
add_dependencies(${EXECUTABLE} weechat_gui_headless weechat_ncurses_fake)
# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a
target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_headless weechat_ncurses_fake ${EXTRA_LIBS} ${STATIC_LIBS})
# Install executable
install(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)

View File

@ -0,0 +1,55 @@
#
# Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" -DWEECHAT_HEADLESS
noinst_LIBRARIES = lib_weechat_ncurses_fake.a lib_weechat_gui_headless.a
lib_weechat_ncurses_fake_a_SOURCES = ncurses-fake.c \
ncurses-fake.h
lib_weechat_gui_headless_a_SOURCES = ../gui-curses-bar-window.c \
../gui-curses-chat.c \
../gui-curses-color.c \
../gui-curses-key.c \
../gui-curses-main.c \
../gui-curses-mouse.c \
../gui-curses-term.c \
../gui-curses-window.c \
../gui-curses.h
bin_PROGRAMS = weechat-headless
# Due to circular references, we must link two times with libweechat_core.a
# (and with two different path/names to be kept by linker)
weechat_headless_LDADD = ./../../../core/lib_weechat_core.a \
../../../plugins/lib_weechat_plugins.a \
../../lib_weechat_gui_common.a \
lib_weechat_gui_headless.a \
lib_weechat_ncurses_fake.a \
../../../core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \
$(GCRYPT_LFLAGS) \
$(GNUTLS_LFLAGS) \
$(CURL_LFLAGS) \
-lm
weechat_headless_SOURCES = main.c
EXTRA_DIST = CMakeLists.txt

View File

@ -0,0 +1,125 @@
/*
* main.c - entry point for headless mode (no GUI)
*
* Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "../../../core/weechat.h"
#include "../../gui-main.h"
#include "../gui-curses.h"
/*
* Daemonizes the process.
*/
void
daemonize ()
{
pid_t pid;
int fd, i;
printf (_("Running WeeChat in background..."));
printf (" ");
pid = fork();
if (pid < 0)
{
printf (_("fork error"));
printf ("\n");
exit (EXIT_FAILURE);
}
if (pid > 0)
{
/* parent process */
printf (_("OK"));
printf ("\n");
exit (EXIT_SUCCESS);
}
/* child process */
/* obtain a new process group */
setsid ();
/* close all file descriptors */
for (i = getdtablesize(); i >= 0; --i)
{
close (i);
}
fd = open ("/dev/null", O_RDWR);
dup (fd);
dup (fd);
}
/*
* Entry point for WeeChat in headless mode (no GUI).
*/
int
main (int argc, char *argv[])
{
int i, daemon;
weechat_init_gettext ();
/*
* Enable a special "headless" mode, where some things are slightly
* different, for example:
* - no read of stdin (keyboard/mouse)
* - don't catch any terminal related signal
*/
weechat_headless = 1;
/*
* If "--daemon" is received in command line arguments,
* daemonize the process.
*/
daemon = 0;
for (i = 1; i < argc; i++)
{
if (strcmp (argv[i], "--daemon") == 0)
{
daemon = 1;
break;
}
}
if (daemon)
daemonize ();
/* init, main loop and end */
weechat_init (argc, argv, &gui_main_init);
gui_main_loop ();
weechat_end (&gui_main_end);
return EXIT_SUCCESS;
}

View File

@ -0,0 +1,433 @@
/*
* ncurses-fake.c - fake ncurses lib (for headless mode and tests)
*
* Copyright (C) 2014-2018 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ncurses-fake.h"
/* simulate 80x25 terminal */
WINDOW _stdscr = { 0, 0, 24, 79, 0, 0 };
WINDOW *stdscr = &_stdscr;
chtype acs_map[256];
WINDOW *
initscr ()
{
return stdscr;
}
int
endwin ()
{
return OK;
}
WINDOW *
newwin (int nlines, int ncols, int begin_y, int begin_x)
{
(void) nlines;
(void) ncols;
(void) begin_y;
(void) begin_x;
return stdscr;
}
int
delwin (WINDOW *win)
{
(void) win;
return OK;
}
int
move (int y, int x)
{
(void) y;
(void) x;
return OK;
}
int
wmove (WINDOW *win, int y, int x)
{
(void) win;
(void) y;
(void) x;
return OK;
}
int
wattr_on (WINDOW *win, attr_t attrs, void *opts)
{
(void) win;
(void) attrs;
(void) opts;
return OK;
}
int
wattr_off (WINDOW *win, attr_t attrs, void *opts)
{
(void) win;
(void) attrs;
(void) opts;
return OK;
}
int
wattr_get (WINDOW *win, attr_t *attrs, short *pair, void *opts)
{
(void) win;
(void) attrs;
(void) pair;
(void) opts;
return OK;
}
int
wattr_set (WINDOW *win, attr_t attrs, short pair, void *opts)
{
(void) win;
(void) attrs;
(void) pair;
(void) opts;
return OK;
}
int
wattron (WINDOW *win, int attrs)
{
(void) win;
(void) attrs;
return OK;
}
int
wattroff (WINDOW *win, int attrs)
{
(void) win;
(void) attrs;
return OK;
}
int
waddstr (WINDOW *win, const char *str)
{
(void) win;
(void) str;
return OK;
}
int
waddnstr (WINDOW *win, const char *str, int n)
{
(void) win;
(void) str;
(void) n;
return OK;
}
int
mvaddstr (int y, int x, const char *str)
{
(void) y;
(void) x;
(void) str;
return OK;
}
int
mvwaddstr (WINDOW *win, int y, int x, const char *str)
{
(void) win;
(void) y;
(void) x;
(void) str;
return OK;
}
int
wclrtobot (WINDOW *win)
{
(void) win;
return OK;
}
int
refresh ()
{
return OK;
}
int
wrefresh (WINDOW *win)
{
(void) win;
return OK;
}
int
wnoutrefresh (WINDOW *win)
{
(void) win;
return OK;
}
int
wclrtoeol (WINDOW *win)
{
(void) win;
return OK;
}
int
mvwprintw (WINDOW *win, int y, int x, const char *fmt, ...)
{
(void) win;
(void) y;
(void) x;
(void) fmt;
return OK;
}
int
init_pair (short pair, short f, short b)
{
(void) pair;
(void) f;
(void) b;
return OK;
}
bool
has_colors ()
{
return TRUE;
}
int
cbreak ()
{
return OK;
}
int
start_color ()
{
return OK;
}
int
noecho ()
{
return OK;
}
int
clear ()
{
return OK;
}
int
wclear (WINDOW *win)
{
(void) win;
return OK;
}
bool
can_change_color ()
{
/* not supported in WeeChat anyway */
return FALSE;
}
int
curs_set (int visibility)
{
(void) visibility;
return 1; /* 0 == invisible, 1 == normal, 2 == very visible */
}
int
nodelay (WINDOW *win, bool bf)
{
(void) win;
(void) bf;
return OK;
}
int
werase (WINDOW *win)
{
(void) win;
return OK;
}
int
wbkgdset (WINDOW *win, chtype ch)
{
(void) win;
(void) ch;
return OK;
}
void
wchgat (WINDOW *win, int n, attr_t attr, short color, const void *opts)
{
(void) win;
(void) n;
(void) attr;
(void) color;
(void) opts;
}
int
mvwchgat (WINDOW *win, int y, int x, int n, attr_t attr, short pair,
const void *opts)
{
(void) win;
(void) y;
(void) x;
(void) n;
(void) attr;
(void) pair;
(void) opts;
return OK;
}
void
whline (WINDOW *win, chtype ch, int n)
{
(void) win;
(void) ch;
(void) n;
}
void
wvline (WINDOW *win, chtype ch, int n)
{
(void) win;
(void) ch;
(void) n;
}
int
mvwhline (WINDOW *win, int y, int x, chtype ch, int n)
{
(void) win;
(void) y;
(void) x;
(void) ch;
(void) n;
return OK;
}
int
mvwvline (WINDOW *win, int y, int x, chtype ch, int n)
{
(void) win;
(void) y;
(void) x;
(void) ch;
(void) n;
return OK;
}
int
raw ()
{
return OK;
}
int
wcolor_set (WINDOW *win, short pair, void *opts)
{
(void) win;
(void) pair;
(void) opts;
return OK;
}
void
cur_term ()
{
}
int
use_default_colors ()
{
return OK;
}
int
resizeterm (int lines, int columns)
{
(void) lines;
(void) columns;
return OK;
}
int
getch ()
{
return ERR;
}
int
wgetch (WINDOW *win)
{
(void) win;
return OK;
}

View File

@ -0,0 +1,126 @@
/*
* Copyright (C) 2014-2018 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_NCURSES_FAKE_H
#define WEECHAT_NCURSES_FAKE_H
#define ERR (-1)
#define OK (0)
#define TRUE 1
#define FALSE 0
#define COLS 80
#define LINES 25
#define COLORS 256
#define COLOR_PAIRS 256
#define COLOR_PAIR(x) x
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_GREEN 2
#define COLOR_YELLOW 3
#define COLOR_BLUE 4
#define COLOR_MAGENTA 5
#define COLOR_CYAN 6
#define COLOR_WHITE 7
#define A_BOLD 0
#define A_UNDERLINE 0
#define A_REVERSE 0
#define A_ITALIC 0
#define ACS_HLINE '-'
#define ACS_VLINE '|'
#define getyx(win, x, y) \
x = 0; \
y = 0;
#define getmaxyx(win, x, y) \
x = 0; \
y = 0;
struct _window
{
int _cury, _curx;
int _maxy, _maxx;
int _begy, _begx;
};
typedef struct _window WINDOW;
typedef unsigned char bool;
typedef int attr_t;
typedef unsigned chtype;
extern WINDOW *stdscr;
extern chtype acs_map[];
extern WINDOW *initscr ();
extern int endwin ();
extern WINDOW *newwin (int nlines, int ncols, int begin_y, int begin_x);
extern int delwin (WINDOW *win);
extern int move (int y, int x);
extern int wmove (WINDOW *win, int y, int x);
extern int wattr_on (WINDOW *win, attr_t attrs, void *opts);
extern int wattr_off (WINDOW *win, attr_t attrs, void *opts);
extern int wattr_get (WINDOW *win, attr_t *attrs, short *pair, void *opts);
extern int wattr_set (WINDOW *win, attr_t attrs, short pair, void *opts);
extern int wattron (WINDOW *win, int attrs);
extern int wattroff (WINDOW *win, int attrs);
extern int waddstr (WINDOW *win, const char *str);
extern int waddnstr (WINDOW *win, const char *str, int n);
extern int mvaddstr (int y, int x, const char *str);
extern int mvwaddstr (WINDOW *win, int y, int x, const char *str);
extern int wclrtobot (WINDOW *win);
extern int refresh ();
extern int wrefresh (WINDOW *win);
extern int wnoutrefresh (WINDOW *win);
extern int wclrtoeol (WINDOW *win);
extern int mvwprintw (WINDOW *win, int y, int x, const char *fmt, ...);
extern int init_pair (short pair, short f, short b);
extern bool has_colors ();
extern int cbreak ();
extern int start_color ();
extern int noecho ();
extern int clear ();
extern int wclear (WINDOW *win);
extern bool can_change_color ();
extern int curs_set (int visibility);
extern int nodelay (WINDOW *win, bool bf);
extern int werase (WINDOW *win);
extern int wbkgdset (WINDOW *win, chtype ch);
extern void wchgat (WINDOW *win, int n, attr_t attr, short color,
const void *opts);
extern int mvwchgat (WINDOW *win, int y, int x, int n, attr_t attr, short pair,
const void *opts);
extern void whline (WINDOW *win, chtype ch, int n);
extern void wvline (WINDOW *win, chtype ch, int n);
extern int mvwhline (WINDOW *win, int y, int x, chtype ch, int n);
extern int mvwvline (WINDOW *win, int y, int x, chtype ch, int n);
extern int raw ();
extern int wcolor_set (WINDOW *win, short pair, void *opts);
extern void cur_term ();
extern int use_default_colors ();
extern int resizeterm ();
extern int getch ();
extern int wgetch (WINDOW *win);
#endif /* WEECHAT_NCURSES_FAKE_H */

View File

@ -0,0 +1,81 @@
#
# Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
set(LIB_GUI_CURSES_SRC
../gui-curses.h
../gui-curses-bar-window.c
../gui-curses-chat.c
../gui-curses-color.c
../gui-curses-key.c
../gui-curses-main.c
../gui-curses-mouse.c
../gui-curses-term.c
../gui-curses-window.c
)
find_package(Ncurses)
if(NCURSES_FOUND)
check_include_files(ncursesw/ncurses.h NCURSESW_HEADERS)
if(NCURSESW_HEADERS)
add_definitions(-DHAVE_NCURSESW_CURSES_H)
else()
check_include_files(ncurses.h NCURSES_HEADERS)
if(NCURSES_HEADERS)
add_definitions(-DHAVE_NCURSES_H)
endif()
endif()
endif()
include_directories(.. ../../core ../../plugins ${NCURSES_INCLUDE_PATH})
add_library(weechat_gui_curses_normal STATIC ${LIB_GUI_CURSES_SRC})
set(WEECHAT_CURSES_MAIN_SRC main.c)
set(EXECUTABLE weechat)
add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_SRC})
add_dependencies(${EXECUTABLE} weechat_gui_curses_normal)
list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a
target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses_normal ${EXTRA_LIBS} ${STATIC_LIBS})
# Create a symbolic link weechat-curses -> weechat
# This link is created for compatibility with old versions on /upgrade.
# It may be removed in future.
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX}
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat${CMAKE_EXECUTABLE_SUFFIX}" "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
DEPENDS ${EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating symbolic link ${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX}"
)
add_custom_target(${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX} ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX}
)
add_dependencies(${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX} ${EXECUTABLE})
list(APPEND CMAKE_INSTALL_MANIFEST_FILES "${CMAKE_INSTALL_PREFIX}/bin/weechat-curses${CMAKE_EXECUTABLE_SUFFIX}")
# Install executable and symbolic link
install(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}-curses${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin)

View File

@ -0,0 +1,62 @@
#
# Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" $(NCURSES_CFLAGS)
noinst_LIBRARIES = lib_weechat_gui_curses.a
lib_weechat_gui_curses_a_SOURCES = ../gui-curses-bar-window.c \
../gui-curses-chat.c \
../gui-curses-color.c \
../gui-curses-key.c \
../gui-curses-main.c \
../gui-curses-mouse.c \
../gui-curses-term.c \
../gui-curses-window.c \
../gui-curses.h
bin_PROGRAMS = weechat
# Due to circular references, we must link two times with libweechat_core.a
# (and with two different path/names to be kept by linker)
weechat_LDADD = ./../../../core/lib_weechat_core.a \
../../../plugins/lib_weechat_plugins.a \
../../lib_weechat_gui_common.a \
lib_weechat_gui_curses.a \
../../../core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \
$(NCURSES_LFLAGS) \
$(GCRYPT_LFLAGS) \
$(GNUTLS_LFLAGS) \
$(CURL_LFLAGS) \
-lm
weechat_SOURCES = main.c
EXTRA_DIST = CMakeLists.txt
# Create a symbolic link weechat-curses -> weechat
# This link is created for compatibility with old versions on /upgrade.
# It may be removed in future.
install-exec-hook:
(cd '$(DESTDIR)$(bindir)' && rm -f weechat-curses$(EXEEXT) && $(LN_S) weechat weechat-curses$(EXEEXT))
# Remove symbolic link on uninstall
uninstall-hook:
(cd '$(DESTDIR)$(bindir)' && rm -f weechat-curses$(EXEEXT))

View File

@ -25,9 +25,9 @@
#include <stdlib.h> #include <stdlib.h>
#include "../../core/weechat.h" #include "../../../core/weechat.h"
#include "../gui-main.h" #include "../../gui-main.h"
#include "gui-curses.h" #include "../gui-curses.h"
/* /*
@ -37,6 +37,8 @@
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
/* init, main loop and end */
weechat_init_gettext ();
weechat_init (argc, argv, &gui_main_init); weechat_init (argc, argv, &gui_main_init);
gui_main_loop (); gui_main_loop ();
weechat_end (&gui_main_end); weechat_end (&gui_main_end);

View File

@ -19,15 +19,17 @@
# #
set(LIB_PLUGINS_SRC set(LIB_PLUGINS_SRC
weechat-plugin.h weechat-plugin.h
plugin.c plugin.h plugin.c plugin.h
plugin-api.c plugin-api.h plugin-api.c plugin-api.h
plugin-config.h plugin-config.c) plugin-config.h plugin-config.c
)
set(LIB_PLUGINS_SCRIPTS_SRC set(LIB_PLUGINS_SCRIPTS_SRC
plugin-script.c plugin-script.h plugin-script.c plugin-script.h
plugin-script-api.c plugin-script-api.h plugin-script-api.c plugin-script-api.h
plugin-script-config.c plugin-script-config.h) plugin-script-config.c plugin-script-config.h
)
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})
add_library(weechat_plugins STATIC ${LIB_PLUGINS_SRC}) add_library(weechat_plugins STATIC ${LIB_PLUGINS_SRC})

View File

@ -19,10 +19,6 @@
enable_language(CXX) enable_language(CXX)
# fake ncurses lib (it does nothing)
set(LIB_WEECHAT_NCURSES_FAKE_SRC ncurses-fake.c)
add_library(weechat_ncurses_fake STATIC ${LIB_WEECHAT_NCURSES_FAKE_SRC})
remove_definitions(-DHAVE_CONFIG_H) remove_definitions(-DHAVE_CONFIG_H)
include_directories(${CPPUTEST_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}) include_directories(${CPPUTEST_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR})
@ -58,8 +54,8 @@ set(LIBS
${PROJECT_BINARY_DIR}/src/core/libweechat_core.a ${PROJECT_BINARY_DIR}/src/core/libweechat_core.a
${PROJECT_BINARY_DIR}/src/plugins/libweechat_plugins.a ${PROJECT_BINARY_DIR}/src/plugins/libweechat_plugins.a
${PROJECT_BINARY_DIR}/src/gui/libweechat_gui_common.a ${PROJECT_BINARY_DIR}/src/gui/libweechat_gui_common.a
${PROJECT_BINARY_DIR}/src/gui/curses/libweechat_gui_curses.a ${PROJECT_BINARY_DIR}/src/gui/curses/headless/libweechat_gui_headless.a
${CMAKE_CURRENT_BINARY_DIR}/libweechat_ncurses_fake.a ${PROJECT_BINARY_DIR}/src/gui/curses/headless/libweechat_ncurses_fake.a
${CMAKE_CURRENT_BINARY_DIR}/libweechat_unit_tests.a ${CMAKE_CURRENT_BINARY_DIR}/libweechat_unit_tests.a
# due to circular references, we must link two times with libweechat_core.a # due to circular references, we must link two times with libweechat_core.a
${PROJECT_BINARY_DIR}/src/core/libweechat_core.a ${PROJECT_BINARY_DIR}/src/core/libweechat_core.a

View File

@ -19,9 +19,7 @@
AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" $(CPPUTEST_CFLAGS) -I$(abs_top_srcdir) AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" $(CPPUTEST_CFLAGS) -I$(abs_top_srcdir)
noinst_LIBRARIES = lib_ncurses_fake.a lib_weechat_unit_tests.a noinst_LIBRARIES = lib_weechat_unit_tests.a
lib_ncurses_fake_a_SOURCES = ncurses-fake.c
lib_weechat_unit_tests_a_SOURCES = unit/test-plugins.cpp \ lib_weechat_unit_tests_a_SOURCES = unit/test-plugins.cpp \
unit/core/test-arraylist.cpp \ unit/core/test-arraylist.cpp \
@ -43,8 +41,8 @@ noinst_PROGRAMS = tests
tests_LDADD = ./../src/core/lib_weechat_core.a \ tests_LDADD = ./../src/core/lib_weechat_core.a \
../src/plugins/lib_weechat_plugins.a \ ../src/plugins/lib_weechat_plugins.a \
../src/gui/lib_weechat_gui_common.a \ ../src/gui/lib_weechat_gui_common.a \
../src/gui/curses/lib_weechat_gui_curses.a \ ../src/gui/curses/headless/lib_weechat_gui_headless.a \
lib_ncurses_fake.a \ ../src/gui/curses/headless/lib_weechat_ncurses_fake.a \
lib_weechat_unit_tests.a \ lib_weechat_unit_tests.a \
../src/core/lib_weechat_core.a \ ../src/core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \ $(PLUGINS_LFLAGS) \

View File

@ -1,315 +0,0 @@
/*
* ncurses-fake.c - fake ncurses lib used for tests
*
* Copyright (C) 2014-2018 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#define ERR (-1)
#define OK (0)
struct _window
{
int _cury, _curx;
int _maxy, _maxx;
int _begy, _begx;
};
typedef struct _window WINDOW;
typedef unsigned char bool;
typedef int attr_t;
typedef unsigned chtype;
/* simulate 80x25 terminal */
WINDOW stdscr = { 0, 0, 24, 79, 0, 0 };
chtype acs_map[256];
WINDOW
*initscr ()
{
return &stdscr;
}
int
endwin ()
{
return OK;
}
WINDOW
*newwin ()
{
return &stdscr;
}
int
delwin ()
{
return OK;
}
int
wmove (WINDOW *win, int y, int x)
{
(void)win;
(void)y;
(void)x;
return OK;
}
int
wattr_on (WINDOW *win, attr_t attrs, void *opts)
{
(void) win;
(void) attrs;
(void) opts;
return OK;
}
int
wattr_off (WINDOW *win, attr_t attrs, void *opts)
{
(void) win;
(void) attrs;
(void) opts;
return OK;
}
int
wattr_get (WINDOW *win, attr_t *attrs, short *pair, void *opts)
{
(void) win;
(void) attrs;
(void) pair;
(void) opts;
return OK;
}
int
wattr_set (WINDOW *win, attr_t *attrs, short *pair, void *opts)
{
(void) win;
(void) attrs;
(void) pair;
(void) opts;
return OK;
}
int
waddnstr(WINDOW *win, const char *str, int n)
{
(void) win;
(void) str;
(void) n;
return OK;
}
int
wclrtobot(WINDOW *win)
{
(void) win;
return OK;
}
int
wrefresh(WINDOW *win)
{
(void) win;
return OK;
}
int
wnoutrefresh(WINDOW *win)
{
(void) win;
return OK;
}
int
wclrtoeol(WINDOW *win)
{
(void) win;
return OK;
}
int
mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
{
(void) win;
(void) y;
(void) x;
(void) fmt;
return OK;
}
int
init_pair(short pair, short f, short b)
{
(void) pair;
(void) f;
(void) b;
return OK;
}
int
has_colors()
{
return 1;
}
int
cbreak()
{
return OK;
}
int
start_color()
{
return OK;
}
int
noecho()
{
return OK;
}
int
wclear(WINDOW *win)
{
(void) win;
return OK;
}
int
wgetch(WINDOW *win)
{
(void) win;
return OK;
}
int
can_change_color()
{
/* not supported in WeeChat anyway */
return 0;
}
int
curs_set(int visibility)
{
(void) visibility;
return 1; /* 0 == invisible, 1 == normal, 2 == very visible */
}
int
nodelay(WINDOW *win, bool bf)
{
(void) win;
(void) bf;
return OK;
}
int
werase(WINDOW *win)
{
(void) win;
return OK;
}
int
wbkgdset(WINDOW *win, chtype ch)
{
(void) win;
(void) ch;
return OK;
}
void
wchgat(WINDOW *win, int n, attr_t attr, short color, const void *opts)
{
(void) win;
(void) n;
(void) attr;
(void) color;
(void) opts;
}
void
whline()
{
}
void
wvline()
{
}
void
raw()
{
}
void
wcolor_set()
{
}
void
cur_term()
{
}
void
use_default_colors()
{
}
void
resizeterm()
{
}
int
COLS()
{
/* simulate 80x25 terminal */
return 80;
}
int
LINES()
{
/* simulate 80x25 terminal */
return 25;
}
int
COLORS()
{
/* simulate 256-color terminal */
return 256;
}
int
COLOR_PAIRS()
{
/* simulate 256-color terminal */
return 256;
}

View File

@ -197,6 +197,7 @@ main (int argc, char *argv[])
/* init WeeChat */ /* init WeeChat */
printf ("------------------------------------------------------------\n"); printf ("------------------------------------------------------------\n");
weechat_init_gettext ();
weechat_init (weechat_argc, weechat_argv, &test_gui_init); weechat_init (weechat_argc, weechat_argv, &test_gui_init);
if (weechat_argv) if (weechat_argv)
string_free_split (weechat_argv); string_free_split (weechat_argv);