mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
use Qt 5.15.4 for mac CI (#2219)
This commit is contained in:
parent
a37d03fd02
commit
3c64b86297
26
.github/workflows/ci-macos.yml
vendored
26
.github/workflows/ci-macos.yml
vendored
@ -13,11 +13,23 @@ env:
|
|||||||
VNOTE_VER: 3.14.0
|
VNOTE_VER: 3.14.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build:
|
||||||
name: Build On MacOS
|
name: Build On MacOS
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {
|
||||||
|
name: "Build Qt 5.12",
|
||||||
|
qt: 5.12.12
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Build Qt 5.15",
|
||||||
|
qt: 5.15.2
|
||||||
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE.
|
# Checks-out your repository under $GITHUB_WORKSPACE.
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -44,12 +56,12 @@ jobs:
|
|||||||
uses: actions/cache@v1 # not v2!
|
uses: actions/cache@v1 # not v2!
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ../Qt
|
||||||
key: ${{ runner.os }}-QtCache-5.12-2
|
key: ${{ runner.os }}-QtCache-${{ matrix.config.qt }}
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
version: 5.12.12
|
version: ${{ matrix.config.qt }}
|
||||||
target: desktop
|
target: desktop
|
||||||
modules: qtwebengine
|
modules: qtwebengine
|
||||||
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||||
@ -125,13 +137,13 @@ jobs:
|
|||||||
popd
|
popd
|
||||||
sleep 1m
|
sleep 1m
|
||||||
hdiutil create -srcfolder ./distrib/vnote -format UDBZ vnote-mac-x64_v${{env.VNOTE_VER}}.dmg
|
hdiutil create -srcfolder ./distrib/vnote -format UDBZ vnote-mac-x64_v${{env.VNOTE_VER}}.dmg
|
||||||
cp vnote-mac-x64_v${{env.VNOTE_VER}}.dmg vnote-mac-x64.dmg
|
cp vnote-mac-x64_v${{env.VNOTE_VER}}.dmg vnote-mac-x64-qt${{matrix.config.qt}}.dmg
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Archive Artifacts
|
- name: Archive Artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: vnote-mac-x64_v${{env.VNOTE_VER}}
|
name: vnote-mac-x64-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}
|
||||||
path: ${{runner.workspace}}/build/vnote-mac-x64_v${{env.VNOTE_VER}}.dmg
|
path: ${{runner.workspace}}/build/vnote-mac-x64_v${{env.VNOTE_VER}}.dmg
|
||||||
|
|
||||||
- name: Update Tag
|
- name: Update Tag
|
||||||
@ -145,6 +157,6 @@ jobs:
|
|||||||
uses: johnwbyrd/update-release@v1.0.0
|
uses: johnwbyrd/update-release@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: ${{runner.workspace}}/build/vnote-mac-x64.dmg
|
files: ${{runner.workspace}}/build/vnote-mac-x64-qt${{matrix.config.qt}}.dmg
|
||||||
release: Continuous Build
|
release: Continuous Build
|
||||||
tag: continuous-build
|
tag: continuous-build
|
||||||
|
8
.github/workflows/ci-win.yml
vendored
8
.github/workflows/ci-win.yml
vendored
@ -39,6 +39,12 @@ jobs:
|
|||||||
platform: x64,
|
platform: x64,
|
||||||
qt: 5.15.2
|
qt: 5.15.2
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
name: "Build On Win32 Qt 5.15",
|
||||||
|
arch: win32_msvc2019,
|
||||||
|
platform: x86,
|
||||||
|
qt: 5.15.2
|
||||||
|
}
|
||||||
- {
|
- {
|
||||||
name: "Build On Win64 Qt 5.15.5",
|
name: "Build On Win64 Qt 5.15.5",
|
||||||
arch: win64_msvc2019_64,
|
arch: win64_msvc2019_64,
|
||||||
@ -80,7 +86,7 @@ jobs:
|
|||||||
- name: Install Qt Private Build
|
- name: Install Qt Private Build
|
||||||
if: ${{ matrix.config.qt == '5.15.x' }}
|
if: ${{ matrix.config.qt == '5.15.x' }}
|
||||||
shell: cmd
|
shell: cmd
|
||||||
# https://build-qt.fsu0413.me/5.15-series/5.15.5-for-windows/
|
# https://build-qt.fsu0413.me/5.15-series
|
||||||
run: |
|
run: |
|
||||||
C:\msys64\usr\bin\wget.exe -q https://mirrors.gigenet.com/OSDN//users/38/38692/Qt5.15.5-Windows-x86_64-VS2019-16.11.16-20220627.7z
|
C:\msys64\usr\bin\wget.exe -q https://mirrors.gigenet.com/OSDN//users/38/38692/Qt5.15.5-Windows-x86_64-VS2019-16.11.16-20220627.7z
|
||||||
7z x Qt5.15*.7z
|
7z x Qt5.15*.7z
|
||||||
|
@ -2135,7 +2135,7 @@ void NotebookNodeExplorer::addOpenWithMenu(QMenu *p_menu, bool p_master)
|
|||||||
{
|
{
|
||||||
auto defaultAct = subMenu->addAction(tr("System Default Program"));
|
auto defaultAct = subMenu->addAction(tr("System Default Program"));
|
||||||
connect(defaultAct, &QAction::triggered,
|
connect(defaultAct, &QAction::triggered,
|
||||||
this, [this, defaultAct, p_master]() {
|
this, [this, p_master]() {
|
||||||
openSelectedNodesWithProgram(QString(), p_master);
|
openSelectedNodesWithProgram(QString(), p_master);
|
||||||
});
|
});
|
||||||
const auto &coreConfig = ConfigMgr::getInst().getCoreConfig();
|
const auto &coreConfig = ConfigMgr::getInst().getCoreConfig();
|
||||||
|
@ -41,17 +41,11 @@
|
|||||||
|
|
||||||
using namespace vnotex;
|
using namespace vnotex;
|
||||||
|
|
||||||
QIcon ViewWindow::s_savedIcon;
|
|
||||||
|
|
||||||
QIcon ViewWindow::s_modifiedIcon;
|
|
||||||
|
|
||||||
ViewWindow::ViewWindow(QWidget *p_parent)
|
ViewWindow::ViewWindow(QWidget *p_parent)
|
||||||
: QFrame(p_parent)
|
: QFrame(p_parent)
|
||||||
{
|
{
|
||||||
setupUI();
|
setupUI();
|
||||||
|
|
||||||
initIcons();
|
|
||||||
|
|
||||||
setupShortcuts();
|
setupShortcuts();
|
||||||
|
|
||||||
// Need to use this global-wise way, especially for the WebView.
|
// Need to use this global-wise way, especially for the WebView.
|
||||||
@ -102,20 +96,6 @@ void ViewWindow::setupUI()
|
|||||||
m_mainLayout->addLayout(m_bottomLayout, 0);
|
m_mainLayout->addLayout(m_bottomLayout, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewWindow::initIcons()
|
|
||||||
{
|
|
||||||
if (!s_savedIcon.isNull()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto &themeMgr = VNoteX::getInst().getThemeMgr();
|
|
||||||
const QString savedIconName("buffer.svg");
|
|
||||||
const QString unsavedIconFg("base#icon#warning#fg");
|
|
||||||
s_savedIcon = IconUtils::fetchIcon(themeMgr.getIconFile(savedIconName));
|
|
||||||
s_modifiedIcon = IconUtils::fetchIcon(themeMgr.getIconFile(savedIconName),
|
|
||||||
themeMgr.paletteColor(unsavedIconFg));
|
|
||||||
}
|
|
||||||
|
|
||||||
Buffer *ViewWindow::getBuffer() const
|
Buffer *ViewWindow::getBuffer() const
|
||||||
{
|
{
|
||||||
return m_buffer;
|
return m_buffer;
|
||||||
@ -194,11 +174,8 @@ void ViewWindow::detachFromBuffer(bool p_quiet)
|
|||||||
|
|
||||||
QIcon ViewWindow::getIcon() const
|
QIcon ViewWindow::getIcon() const
|
||||||
{
|
{
|
||||||
if (m_buffer) {
|
// Unnecessary to provide an icon for the tab.
|
||||||
return m_buffer->isModified() ? s_modifiedIcon : s_savedIcon;
|
return QIcon();
|
||||||
} else {
|
|
||||||
return s_savedIcon;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ViewWindow::getName() const
|
QString ViewWindow::getName() const
|
||||||
|
@ -283,8 +283,6 @@ namespace vnotex
|
|||||||
|
|
||||||
void setupUI();
|
void setupUI();
|
||||||
|
|
||||||
void initIcons();
|
|
||||||
|
|
||||||
void setupShortcuts();
|
void setupShortcuts();
|
||||||
|
|
||||||
void discardChangesAndRead();
|
void discardChangesAndRead();
|
||||||
@ -378,9 +376,6 @@ namespace vnotex
|
|||||||
QActionGroup *m_imageHostActionGroup = nullptr;
|
QActionGroup *m_imageHostActionGroup = nullptr;
|
||||||
|
|
||||||
bool m_statusWidgetInBottomLayout = false;
|
bool m_statusWidgetInBottomLayout = false;
|
||||||
|
|
||||||
static QIcon s_savedIcon;
|
|
||||||
static QIcon s_modifiedIcon;
|
|
||||||
};
|
};
|
||||||
} // ns vnotex
|
} // ns vnotex
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user