From 23e9885435f2a8dc1aae379d767e6ee8d4c201bb Mon Sep 17 00:00:00 2001 From: ninetailedtori Date: Mon, 8 Dec 2025 20:36:46 +0000 Subject: [PATCH] Add pnpm and git tasks during configure stage. Add Millennium .idea files to general repo (basic, not too edited, provides an initialised template for those using JetBrains IDEs.) --- .idea/.gitignore | 10 ++ .idea/.name | 1 + .idea/Millennium.iml | 2 + .idea/editor.xml | 353 +++++++++++++++++++++++++++++++++++++++++++ .idea/misc.xml | 8 + .idea/modules.xml | 8 + .idea/vcs.xml | 7 + CMakeLists.txt | 23 +++ 8 files changed, 412 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/Millennium.iml create mode 100644 .idea/editor.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..ab1f4164e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 000000000..f058e5fc0 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +MillenniumBuildSlave \ No newline at end of file diff --git a/.idea/Millennium.iml b/.idea/Millennium.iml new file mode 100644 index 000000000..4c9423543 --- /dev/null +++ b/.idea/Millennium.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 000000000..9489ac1ef --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,353 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..e479d636d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..e30a0db3a --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..101bf5ed4 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f05f8d50..16ccbcaeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,3 +51,26 @@ ExternalProject_Add(hhx64 INSTALL_COMMAND "" BUILD_ALWAYS 1 ) + +find_package(Git QUIET) + +if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + endif() +endif() + +find_package(pnpm QUIET) +if (PNPM_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/sdk" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/frontend") + add_custom_command( + COMMAND pnpm install && pnpm run build + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/sdk" + ) + add_custom_command( + COMMAND pnpm install && pnpm run build + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/frontend" + ) +endif() \ No newline at end of file