mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
Desktop logos/shortcuts.
This commit is contained in:
parent
661191ce12
commit
f998d678e6
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(gpt4all-chat VERSION 0.1 LANGUAGES CXX)
|
||||
project(gpt4all VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
@ -27,6 +27,9 @@ qt_add_qml_module(chat
|
||||
icons/regenerate.svg
|
||||
icons/logo.svg
|
||||
icons/copy.svg
|
||||
icons/logo-16.png
|
||||
icons/logo-32.png
|
||||
icons/logo-48.png
|
||||
)
|
||||
|
||||
set_target_properties(chat PROPERTIES
|
||||
@ -44,7 +47,7 @@ target_link_libraries(chat
|
||||
target_link_libraries(chat
|
||||
PRIVATE ggml ggml_utils)
|
||||
|
||||
set(COMPONENT_NAME_MAIN "gpt4all-chat")
|
||||
set(COMPONENT_NAME_MAIN ${PROJECT_NAME})
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
|
||||
install(TARGETS chat DESTINATION bin COMPONENT ${COMPONENT_NAME_MAIN})
|
||||
|
||||
@ -86,7 +89,7 @@ set(CPACK_IFW_PACKAGE_TITLE "GPT4All Chat Installer")
|
||||
set(CPACK_IFW_PACKAGE_PUBLISHER "Adam Treat")
|
||||
set(CPACK_IFW_PRODUCT_URL "https://github.com/manyoso/gpt4all-chat")
|
||||
set(CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero")
|
||||
set(CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png")
|
||||
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")
|
||||
set(CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF)
|
||||
|
||||
|
@ -2,5 +2,11 @@ set(LINUXDEPLOYQT "@LINUXDEPLOYQT@")
|
||||
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
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin)
|
||||
#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models/ggml-gpt4all-j.bin
|
||||
# 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)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
|
||||
|
@ -4,3 +4,9 @@ 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
|
||||
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/bin)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin)
|
||||
|
@ -4,3 +4,9 @@ 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
|
||||
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/bin)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin)
|
||||
|
@ -17,7 +17,7 @@ Component.prototype.createOperations = function()
|
||||
"@TargetDir@/chat.exe",
|
||||
"@UserProfile@/Desktop/chat.lnk",
|
||||
"workingDirectory=@TargetDir@",
|
||||
"iconPath=%SystemRoot%/system32/SHELL32.dll",
|
||||
"iconPath=@TargetDir@/logo-48.png",
|
||||
"iconId=2", "description=Open GPT4All Chat");
|
||||
} catch (e) {
|
||||
print("ERROR: creating desktop shortcut" + e);
|
||||
@ -26,12 +26,16 @@ Component.prototype.createOperations = function()
|
||||
"@TargetDir@/chat.exe",
|
||||
"@StartMenuDir@/chat.lnk",
|
||||
"workingDirectory=@TargetDir@",
|
||||
"iconPath=%SystemRoot%/system32/SHELL32.dll",
|
||||
"iconPath=@TargetDir@/logo-48.png",
|
||||
"iconId=2", "description=Open GPT4All Chat");
|
||||
} else if (systemInfo.productType === "osx") {
|
||||
} else { // linux
|
||||
component.addOperation("CreateDesktopEntry", "/usr/share/applications/GPT4AllChat.desktop", "Version=0.1.0\nType=Application\nTerminal=false\nExec=@TargetDir@/chat\nName=GPT4All-Chat\nIcon=@TargetDir@YourApp_icon.png\nName[en_US]=GPT4All-Chat");
|
||||
component.addElevatedOperation("Copy", "/usr/share/applications/GPT4AllChat.desktop", "@HomeDir@/Desktop/GPT4AllChat.desktop");
|
||||
component.addOperation("CreateDesktopEntry",
|
||||
"/usr/share/applications/GPT4AllChat.desktop",
|
||||
"Type=Application\nTerminal=false\nExec=@TargetDir@/bin/chat\nName=GPT4All-Chat\nIcon=@TargetDir@/logo-48.png\nName[en_US]=GPT4All-Chat");
|
||||
component.addElevatedOperation("Copy",
|
||||
"/usr/share/applications/GPT4AllChat.desktop",
|
||||
"@HomeDir@/Desktop/GPT4AllChat.desktop");
|
||||
}
|
||||
} catch (e) {
|
||||
print("ERROR: creating desktop/startmenu shortcuts" + e);
|
||||
|
Loading…
Reference in New Issue
Block a user