krb5 commit: Use separate components for shortcuts

Benjamin Kaduk kaduk at MIT.EDU
Fri Aug 31 15:42:13 EDT 2012


https://github.com/krb5/krb5/commit/fe9a1d24c5ce9dd415658493c1811aa9e54aebce
commit fe9a1d24c5ce9dd415658493c1811aa9e54aebce
Author: Ben Kaduk <kaduk at mit.edu>
Date:   Fri Aug 31 13:41:26 2012 -0400

    Use separate components for shortcuts
    
    Since the Start Menu and Desktop are different folders, we should
    use different components for the shortcuts in those folders, given
    that components operate at directory granularity.
    
    Take the opportunity to use the newer style for installing shortcuts
    and registry keys, and make the names more descriptive.
    
    Increment the buildlevel to ensure new files are installed.
    
    ticket: 7348 (new)
    subject: Use more meaningfully named registry keys for shortcuts
    queue: kfw
    target_version: 1.10.4
    tags: pullup

 src/windows/installer/wix/features.wxi |    3 ++-
 src/windows/installer/wix/files.wxi    |   29 +++++++++++++++++++++--------
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/windows/installer/wix/features.wxi b/src/windows/installer/wix/features.wxi
index 5777314..ff63027 100644
--- a/src/windows/installer/wix/features.wxi
+++ b/src/windows/installer/wix/features.wxi
@@ -135,7 +135,8 @@
                 <Condition Level="30">LEASHAUTOSTART = 1</Condition>
                 <ComponentRef Id="csc_LeashStartup" />
             </Feature>
-            <ComponentRef Id="cmf_remove_folder" />
+            <ComponentRef Id="SMshortcut" />
+            <ComponentRef Id="Dshortcut" />
             <?include runtime.wxi?>
         </Feature> <!-- /feaKfwClient -->
         
diff --git a/src/windows/installer/wix/files.wxi b/src/windows/installer/wix/files.wxi
index bdad142..cf07d17 100644
--- a/src/windows/installer/wix/files.wxi
+++ b/src/windows/installer/wix/files.wxi
@@ -153,8 +153,6 @@
                     </Component>
                     <Component Win64="$(var.Win64)" Id="cmf_leash_exe" Guid="$(var.cmf_leash_exe_guid)" DiskId="1">
                       <File Id="fil_leash_exe" Name="MIT Kerberos.exe" KeyPath="yes">
-                        <Shortcut Id="sc_leash_exe" Advertise="yes" Directory="dirShortcut" Name="MIT Kerberos Ticket Manager.lnk" Arguments="[LEASHAUTOINIT]" />
-                        <Shortcut Id="sc_leash_desktop_exe" Advertise="yes" Directory="DesktopFolder" Name="MIT Kerberos Ticket Manager.lnk" Arguments="[LEASHAUTOINIT]" />
                       </File>
                       <Registry Id="reg_ts_leash32_0" Root="HKLM" Key="Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\leash32" Action="createKeyAndRemoveKeyOnUninstall" />
 	                    <Registry Id="reg_ts_leash32_1" Root="HKLM" Key="Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\leash32" Name="Flags" Type="integer" Value="1032" />
@@ -468,14 +466,11 @@
       </Directory>
     </Directory>
     
+    <!-- Start Menu shortcut -->
     <Directory Id="ProgramMenuFolder">
-        <Directory Id="dirShortcut" Name="$(var.BaseProductName)">
-          <Component Id="cmf_remove_folder" Guid="BAE73197-1894-4fff-86B9-EFFB78A24CA2">
-            <Registry Id="reg_bogus" Root="HKCU" Key="Software\MIT\Kerberos5" Name="omfg" Type="string" Value="sigh" KeyPath="yes"/>
-            <RemoveFolder Id="removeFolder" On ="uninstall" />
-          </Component>
-        </Directory>
+        <Directory Id="dirShortcut" Name="$(var.BaseProductName)" />
     </Directory>
+
     <Directory Id="StartupFolder">
     </Directory>
     
@@ -624,4 +619,22 @@
     <?endif?>
 
 </Directory>
+
+<!-- Start Menu shortcut -->
+<DirectoryRef Id="dirShortcut">
+    <Component Id="SMshortcut" Guid="FBB3BCED-16B7-4C5F-AE39-425B3E62503A">
+        <Shortcut Id="sc_leash_exe" Name="MIT Kerberos Ticket Manager.lnk" Target="[KERBEROSDIR]\bin\MIT Kerberos.exe" WorkingDirectory="dirbin" Arguments="[LEASHAUTOINIT]" />
+        <RemoveFolder Id="removeFolder" On ="uninstall" />
+        <RegistryValue Root="HKCU" Key="Software\MIT\Kerberos5" Name="installedStartMenu" Type="integer" Value="1" KeyPath="yes"/>
+    </Component>
+</DirectoryRef>
+<!-- Desktop shortcut -->
+<DirectoryRef Id="DesktopFolder">
+    <Component Id="Dshortcut" Guid="B1713C3F-956D-4301-A38E-3E3EFFCF6990">
+        <Shortcut Id="sc_leash_desktop_exe" Name="MIT Kerberos Ticket Manager.lnk" Target="[KERBEROSDIR]\bin\MIT Kerberos.exe" WorkingDirectory="dirbin" Arguments="[LEASHAUTOINIT]" />
+        <RemoveFolder Id="rem_fol_desktop" On="uninstall" />
+        <RegistryValue Root="HKCU" Key="Software\MIT\Kerberos5" Name="installedDesktop" Type="integer" Value="1" KeyPath="yes" />
+    </Component>
+</DirectoryRef>
+
 </Include>


More information about the cvs-krb5 mailing list