[Gpg4win-commits] r232 - in trunk: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Mar 27 00:28:56 CEST 2006
Author: marcus
Date: 2006-03-27 00:28:55 +0200 (Mon, 27 Mar 2006)
New Revision: 232
Added:
trunk/src/installer-options.ini
Modified:
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/inst-sections.nsi
trunk/src/installer-finish.nsi
trunk/src/installer.nsi
Log:
2006-03-27 Marcus Brinkmann <marcus at g10code.de>
* installer.nsi: Move custom page for installer options before
start menu path selection. Do not allow to disable start menu
creation at start meny path selection dialog. Only display start
menu path selection dialog if start menu creation is desired.
Rename opt.ini to installer-options.ini.
(CheckIfStartMenuWanted): New function.
* installer-finish.nsi: Delete desktop and quicklaunch shortcuts.
* inst-sections.nsi: Rename opt.ini to installer-options.ini.
Install desktop and quick launch bar shortcuts.
* Makefile.am (EXTRA_DIST): Rename opt.ini to
installer-options.ini.
* installer-options.ini: New file.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-03-22 23:04:57 UTC (rev 231)
+++ trunk/ChangeLog 2006-03-26 22:28:55 UTC (rev 232)
@@ -1,3 +1,18 @@
+2006-03-27 Marcus Brinkmann <marcus at g10code.de>
+
+ * installer.nsi: Move custom page for installer options before
+ start menu path selection. Do not allow to disable start menu
+ creation at start meny path selection dialog. Only display start
+ menu path selection dialog if start menu creation is desired.
+ Rename opt.ini to installer-options.ini.
+ (CheckIfStartMenuWanted): New function.
+ * installer-finish.nsi: Delete desktop and quicklaunch shortcuts.
+ * inst-sections.nsi: Rename opt.ini to installer-options.ini.
+ Install desktop and quick launch bar shortcuts.
+ * Makefile.am (EXTRA_DIST): Rename opt.ini to
+ installer-options.ini.
+ * installer-options.ini: New file.
+
2006-03-21 Werner Koch <wk at g10code.com>
* Makefile.am (EXTRA_DIST): No more need tositribute the GPA 0.7.2
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2006-03-22 23:04:57 UTC (rev 231)
+++ trunk/src/Makefile.am 2006-03-26 22:28:55 UTC (rev 232)
@@ -19,7 +19,7 @@
EXTRA_DIST = pkg-config $(common_nsi) gpg4win.nsi gpg4win-src.nsi \
- inst-gpg4win.nsi uninst-gpg4win.nsi opt.ini \
+ inst-gpg4win.nsi uninst-gpg4win.nsi installer-options.ini \
libiconv.def libintl.def gpg4win-splash.wav \
exdll.h g4wihelp.c g4wihelp.nsi config.site loreley.mid
Modified: trunk/src/inst-sections.nsi
===================================================================
--- trunk/src/inst-sections.nsi 2006-03-22 23:04:57 UTC (rev 231)
+++ trunk/src/inst-sections.nsi 2006-03-26 22:28:55 UTC (rev 232)
@@ -360,7 +360,7 @@
Function .onInit
- Call G4wRunOnce
+Call G4wRunOnce
SetOutPath $TEMP
File /oname=gpgspltmp.bmp "${TOP_SRCDIR}/doc/logo/gpg4win-logo-400px.bmp"
@@ -374,7 +374,7 @@
Delete $TEMP\gpgspltmp.bmp
# Note that we delete gpgspltmp.wav in .onInst{Failed,Success}
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "opt.ini"
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "installer-options.ini"
Call CalcDepends
Call CheckOtherGnuPGApps
@@ -461,6 +461,11 @@
# we printed a warning that installation will not succeed.
SetShellVarContext all
+ # Check if the start menu entries where requested.
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
+ "Field 1" "State"
+ IntCmp $R0 0 no_start_menu
+
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
@@ -535,7 +540,6 @@
no_gpgee_menu:
!endif
-
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG FAQ.lnk" \
"$INSTDIR\share\gnupg\faq.html" \
"" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_faq)
@@ -544,12 +548,175 @@
"$INSTDIR\share\gpg4win\README.$(T_LangCode).txt" \
"" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpg4win_readme)
-
-
-# No more uninstall link becuase Windows has its wom feature to call
+# No more uninstall link because Windows has its own feature to call
# the uninstaller.
# CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" \
# "$INSTDIR\${PACKAGE}-uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
+
+ no_start_menu:
+
+
+
+ # Check if the desktop entries where requested.
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
+ "Field 2" "State"
+ IntCmp $R0 0 no_desktop
+
+!ifdef HAVE_PKG_WINPT
+ SectionGetFlags ${SEC_winpt} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_winpt_desktop
+ CreateShortCut "$DESKTOP\WinPT.lnk" \
+ "$INSTDIR\winpt.exe" \
+ "" "$INSTDIR\winpt.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_winpt)
+ no_winpt_desktop:
!endif
+
+!ifdef HAVE_PKG_GPA
+ SectionGetFlags ${SEC_gpa} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_gpa_desktop
+ CreateShortCut "$DESKTOP\GPA.lnk" \
+ "$INSTDIR\gpa.exe" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
+ no_gpa_desktop:
+!endif
+
+!ifdef HAVE_PKG_SYLPHEED_CLAWS
+ SectionGetFlags ${SEC_sylpheed} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_sylpheed_desktop
+ CreateShortCut "$DESKTOP\Sylpheed.lnk" \
+ "$INSTDIR\sylpheed-claws.exe" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed)
+ no_sylpheed_desktop:
+!endif
+
+!ifdef HAVE_PKG_MAN_NOVICE_DE
+ SectionGetFlags ${SEC_man_novice_de} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_man_novice_de_desktop
+ CreateShortCut \
+ "$DESKTOP\$(DESC_Name_man_novice_de).lnk" \
+ "$INSTDIR\share\gpg4win\einsteiger.pdf" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_novice_de)
+ no_man_novice_de_desktop:
+!endif
+
+!ifdef HAVE_PKG_MAN_ADVANCED_DE
+ SectionGetFlags ${SEC_man_advanced_de} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_man_advanced_de_desktop
+ CreateShortCut \
+ "$DESKTOP\$(DESC_Name_man_advanced_de).lnk" \
+ "$INSTDIR\share\gpg4win\durchblicker.pdf" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_advanced_de)
+ no_man_advanced_de_desktop:
+!endif
+
+!ifdef HAVE_PKG_GPGEE
+ SectionGetFlags ${SEC_gpgee} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_gpgee_desktop
+ CreateShortCut "$DESKTOP\GPGee Manual.lnk" \
+ "$INSTDIR\GPGee.hlp" "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpgee_hlp)
+ no_gpgee_desktop:
+!endif
+
+ CreateShortCut "$DESKTOP\GnuPG FAQ.lnk" \
+ "$INSTDIR\share\gnupg\faq.html" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_faq)
+
+ CreateShortCut "$DESKTOP\Gpg4Win README.lnk" \
+ "$INSTDIR\share\gpg4win\README.$(T_LangCode).txt" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpg4win_readme)
+
+no_desktop:
+
+
+ # Check if the quick launch bar entries where requested.
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
+ "Field 3" "State"
+ IntCmp $R0 0 no_quick_launch
+ StrCmp $QUICKLAUNCH $TEMP no_quick_launch
+
+!ifdef HAVE_PKG_WINPT
+ SectionGetFlags ${SEC_winpt} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_winpt_quicklaunch
+ CreateShortCut "$QUICKLAUNCH\WinPT.lnk" \
+ "$INSTDIR\winpt.exe" \
+ "" "$INSTDIR\winpt.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_winpt)
+ no_winpt_quicklaunch:
+!endif
+
+!ifdef HAVE_PKG_GPA
+ SectionGetFlags ${SEC_gpa} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_gpa_quicklaunch
+ CreateShortCut "$QUICKLAUNCH\GPA.lnk" \
+ "$INSTDIR\gpa.exe" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
+ no_gpa_quicklaunch:
+!endif
+
+!ifdef HAVE_PKG_SYLPHEED_CLAWS
+ SectionGetFlags ${SEC_sylpheed} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_sylpheed_quicklaunch
+ CreateShortCut "$QUICKLAUNCH\Sylpheed.lnk" \
+ "$INSTDIR\sylpheed-claws.exe" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed)
+ no_sylpheed_quicklaunch:
+!endif
+
+!ifdef HAVE_PKG_MAN_NOVICE_DE
+ SectionGetFlags ${SEC_man_novice_de} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_man_novice_de_quicklaunch
+ CreateShortCut \
+ "$QUICKLAUNCH\$(DESC_Name_man_novice_de).lnk" \
+ "$INSTDIR\share\gpg4win\einsteiger.pdf" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_novice_de)
+ no_man_novice_de_quicklaunch:
+!endif
+
+!ifdef HAVE_PKG_MAN_ADVANCED_DE
+ SectionGetFlags ${SEC_man_advanced_de} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_man_advanced_de_quicklaunch
+ CreateShortCut \
+ "$QUICKLAUNCH\$(DESC_Name_man_advanced_de).lnk" \
+ "$INSTDIR\share\gpg4win\durchblicker.pdf" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_advanced_de)
+ no_man_advanced_de_quicklaunch:
+!endif
+
+!ifdef HAVE_PKG_GPGEE
+ SectionGetFlags ${SEC_gpgee} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 no_gpgee_quicklaunch
+ CreateShortCut "$QUICKLAUNCH\GPGee Manual.lnk" \
+ "$INSTDIR\GPGee.hlp" "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpgee_hlp)
+ no_gpgee_quicklaunch:
+!endif
+
+ CreateShortCut "$QUICKLAUNCH\GnuPG FAQ.lnk" \
+ "$INSTDIR\share\gnupg\faq.html" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_faq)
+
+ CreateShortCut "$QUICKLAUNCH\Gpg4Win README.lnk" \
+ "$INSTDIR\share\gpg4win\README.$(T_LangCode).txt" \
+ "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpg4win_readme)
+
+no_quick_launch:
+
+
+!endif
SectionEnd
+
+
+# FIXME: Now write desktop and quick launch bar.
+# Don't forget to delete the corr. entries in installer-finish. Uninstall.
+
Modified: trunk/src/installer-finish.nsi
===================================================================
--- trunk/src/installer-finish.nsi 2006-03-22 23:04:57 UTC (rev 231)
+++ trunk/src/installer-finish.nsi 2006-03-26 22:28:55 UTC (rev 232)
@@ -62,8 +62,56 @@
DeleteRegValue HKLM "Software\GNU\${PRETTY_PACKAGE_SHORT}" \
"Start Menu Folder"
+
+ # Delete Desktop links.
+!ifdef HAVE_PKG_WINPT
+ Delete "$DESKTOP\WinPT.lnk"
!endif
+!ifdef HAVE_PKG_GPA
+ Delete "$DESKTOP\GPA.lnk"
+!endif
+!ifdef HAVE_PKG_SYLPHEED_CLAWS
+ Delete "$DESKTOP\Sylpheed.lnk"
+!endif
+!ifdef HAVE_PKG_MAN_NOVICE_DE
+ Delete "$DESKTOP\$(DESC_Name_man_novice_de).lnk"
+!endif
+!ifdef HAVE_PKG_MAN_ADVANCED_DE
+ Delete "$DESKTOP\$(DESC_Name_man_advanced_de).lnk"
+!endif
+!ifdef HAVE_PKG_GPGEE
+ Delete "$DESKTOP\GPGee Manual.lnk"
+!endif
+ Delete "$DESKTOP\GnuPG FAQ.lnk"
+ Delete "$DESKTOP\Gpg4Win README.lnk"
+ # Delete Quick Launch Bar links.
+ StrCmp $QUICKLAUNCH $TEMP no_quick_launch_uninstall
+!ifdef HAVE_PKG_WINPT
+ Delete "$QUICKLAUNCH\WinPT.lnk"
+!endif
+!ifdef HAVE_PKG_GPA
+ Delete "$QUICKLAUNCH\GPA.lnk"
+!endif
+!ifdef HAVE_PKG_SYLPHEED_CLAWS
+ Delete "$QUICKLAUNCH\Sylpheed.lnk"
+!endif
+!ifdef HAVE_PKG_MAN_NOVICE_DE
+ Delete "$QUICKLAUNCH\$(DESC_Name_man_novice_de).lnk"
+!endif
+!ifdef HAVE_PKG_MAN_ADVANCED_DE
+ Delete "$QUICKLAUNCH\$(DESC_Name_man_advanced_de).lnk"
+!endif
+!ifdef HAVE_PKG_GPGEE
+ Delete "$QUICKLAUNCH\GPGee Manual.lnk"
+!endif
+ Delete "$QUICKLAUNCH\GnuPG FAQ.lnk"
+ Delete "$QUICKLAUNCH\Gpg4Win README.lnk"
+no_quick_launch_uninstall:
+
+!endif
+
+
Delete "$INSTDIR\${PACKAGE}-uninstall.exe"
RMDir "$INSTDIR"
Added: trunk/src/installer-options.ini
===================================================================
--- trunk/src/installer-options.ini 2006-03-22 23:04:57 UTC (rev 231)
+++ trunk/src/installer-options.ini 2006-03-26 22:28:55 UTC (rev 232)
@@ -0,0 +1,31 @@
+[Settings]
+NumFields=3
+
+; The number of the fields here is known in installer.nsi.
+
+[Field 1]
+Type=Checkbox
+Left=0
+Right=-1
+Top=0
+Bottom=10
+Text=Start Menu
+State=1
+
+[Field 2]
+Type=Checkbox
+Left=0
+Right=-1
+Top=20
+Bottom=30
+Text=Desktop
+State=1
+
+[Field 3]
+Type=Checkbox
+Left=0
+Right=-1
+Top=40
+Bottom=50
+Text=Quick Launch Bar
+State=0
Modified: trunk/src/installer.nsi
===================================================================
--- trunk/src/installer.nsi 2006-03-22 23:04:57 UTC (rev 231)
+++ trunk/src/installer.nsi 2006-03-26 22:28:55 UTC (rev 232)
@@ -113,16 +113,19 @@
!insertmacro MUI_PAGE_DIRECTORY
!ifdef HAVE_STARTMENU
+
+Page custom CustomPageOptions
+
Var STARTMENU_FOLDER
+!define MUI_PAGE_CUSTOMFUNCTION_PRE CheckIfStartMenuWanted
+!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GNU\${PRETTY_PACKAGE_SHORT}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
-Page custom CustomPageOptions
-
!endif
!define MUI_PAGE_CUSTOMFUNCTION_PRE PrintCloseOtherApps
@@ -168,7 +171,7 @@
ReserveFile "${TOP_SRCDIR}\src\gpg4win-splash.wav"
!endif
ReserveFile "${TOP_SRCDIR}\COPYING"
-ReserveFile "${TOP_SRCDIR}\src\opt.ini"
+ReserveFile "${TOP_SRCDIR}\src\installer-options.ini"
# Language support
@@ -236,14 +239,10 @@
#
Function CustomPageOptions
!insertmacro MUI_HEADER_TEXT "$(T_InstallOptions)" "$(T_InstallOptLinks)"
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "opt.ini" "Field 1" "ListItems"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "opt.ini" "Field 1" "State" $R3
-
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "opt.ini"
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY "installer-options.ini"
FunctionEnd
-
# Display a warning if GnuPP has been detected and allow the user to abort
# the installation.
Function PrintGnuPPWarning
@@ -313,6 +312,16 @@
FunctionEnd
+# Check whether the start menu is actually wanted.
+
+Function CheckIfStartMenuWanted
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
+ "Field 1" "State"
+ IntCmp $R0 1 +2
+ Abort
+FunctionEnd
+
+
# Check whether this is a reinstall and popup a message box to explain
# that it is better to close other apps before continuing
Function PrintCloseOtherApps
More information about the Gpg4win-commits
mailing list