diff --git a/CMakeLists.txt b/CMakeLists.txt index bed979fd..e1091a75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/cmake/installerscript.qs b/cmake/installerscript.qs index b95e8db5..6a7f12d3 100644 --- a/cmake/installerscript.qs +++ b/cmake/installerscript.qs @@ -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");