Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2012-09-24 05:44:03 +0400
committerDaniel Molkentin <danimo@owncloud.com>2012-09-24 05:44:03 +0400
commit8233c0c82a86e946ff9b305878c419b4c9811b87 (patch)
tree6f924601d691682a6248f08cbb9648c88d2c2989 /cmake
parent95f28eca5b48c7e2e0fa5dcd2e1308b4eca175c8 (diff)
Add autostart section
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/NSIS.template.in22
1 files changed, 20 insertions, 2 deletions
diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in
index 22f91bc43..dd2ee8787 100644
--- a/cmake/modules/NSIS.template.in
+++ b/cmake/modules/NSIS.template.in
@@ -17,6 +17,7 @@
!define OPTION_SECTION_SC_START_MENU
!define OPTION_SECTION_SC_DESKTOP
!define OPTION_SECTION_SC_QUICK_LAUNCH
+!define OPTION_SECTION_SC_AUTOSTART
!define OPTION_FINISHPAGE
!define OPTION_FINISHPAGE_LAUNCHER
; !define OPTION_FINISHPAGE_RELEASE_NOTES
@@ -266,7 +267,7 @@ FunctionEnd
# INSTALLER SECTIONS #
# #
##############################################################################
-Section "${APPLICATION_NAME}" SEC_OWNCLOUD_PLAYER
+Section "${APPLICATION_NAME}" SEC_OWNCLOUD
SectionIn 1 2 3 RO
SetDetailsPrint listonly
@@ -395,6 +396,17 @@ SectionGroup "Shortcuts"
SectionGroupEnd
+!ifdef OPTION_SECTION_SC_AUTOSTART
+ ${MementoSection} "Autostart" SEC_AUTOSTART
+ SectionIn 1 2
+ SetDetailsPrint textonly
+ DetailPrint "Creating Windows Start Entry"
+ SetDetailsPrint listonly
+ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" \
+ "${APPLICATION_NAME}" "$INSTDIR\${APPLICATION_EXECUTABLE}"
+ ${MementoSectionEnd}
+!endif
+
${MementoSectionDone}
; Installer section descriptions
@@ -404,6 +416,7 @@ ${MementoSectionDone}
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} "${APPLICATION_NAME} program group."
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} "Desktop shortcut for ${APPLICATION_NAME}."
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} "Quick Launch shortcut for ${APPLICATION_NAME}."
+!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_AUTOSTART} "Register ${APPLICATION_NAME} to run on Windows startup."
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Section -post
@@ -502,6 +515,11 @@ Section Uninstall
DeleteRegKey HKCR "${APPLICATION_NAME}"
+ ;Windows Start entry
+ !ifdef OPTION_SECTION_SC_AUTOSTART
+ DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "${APPLICATION_NAME}"
+ !endif
+
;Start menu shortcuts.
!ifdef OPTION_SECTION_SC_START_MENU
SetShellVarContext all
@@ -530,7 +548,7 @@ Section Uninstall
${EndIf}
SetDetailsPrint textonly
- DetailPrint "Finsihed."
+ DetailPrint "Finshed."
SectionEnd
##############################################################################