Skip to content

Commit 3fdd627

Browse files
committed
perf!: 废弃插件监视器插件;
1 parent 5be5974 commit 3fdd627

27 files changed

Lines changed: 234 additions & 2134 deletions

CMakeLists.txt

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ endif()
5353

5454
if(WINGHEX_BUILD_TEST_PLUGIN)
5555
add_subdirectory(TestPlugin)
56-
add_subdirectory(TestBadPlugin)
5756
add_subdirectory(TestHexExt)
58-
add_subdirectory(TestManager)
5957
endif()
6058

6159
if(WINGHEX_BUILD_SHARED_MEM_EXT)
@@ -698,10 +696,10 @@ target_link_options(
698696
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>>:-Wl,--gc-sections>)
699697

700698
if(WINGHEX_ANGEL_LSP)
701-
set(NODE_SUBDIR "${CMAKE_SOURCE_DIR}/3rdparty/angel-lsp/server")
699+
set(NODE_ROOT_SUBDIR "${CMAKE_SOURCE_DIR}/3rdparty/angel-lsp")
700+
set(NODE_SUBDIR "${NODE_ROOT_SUBDIR}/server")
702701
set(BUILD_BIN_DIR "${CMAKE_BINARY_DIR}/lsp")
703702
set(BUILD_BIN_BUILD_DIR "${CMAKE_BINARY_DIR}/lsp-build")
704-
705703
if(WIN32)
706704
set(OUT_NAME "angelscript-ls.exe")
707705
else()
@@ -767,16 +765,42 @@ if(WINGHEX_ANGEL_LSP)
767765
COMMENT "Building JS bundle with esbuild -> ${DIST_JS}"
768766
VERBATIM)
769767

770-
add_custom_command(
771-
OUTPUT ${OUT_BIN}
772-
DEPENDS ${DIST_JS}
773-
WORKING_DIRECTORY ${NODE_SUBDIR}
774-
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_BIN_DIR}
775-
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_BIN_BUILD_DIR}
776-
COMMAND ${CMAKE_COMMAND} -E echo "[3] packaging with pkg/npm exec/npx"
777-
COMMAND ${PKG_CMD}
778-
COMMENT "Packaging with pkg"
779-
VERBATIM)
768+
if(WIN32)
769+
add_custom_command(
770+
OUTPUT ${OUT_BIN}
771+
DEPENDS ${DIST_JS}
772+
WORKING_DIRECTORY ${NODE_SUBDIR}
773+
COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_BIN_DIR}"
774+
COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_BIN_BUILD_DIR}"
775+
COMMAND ${CMAKE_COMMAND} -E echo
776+
"[3] packaging with pkg/npm exec/npx"
777+
COMMAND ${PKG_CMD}
778+
COMMENT "[4] Packaging with pkg"
779+
COMMAND ${CMAKE_COMMAND} -E copy "${NODE_ROOT_SUBDIR}/package.json"
780+
"${BUILD_BIN_DIR}"
781+
COMMAND ${CMAKE_COMMAND} -E copy "${NODE_SUBDIR}/modIcon_win.js"
782+
"${BUILD_BIN_DIR}"
783+
COMMAND ${CMAKE_COMMAND} -E copy "${NODE_SUBDIR}/icon.ico"
784+
"${BUILD_BIN_DIR}"
785+
COMMAND ${NODE_EXE} "${BUILD_BIN_DIR}/modIcon_win.js"
786+
COMMAND ${CMAKE_COMMAND} -E remove "${BUILD_BIN_DIR}/modIcon_win.js"
787+
"${BUILD_BIN_DIR}/icon.ico" "${BUILD_BIN_DIR}/package.json"
788+
COMMENT "[5] Modifying exe icon"
789+
VERBATIM)
790+
else()
791+
add_custom_command(
792+
OUTPUT ${OUT_BIN}
793+
DEPENDS ${DIST_JS}
794+
WORKING_DIRECTORY ${NODE_SUBDIR}
795+
COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_BIN_DIR}"
796+
COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_BIN_BUILD_DIR}"
797+
COMMAND ${CMAKE_COMMAND} -E echo
798+
"[3] packaging with pkg/npm exec/npx"
799+
COMMAND ${PKG_CMD}
800+
COMMENT "[4] Packaging with pkg"
801+
VERBATIM)
802+
endif()
803+
780804
add_custom_target(build_angel_lsp ALL DEPENDS ${OUT_BIN})
781805
add_dependencies(WingHexExplorer2 build_angel_lsp)
782806
endif()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106

107107
&emsp;&emsp;如果你想将本软件的代码用于闭源的商业代码,想要解除`GPL`系列的必须开源的限制,请必须亲自咨询我,商讨商业授权相关事宜。
108108

109-
&emsp;&emsp;对于插件开发相关的,对应的开源协议就不一样了。只针对本仓库下的`WingPlugin`的代码遵守`BSD 3-Clause`协议,以允许闭源商业开发。对于本仓库下的`TestPlugin`/`TestBadPlugin`/`TestHexExt`/`TestManager`的代码(除`TranslationUtils.cmake`这一个文件遵守`BSD 3-Clause`)遵守`MIT`协议。
109+
&emsp;&emsp;对于插件开发相关的,对应的开源协议就不一样了。只针对本仓库下的`WingPlugin`的代码遵守`BSD 3-Clause`协议,以允许闭源商业开发。对于本仓库下的`TestPlugin`/`TestHexExt`的代码(除`TranslationUtils.cmake`这一个文件遵守`BSD 3-Clause`)遵守`MIT`协议。
110110

111111
### 使用声明
112112

README_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ This software complies with the `AGPL-3.0` agreement. Please do not use it for p
106106

107107
If you want to use the code of this software for closed-source commercial code and want to lift the restriction of the `GPL` series that it must be open source, please consult me ​​in person to discuss commercial licensing matters.
108108

109-
For plugin development, the corresponding open source agreements are different. Only the code of `WingPlugin` in this repository comply with the `BSD 3-Clause` agreement to allow closed-source commercial development. The code of `TestPlugin`/`TestBadPlugin`/`TestHexExt`/`TestManager` in this repository (except the file `TranslationUtils.cmake` which complies with `BSD 3-Clause`) complies with the `MIT` agreement.
109+
For plugin development, the corresponding open source agreements are different. Only the code of `WingPlugin` in this repository comply with the `BSD 3-Clause` agreement to allow closed-source commercial development. The code of `TestPlugin`/`TestHexExt` in this repository (except the file `TranslationUtils.cmake` which complies with `BSD 3-Clause`) complies with the `MIT` agreement.
110110

111111
### Usage Statement
112112

TestBadPlugin/CMakeLists.txt

Lines changed: 0 additions & 53 deletions
This file was deleted.

TestBadPlugin/TestBadPlugin.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

TestBadPlugin/testbadplugin.cpp

Lines changed: 0 additions & 41 deletions
This file was deleted.

TestBadPlugin/testbadplugin.h

Lines changed: 0 additions & 46 deletions
This file was deleted.

TestManager/CMakeLists.txt

Lines changed: 0 additions & 50 deletions
This file was deleted.

TestManager/TestManager.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)