Add icons/logos and install script for desktop/shortcuts.

pull/520/head
Adam Treat 1 year ago
parent c183702aa4
commit 4492c4ef9a

@ -62,19 +62,21 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES Windows)
"${CMAKE_BINARY_DIR}/cmake/deploy-qt-windows.cmake" @ONLY)
set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_BINARY_DIR}/cmake/deploy-qt-windows.cmake)
set(CPACK_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.5")
set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.ico")
elseif(${CMAKE_SYSTEM_NAME} MATCHES Darwin)
find_program(MACDEPLOYQT macdeployqt HINTS ${_qt_bin_dir})
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/deploy-qt-mac.cmake.in"
"${CMAKE_BINARY_DIR}/cmake/deploy-qt-mac.cmake" @ONLY)
set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_BINARY_DIR}/cmake/deploy-qt-mac.cmake)
set(CPACK_IFW_ROOT "~/Qt/Tools/QtInstallerFramework/4.5")
set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.icns")
endif()
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://gpt4all.io")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo.svg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
set(CPACK_PACKAGE_EXECUTABLES "GPT4All Chat")
@ -84,7 +86,8 @@ 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_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo.svg")
set(CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png")
set(CPACK_IFW_PACKAGE_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png")
set(CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF)
include(CPack)
@ -92,6 +95,7 @@ include(CPackIFW)
cpack_add_component(${COMPONENT_NAME_MAIN} DOWNLOADED)
cpack_ifw_configure_component(${COMPONENT_NAME_MAIN} ESSENTIAL FORCED_INSTALLATION)
cpack_ifw_configure_component(${COMPONENT_NAME_MAIN} LICENSES "GPL-3.0 LICENSE" ${CPACK_RESOURCE_FILE_LICENSE})
cpack_ifw_configure_component(${COMPONENT_NAME_MAIN} SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/installer-script.qs")
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
cpack_ifw_add_repository("GPT4AllRepository" URL "https://gpt4all.io/installer_repos/linux/repository")

@ -0,0 +1,39 @@
function Component()
{
// default constructor
}
Component.prototype.createOperations = function()
{
try {
// call the base create operations function
component.createOperations();
if (systemInfo.productType === "windows") {
try {
var userProfile = installer.environmentVariable("USERPROFILE");
installer.setValue("UserProfile", userProfile);
component.addOperation("CreateShortcut",
"@TargetDir@/chat.exe",
"@UserProfile@/Desktop/chat.lnk",
"workingDirectory=@TargetDir@",
"iconPath=%SystemRoot%/system32/SHELL32.dll",
"iconId=2", "description=Open GPT4All Chat");
} catch (e) {
print("ERROR: creating desktop shortcut" + e);
}
component.addOperation("CreateShortcut",
"@TargetDir@/chat.exe",
"@StartMenuDir@/chat.lnk",
"workingDirectory=@TargetDir@",
"iconPath=%SystemRoot%/system32/SHELL32.dll",
"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");
}
} catch (e) {
print("ERROR: creating desktop/startmenu shortcuts" + e);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -1,20 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 120" width="200" height="200">
<!-- Smaller Cool Robot Ears (behind the head, thicker stroke) -->
<path d="M14,51 Q10,61 14,71 L6,71 Q2,61 6,51 Z" fill="#b392f0" stroke="#5f248b" stroke-width="1"/>
<path d="M96,51 Q100,61 96,71 L86,71 Q90,61 86,51 Z" fill="#b392f0" stroke="#5f248b" stroke-width="1"/>
<!-- Head with a thicker stroke -->
<path d="M22,28 L76,28 Q80,28 84,38 L94,106 Q90,116 86,116 L14,116 Q10,116 6,106 L16,38 Q20,28 24,28 Z" fill="#b392f0" stroke="#5f248b" stroke-width="1"/>
<!-- Bigger Eyes -->
<circle cx="32" cy="66" r="12.4" fill="#ffffff"/>
<circle cx="68" cy="66" r="12.4" fill="#ffffff"/>
<circle cx="33" cy="66" r="8.5" fill="#5f248b"/>
<circle cx="67" cy="66" r="8.5" fill="#5f248b"/>
<!-- Wider Smile -->
<path d="M23,92 Q50,102 77,92" stroke="#5f248b" stroke-width="3" fill="none"/>
<!-- Antenna with tower of circles separated by a small vertical line -->
<line x1="50" y1="0" x2="50" y2="4" stroke="#5f248b" stroke-width="2"/>
<circle cx="50" cy="8" r="4" fill="#b392f0" stroke="#5f248b" stroke-width="2"/>
<line x1="50" y1="11" x2="50" y2="16" stroke="#5f248b" stroke-width="2"/>
<circle cx="50" cy="20" r="4" fill="#b392f0" stroke="#5f248b" stroke-width="2"/>
<line x1="50" y1="24" x2="50" y2="28" stroke="#5f248b" stroke-width="2"/>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
<!-- Robot's body -->
<rect x="50" y="60" width="100" height="80" fill="#E0E0E0" rx="10" ry="10" />
<!-- Robot's head -->
<rect x="65" y="30" width="70" height="70" fill="#D0D0D0" rx="15" ry="15" />
<!-- Robot's eyes -->
<rect x="75" y="45" width="20" height="20" fill="#FFFFFF" rx="5" ry="5" />
<rect x="105" y="45" width="20" height="20" fill="#FFFFFF" rx="5" ry="5" />
<!-- Robot's mouth -->
<path d="M75 80 Q100 95, 125 80" fill="none" stroke="#000000" stroke-width="5" />
<!-- Robot's antenna -->
<rect x="80" y="10" width="10" height="20" fill="#000000" />
<rect x="110" y="10" width="10" height="20" fill="#000000" />
<!-- Atlas book -->
<rect x="65" y="100" width="70" height="70" fill="#32CD32" rx="10" ry="10" />
<g transform="translate(68,130)">
<!-- Atlas book details -->
<text x="5" y="0" font-size="28" fill="#FFFFFF">GPT</text>
<text x="0" y="28" font-size="28" fill="#FFFFFF">4ALL</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Loading…
Cancel
Save