2023-04-09 03:28:39 +00:00
cmake_minimum_required ( VERSION 3.16 )
2023-07-12 14:49:24 +00:00
set ( CMAKE_EXPORT_COMPILE_COMMANDS ON )
2023-05-25 19:22:45 +00:00
set ( CMAKE_CXX_STANDARD 20 )
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
2023-04-14 16:19:03 +00:00
if ( APPLE )
2023-04-20 10:35:17 +00:00
option ( BUILD_UNIVERSAL "Build a Universal binary on macOS" OFF )
if ( BUILD_UNIVERSAL )
# Build a Universal binary on macOS
# This requires that the found Qt library is compiled as Universal binaries.
set ( CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE )
else ( )
# Build for the host architecture on macOS
set ( CMAKE_OSX_ARCHITECTURES "${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE STRING "" FORCE )
endif ( )
2023-04-14 16:19:03 +00:00
endif ( )
2023-04-17 11:50:39 +00:00
set ( APP_VERSION_MAJOR 2 )
2023-05-05 15:43:25 +00:00
set ( APP_VERSION_MINOR 4 )
2023-09-16 16:35:08 +00:00
set ( APP_VERSION_PATCH 20 )
2023-04-16 23:20:43 +00:00
set ( APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}" )
# Include the binary directory for the generated header file
include_directories ( "${CMAKE_CURRENT_BINARY_DIR}" )
2023-04-20 23:34:39 +00:00
project ( gpt4all VERSION ${ APP_VERSION } LANGUAGES CXX C )
2023-04-09 03:28:39 +00:00
set ( CMAKE_AUTOMOC ON )
set ( CMAKE_AUTORCC ON )
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
2023-04-26 15:02:05 +00:00
option ( GPT4ALL_LOCALHOST OFF "Build installer for localhost repo" )
2023-04-29 16:13:11 +00:00
option ( GPT4ALL_OFFLINE_INSTALLER "Build an offline installer" OFF )
2023-04-25 23:16:45 +00:00
2023-05-08 12:23:00 +00:00
# Generate a header file with the version number
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c m a k e / c o n f i g . h . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c o n f i g . h "
)
2023-07-01 12:10:14 +00:00
if ( LINUX )
2023-07-01 12:49:39 +00:00
find_package ( Qt6 6.5 COMPONENTS Core Quick WaylandCompositor QuickDialogs2 Svg HttpServer Sql Pdf REQUIRED )
2023-07-01 12:10:14 +00:00
else ( )
find_package ( Qt6 6.5 COMPONENTS Core Quick QuickDialogs2 Svg HttpServer Sql Pdf REQUIRED )
endif ( )
2023-04-22 03:23:57 +00:00
# Get the Qt6Core target properties
get_target_property ( Qt6Core_INCLUDE_DIRS Qt6::Core INTERFACE_INCLUDE_DIRECTORIES )
get_target_property ( Qt6Core_LIBRARY_RELEASE Qt6::Core LOCATION_RELEASE )
# Find the qmake binary
find_program ( QMAKE_EXECUTABLE NAMES qmake qmake6 PATHS ${ Qt6Core_INCLUDE_DIRS } /../.. NO_DEFAULT_PATH )
# Get the Qt 6 root directory
get_filename_component ( Qt6_ROOT_DIR "${Qt6Core_LIBRARY_RELEASE}" DIRECTORY )
get_filename_component ( Qt6_ROOT_DIR "${Qt6_ROOT_DIR}/.." ABSOLUTE )
message ( STATUS "qmake binary: ${QMAKE_EXECUTABLE}" )
message ( STATUS "Qt 6 root directory: ${Qt6_ROOT_DIR}" )
2023-04-09 03:28:39 +00:00
2023-04-27 02:59:37 +00:00
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ CMAKE_BINARY_DIR } /bin )
2023-05-31 21:04:01 +00:00
add_subdirectory ( ../gpt4all-backend llmodel )
2023-06-09 20:48:46 +00:00
set ( METAL_SHADER_FILE )
if ( ${ CMAKE_SYSTEM_NAME } MATCHES Darwin )
set ( METAL_SHADER_FILE ../gpt4all-backend/llama.cpp-mainline/ggml-metal.metal )
endif ( )
2023-04-09 03:28:39 +00:00
qt_add_executable ( chat
m a i n . c p p
2023-05-01 21:13:20 +00:00
c h a t . h c h a t . c p p
2023-05-01 13:10:05 +00:00
c h a t l l m . h c h a t l l m . c p p
2023-05-04 19:31:41 +00:00
c h a t m o d e l . h c h a t l i s t m o d e l . h c h a t l i s t m o d e l . c p p
2023-05-15 00:12:15 +00:00
c h a t g p t . h c h a t g p t . c p p
2023-05-23 02:13:42 +00:00
d a t a b a s e . h d a t a b a s e . c p p
2023-04-19 01:10:06 +00:00
d o w n l o a d . h d o w n l o a d . c p p
2023-05-23 02:13:42 +00:00
l o c a l d o c s . h l o c a l d o c s . c p p l o c a l d o c s m o d e l . h l o c a l d o c s m o d e l . c p p
2023-04-09 03:28:39 +00:00
l l m . h l l m . c p p
2023-06-22 19:44:49 +00:00
m o d e l l i s t . h m o d e l l i s t . c p p
2023-06-27 15:54:34 +00:00
m y s e t t i n g s . h m y s e t t i n g s . c p p
2023-06-22 19:44:49 +00:00
n e t w o r k . h n e t w o r k . c p p
2023-05-11 20:46:25 +00:00
s e r v e r . h s e r v e r . c p p
2023-06-01 14:50:42 +00:00
l o g g e r . h l o g g e r . c p p
2023-06-10 14:15:38 +00:00
r e s p o n s e t e x t . h r e s p o n s e t e x t . c p p
2023-06-09 20:48:46 +00:00
$ { M E T A L _ S H A D E R _ F I L E }
2023-04-09 03:28:39 +00:00
)
qt_add_qml_module ( chat
2023-04-23 13:42:35 +00:00
U R I g p t 4 a l l
2023-04-09 03:28:39 +00:00
V E R S I O N 1 . 0
2023-04-14 18:44:28 +00:00
Q M L _ F I L E S
m a i n . q m l
2023-05-01 17:51:46 +00:00
q m l / C h a t D r a w e r . q m l
2023-05-23 18:51:14 +00:00
q m l / C o l l e c t i o n s D i a l o g . q m l
2023-04-14 18:44:28 +00:00
q m l / M o d e l D o w n l o a d e r D i a l o g . q m l
2023-04-28 14:54:05 +00:00
q m l / N e t w o r k D i a l o g . q m l
q m l / N e w V e r s i o n D i a l o g . q m l
2023-04-14 18:44:28 +00:00
q m l / T h u m b s D o w n D i a l o g . q m l
2023-04-23 10:58:07 +00:00
q m l / S e t t i n g s D i a l o g . q m l
2023-04-28 14:54:05 +00:00
q m l / S t a r t u p D i a l o g . q m l
2023-04-23 11:05:43 +00:00
q m l / P o p u p D i a l o g . q m l
2023-05-05 14:47:05 +00:00
q m l / A b o u t D i a l o g . q m l
2023-04-23 13:42:35 +00:00
q m l / T h e m e . q m l
2023-06-30 13:50:09 +00:00
q m l / M o d e l S e t t i n g s . q m l
2023-06-29 03:46:03 +00:00
q m l / A p p l i c a t i o n S e t t i n g s . q m l
q m l / L o c a l D o c s S e t t i n g s . q m l
q m l / M y S e t t i n g s T a b . q m l
2023-06-29 17:38:10 +00:00
q m l / M y S e t t i n g s S t a c k . q m l
2023-05-22 13:01:46 +00:00
q m l / M y B u t t o n . q m l
q m l / M y C o m b o B o x . q m l
2023-07-06 14:53:43 +00:00
q m l / M y D i a l o g . q m l
2023-06-03 02:52:55 +00:00
q m l / M y D i r e c t o r y F i e l d . q m l
2023-05-22 21:58:37 +00:00
q m l / M y T e x t F i e l d . q m l
q m l / M y C h e c k B o x . q m l
2023-05-31 23:28:09 +00:00
q m l / M y B u s y I n d i c a t o r . q m l
2023-06-01 01:07:14 +00:00
q m l / M y T o o l B u t t o n . q m l
2023-04-11 03:34:34 +00:00
R E S O U R C E S
i c o n s / s e n d _ m e s s a g e . s v g
i c o n s / s t o p _ g e n e r a t i n g . s v g
i c o n s / r e g e n e r a t e . s v g
2023-07-06 14:53:43 +00:00
i c o n s / c l o s e . s v g
2023-04-11 12:54:57 +00:00
i c o n s / c o p y . s v g
2023-05-23 18:51:14 +00:00
i c o n s / d b . s v g
2023-07-09 19:51:59 +00:00
i c o n s / d o w n l o a d . s v g
2023-04-16 05:14:30 +00:00
i c o n s / s e t t i n g s . s v g
2023-04-14 18:44:28 +00:00
i c o n s / e d i t . s v g
2023-07-01 15:34:21 +00:00
i c o n s / i m a g e . s v g
2023-05-02 00:56:53 +00:00
i c o n s / t r a s h . s v g
2023-04-14 18:44:28 +00:00
i c o n s / n e t w o r k . s v g
i c o n s / t h u m b s _ u p . s v g
i c o n s / t h u m b s _ d o w n . s v g
i c o n s / l o g o . s v g
2023-04-13 02:12:01 +00:00
i c o n s / l o g o - 3 2 . p n g
i c o n s / l o g o - 4 8 . p n g
2023-04-13 10:49:47 +00:00
i c o n s / f a v i c o n . i c o
i c o n s / f a v i c o n . i c n s
2023-04-09 03:28:39 +00:00
)
set_target_properties ( chat PROPERTIES
2023-04-24 02:57:37 +00:00
M A C O S X _ B U N D L E _ G U I _ I D E N T I F I E R g p t 4 a l l
2023-04-09 03:28:39 +00:00
M A C O S X _ B U N D L E _ B U N D L E _ V E R S I O N $ { P R O J E C T _ V E R S I O N }
M A C O S X _ B U N D L E _ S H O R T _ V E R S I O N _ S T R I N G $ { P R O J E C T _ V E R S I O N _ M A J O R } . $ { P R O J E C T _ V E R S I O N _ M I N O R }
M A C O S X _ B U N D L E T R U E
W I N 3 2 _ E X E C U T A B L E T R U E
2023-04-24 04:33:57 +00:00
M A C O S X _ B U N D L E _ I C O N _ F I L E " f a v i c o n . i c n s "
2023-04-09 03:28:39 +00:00
)
2023-04-24 03:42:55 +00:00
if ( ${ CMAKE_SYSTEM_NAME } MATCHES Darwin )
set_target_properties ( chat PROPERTIES
O U T P U T _ N A M E g p t 4 a l l
)
endif ( )
2023-06-09 20:48:46 +00:00
if ( METAL_SHADER_FILE )
set_target_properties ( chat PROPERTIES
R E S O U R C E $ { M E T A L _ S H A D E R _ F I L E }
)
configure_file ( ${ METAL_SHADER_FILE } bin/ggml-metal.metal COPYONLY )
endif ( )
2023-04-09 03:28:39 +00:00
target_compile_definitions ( chat
P R I V A T E $ < $ < O R : $ < C O N F I G : D e b u g > , $ < C O N F I G : R e l W i t h D e b I n f o > > : Q T _ Q M L _ D E B U G > )
2023-07-01 12:10:14 +00:00
if ( LINUX )
target_link_libraries ( chat
2023-07-01 12:49:39 +00:00
P R I V A T E Q t 6 : : Q u i c k Q t 6 : : S v g Q t 6 : : H t t p S e r v e r Q t 6 : : S q l Q t 6 : : P d f Q t 6 : : W a y l a n d C o m p o s i t o r )
2023-07-01 12:10:14 +00:00
else ( )
target_link_libraries ( chat
2023-06-26 18:10:27 +00:00
P R I V A T E Q t 6 : : Q u i c k Q t 6 : : S v g Q t 6 : : H t t p S e r v e r Q t 6 : : S q l Q t 6 : : P d f )
2023-07-01 12:10:14 +00:00
endif ( )
2023-04-09 03:28:39 +00:00
target_link_libraries ( chat
2023-04-25 23:16:45 +00:00
P R I V A T E l l m o d e l )
2023-04-10 19:03:00 +00:00
2023-04-22 03:23:57 +00:00
set ( COMPONENT_NAME_MAIN ${ PROJECT_NAME } )
set ( CMAKE_INSTALL_PREFIX ${ CMAKE_BINARY_DIR } /install )
2023-04-10 19:03:00 +00:00
install ( TARGETS chat DESTINATION bin COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-04-25 23:16:45 +00:00
install ( TARGETS llmodel DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-04-10 19:03:00 +00:00
2023-06-05 13:56:52 +00:00
# We should probably iterate through the list of the cmake for backend, but these need to be installed
# to the this component's dir for the finicky qt installer to work
2023-08-15 16:56:21 +00:00
#install(TARGETS gptj-avxonly DESTINATION lib COMPONENT ${COMPONENT_NAME_MAIN})
#install(TARGETS gptj-default DESTINATION lib COMPONENT ${COMPONENT_NAME_MAIN})
2023-06-05 13:56:52 +00:00
install ( TARGETS llama-mainline-avxonly DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS llama-mainline-default DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS llamamodel-mainline-avxonly DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS llamamodel-mainline-default DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-06-16 21:24:20 +00:00
if ( APPLE )
2023-06-16 21:13:03 +00:00
install ( TARGETS llamamodel-mainline-metal DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-06-16 21:18:17 +00:00
endif ( )
2023-06-27 02:53:57 +00:00
install ( TARGETS falcon-avxonly DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS falcon-default DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-08-15 16:56:21 +00:00
#install(TARGETS mpt-avxonly DESTINATION lib COMPONENT ${COMPONENT_NAME_MAIN})
#install(TARGETS mpt-default DESTINATION lib COMPONENT ${COMPONENT_NAME_MAIN})
2023-06-16 21:18:17 +00:00
install ( TARGETS replit-mainline-avxonly DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS replit-mainline-default DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-06-16 21:24:20 +00:00
if ( APPLE )
2023-06-16 21:18:17 +00:00
install ( TARGETS replit-mainline-metal DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
endif ( )
2023-07-07 13:31:34 +00:00
install ( TARGETS bert-avxonly DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS bert-default DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-07-06 20:34:04 +00:00
install ( TARGETS starcoder-avxonly DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
install ( TARGETS starcoder-default DESTINATION lib COMPONENT ${ COMPONENT_NAME_MAIN } )
2023-06-05 13:56:52 +00:00
2023-04-10 19:03:00 +00:00
set ( CPACK_GENERATOR "IFW" )
2023-04-22 03:23:57 +00:00
set ( CPACK_VERBATIM_VARIABLES YES )
set ( CPACK_IFW_VERBOSE ON )
2023-04-17 02:10:26 +00:00
2023-04-10 20:33:14 +00:00
if ( ${ CMAKE_SYSTEM_NAME } MATCHES Linux )
2023-09-19 17:59:43 +00:00
find_program ( LINUXDEPLOYQT linuxdeployqt HINTS "$ENV{HOME}/dev/linuxdeployqt/build/tools/linuxdeployqt" "$ENV{HOME}/project/linuxdeployqt/bin" )
2023-04-10 20:33:14 +00:00
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/deploy-qt-linux.cmake.in"
" $ { C M A K E _ B I N A R Y _ D I R } / c m a k e / d e p l o y - q t - l i n u x . c m a k e " @ O N L Y )
set ( CPACK_PRE_BUILD_SCRIPTS ${ CMAKE_BINARY_DIR } /cmake/deploy-qt-linux.cmake )
2023-09-19 17:59:43 +00:00
set ( CPACK_IFW_ROOT "~/Qt/Tools/QtInstallerFramework/4.6" )
2023-04-17 19:59:14 +00:00
set ( CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-linux" )
2023-04-22 03:23:57 +00:00
set ( CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/${COMPONENT_NAME_MAIN}" )
2023-04-10 20:33:14 +00:00
elseif ( ${ CMAKE_SYSTEM_NAME } MATCHES Windows )
2023-04-10 19:03:00 +00:00
find_program ( WINDEPLOYQT windeployqt HINTS ${ _qt_bin_dir } )
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/deploy-qt-windows.cmake.in"
" $ { C M A K E _ B I N A R Y _ D I R } / c m a k e / d e p l o y - q t - w i n d o w s . c m a k e " @ O N L Y )
set ( CPACK_PRE_BUILD_SCRIPTS ${ CMAKE_BINARY_DIR } /cmake/deploy-qt-windows.cmake )
2023-09-19 17:59:43 +00:00
set ( CPACK_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.6" )
2023-04-12 19:31:21 +00:00
set ( CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.ico" )
2023-04-17 19:59:14 +00:00
set ( CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-win64" )
2023-04-22 03:23:57 +00:00
set ( CPACK_IFW_TARGET_DIRECTORY "@HomeDir@\\${COMPONENT_NAME_MAIN}" )
2023-04-10 20:33:14 +00:00
elseif ( ${ CMAKE_SYSTEM_NAME } MATCHES Darwin )
2023-04-10 21:13:22 +00:00
find_program ( MACDEPLOYQT macdeployqt HINTS ${ _qt_bin_dir } )
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/deploy-qt-mac.cmake.in"
" $ { C M A K E _ B I N A R Y _ D I R } / c m a k e / d e p l o y - q t - m a c . c m a k e " @ O N L Y )
set ( CPACK_PRE_BUILD_SCRIPTS ${ CMAKE_BINARY_DIR } /cmake/deploy-qt-mac.cmake )
2023-09-19 17:59:43 +00:00
set ( CPACK_IFW_ROOT "~/Qt/Tools/QtInstallerFramework/4.6" )
2023-04-12 19:31:21 +00:00
set ( CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.icns" )
2023-04-17 19:59:14 +00:00
set ( CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-darwin" )
2023-04-29 01:19:12 +00:00
set ( CPACK_IFW_TARGET_DIRECTORY "@ApplicationsDir@/${COMPONENT_NAME_MAIN}" )
2023-04-24 02:05:24 +00:00
set ( CPACK_BUNDLE_NAME ${ COMPONENT_NAME_MAIN } )
set ( CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.icns" )
2023-04-10 20:33:14 +00:00
endif ( )
2023-04-10 19:03:00 +00:00
2023-04-17 19:59:14 +00:00
set ( CPACK_PACKAGE_INSTALL_DIRECTORY ${ COMPONENT_NAME_MAIN } )
2023-04-13 08:59:48 +00:00
set ( CPACK_PACKAGE_VERSION_MAJOR ${ PROJECT_VERSION_MAJOR } )
set ( CPACK_PACKAGE_VERSION_MINOR ${ PROJECT_VERSION_MINOR } )
SET ( CPACK_PACKAGE_VERSION_PATCH ${ PROJECT_VERSION_PATCH } )
2023-04-11 16:16:49 +00:00
set ( CPACK_PACKAGE_HOMEPAGE_URL "https://gpt4all.io" )
2023-04-29 01:40:45 +00:00
set ( CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png" )
2023-04-11 16:16:49 +00:00
set ( CPACK_RESOURCE_FILE_LICENSE ${ CMAKE_CURRENT_SOURCE_DIR } /LICENSE )
set ( CPACK_RESOURCE_FILE_README ${ CMAKE_CURRENT_SOURCE_DIR } /README.md )
2023-04-17 11:50:39 +00:00
set ( CPACK_PACKAGE_EXECUTABLES "GPT4All" )
set ( CPACK_CREATE_DESKTOP_LINKS "GPT4All" )
set ( CPACK_IFW_PACKAGE_NAME "GPT4All" )
set ( CPACK_IFW_PACKAGE_TITLE "GPT4All Installer" )
2023-04-16 23:20:43 +00:00
set ( CPACK_IFW_PACKAGE_PUBLISHER "Nomic, Inc." )
set ( CPACK_IFW_PRODUCT_URL "https://gpt4all.io" )
2023-04-10 19:03:00 +00:00
set ( CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero" )
2023-04-29 01:40:45 +00:00
set ( CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png" )
set ( CPACK_IFW_PACKAGE_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png" )
2023-04-10 19:03:00 +00:00
set ( CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF )
2023-04-11 16:16:49 +00:00
2023-04-29 01:26:38 +00:00
include ( InstallRequiredSystemLibraries )
2023-04-10 19:03:00 +00:00
include ( CPack )
include ( CPackIFW )
2023-09-18 20:21:34 +00:00
if ( GPT4ALL_OFFLINE_INSTALLER )
cpack_add_component ( ${ COMPONENT_NAME_MAIN } )
else ( )
cpack_add_component ( ${ COMPONENT_NAME_MAIN } DOWNLOADED )
endif ( )
2023-04-10 19:03:00 +00:00
cpack_ifw_configure_component ( ${ COMPONENT_NAME_MAIN } ESSENTIAL FORCED_INSTALLATION )
2023-04-16 23:20:43 +00:00
cpack_ifw_configure_component ( ${ COMPONENT_NAME_MAIN } VERSION ${ APP_VERSION } )
2023-04-22 03:23:57 +00:00
cpack_ifw_configure_component ( ${ COMPONENT_NAME_MAIN } LICENSES "MIT LICENSE" ${ CPACK_RESOURCE_FILE_LICENSE } )
2023-04-12 20:42:17 +00:00
cpack_ifw_configure_component ( ${ COMPONENT_NAME_MAIN } SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/installerscript.qs" )
2023-04-13 09:49:00 +00:00
cpack_ifw_configure_component ( ${ COMPONENT_NAME_MAIN } REPLACES "gpt4all-chat" ) #Was used in very earliest prototypes
2023-04-10 19:03:00 +00:00
2023-04-24 05:08:13 +00:00
if ( GPT4ALL_LOCALHOST )
cpack_ifw_add_repository ( "GPT4AllRepository" URL "http://localhost/repository" )
2023-04-29 16:13:11 +00:00
elseif ( GPT4ALL_OFFLINE_INSTALLER )
2023-09-19 17:59:43 +00:00
add_compile_definitions ( GPT4ALL_OFFLINE_INSTALLER )
2023-04-24 05:08:13 +00:00
else ( )
if ( ${ CMAKE_SYSTEM_NAME } MATCHES Linux )
cpack_ifw_add_repository ( "GPT4AllRepository" URL "https://gpt4all.io/installer_repos/linux/repository" )
elseif ( ${ CMAKE_SYSTEM_NAME } MATCHES Windows )
2023-06-04 19:28:58 +00:00
#To sign the target on windows have to create a batch script add use it as a custom target and then use CPACK_IFW_EXTRA_TARGETS to set this extra target
2023-04-24 05:08:13 +00:00
cpack_ifw_add_repository ( "GPT4AllRepository" URL "https://gpt4all.io/installer_repos/windows/repository" )
elseif ( ${ CMAKE_SYSTEM_NAME } MATCHES Darwin )
cpack_ifw_add_repository ( "GPT4AllRepository" URL "https://gpt4all.io/installer_repos/mac/repository" )
endif ( )
2023-04-11 03:34:34 +00:00
endif ( )