-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
406 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ GRTAGS | |
GTAGS | ||
aqtinstall.log | ||
tags | ||
CMakeLists.txt.user | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cmake_minimum_required (VERSION 3.12) | ||
project(VNote VERSION 3.17.0 LANGUAGES C CXX) | ||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTORCC ON) | ||
|
||
add_subdirectory(libs) | ||
add_subdirectory(src) | ||
# TODO: find a better way to organize tests | ||
# add_subdirectory(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_subdirectory(QHotKey) | ||
add_subdirectory(vtextedit) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6") | ||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core Gui Network PrintSupport Sql Svg Widgets WebChannel WebEngineWidgets LinguistTools) | ||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_COMPONENTS Core5Compat) | ||
|
||
if ((QT_DEFAULT_MAJOR_VERSION GREATER 5)) | ||
qt_standard_project_setup() | ||
else() | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
endif() | ||
|
||
# Application icon on Windows | ||
set(VX_APP_ICON_RC_WIN data/core/icons/vnote.rc) | ||
|
||
# Application icon on macOS | ||
set(MACOSX_BUNDLE_ICON_FILE vnote.icns) | ||
set(VX_APP_ICON_MACOS data/core/icons/vnote.icns) | ||
set_source_files_properties(${VX_APP_ICON_MACOS} PROPERTIES | ||
MACOSX_PACKAGE_LOCATION "Resources") | ||
|
||
# Translations | ||
set(VX_TS_FILES data/core/translations/vnote_zh_CN.ts | ||
data/core/translations/vnote_ja.ts) | ||
set_source_files_properties(${VX_TS_FILES} PROPERTIES OUTPUT_LOCATION "data/core/translations") | ||
qt_add_translation(VX_QM_FILES ${VX_TS_FILES}) | ||
|
||
# Resources | ||
set(VX_RESOURCE_FILES data/core/core.qrc) | ||
qt_add_binary_resources(VX_EXTRA_RESOURCE data/extra/extra.qrc DESTINATION vnote_extra.rcc) | ||
|
||
add_executable(vnote WIN32 MACOSX_BUNDLE | ||
application.cpp application.h | ||
commandlineoptions.cpp commandlineoptions.h | ||
fakeaccessible.cpp fakeaccessible.h | ||
main.cpp | ||
${VX_APP_ICON_RC_WIN} ${VX_APP_ICON_MACOS} ${VX_RESOURCE_FILES} | ||
) | ||
|
||
add_dependencies(vnote VX_EXTRA_RESOURCE) | ||
|
||
set(VX_LIBS_FOLDER ../libs) | ||
target_include_directories(vnote PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
|
||
find_program(GOLD_LINKER "ld.gold") | ||
if (NOT ${GOLD_LINKER} STREQUAL GOLD_LINKER-NOTFOUND) | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") | ||
endif() | ||
|
||
target_compile_definitions(vnote PRIVATE | ||
QT_MESSAGELOGCONTEXT | ||
) | ||
|
||
add_subdirectory(core) | ||
add_subdirectory(export) | ||
add_subdirectory(imagehost) | ||
add_subdirectory(search) | ||
add_subdirectory(snippet) | ||
add_subdirectory(task) | ||
add_subdirectory(unitedentry) | ||
add_subdirectory(utils) | ||
add_subdirectory(widgets) | ||
|
||
target_link_libraries(vnote PRIVATE | ||
Qt::Core | ||
Qt::Gui | ||
Qt::Network | ||
Qt::PrintSupport | ||
Qt::Sql | ||
Qt::Svg | ||
Qt::WebChannel | ||
Qt::WebEngineWidgets | ||
Qt::Widgets | ||
VTextEdit | ||
qhotkey | ||
) | ||
|
||
if((QT_DEFAULT_MAJOR_VERSION GREATER 5)) | ||
target_link_libraries(vnote PRIVATE | ||
Qt::Core5Compat | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
target_sources(vnote PRIVATE | ||
buffer/buffer.cpp buffer/buffer.h | ||
buffer/bufferprovider.cpp buffer/bufferprovider.h | ||
buffer/filebufferprovider.cpp buffer/filebufferprovider.h | ||
buffer/filetypehelper.cpp buffer/filetypehelper.h | ||
buffer/ibufferfactory.h | ||
buffer/markdownbuffer.cpp buffer/markdownbuffer.h | ||
buffer/markdownbufferfactory.cpp buffer/markdownbufferfactory.h | ||
buffer/mindmapbuffer.cpp buffer/mindmapbuffer.h | ||
buffer/mindmapbufferfactory.cpp buffer/mindmapbufferfactory.h | ||
buffer/nodebufferprovider.cpp buffer/nodebufferprovider.h | ||
buffer/pdfbuffer.cpp buffer/pdfbuffer.h | ||
buffer/pdfbufferfactory.cpp buffer/pdfbufferfactory.h | ||
buffer/textbuffer.cpp buffer/textbuffer.h | ||
buffer/textbufferfactory.cpp buffer/textbufferfactory.h | ||
buffer/urlbasedbufferprovider.h | ||
buffermgr.cpp buffermgr.h | ||
clipboarddata.cpp clipboarddata.h | ||
configmgr.cpp configmgr.h | ||
coreconfig.cpp coreconfig.h | ||
editorconfig.cpp editorconfig.h | ||
events.h | ||
exception.h | ||
externalfile.cpp externalfile.h | ||
file.cpp file.h | ||
filelocator.h | ||
fileopenparameters.h | ||
global.cpp global.h | ||
historyitem.cpp historyitem.h | ||
historymgr.cpp historymgr.h | ||
htmltemplatehelper.cpp htmltemplatehelper.h | ||
iconfig.h | ||
location.h | ||
logger.cpp logger.h | ||
mainconfig.cpp mainconfig.h | ||
markdowneditorconfig.cpp markdowneditorconfig.h | ||
mindmapeditorconfig.cpp mindmapeditorconfig.h | ||
namebasedserver.h | ||
noncopyable.h | ||
notebook/bundlenotebook.cpp notebook/bundlenotebook.h | ||
notebook/bundlenotebookfactory.cpp notebook/bundlenotebookfactory.h | ||
notebook/externalnode.cpp notebook/externalnode.h | ||
notebook/historyi.h | ||
notebook/inotebookfactory.h | ||
notebook/node.cpp notebook/node.h | ||
notebook/nodeparameters.cpp notebook/nodeparameters.h | ||
notebook/notebook.cpp notebook/notebook.h | ||
notebook/notebookdatabaseaccess.cpp notebook/notebookdatabaseaccess.h | ||
notebook/notebookparameters.cpp notebook/notebookparameters.h | ||
notebook/notebooktagmgr.cpp notebook/notebooktagmgr.h | ||
notebook/tag.cpp notebook/tag.h | ||
notebook/tagi.h | ||
notebook/vxnode.cpp notebook/vxnode.h | ||
notebook/vxnodefile.cpp notebook/vxnodefile.h | ||
notebookbackend/inotebookbackend.cpp notebookbackend/inotebookbackend.h | ||
notebookbackend/inotebookbackendfactory.h | ||
notebookbackend/localnotebookbackend.cpp notebookbackend/localnotebookbackend.h | ||
notebookbackend/localnotebookbackendfactory.cpp notebookbackend/localnotebookbackendfactory.h | ||
notebookconfigmgr/bundlenotebookconfigmgr.cpp notebookconfigmgr/bundlenotebookconfigmgr.h | ||
notebookconfigmgr/inotebookconfigmgr.cpp notebookconfigmgr/inotebookconfigmgr.h | ||
notebookconfigmgr/inotebookconfigmgrfactory.h | ||
notebookconfigmgr/notebookconfig.cpp notebookconfigmgr/notebookconfig.h | ||
notebookconfigmgr/vxnodeconfig.cpp notebookconfigmgr/vxnodeconfig.h | ||
notebookconfigmgr/vxnotebookconfigmgr.cpp notebookconfigmgr/vxnotebookconfigmgr.h | ||
notebookconfigmgr/vxnotebookconfigmgrfactory.cpp notebookconfigmgr/vxnotebookconfigmgrfactory.h | ||
notebookmgr.cpp notebookmgr.h | ||
pdfviewerconfig.cpp pdfviewerconfig.h | ||
quickaccesshelper.cpp quickaccesshelper.h | ||
sessionconfig.cpp sessionconfig.h | ||
singleinstanceguard.cpp singleinstanceguard.h | ||
templatemgr.cpp templatemgr.h | ||
texteditorconfig.cpp texteditorconfig.h | ||
theme.cpp theme.h | ||
thememgr.cpp thememgr.h | ||
versioncontroller/dummyversioncontroller.cpp versioncontroller/dummyversioncontroller.h | ||
versioncontroller/dummyversioncontrollerfactory.cpp versioncontroller/dummyversioncontrollerfactory.h | ||
versioncontroller/iversioncontroller.h | ||
versioncontroller/iversioncontrollerfactory.h | ||
versioncontroller/versioncontrollerserver.cpp versioncontroller/versioncontrollerserver.h | ||
vnotex.cpp vnotex.h | ||
webresource.h | ||
widgetconfig.cpp widgetconfig.h | ||
) | ||
|
||
target_include_directories(vnote PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
IDI_ICON1 ICON DISCARDABLE "vnote.ico" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
target_sources(vnote PRIVATE | ||
exportdata.cpp exportdata.h | ||
exporter.cpp exporter.h | ||
webviewexporter.cpp webviewexporter.h | ||
) |
Oops, something went wrong.