mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2026-02-08 08:42:22 +00:00
Compare commits
6 Commits
feature/ad
...
feature/qt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77434e463e | ||
|
|
6bcb54114d | ||
|
|
09f813a7e0 | ||
|
|
a6a7768e42 | ||
|
|
33878dae24 | ||
|
|
0313a00b4f |
7
.github/workflows/build-appimage.yml
vendored
7
.github/workflows/build-appimage.yml
vendored
@@ -11,8 +11,13 @@ jobs:
|
||||
build-appimage:
|
||||
name: Build (Linux, AppImage)
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install build deps
|
||||
run: |
|
||||
@@ -24,7 +29,7 @@ jobs:
|
||||
with:
|
||||
version: 6.10.0
|
||||
dir: ..
|
||||
modules: qtwayland qtshadertools
|
||||
modules: qtshadertools
|
||||
setup-python: false
|
||||
cache: true
|
||||
|
||||
|
||||
8
.github/workflows/build-dmg.yml
vendored
8
.github/workflows/build-dmg.yml
vendored
@@ -11,15 +11,21 @@ jobs:
|
||||
build-dmg:
|
||||
name: Build (macOS, DMG)
|
||||
runs-on: macos-14
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.10.*
|
||||
modules: qtshadertools
|
||||
setup-python: false
|
||||
setup-python: true
|
||||
python-version: '3.11'
|
||||
cache: true
|
||||
|
||||
- name: Build DMG
|
||||
|
||||
@@ -10,7 +10,7 @@ It has been designed to be eye-candy, customizable, and reasonably lightweight.
|
||||
|
||||
It uses the QML port of qtermwidget (Konsole): https://github.com/Swordfish90/qmltermwidget.
|
||||
|
||||
This terminal emulator works under Linux and macOS and requires Qt5. It's suggested that you stick to the latest LTS version.
|
||||
This terminal emulator works under Linux and macOS and requires Qt6.
|
||||
|
||||
Settings such as colors, fonts, and effects can be accessed via context menu.
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ import QtQuick 2.2
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQml
|
||||
|
||||
import QMLTermWidget 1.0
|
||||
import QMLTermWidget 2.0
|
||||
|
||||
import "menus"
|
||||
import "utils.js" as Utils
|
||||
|
||||
Item{
|
||||
Item {
|
||||
id: preprocessedTerminal
|
||||
signal sessionFinished()
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ ColumnLayout {
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
title: qsTr("Command")
|
||||
title: qsTr("Miscellaneous")
|
||||
padding: appSettings.defaultMargin
|
||||
|
||||
ColumnLayout {
|
||||
@@ -39,12 +39,6 @@ ColumnLayout {
|
||||
checked: appSettings.useCustomCommand
|
||||
onCheckedChanged: appSettings.useCustomCommand = checked
|
||||
}
|
||||
// Workaround for QTBUG-31627 for pre 5.3.0
|
||||
Binding {
|
||||
target: useCustomCommand
|
||||
property: "checked"
|
||||
value: appSettings.useCustomCommand
|
||||
}
|
||||
TextField {
|
||||
id: customCommand
|
||||
Layout.fillWidth: true
|
||||
@@ -59,26 +53,18 @@ ColumnLayout {
|
||||
Component.onCompleted: settings_window.closing.connect(
|
||||
saveSetting)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GroupBox {
|
||||
title: qsTr("Cursor")
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
padding: appSettings.defaultMargin
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
CheckBox {
|
||||
id: blinkingCursor
|
||||
text: qsTr("Blinking Cursor")
|
||||
checked: appSettings.blinkingCursor
|
||||
onCheckedChanged: appSettings.blinkingCursor = checked
|
||||
}
|
||||
Binding {
|
||||
target: blinkingCursor
|
||||
property: "checked"
|
||||
value: appSettings.blinkingCursor
|
||||
CheckBox {
|
||||
id: showMenubar
|
||||
text: qsTr("Show Menubar")
|
||||
enabled: !appSettings.isMacOS
|
||||
checked: appSettings.showMenubar
|
||||
onCheckedChanged: appSettings.showMenubar = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,15 +21,13 @@ import QtQuick 2.2
|
||||
|
||||
Rectangle {
|
||||
property size terminalSize
|
||||
property real topOpacity: 0.6
|
||||
property real topOpacity: 0.5
|
||||
|
||||
width: textSize.width * 2
|
||||
height: textSize.height * 2
|
||||
radius: 5
|
||||
border.width: 2
|
||||
border.color: "white"
|
||||
color: "black"
|
||||
opacity: sizetimer.running ? 0.6 : 0.0
|
||||
opacity: sizetimer.running ? 0.5 : 0.0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQml.Models
|
||||
|
||||
Item {
|
||||
id: tabsRoot
|
||||
|
||||
readonly property int innerPadding: 6
|
||||
readonly property string currentTitle: tabsModel.get(currentIndex).title ?? "cool-retro-term"
|
||||
readonly property size terminalSize: stack.currentItem ? stack.currentItem.terminalSize : Qt.size(0, 0)
|
||||
property alias currentIndex: tabBar.currentIndex
|
||||
readonly property int count: tabsModel.count
|
||||
property var hostWindow
|
||||
property size terminalSize: Qt.size(0, 0)
|
||||
|
||||
function normalizeTitle(rawTitle) {
|
||||
if (rawTitle === undefined || rawTitle === null) {
|
||||
@@ -45,7 +45,7 @@ Item {
|
||||
|
||||
function closeTab(index) {
|
||||
if (tabsModel.count <= 1) {
|
||||
hostWindow.close()
|
||||
terminalWindow.close()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -132,10 +132,20 @@ Item {
|
||||
TerminalContainer {
|
||||
id: terminalContainer
|
||||
hasFocus: terminalWindow.active && StackLayout.isCurrentItem
|
||||
|
||||
onTerminalSizeChanged: updateTerminalSize()
|
||||
|
||||
onTitleChanged: tabsModel.setProperty(index, "title", normalizeTitle(title))
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
onSessionFinished: tabsRoot.closeTab(index)
|
||||
|
||||
function updateTerminalSize() {
|
||||
// Every tab will have the same size so we can simply take the first one.
|
||||
if (index == 0) {
|
||||
tabsRoot.terminalSize = terminalSize
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ ApplicationWindow {
|
||||
id: terminalTabs
|
||||
width: parent.width
|
||||
height: (parent.height + Math.abs(y))
|
||||
hostWindow: terminalWindow
|
||||
}
|
||||
Loader {
|
||||
anchors.centerIn: parent
|
||||
|
||||
@@ -52,15 +52,6 @@ QtObject {
|
||||
sourceComponent: OSXMenu { }
|
||||
}
|
||||
|
||||
property Action showMenubarAction: Action {
|
||||
text: qsTr("Show Menubar")
|
||||
enabled: !appSettings.isMacOS
|
||||
shortcut: "Ctrl+Shift+M"
|
||||
checkable: true
|
||||
checked: appSettings.showMenubar
|
||||
onTriggered: appSettings.showMenubar = !appSettings.showMenubar
|
||||
}
|
||||
|
||||
property Action fullscreenAction: Action {
|
||||
text: qsTr("Fullscreen")
|
||||
enabled: !appSettings.isMacOS
|
||||
|
||||
@@ -64,10 +64,6 @@ Menu {
|
||||
action: fullscreenAction
|
||||
visible: fullscreenAction.enabled
|
||||
}
|
||||
MenuItem {
|
||||
action: showMenubarAction
|
||||
visible: showMenubarAction.enabled
|
||||
}
|
||||
MenuItem {
|
||||
action: zoomInAction
|
||||
}
|
||||
|
||||
@@ -56,10 +56,6 @@ MenuBar {
|
||||
action: fullscreenAction
|
||||
visible: fullscreenAction.enabled
|
||||
}
|
||||
MenuItem {
|
||||
action: showMenubarAction
|
||||
visible: showMenubarAction.enabled
|
||||
}
|
||||
MenuItem {
|
||||
action: zoomInAction
|
||||
}
|
||||
|
||||
Submodule qmltermwidget updated: eef7525edb...ed85066d14
@@ -6,6 +6,10 @@ REPO_ROOT="$(readlink -f "$(dirname "$(dirname "$0")")")"
|
||||
OLD_CWD="$(readlink -f .)"
|
||||
BUILD_DIR="$REPO_ROOT/build/appimage"
|
||||
TOOLS_DIR="$BUILD_DIR/tools"
|
||||
VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)"
|
||||
if [ -z "$VERSION" ]; then
|
||||
VERSION="unknown"
|
||||
fi
|
||||
|
||||
if ! command -v qmake >/dev/null; then
|
||||
echo "qmake not found in PATH." >&2
|
||||
@@ -73,5 +77,7 @@ export LINUXDEPLOY_EXCLUDED_LIBRARIES="libmysqlclient.so;libqsqlmimer.so;libqsql
|
||||
--plugin qt \
|
||||
--output appimage
|
||||
|
||||
mv ./*.AppImage "$OLD_CWD"
|
||||
APPIMAGE_PATH="$(ls -1 ./*.AppImage | head -n 1)"
|
||||
APPIMAGE_OUT="cool-retro-term-${VERSION}.AppImage"
|
||||
mv "$APPIMAGE_PATH" "$OLD_CWD/$APPIMAGE_OUT"
|
||||
popd
|
||||
|
||||
@@ -8,6 +8,10 @@ BUILD_DIR="$REPO_ROOT/build/dmg"
|
||||
APP="cool-retro-term.app"
|
||||
QML_DIR="$REPO_ROOT/app/qml"
|
||||
JOBS="${JOBS:-$(sysctl -n hw.ncpu 2>/dev/null || echo 4)}"
|
||||
VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)"
|
||||
if [ -z "$VERSION" ]; then
|
||||
VERSION="unknown"
|
||||
fi
|
||||
|
||||
if ! command -v qmake >/dev/null; then
|
||||
echo "qmake not found in PATH." >&2
|
||||
@@ -32,5 +36,6 @@ export QML_IMPORT_PATH="$PWD/$APP/Contents/PlugIns"
|
||||
"$QT_BIN/macdeployqt" "$APP" -qmldir="$QML_DIR" -dmg
|
||||
|
||||
rm -f "$APP/Contents/PlugIns/sqldrivers/"libqsql{odbc,psql,mimer}.dylib 2>/dev/null || true
|
||||
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/"
|
||||
DMG_OUT="${APP%.app}-${VERSION}.dmg"
|
||||
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/$DMG_OUT"
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user