Skip to content

Commit 809bf71

Browse files
committed
CI: install qtermwidget resource
1 parent 45d4085 commit 809bf71

5 files changed

Lines changed: 29 additions & 15 deletions

File tree

.github/workflows/msvc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ jobs:
437437
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
438438
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
439439
copy /Y vcpkg_installed\${{matrix.VCPKG_TARGET_TRIPLET}}\bin\*.dll install\bin
440-
copy /Y ${{env.INSTALL_DIR}}\share\qtermwidget6 install\bin
440+
IF EXIST "${{env.INSTALL_DIR}}\share\qtermwidget6" (
441+
copy /Y ${{env.INSTALL_DIR}}\share\qtermwidget6 install\share
442+
)
441443
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-1.80.exe
442444
copy npcap-1.80.exe install\bin
443445
7z a RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Portable.zip .\install\*

Script/build_appimage.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ cmake --install . --config Release --strip --component DependLibraries --prefix
187187
cmake --install . --config Release --strip --component Runtime --prefix ${INSTALL_APP_DIR}
188188
cmake --install . --config Release --strip --component Application --prefix ${INSTALL_APP_DIR}
189189
cmake --install . --config Release --strip --component Plugin --prefix ${INSTALL_APP_DIR}
190-
cp -r ${INSTALL_DIR}/share/qtermwidget6/* ${INSTALL_APP_DIR}/bin
190+
if [ -d "${INSTALL_DIR}/share/qtermwidget6" ]; then
191+
cp -r ${INSTALL_DIR}/share/qtermwidget6 ${INSTALL_APP_DIR}/share/
192+
else
193+
echo "${INSTALL_DIR}/share/qtermwidget6 is not exist"
194+
fi
191195

192196
echo "Build AppImage ......"
193197
# See: https://github.com/linuxdeploy/linuxdeploy-plugin-qt

Src/Terminal/OperateTerminal.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ COperateTerminal::COperateTerminal(CPlugin *parent)
2727
return;
2828
}
2929
m_pTerminal->setAutoClose(true);
30-
m_pTerminal->addCustomColorSchemeDir(QApplication::applicationDirPath());
30+
m_pTerminal->addCustomColorSchemeDir(QApplication::applicationDirPath()
31+
+ QDir::separator() + "color-schemes");
3132
m_pTerminal->addCustomColorSchemeDir(QApplication::applicationDirPath()
3233
+ QDir::separator() + ".."
33-
+ QDir::separator() + "share");
34+
+ QDir::separator() + "share"
35+
+ QDir::separator() + "qtermwidget6"
36+
+ QDir::separator() + "color-schemes");
3437

3538
bool check = false;
3639
m_pTerminal->setContextMenuPolicy(Qt::CustomContextMenu);

Src/Terminal/ParameterTerminalUI.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ int CParameterTerminalUI::SetParameter(CParameter *pParameter)
101101
ui->cbCursorShape->addItem(tr("IBeamCursor"), (int)Konsole::Emulation::KeyboardCursorShape::BlockCursor);
102102
ui->cbCursorShape->setCurrentIndex((int)m_pPara->GetCursorShape());
103103

104-
QTermWidget::addCustomColorSchemeDir(QApplication::applicationDirPath());
104+
QTermWidget::addCustomColorSchemeDir(QApplication::applicationDirPath()
105+
+ QDir::separator() + "color-schemes");
105106
QTermWidget::addCustomColorSchemeDir(QApplication::applicationDirPath()
106107
+ QDir::separator() + ".."
107-
+ QDir::separator() + "share");
108+
+ QDir::separator() + "share"
109+
+ QDir::separator() + "qtermwidget6"
110+
+ QDir::separator() + "color-schemes");
108111
ui->cbColorScheme->addItems(QTermWidget::availableColorSchemes());
109112
if(!m_pPara->GetColorScheme().isEmpty())
110113
ui->cbColorScheme->setCurrentText(m_pPara->GetColorScheme());

snap/snapcraft.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ description: |
3232
# See: https://snapcraft.io/docs/reference-architectures
3333
# See: https://snapcraft.io/docs/architectures
3434
base: core24 # the base snap is the execution environment for this snap
35-
platforms:
36-
amd64:
37-
arm64:
35+
#platforms:
36+
# amd64:
37+
# arm64:
3838
#base: core22
3939
#architectures:
4040
# - build-on: amd64
@@ -250,6 +250,8 @@ parts:
250250
- -DCMAKE_BUILD_TYPE=Release
251251
- -DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr/local/
252252
- -Dlxqt2-build-tools_DIR=$CRAFT_STAGE/usr/local/share/cmake/lxqt2-build-tools
253+
prime:
254+
- -usr/local/include
253255

254256
rabbitremotecontrol:
255257
# See 'snapcraft plugins'
@@ -298,18 +300,18 @@ parts:
298300
# - -DQt6_ROOT=$CRAFT_STAGE/qt
299301
# - -DQt6_DIR=$CRAFT_STAGE/qt/lib/cmake/Qt6
300302
#- -DCMAKE_MODULE_PATH=$CRAFT_STAGE/qt/lib/cmake
301-
- -DCMAKE_INSTALL_PREFIX=/opt/RabbitRemoteControl
303+
#- -DCMAKE_INSTALL_PREFIX=/usr/local/
302304
- -DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr/local/
303305
# build-environment:
304306
# - LD_LIBRARY_PATH: "$CRAFT_STAGE/qt/lib:$LD_LIBRARY_PATH"
305307
# - CMAKE_FIND_ROOT_PATH: "$CRAFT_STAGE/qt;$CRAFT_STAGE/usr/local/lib;$CMAKE_FIND_ROOT_PATH"
306308
# - PATH: "$CRAFT_STAGE/qt/bin:$PATH"
307309
override-stage: |
308-
cd $CRAFT_PART_INSTALL/opt/RabbitRemoteControl/bin
310+
cd $CRAFT_PART_INSTALL/usr/local/bin
309311
# cp $SNAPCRAFT_PART_SRC/snap/local/start.sh .
310312
# See: https://snapcraft.io/docs/desktop-menu-support#heading--desktop-key
311-
sed -i 's|Icon=io\.github\.KangLin\.RabbitRemoteControl|Icon=/opt/RabbitRemoteControl/share/icons/hicolor/scalable/apps/io\.github\.KangLin\.RabbitRemoteControl\.svg|' $CRAFT_PART_INSTALL/opt/RabbitRemoteControl/share/applications/io.github.KangLin.RabbitRemoteControl.desktop
312-
sed -i 's|Path=/opt/RabbitRemoteControl/bin|Path=\$\{SNAP\}/opt/RabbitRemoteControl/bin|' $CRAFT_PART_INSTALL/opt/RabbitRemoteControl/share/applications/io.github.KangLin.RabbitRemoteControl.desktop
313+
sed -i 's|Icon=io\.github\.KangLin\.RabbitRemoteControl|Icon=/usr/local/share/icons/hicolor/scalable/apps/io\.github\.KangLin\.RabbitRemoteControl\.svg|' $CRAFT_PART_INSTALL/usr/local/share/applications/io.github.KangLin.RabbitRemoteControl.desktop
314+
sed -i 's|Path=/usr/local/bin|Path=\$\{SNAP\}/usr/local/bin|' $CRAFT_PART_INSTALL/usr/local/share/applications/io.github.KangLin.RabbitRemoteControl.desktop
313315
# cat > "qt.conf" << EOF
314316
# [Paths]
315317
# Prefix=../../..
@@ -333,8 +335,8 @@ apps:
333335
# See: https://snapcraft.io/docs/desktop-menu-support#heading--desktop-key
334336
desktop: opt/RabbitRemoteControl/share/applications/io.github.KangLin.RabbitRemoteControl.desktop
335337
environment:
336-
LD_LIBRARY_PATH: ${SNAP}/usr/local/lib:${SNAP}/opt/RabbitRemoteControl/lib/:${LD_LIBRARY_PATH}
337-
PATH: $SNAP/opt/RabbitRemoteControl/bin:$PATH
338+
LD_LIBRARY_PATH: ${SNAP}/usr/local/lib::${LD_LIBRARY_PATH}
339+
PATH: $SNAP/usr/local/bin:$PATH
338340
# List extensions, run `snapcraft extensions`
339341
extensions:
340342
# [KDE neon extensions](https://documentation.ubuntu.com/snapcraft/stable/reference/extensions/kde-neon-extensions/)

0 commit comments

Comments
 (0)