-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: make it possible to sign maintenancetool
Signed-off-by: Jared Van Bortel <[email protected]>
- Loading branch information
1 parent
cc5ed47
commit 6779104
Showing
6 changed files
with
104 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
set(OUTPUT_DIR "@CMAKE_BINARY_DIR@") | ||
file(COPY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/config DESTINATION ${OUTPUT_DIR}/cpack-config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
set(COMPONENT_NAME_MAIN "gpt4all") | ||
|
||
set(CPACK_GENERATOR "IFW") | ||
set(CPACK_VERBATIM_VARIABLES YES) | ||
set(CPACK_IFW_VERBOSE ON) | ||
|
||
if (CMAKE_SYSTEM_NAME MATCHES Linux) | ||
set(CPACK_IFW_ROOT "~/Qt/Tools/QtInstallerFramework/4.6") | ||
set(CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-linux") | ||
set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/${COMPONENT_NAME_MAIN}") | ||
elseif (CMAKE_SYSTEM_NAME MATCHES Windows) | ||
set(CPACK_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.6") | ||
set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.ico") | ||
set(CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-win64") | ||
set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@\\${COMPONENT_NAME_MAIN}") | ||
elseif (CMAKE_SYSTEM_NAME MATCHES Darwin) | ||
set(CPACK_IFW_ROOT "~/Qt/Tools/QtInstallerFramework/4.6") | ||
set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.icns") | ||
set(CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-darwin") | ||
set(CPACK_IFW_TARGET_DIRECTORY "@ApplicationsDir@/${COMPONENT_NAME_MAIN}") | ||
endif() | ||
|
||
set(CPACK_COMPONENTS_ALL ${COMPONENT_NAME_MAIN}) # exclude development components | ||
if (APPLE) | ||
list(APPEND CPACK_COMPONENTS_ALL maintenancetool) | ||
endif() | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${COMPONENT_NAME_MAIN}) | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | ||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.nomic.ai/gpt4all") | ||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-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") | ||
set(CPACK_CREATE_DESKTOP_LINKS "GPT4All") | ||
set(CPACK_IFW_PACKAGE_NAME "GPT4All") | ||
set(CPACK_IFW_PACKAGE_TITLE "GPT4All Installer") | ||
set(CPACK_IFW_PACKAGE_PUBLISHER "Nomic, Inc.") | ||
set(CPACK_IFW_PRODUCT_URL "https://www.nomic.ai/gpt4all") | ||
set(CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero") | ||
set(CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-48.png") | ||
set(CPACK_IFW_PACKAGE_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-32.png") | ||
set(CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF) | ||
set(CPACK_IFW_PACKAGE_CONTROL_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/installer_control.qs") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function Component() | ||
{ | ||
component.ifwVersion = installer.value("FrameworkVersion"); | ||
installer.installationStarted.connect(this, Component.prototype.onInstallationStarted); | ||
} | ||
|
||
Component.prototype.onInstallationStarted = function() | ||
{ | ||
if (component.updateRequested() || component.installationRequested()) { | ||
if (installer.value("os") == "win") { | ||
component.installerbaseBinaryPath = "@TargetDir@/installerbase.exe"; | ||
} else if (installer.value("os") == "x11") { | ||
component.installerbaseBinaryPath = "@TargetDir@/installerbase"; | ||
} else if (installer.value("os") == "mac") { | ||
component.installerbaseBinaryPath = "@TargetDir@/MaintenanceTool.app"; | ||
} | ||
installer.setInstallerBaseBinary(component.installerbaseBinaryPath); | ||
} | ||
} |