Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
25 KB
Referenced Files
None
Subscribers
None
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c60f72..9d2f48d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,361 +1,366 @@
cmake_minimum_required(VERSION 3.2)
project(Guitar
VERSION 0.9.0
LANGUAGES CXX C
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
find_package(Qt5 COMPONENTS Core Widgets Network Svg REQUIRED)
find_package(zlib REQUIRED )
find_package(OpenSSL REQUIRED )
find_package(Qt5LinguistTools REQUIRED)
+if(WIN32)
+ # check package at
+ # https://github.com/rprichard/winpty
+ find_package(winpty REQUIRED )
+endif()
set(Guitar_SOURCES
version.c
src/main.cpp
src/MainWindow.cpp
src/Git.cpp
src/common/joinpath.cpp
src/common/misc.cpp
src/ConfigCredentialHelperDialog.cpp
src/MySettings.cpp
src/FileDiffWidget.cpp
src/TextEditDialog.cpp
src/LogTableWidget.cpp
src/FileDiffSliderWidget.cpp
src/FileUtil.cpp
src/SettingsDialog.cpp
src/MergeBranchDialog.cpp
src/CloneDialog.cpp
src/AboutDialog.cpp
src/RepositoryInfoFrame.cpp
src/RepositoryPropertyDialog.cpp
src/RepositoryData.cpp
src/MyToolButton.cpp
src/GitDiff.cpp
src/CommitPropertyDialog.cpp
src/Terminal.cpp
src/DeleteTagsDialog.cpp
src/RepositoriesTreeWidget.cpp
src/SelectCommandDialog.cpp
src/ImageViewWidget.cpp
src/FileHistoryWindow.cpp
src/GitPackIdxV2.cpp
src/GitPack.cpp
src/GitObjectManager.cpp
src/FilePropertyDialog.cpp
src/BigDiffWindow.cpp
src/MaximizeButton.cpp
src/CommitExploreWindow.cpp
src/ReadOnlyLineEdit.cpp
src/ReadOnlyPlainTextEdit.cpp
src/MyTableWidgetDelegate.cpp
src/SetRemoteUrlDialog.cpp
src/ClearButton.cpp
src/SetUserDialog.cpp
src/SearchFromGitHubDialog.cpp
src/webclient.cpp
src/charvec.cpp
src/urlencode.cpp
src/HyperLinkLabel.cpp
src/JumpDialog.cpp
src/CheckoutDialog.cpp
src/DeleteBranchDialog.cpp
src/BasicRepositoryDialog.cpp
src/RemoteRepositoriesTableWidget.cpp
src/LocalSocketReader.cpp
src/PushDialog.cpp
src/StatusLabel.cpp
src/RepositoryLineEdit.cpp
src/DirectoryLineEdit.cpp
src/AbstractSettingForm.cpp
src/SettingExampleForm.cpp
src/CreateRepositoryDialog.cpp
src/GitHubAPI.cpp
src/MemoryReader.cpp
src/ExperimentDialog.cpp
src/gunzip.cpp
src/AvatarLoader.cpp
src/SettingNetworkForm.cpp
src/Photoshop.cpp
src/SettingBehaviorForm.cpp
src/MyProcess.cpp
src/FileViewWidget.cpp
src/MyTextEditorWidget.cpp
src/AbstractProcess.cpp
src/texteditor/AbstractCharacterBasedApplication.cpp
src/texteditor/InputMethodPopup.cpp
src/texteditor/TextEditorTheme.cpp
src/texteditor/TextEditorWidget.cpp
src/texteditor/unicode.cpp
src/texteditor/UnicodeWidth.cpp
src/MyImageViewWidget.cpp
src/SetGlobalUserDialog.cpp
src/ReflogWindow.cpp
src/Theme.cpp
src/ApplicationGlobal.cpp
src/BlameWindow.cpp
src/MenuButton.cpp
src/SettingGeneralForm.cpp
src/WelcomeWizardDialog.cpp
src/DialogHeaderFrame.cpp
src/CommitViewWindow.cpp
src/EditRemoteDialog.cpp
src/gpg.cpp
src/SelectGpgKeyDialog.cpp
src/SetGpgSigningDialog.cpp
src/CommitDialog.cpp
src/ConfigSigningDialog.cpp
src/AreYouSureYouWantToContinueConnectingDialog.cpp
src/LineEditDialog.cpp
src/SettingProgramsForm.cpp
src/InputNewTagDialog.cpp
src/EditTagsDialog.cpp
src/darktheme/DarkStyle.cpp
src/darktheme/NinePatch.cpp
src/darktheme/StandardStyle.cpp
src/darktheme/TraditionalWindowsStyleTreeControl.cpp
src/EditGitIgnoreDialog.cpp
src/SelectItemDialog.cpp
src/RebaseOntoDialog.cpp
)
set(Guitar_HEADERS
src/MainWindow.h
src/Git.h
src/common/joinpath.h
src/common/misc.h
src/ConfigCredentialHelperDialog.h
src/MySettings.h
src/main.h
src/FileDiffWidget.h
src/TextEditDialog.h
src/LogTableWidget.h
src/FileDiffSliderWidget.h
src/FileUtil.h
src/SettingsDialog.h
src/MergeBranchDialog.h
src/CloneDialog.h
src/AboutDialog.h
src/RepositoryInfoFrame.h
src/RepositoryPropertyDialog.h
src/RepositoryData.h
src/MyToolButton.h
src/GitDiff.h
src/CommitPropertyDialog.h
src/Terminal.h
src/DeleteTagsDialog.h
src/RepositoriesTreeWidget.h
src/SelectCommandDialog.h
src/ImageViewWidget.h
src/FileHistoryWindow.h
src/Debug.h
src/GitPackIdxV2.h
src/GitPack.h
src/GitObjectManager.h
src/FilePropertyDialog.h
src/BigDiffWindow.h
src/MaximizeButton.h
src/CommitExploreWindow.h
src/ReadOnlyLineEdit.h
src/ReadOnlyPlainTextEdit.h
src/MyTableWidgetDelegate.h
src/SetRemoteUrlDialog.h
myzlib.h
src/ClearButton.h
src/SetUserDialog.h
src/SearchFromGitHubDialog.h
src/webclient.h
src/charvec.h
src/urlencode.h
src/HyperLinkLabel.h
src/JumpDialog.h
src/CheckoutDialog.h
src/DeleteBranchDialog.h
src/BasicRepositoryDialog.h
src/RemoteRepositoriesTableWidget.h
src/LocalSocketReader.h
src/PushDialog.h
src/StatusLabel.h
src/RepositoryLineEdit.h
src/DirectoryLineEdit.h
src/AbstractSettingForm.h
src/SettingExampleForm.h
src/CreateRepositoryDialog.h
src/GitHubAPI.h
src/MemoryReader.h
src/ExperimentDialog.h
src/gunzip.h
src/AvatarLoader.h
src/SettingNetworkForm.h
src/Photoshop.h
src/SettingBehaviorForm.h
src/MyProcess.h
src/FileViewWidget.h
src/MyTextEditorWidget.h
src/AbstractProcess.h
src/texteditor/AbstractCharacterBasedApplication.h
src/texteditor/InputMethodPopup.h
src/texteditor/TextEditorTheme.h
src/texteditor/TextEditorWidget.h
src/texteditor/unicode.h
src/texteditor/UnicodeWidth.h
src/MyImageViewWidget.h
src/SetGlobalUserDialog.h
src/ReflogWindow.h
src/Theme.h
src/ApplicationGlobal.h
src/BlameWindow.h
src/MenuButton.h
src/SettingGeneralForm.h
src/WelcomeWizardDialog.h
src/DialogHeaderFrame.h
src/CommitViewWindow.h
src/EditRemoteDialog.h
src/gpg.h
src/SelectGpgKeyDialog.h
src/SetGpgSigningDialog.h
src/CommitDialog.h
src/ConfigSigningDialog.h
src/AreYouSureYouWantToContinueConnectingDialog.h
src/LineEditDialog.h
src/SettingProgramsForm.h
src/InputNewTagDialog.h
src/EditTagsDialog.h
src/darktheme/DarkStyle.h
src/darktheme/NinePatch.h
src/darktheme/StandardStyle.h
src/darktheme/TraditionalWindowsStyleTreeControl.h
src/EditGitIgnoreDialog.h
src/SelectItemDialog.h
src/RebaseOntoDialog.h
)
if(UNIX)
list(APPEND Guitar_SOURCES
src/unix/UnixProcess.cpp
src/unix/UnixPtyProcess.cpp
)
list(APPEND Guitar_HEADERS
src/unix/UnixProcess.h
src/unix/UnixPtyProcess.h
)
elseif(WIN32)
list(APPEND Guitar_SOURCES
src/win32/thread.cpp
src/win32/event.cpp
src/win32/win32.cpp
src/win32/Win32Process.cpp
src/win32/Win32PtyProcess.cpp
)
list(APPEND Guitar_HEADERS
src/win32/thread.h
src/win32/event.h
src/win32/mutex.h
src/win32/win32.h
src/win32/Win32Process.h
src/win32/Win32PtyProcess.h
)
endif()
set(Guitar_UIS
src/MainWindow.ui
src/ConfigCredentialHelperDialog.ui
src/TextEditDialog.ui
src/SettingsDialog.ui
src/MergeBranchDialog.ui
src/CloneDialog.ui
src/AboutDialog.ui
src/RepositoryPropertyDialog.ui
src/CommitPropertyDialog.ui
src/DeleteTagsDialog.ui
src/SelectCommandDialog.ui
src/FileDiffWidget.ui
src/FileHistoryWindow.ui
src/FilePropertyDialog.ui
src/BigDiffWindow.ui
src/CommitExploreWindow.ui
src/SetRemoteUrlDialog.ui
src/SetUserDialog.ui
src/SearchFromGitHubDialog.ui
src/JumpDialog.ui
src/CheckoutDialog.ui
src/DeleteBranchDialog.ui
src/PushDialog.ui
src/SettingExampleForm.ui
src/CreateRepositoryDialog.ui
src/ExperimentDialog.ui
src/SettingNetworkForm.ui
src/SettingBehaviorForm.ui
src/SetGlobalUserDialog.ui
src/ReflogWindow.ui
src/BlameWindow.ui
src/SettingGeneralForm.ui
src/WelcomeWizardDialog.ui
src/CommitViewWindow.ui
src/EditRemoteDialog.ui
src/SelectGpgKeyDialog.ui
src/SetGpgSigningDialog.ui
src/CommitDialog.ui
src/ConfigSigningDialog.ui
src/AreYouSureYouWantToContinueConnectingDialog.ui
src/LineEditDialog.ui
src/SettingProgramsForm.ui
src/InputNewTagDialog.ui
src/EditTagsDialog.ui
src/EditGitIgnoreDialog.ui
src/SelectItemDialog.ui
src/RebaseOntoDialog.ui
)
set(Guitar_RESOURCES
src/resources/resources.qrc
)
set(Guitar_TRANSLATIONS
src/resources/translations/ja_JPN.ts
)
qt5_add_translation(Guitar_QM_FILES ${Guitar_TRANSLATIONS})
configure_file(${Guitar_RESOURCES} ${CMAKE_BINARY_DIR} COPYONLY)
add_custom_target(translations ALL DEPENDS ${Guitar_QM_FILES})
add_custom_target(resources ALL DEPENDS ${Guitar_RESOURCES})
add_dependencies(resources translations)
include_directories(src)
include_directories(src/texteditor)
add_executable(${PROJECT_NAME}
${Guitar_SOURCES}
${Guitar_HEADERS}
${Guitar_UIS}
${Guitar_RESOURCES}
${Guitar_QM_FILES}
)
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS OFF
)
target_link_libraries(${PROJECT_NAME}
Qt5::Widgets
Qt5::Network
Qt5::Svg
zlib
OpenSSL::SSL OpenSSL::Crypto
)
add_subdirectory(extra)
diff --git a/winpty/winpty.h b/winpty/winpty.h
deleted file mode 100644
index fdfe4bc..0000000
--- a/winpty/winpty.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2011-2016 Ryan Prichard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef WINPTY_H
-#define WINPTY_H
-
-#include <windows.h>
-
-#include "winpty_constants.h"
-
-/* On 32-bit Windows, winpty functions have the default __cdecl (not __stdcall)
- * calling convention. (64-bit Windows has only a single calling convention.)
- * When compiled with __declspec(dllexport), with either MinGW or MSVC, the
- * winpty functions are unadorned--no underscore prefix or '@nn' suffix--so
- * GetProcAddress can be used easily. */
-#ifdef COMPILING_WINPTY_DLL
-#define WINPTY_API __declspec(dllexport)
-#else
-#define WINPTY_API __declspec(dllimport)
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The winpty API uses wide characters, instead of UTF-8, to avoid conversion
- * complications related to surrogates. Windows generally tolerates unpaired
- * surrogates in text, which makes conversion to and from UTF-8 ambiguous and
- * complicated. (There are different UTF-8 variants that deal with UTF-16
- * surrogates differently.) */
-
-
-
-/*****************************************************************************
- * Error handling. */
-
-/* All the APIs have an optional winpty_error_t output parameter. If a
- * non-NULL argument is specified, then either the API writes NULL to the
- * value (on success) or writes a newly allocated winpty_error_t object. The
- * object must be freed using winpty_error_free. */
-
-/* An error object. */
-typedef struct winpty_error_s winpty_error_t;
-typedef winpty_error_t *winpty_error_ptr_t;
-
-/* An error code -- one of WINPTY_ERROR_xxx. */
-typedef DWORD winpty_result_t;
-
-/* Gets the error code from the error object. */
-WINPTY_API winpty_result_t winpty_error_code(winpty_error_ptr_t err);
-
-/* Returns a textual representation of the error. The string is freed when
- * the error is freed. */
-WINPTY_API LPCWSTR winpty_error_msg(winpty_error_ptr_t err);
-
-/* Free the error object. Every error returned from the winpty API must be
- * freed. */
-WINPTY_API void winpty_error_free(winpty_error_ptr_t err);
-
-
-
-/*****************************************************************************
- * Configuration of a new agent. */
-
-/* The winpty_config_t object is not thread-safe. */
-typedef struct winpty_config_s winpty_config_t;
-
-/* Allocate a winpty_config_t value. Returns NULL on error. There are no
- * required settings -- the object may immediately be used. agentFlags is a
- * set of zero or more WINPTY_FLAG_xxx values. An unrecognized flag results
- * in an assertion failure. */
-WINPTY_API winpty_config_t *
-winpty_config_new(UINT64 agentFlags, winpty_error_ptr_t *err /*OPTIONAL*/);
-
-/* Free the cfg object after passing it to winpty_open. */
-WINPTY_API void winpty_config_free(winpty_config_t *cfg);
-
-WINPTY_API void
-winpty_config_set_initial_size(winpty_config_t *cfg, int cols, int rows);
-
-/* Set the mouse mode to one of the WINPTY_MOUSE_MODE_xxx constants. */
-WINPTY_API void
-winpty_config_set_mouse_mode(winpty_config_t *cfg, int mouseMode);
-
-/* Amount of time to wait for the agent to startup and to wait for any given
- * agent RPC request. Must be greater than 0. Can be INFINITE. */
-WINPTY_API void
-winpty_config_set_agent_timeout(winpty_config_t *cfg, DWORD timeoutMs);
-
-
-
-/*****************************************************************************
- * Start the agent. */
-
-/* The winpty_t object is thread-safe. */
-typedef struct winpty_s winpty_t;
-
-/* Starts the agent. Returns NULL on error. This process will connect to the
- * agent over a control pipe, and the agent will open data pipes (e.g. CONIN
- * and CONOUT). */
-WINPTY_API winpty_t *
-winpty_open(const winpty_config_t *cfg,
- winpty_error_ptr_t *err /*OPTIONAL*/);
-
-/* A handle to the agent process. This value is valid for the lifetime of the
- * winpty_t object. Do not close it. */
-WINPTY_API HANDLE winpty_agent_process(winpty_t *wp);
-
-
-
-/*****************************************************************************
- * I/O pipes. */
-
-/* Returns the names of named pipes used for terminal I/O. Each input or
- * output direction uses a different half-duplex pipe. The agent creates
- * these pipes, and the client can connect to them using ordinary I/O methods.
- * The strings are freed when the winpty_t object is freed.
- *
- * winpty_conerr_name returns NULL unless WINPTY_FLAG_CONERR is specified.
- *
- * N.B.: CreateFile does not block when connecting to a local server pipe. If
- * the server pipe does not exist or is already connected, then it fails
- * instantly. */
-WINPTY_API LPCWSTR winpty_conin_name(winpty_t *wp);
-WINPTY_API LPCWSTR winpty_conout_name(winpty_t *wp);
-WINPTY_API LPCWSTR winpty_conerr_name(winpty_t *wp);
-
-
-
-/*****************************************************************************
- * winpty agent RPC call: process creation. */
-
-/* The winpty_spawn_config_t object is not thread-safe. */
-typedef struct winpty_spawn_config_s winpty_spawn_config_t;
-
-/* winpty_spawn_config strings do not need to live as long as the config
- * object. They are copied. Returns NULL on error. spawnFlags is a set of
- * zero or more WINPTY_SPAWN_FLAG_xxx values. An unrecognized flag results in
- * an assertion failure.
- *
- * env is a a pointer to an environment block like that passed to
- * CreateProcess--a contiguous array of NUL-terminated "VAR=VAL" strings
- * followed by a final NUL terminator.
- *
- * N.B.: If you want to gather all of the child's output, you may want the
- * WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN flag.
- */
-WINPTY_API winpty_spawn_config_t *
-winpty_spawn_config_new(UINT64 spawnFlags,
- LPCWSTR appname /*OPTIONAL*/,
- LPCWSTR cmdline /*OPTIONAL*/,
- LPCWSTR cwd /*OPTIONAL*/,
- LPCWSTR env /*OPTIONAL*/,
- winpty_error_ptr_t *err /*OPTIONAL*/);
-
-/* Free the cfg object after passing it to winpty_spawn. */
-WINPTY_API void winpty_spawn_config_free(winpty_spawn_config_t *cfg);
-
-/*
- * Spawns the new process.
- *
- * The function initializes all output parameters to zero or NULL.
- *
- * On success, the function returns TRUE. For each of process_handle and
- * thread_handle that is non-NULL, the HANDLE returned from CreateProcess is
- * duplicated from the agent and returned to the winpty client. The client is
- * responsible for closing these HANDLES.
- *
- * On failure, the function returns FALSE, and if err is non-NULL, then *err
- * is set to an error object.
- *
- * If the agent's CreateProcess call failed, then *create_process_error is set
- * to GetLastError(), and the WINPTY_ERROR_SPAWN_CREATE_PROCESS_FAILED error
- * is returned.
- *
- * winpty_spawn can only be called once per winpty_t object. If it is called
- * before the output data pipe(s) is/are connected, then collected output is
- * buffered until the pipes are connected, rather than being discarded.
- *
- * N.B.: GetProcessId works even if the process has exited. The PID is not
- * recycled until the NT process object is freed.
- * (https://blogs.msdn.microsoft.com/oldnewthing/20110107-00/?p=11803)
- */
-WINPTY_API BOOL
-winpty_spawn(winpty_t *wp,
- const winpty_spawn_config_t *cfg,
- HANDLE *process_handle /*OPTIONAL*/,
- HANDLE *thread_handle /*OPTIONAL*/,
- DWORD *create_process_error /*OPTIONAL*/,
- winpty_error_ptr_t *err /*OPTIONAL*/);
-
-
-
-/*****************************************************************************
- * winpty agent RPC calls: everything else */
-
-/* Change the size of the Windows console window. */
-WINPTY_API BOOL
-winpty_set_size(winpty_t *wp, int cols, int rows,
- winpty_error_ptr_t *err /*OPTIONAL*/);
-
-/* Gets a list of processes attached to the console. */
-WINPTY_API int
-winpty_get_console_process_list(winpty_t *wp, int *processList, const int processCount,
- winpty_error_ptr_t *err /*OPTIONAL*/);
-
-/* Frees the winpty_t object and the OS resources contained in it. This
- * call breaks the connection with the agent, which should then close its
- * console, terminating the processes attached to it.
- *
- * This function must not be called if any other threads are using the
- * winpty_t object. Undefined behavior results. */
-WINPTY_API void winpty_free(winpty_t *wp);
-
-
-
-/****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WINPTY_H */
diff --git a/winpty/winpty.lib b/winpty/winpty.lib
deleted file mode 100644
index a35c429..0000000
Binary files a/winpty/winpty.lib and /dev/null differ
diff --git a/winpty/winpty_constants.h b/winpty/winpty_constants.h
deleted file mode 100644
index 11e34cf..0000000
--- a/winpty/winpty_constants.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2016 Ryan Prichard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef WINPTY_CONSTANTS_H
-#define WINPTY_CONSTANTS_H
-
-/*
- * You may want to include winpty.h instead, which includes this header.
- *
- * This file is split out from winpty.h so that the agent can access the
- * winpty flags without also declaring the libwinpty APIs.
- */
-
-/*****************************************************************************
- * Error codes. */
-
-#define WINPTY_ERROR_SUCCESS 0
-#define WINPTY_ERROR_OUT_OF_MEMORY 1
-#define WINPTY_ERROR_SPAWN_CREATE_PROCESS_FAILED 2
-#define WINPTY_ERROR_LOST_CONNECTION 3
-#define WINPTY_ERROR_AGENT_EXE_MISSING 4
-#define WINPTY_ERROR_UNSPECIFIED 5
-#define WINPTY_ERROR_AGENT_DIED 6
-#define WINPTY_ERROR_AGENT_TIMEOUT 7
-#define WINPTY_ERROR_AGENT_CREATION_FAILED 8
-
-
-
-/*****************************************************************************
- * Configuration of a new agent. */
-
-/* Create a new screen buffer (connected to the "conerr" terminal pipe) and
- * pass it to child processes as the STDERR handle. This flag also prevents
- * the agent from reopening CONOUT$ when it polls -- regardless of whether the
- * active screen buffer changes, winpty continues to monitor the original
- * primary screen buffer. */
-#define WINPTY_FLAG_CONERR 0x1ull
-
-/* Don't output escape sequences. */
-#define WINPTY_FLAG_PLAIN_OUTPUT 0x2ull
-
-/* Do output color escape sequences. These escapes are output by default, but
- * are suppressed with WINPTY_FLAG_PLAIN_OUTPUT. Use this flag to reenable
- * them. */
-#define WINPTY_FLAG_COLOR_ESCAPES 0x4ull
-
-/* On XP and Vista, winpty needs to put the hidden console on a desktop in a
- * service window station so that its polling does not interfere with other
- * (visible) console windows. To create this desktop, it must change the
- * process' window station (i.e. SetProcessWindowStation) for the duration of
- * the winpty_open call. In theory, this change could interfere with the
- * winpty client (e.g. other threads, spawning children), so winpty by default
- * spawns a special agent process to create the hidden desktop. Spawning
- * processes on Windows is slow, though, so if
- * WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION is set, winpty changes this
- * process' window station instead.
- * See https://github.com/rprichard/winpty/issues/58. */
-#define WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION 0x8ull
-
-#define WINPTY_FLAG_MASK (0ull \
- | WINPTY_FLAG_CONERR \
- | WINPTY_FLAG_PLAIN_OUTPUT \
- | WINPTY_FLAG_COLOR_ESCAPES \
- | WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION \
-)
-
-/* QuickEdit mode is initially disabled, and the agent does not send mouse
- * mode sequences to the terminal. If it receives mouse input, though, it
- * still writes MOUSE_EVENT_RECORD values into CONIN. */
-#define WINPTY_MOUSE_MODE_NONE 0
-
-/* QuickEdit mode is initially enabled. As CONIN enters or leaves mouse
- * input mode (i.e. where ENABLE_MOUSE_INPUT is on and ENABLE_QUICK_EDIT_MODE
- * is off), the agent enables or disables mouse input on the terminal.
- *
- * This is the default mode. */
-#define WINPTY_MOUSE_MODE_AUTO 1
-
-/* QuickEdit mode is initially disabled, and the agent enables the terminal's
- * mouse input mode. It does not disable terminal mouse mode (until exit). */
-#define WINPTY_MOUSE_MODE_FORCE 2
-
-
-
-/*****************************************************************************
- * winpty agent RPC call: process creation. */
-
-/* If the spawn is marked "auto-shutdown", then the agent shuts down console
- * output once the process exits. The agent stops polling for new console
- * output, and once all pending data has been written to the output pipe, the
- * agent closes the pipe. (At that point, the pipe may still have data in it,
- * which the client may read. Once all the data has been read, further reads
- * return EOF.) */
-#define WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN 1ull
-
-/* After the agent shuts down output, and after all output has been written
- * into the pipe(s), exit the agent by closing the console. If there any
- * surviving processes still attached to the console, they are killed.
- *
- * Note: With this flag, an RPC call (e.g. winpty_set_size) issued after the
- * agent exits will fail with an I/O or dead-agent error. */
-#define WINPTY_SPAWN_FLAG_EXIT_AFTER_SHUTDOWN 2ull
-
-/* All the spawn flags. */
-#define WINPTY_SPAWN_FLAG_MASK (0ull \
- | WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN \
- | WINPTY_SPAWN_FLAG_EXIT_AFTER_SHUTDOWN \
-)
-
-
-
-#endif /* WINPTY_CONSTANTS_H */

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jun 17, 9:34 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71394
Default Alt Text
(25 KB)

Event Timeline