Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Windows support from KDE Konsole #578

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,29 @@ set(QTERMWIDGET_LIBRARY_NAME qtermwidget6)


# main library
if(WIN32)
set(WIN_SRCS
lib/ptyqt/conptyprocess.cpp
lib/ptyqt/iptyprocess.cpp
)
set(WIN_HDRS
lib/ptyqt/conptyprocess.h
lib/ptyqt/iptyprocess.h
)
else()
set(UNIX_SRCS
lib/kpty.cpp
lib/kptydevice.cpp
lib/kptyprocess.cpp
lib/BlockArray.cpp
)
set(UNIX_HDRS
lib/kptydevice.h
lib/kptyprocess.h
)
endif()

set(SRCS
lib/BlockArray.cpp
lib/ColorScheme.cpp
lib/Emulation.cpp
lib/Filter.cpp
Expand All @@ -70,9 +90,6 @@ set(SRCS
lib/KeyboardTranslator.cpp
lib/konsole_wcwidth.cpp
lib/kprocess.cpp
lib/kpty.cpp
lib/kptydevice.cpp
lib/kptyprocess.cpp
lib/Pty.cpp
lib/qtermwidget.cpp
lib/Screen.cpp
Expand All @@ -84,6 +101,8 @@ set(SRCS
lib/TerminalDisplay.cpp
lib/tools.cpp
lib/Vt102Emulation.cpp
${WIN_SRCS}
${UNIX_SRCS}
)

# Only the Headers that need to be moc'd go here
Expand All @@ -92,15 +111,15 @@ set(HDRS
lib/Filter.h
lib/HistorySearch.h
lib/kprocess.h
lib/kptydevice.h
lib/kptyprocess.h
lib/Pty.h
lib/qtermwidget.h
lib/ScreenWindow.h
lib/SearchBar.h
lib/Session.h
lib/TerminalDisplay.h
lib/Vt102Emulation.h
${WIN_HDRS}
${UNIX_HDRS}
)

set(UI
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ Copyright: Author Adriaan de Groot <[email protected]>
2022, Francesc Martinez <[email protected]>
License: LGPL-2+

Files: lib/wcwidth.c
Copyright: Markus Kuhn
License: MIT

Files: lib/ptyqt/conptyprocess.cpp
lib/ptyqt/conptyprocess.h
Copyright: Vitaly Petrov <[email protected]>
License: MIT

Files: lib/ptyqt/iptyprocess.cpp
lib/ptyqt/iptyprocess.h
Copyright: Waqar Ahmed <[email protected]>
License: MIT

Files: cmake/FindUtf8Proc.cmake
Copyright: 2009-2011, Kitware, Inc
2009-2011, Philip Lowman <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions examples/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ int main(int argc, char *argv[])
font.setFamily(QStringLiteral("Monaco"));
#elif defined(Q_WS_QWS)
font.setFamily(QStringLiteral("fixed"));
#elif defined(Q_OS_WIN)
font.setFamily(QStringLiteral("Courier New"));
#else
font.setFamily(QStringLiteral("Monospace"));
#endif
Expand Down
1 change: 0 additions & 1 deletion lib/Emulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
// System
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include <string>

// Qt
Expand Down
Loading