From c924acffa7f2cdafd03f38df23ba7382417eca62 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Sun, 16 Apr 2023 22:10:26 -0400 Subject: [PATCH] Update the bundled model name. --- CMakeLists.txt | 2 ++ cmake/deploy-qt-linux.cmake.in | 3 ++- cmake/deploy-qt-mac.cmake.in | 3 ++- cmake/deploy-qt-windows.cmake.in | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ffeaef0..b6a5ba4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,8 @@ install(TARGETS chat DESTINATION bin COMPONENT ${COMPONENT_NAME_MAIN}) set(CPACK_GENERATOR "IFW") +set(BUNDLED_MODEL_NAME "ggml-gpt4all-j-v1.2-jazzy.bin") + if(${CMAKE_SYSTEM_NAME} MATCHES Linux) set(LINUXDEPLOYQT "/home/atreat/dev/linuxdeployqt/build/tools/linuxdeployqt/linuxdeployqt") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/deploy-qt-linux.cmake.in" diff --git a/cmake/deploy-qt-linux.cmake.in b/cmake/deploy-qt-linux.cmake.in index 3d2ddc3e..25406184 100644 --- a/cmake/deploy-qt-linux.cmake.in +++ b/cmake/deploy-qt-linux.cmake.in @@ -1,8 +1,9 @@ set(LINUXDEPLOYQT "@LINUXDEPLOYQT@") +set(BUNDLED_MODEL_NAME "@BUNDLED_MODEL_NAME@") set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@") set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") execute_process(COMMAND ${LINUXDEPLOYQT} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/chat -qmldir=${CMAKE_CURRENT_SOURCE_DIR} -verbose=2) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/ggml-gpt4all-j.bin +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/${BUNDLED_MODEL_NAME} DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-16.png" DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) diff --git a/cmake/deploy-qt-mac.cmake.in b/cmake/deploy-qt-mac.cmake.in index 891ef909..11861f71 100644 --- a/cmake/deploy-qt-mac.cmake.in +++ b/cmake/deploy-qt-mac.cmake.in @@ -1,8 +1,9 @@ set(MACDEPLOYQT "@MACDEPLOYQT@") +set(BUNDLED_MODEL_NAME "@BUNDLED_MODEL_NAME@") set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@") set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") execute_process(COMMAND ${MACDEPLOYQT} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/chat.app -qmldir=${CMAKE_CURRENT_SOURCE_DIR} -verbose=2) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/ggml-gpt4all-j.bin +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/${BUNDLED_MODEL_NAME} DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/chat.app/Contents/MacOS) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-16.png" DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) diff --git a/cmake/deploy-qt-windows.cmake.in b/cmake/deploy-qt-windows.cmake.in index cedcf0c5..b55db5b3 100644 --- a/cmake/deploy-qt-windows.cmake.in +++ b/cmake/deploy-qt-windows.cmake.in @@ -1,8 +1,9 @@ set(WINDEPLOYQT "@WINDEPLOYQT@") +set(BUNDLED_MODEL_NAME "@BUNDLED_MODEL_NAME@") set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@") set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") execute_process(COMMAND ${WINDEPLOYQT} --qmldir ${CMAKE_CURRENT_SOURCE_DIR} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/ggml-gpt4all-j.bin +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/${BUNDLED_MODEL_NAME} DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-16.png" DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)