Changeset View
Changeset View
Standalone View
Standalone View
extragear/kdeconnect-kde/kdeconnect-kde.py
Show All 29 Lines | 29 | def __init__(self): | |||
---|---|---|---|---|---|
30 | CMakePackageBase.__init__(self) | 30 | CMakePackageBase.__init__(self) | ||
31 | 31 | | |||
32 | def createPackage(self): | 32 | def createPackage(self): | ||
33 | self.blacklist_file.append(os.path.join(self.packageDir(), "blacklist.txt")) | 33 | self.blacklist_file.append(os.path.join(self.packageDir(), "blacklist.txt")) | ||
34 | 34 | | |||
35 | self.defines["caption"] = self.binaryArchiveName(fileType=None).capitalize() | 35 | self.defines["caption"] = self.binaryArchiveName(fileType=None).capitalize() | ||
36 | self.defines["icon"] = os.path.join(os.path.dirname(__file__), "icon.ico") | 36 | self.defines["icon"] = os.path.join(os.path.dirname(__file__), "icon.ico") | ||
37 | self.defines["appname"] = "kdeconnect-indicator" | 37 | self.defines["appname"] = "kdeconnect-indicator" | ||
38 | 38 | | |||
vonreth: I don't think you need that define, just use it directly in the shortcut creation. | |||||
I've actually been meaning to keep the NSIS scripts pristine, as I want other projects to pick up on these if they want to adopt SnoreToast for their projects. Can I keep it please? 😅 brute4s99: I've actually been meaning to keep the NSIS scripts pristine, as I want other projects to pick… | |||||
39 | if isinstance(self, NullsoftInstallerPackager): | 39 | if isinstance(self, NullsoftInstallerPackager): | ||
40 | self.defines["nsis_include"] = f"!include {self.packageDir()}\\SnoreNotify.nsh" | 40 | self.defines["nsis_include"] = f"!include {self.packageDir()}\\SnoreNotify.nsh" | ||
41 | self.defines["sections"] = r""" | 41 | self.defines["sections"] = r""" | ||
42 | !define MyApp_AppUserModelId org.kde.kdeconnect.daemon | 42 | !define MyApp_AppUserModelId org.kde.kdeconnect.daemon | ||
43 | !define SnoreToastExe "$INSTDIR\bin\SnoreToast.exe" | 43 | !define SnoreToastExe "$INSTDIR\bin\SnoreToast.exe" | ||
44 | 44 | | |||
45 | Section "@{productname}" | 45 | Section "@{productname}" | ||
46 | SectionIn 1 | 46 | SectionIn 1 | ||
47 | !insertmacro MUI_STARTMENU_WRITE_BEGIN Application | 47 | !insertmacro MUI_STARTMENU_WRITE_BEGIN Application | ||
48 | !insertmacro SnoreShortcut "$SMPROGRAMS\@{productname}.lnk" "$INSTDIR\bin\@{appname}.exe" "${MyApp_AppUserModelId}" | 48 | !insertmacro SnoreShortcut "$SMPROGRAMS\@{productname}.lnk" "$INSTDIR\bin\@{appname}.exe" "${MyApp_AppUserModelId}" | ||
49 | CreateShortCut "$SMPROGRAMS\Startup\@{productname}.lnk" "$INSTDIR\bin\@{appname}.exe" | 49 | CreateShortCut "$SMPROGRAMS\Startup\@{productname}.lnk" "$INSTDIR\bin\@{appname}.exe" | ||
50 | CreateShortCut "$DESKTOP\@{productname}.lnk" "$INSTDIR\bin\@{appname}.exe" | 50 | CreateShortCut "$DESKTOP\@{productname}.lnk" "$INSTDIR\bin\@{appname}.exe" | ||
51 | CreateShortCut "$SENDTO\Send to remote device via @{productname}.lnk" "$INSTDIR\bin\kdeconnect-handler.exe" "" "$INSTDIR\bin\@{appname}.exe" 0 | ||||
52 | CreateShortCut "$SENDTO\Open on remote device via @{productname}.lnk" "$INSTDIR\bin\kdeconnect-handler.exe" "--open" "$INSTDIR\bin\@{appname}.exe" 0 | ||||
51 | !insertmacro MUI_STARTMENU_WRITE_END | 53 | !insertmacro MUI_STARTMENU_WRITE_END | ||
52 | SectionEnd | 54 | SectionEnd | ||
53 | """ | 55 | """ | ||
54 | self.defines["un_sections"]=r""" | 56 | self.defines["un_sections"]=r""" | ||
55 | Section "Un.Remove Shortcuts" | 57 | Section "Un.Remove Shortcuts" | ||
56 | Delete "$SMPROGRAMS\@{productname}.lnk" | 58 | Delete "$SMPROGRAMS\@{productname}.lnk" | ||
57 | Delete "$SMPROGRAMS\Startup\@{productname}.lnk" | 59 | Delete "$SMPROGRAMS\Startup\@{productname}.lnk" | ||
58 | Delete "$DESKTOP\@{productname}.lnk" | 60 | Delete "$DESKTOP\@{productname}.lnk" | ||
61 | Delete "$SENDTO\Send to remote device via @{productname}.lnk" | ||||
62 | Delete "$SENDTO\Open on remote device via @{productname}.lnk" | ||||
59 | SectionEnd | 63 | SectionEnd | ||
60 | """ | 64 | """ | ||
61 | else: | 65 | else: | ||
62 | self.defines["shortcuts"] = [{"name" : self.subinfo.displayName , "target" : f"bin/{self.defines['appname']}{CraftCore.compiler.executableSuffix}", "description" : self.subinfo.description}] | 66 | self.defines["shortcuts"] = [{"name" : self.subinfo.displayName , "target" : f"bin/{self.defines['appname']}{CraftCore.compiler.executableSuffix}", "description" : self.subinfo.description}] | ||
63 | self.defines["icon_png"] = os.path.join(self.packageDir(), ".assets", "Square150x150Logo.scale-100.png") | 67 | self.defines["icon_png"] = os.path.join(self.packageDir(), ".assets", "Square150x150Logo.scale-100.png") | ||
64 | self.defines["icon_png_44"] = os.path.join(self.packageDir(), ".assets", "Square44x44Logo.scale-100.png") | 68 | self.defines["icon_png_44"] = os.path.join(self.packageDir(), ".assets", "Square44x44Logo.scale-100.png") | ||
65 | self.defines["icon_png_310x150"] = os.path.join(self.packageDir(), ".assets", "Wide310x150Logo.scale-100.png") | 69 | self.defines["icon_png_310x150"] = os.path.join(self.packageDir(), ".assets", "Wide310x150Logo.scale-100.png") | ||
66 | self.defines["icon_png_310x310"] = os.path.join(self.packageDir(), ".assets", "Square310x310Logo.scale-100.png") | 70 | self.defines["icon_png_310x310"] = os.path.join(self.packageDir(), ".assets", "Square310x310Logo.scale-100.png") | ||
Show All 33 Lines |
I don't think you need that define, just use it directly in the shortcut creation.