|
|
|
@ -16,7 +16,7 @@ Component.prototype.createOperations = function()
|
|
|
|
|
var userProfile = installer.environmentVariable("USERPROFILE");
|
|
|
|
|
installer.setValue("UserProfile", userProfile);
|
|
|
|
|
component.addOperation("CreateShortcut",
|
|
|
|
|
targetDirectory + "/bin/chat.exe",
|
|
|
|
|
targetDirectory + "/bin/gpt4all.exe",
|
|
|
|
|
"@UserProfile@/Desktop/GPT4All.lnk",
|
|
|
|
|
"workingDirectory=" + targetDirectory + "/bin",
|
|
|
|
|
"iconPath=" + targetDirectory + "/favicon.ico",
|
|
|
|
@ -25,20 +25,20 @@ Component.prototype.createOperations = function()
|
|
|
|
|
print("ERROR: creating desktop shortcut" + e);
|
|
|
|
|
}
|
|
|
|
|
component.addOperation("CreateShortcut",
|
|
|
|
|
targetDirectory + "/bin/chat.exe",
|
|
|
|
|
targetDirectory + "/bin/gpt4all.exe",
|
|
|
|
|
"@StartMenuDir@/GPT4All.lnk",
|
|
|
|
|
"workingDirectory=" + targetDirectory + "/bin",
|
|
|
|
|
"iconPath=" + targetDirectory + "/favicon.ico",
|
|
|
|
|
"iconId=0", "description=Open GPT4All");
|
|
|
|
|
} else if (systemInfo.productType === "osx") {
|
|
|
|
|
targetDirectory += "/chat.app/Contents/MacOS/"
|
|
|
|
|
targetDirectory += "/gpt4all.app/Contents/MacOS/"
|
|
|
|
|
} else { // linux
|
|
|
|
|
var homeDir = installer.environmentVariable("HOME");
|
|
|
|
|
if (!installer.fileExists(homeDir + "/Desktop/GPT4All.desktop")) {
|
|
|
|
|
component.addOperation("CreateDesktopEntry",
|
|
|
|
|
homeDir + "/Desktop/GPT4All.desktop",
|
|
|
|
|
"Type=Application\nTerminal=false\nExec=\"" + targetDirectory +
|
|
|
|
|
"/bin/chat\"\nName=GPT4All\nIcon=" + targetDirectory +
|
|
|
|
|
"/bin/gpt4all\"\nName=GPT4All\nIcon=" + targetDirectory +
|
|
|
|
|
"/logo-48.png\nName[en_US]=GPT4All");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|