Fix paths on linux/windows desktop shortcut and add comments about future codesign.

This commit is contained in:
Adam Treat 2023-04-13 04:48:42 -04:00
parent a5ed84f657
commit 455058e3de
2 changed files with 7 additions and 5 deletions

View File

@ -103,7 +103,9 @@ cpack_ifw_configure_component(${COMPONENT_NAME_MAIN} SCRIPT "${CMAKE_CURRENT_SOU
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)
#To sign the target on windows have to create a batch script add it as a custom target and then use CPACK_IFW_EXTRA_TARGETS to set this extra target
cpack_ifw_add_repository("GPT4AllRepository" URL "https://gpt4all.io/installer_repos/windows/repository")
elseif(${CMAKE_SYSTEM_NAME} MATCHES Darwin)
#Use this in future https://cmake.org/cmake/help/latest/cpack_gen/ifw.html#variable:CPACK_IFW_PACKAGE_SIGNING_IDENTITY
cpack_ifw_add_repository("GPT4AllRepository" URL "https://gpt4all.io/installer_repos/mac/repository")
endif()

View File

@ -14,25 +14,25 @@ Component.prototype.createOperations = function()
var userProfile = installer.environmentVariable("USERPROFILE");
installer.setValue("UserProfile", userProfile);
component.addOperation("CreateShortcut",
"@TargetDir@/chat.exe",
"@TargetDir@/bin/chat.exe",
"@UserProfile@/Desktop/chat.lnk",
"workingDirectory=@TargetDir@",
"workingDirectory=@TargetDir@/bin",
"iconPath=@TargetDir@/logo-48.png",
"iconId=2", "description=Open GPT4All Chat");
} catch (e) {
print("ERROR: creating desktop shortcut" + e);
}
component.addOperation("CreateShortcut",
"@TargetDir@/chat.exe",
"@TargetDir@/bin/chat.exe",
"@StartMenuDir@/chat.lnk",
"workingDirectory=@TargetDir@",
"workingDirectory=@TargetDir@/bin",
"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",
"Type=Application\nTerminal=false\nExec=@TargetDir@/bin/chat\nName=GPT4All-Chat\nIcon=@TargetDir@/logo-48.png\nName[en_US]=GPT4All-Chat");
"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");