Warning, /office/calligra/windows/calligra_installer/calligra.wxs is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="utf-8"?>
0002 <!--
0003     Copyright (c) 2011-2012 KO GmbH.  All rights reserved.
0004     Copyright (c) 2011-2012 Stuart Dickson <stuartmd@kogmbh.com>
0005 
0006     The use and distribution terms for this software are covered by the
0007     Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php)
0008     which can be found in the file CPL.TXT at the root of this distribution.
0009     By using this software in any fashion, you are agreeing to be bound by
0010     the terms of this license.
0011 
0012     You must not remove this notice, or any other, from this software.
0013 -->
0014 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
0015 
0016     <!-- Information such as name and manufacturer stored in include file -->
0017     <?include "calligra.wxi" ?>
0018         
0019     <Product Id="*"
0020         Name="!(loc.ApplicationName)"
0021         Language="!(loc.LanguageId)"
0022                 Codepage="0"
0023         Version="$(env.C2WINSTALL_VERSION)"
0024         Manufacturer="$(var.ProductManufacturer)"
0025         UpgradeCode="355292C5-4E08-4B0B-8003-67830956EAD8">
0026 
0027                 <Package
0028             Description="!(loc.Description)"
0029             Comments="$(env.C2WINSTALL_VERSIONSTRING) !(loc.Comments) $(env.C2WINSTALL_GITREV)"
0030             InstallerVersion="300"
0031             Compressed="yes" />
0032 
0033         
0034         <Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
0035 
0036                 <!-- Need to store variables in properties used by localisation files 
0037                         These are referenced with !(wix.VARNAME)
0038                         -->
0039                 <WixVariable Id="VERSIONSTRING" Value="$(env.C2WINSTALL_VERSIONSTRING)"/>
0040         
0041         
0042         
0043         <!-- Support upgrades -->
0044         <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
0045         <Upgrade Id="355292C5-4E08-4B0B-8003-67830956EAD8">
0046            <UpgradeVersion
0047               Minimum="2.3.87.1" Maximum="$(env.C2WINSTALL_VERSION)"
0048               Property="PREVIOUSVERSIONSINSTALLED"
0049               IncludeMinimum="yes" IncludeMaximum="no" />
0050         </Upgrade>
0051 
0052         <Directory Id="TARGETDIR" Name="SourceDir">
0053             <Directory Id="ProgramFilesFolder" Name="PFiles">
0054                 <Directory Id="CALLIGRADIR" Name="Calligra">
0055 
0056                                         <!-- Remove Generated/User files -->
0057                                         <Component Id="RemoveFiles" Guid="3EAA47CF-97BB-4cf3-81AC-BF25B8E90867">
0058                                           <CreateFolder />
0059                                           <RemoveFile Id="SycocaFiles" Name="sycoca*" On="uninstall" />
0060                                         </Component>
0061 
0062                     <Component Id="ENV.BAT" DiskId="1" Guid="C58493DF-C500-475D-B011-3AF792F8D40A">
0063                         <File Id="ENV.BAT" Name="env.bat" Source="res\package\env.bat" />
0064                     </Component>
0065                                         
0066                                         <Component Id="STARTAPP.VBS" DiskId="1" Guid="6A53D7FC-9ACE-4275-9B0F-97BF4FBB4D16">
0067                         <File Id="STARTAPP.VBS" Name="StartApp.vbs" Source="res\package\StartApp.vbs" />
0068 
0069                         <!-- CALLIGRA PROGRAM MENU -->
0070                                                 
0071                         <!-- Shortcut to Uninstall -->
0072                         <Shortcut Id="ProgramMenu.Tools.UninstallProduct"
0073                                   Directory="ProgramMenuDir.Tools"
0074                                   Name="Uninstall Calligra"
0075                                   Target="[SystemFolder]msiexec.exe"
0076                                   Arguments="/x [ProductCode]"
0077                                   Description="Uninstalls the Calligra Office Suite"/>
0078                         <!-- Shortcut to terminate KDE processes -->
0079                         <Shortcut Id="ProgramMenu.Tools.Terminate" Directory="ProgramMenuDir.Tools" Name="Close Applications"
0080                                   WorkingDirectory='CALLIGRADIR' Advertise="no"
0081                                   Arguments="kdeinit4 --terminate"  Target="[CALLIGRADIR]StartApp.vbs"/>
0082                     </Component>
0083                                         
0084                                         
0085                                         <?if $(env.BUILDkarbon) = on ?>
0086                                         <Component Id="KARBON.LNK" DiskId="1" Guid="F784F8B3-1F5F-404f-8480-ECF870C03D5B">
0087                         <!-- CALLIGRA PROGRAM MENU -->
0088                                                 <CreateFolder/>
0089                                                 <Shortcut Id="ProgramMenu.Karbon" Directory="ProgramMenuDir" Name="Karbon"
0090                                                           WorkingDirectory='CALLIGRADIR' Icon="Icon.Karbon.exe" IconIndex="0" Advertise="no"
0091                                                           Arguments="--style windowsvista" Target="[CALLIGRADIR]bin\karbon.exe" />
0092                                         </Component>
0093                                         <?endif ?>
0094                                         <?if $(env.BUILDsheets) = on ?>
0095                                         <Component Id="SHEETS.LNK" DiskId="1" Guid="{3673F822-F0E4-4696-A01F-0A2941032733}">
0096                         <CreateFolder/>
0097                                                 <Shortcut Id="ProgramMenu.CalligraSheets" Directory="ProgramMenuDir" Name="Calligra Sheets"
0098                                                           WorkingDirectory='CALLIGRADIR' Icon="Icon.Sheets.exe" IconIndex="0" Advertise="no"
0099                                                           Arguments="--style windowsvista" Target="[CALLIGRADIR]bin\calligrasheets.exe" />
0100                                         </Component>
0101                                         <?endif ?>
0102                                         <?if $(env.BUILDstage) = on ?>
0103                                         <Component Id="STAGE.LNK" DiskId="1" Guid="{226AD486-6711-49f0-AD59-753C701A83EF}">
0104                         <CreateFolder/>
0105                                                         <Shortcut Id="ProgramMenu.CalligraStage" Directory="ProgramMenuDir" Name="Calligra Stage"
0106                                   WorkingDirectory='CALLIGRADIR' Icon="Icon.Stage.exe" IconIndex="0" Advertise="no"
0107                                   Arguments="--style windowsvista" Target="[CALLIGRADIR]bin\calligrastage.exe" />
0108                                         </Component>
0109                                         <?endif ?>
0110                                         <Component Id="WORDS.LNK" DiskId="1" Guid="C718583E-F2DD-4603-97CA-63DBCD4D30A2">
0111                         <CreateFolder/>
0112                                                 <Shortcut Id="ProgramMenu.CalligraWords" Directory="ProgramMenuDir" Name="CalligraWords"
0113                                                           WorkingDirectory='CALLIGRADIR' Icon="Icon.Words.exe" IconIndex="0" Advertise="no"
0114                                                           Arguments="--style windowsvista" Target="[CALLIGRADIR]bin\calligrawords.exe" />
0115                                         </Component>
0116                                         
0117                                         
0118                                         <Component Id="DesktopShortcuts" DiskId="1" Guid="95136A79-458C-4c9d-860F-0319FD47B3EA">
0119                                                 <!-- CALLIGRA PROGRAM MENU -->
0120                                                                         
0121                                                 <CreateFolder/>
0122                         <?if $(env.BUILDkarbon) = on ?>
0123                                                         <Shortcut Id="Desktop.Karbon" Directory="DesktopFolder" Name="Karbon"
0124                                                                   Target="[CALLIGRADIR]bin\karbon.exe"
0125                                                         
0126                                   WorkingDirectory='CALLIGRADIR' Icon="Icon.Karbon.exe" IconIndex="0"
0127                                   Arguments="--style windowsvista" />
0128                                                 <?endif ?>
0129                         <?if $(env.BUILDsheets) = on ?>
0130                                                         <Shortcut Id="Desktop.CalligraSheets" Directory="DesktopFolder" 
0131                                                                 Name="Calligra Sheets"
0132                                                                 Target="[CALLIGRADIR]bin\calligrasheets.exe"
0133                                   WorkingDirectory='CALLIGRADIR' Icon="Icon.Sheets.exe" IconIndex="0"
0134                                   Arguments="--style windowsvista" />
0135                         <?endif ?>
0136                                                 <?if $(env.BUILDstage) = on ?>
0137                                                         <Shortcut Id="Desktop.CalligraStage" Directory="DesktopFolder" 
0138                                                                 Name="Calligra Stage"
0139                                                                 Target="[CALLIGRADIR]bin\calligrastage.exe"
0140                                   WorkingDirectory='CALLIGRADIR' Icon="Icon.Stage.exe" IconIndex="0"
0141                                   Arguments="--style windowsvista" />
0142                                                 <?endif ?>
0143                         <?if $(env.BUILDwords) = on ?>
0144                                                         <Shortcut Id="Desktop.CalligraWords" Directory="DesktopFolder" 
0145                                                                 Name="Calligra Words"
0146                                                                 Target="[CALLIGRADIR]bin\calligrawords.exe"
0147                                   WorkingDirectory='CALLIGRADIR' Icon="Icon.Words.exe" IconIndex="0"
0148                                   Arguments="--style windowsvista" />
0149                         <?endif ?>
0150                     </Component>
0151                 </Directory>
0152             </Directory>
0153 
0154             <Directory Id="ProgramMenuFolder" Name="Programs">
0155                 <Directory Id="ProgramMenuDir" Name="Calligra Suite">
0156                     <Component Id="ProgramMenuDir" Guid="*">
0157                         <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
0158                         <RegistryValue Root='HKCU' Key='Software\$(var.ProductManufacturer)\Calligra' Type='string' Value='' KeyPath='yes' />
0159                     </Component>
0160 
0161                     <Directory Id="ProgramMenuDir.Tools" Name="Tools">
0162                         <Component Id="ProgramMenuDir.Tools" Guid="{B9C1F04A-991A-4be3-96E1-CFCAFA70E0D4}">
0163                             <RemoveFolder Id='ProgramMenuDir.Tools' On='uninstall' />
0164                             <RegistryValue Root='HKCU' Key='Software\$(var.ProductManufacturer)\Calligra' Type='string' Value='' KeyPath='yes' />
0165                         </Component>
0166                     </Directory>
0167                 </Directory>
0168             </Directory>
0169 
0170             <!-- Allow installation of shortcuts on the desktop -->
0171             <!-- TODO make these optional -->
0172             <Directory Id="DesktopFolder" Name="Desktop" />
0173         </Directory>
0174 
0175         <!-- Currently just the one feature for all of Calligra + dependencies -->
0176         <Feature 
0177                         Id="DefaultFeature" 
0178                         Title="Calligra Suite" 
0179                         Level="1"
0180                         ConfigurableDirectory="CALLIGRADIR">
0181             <ComponentGroupRef Id="CG.VC2010_Support"/>
0182 
0183                         <ComponentRef Id="RemoveFiles" />
0184                         
0185             <ComponentRef Id="ENV.BAT" />
0186             <ComponentRef Id="STARTAPP.VBS" />
0187 
0188                         
0189                         <?if $(env.BUILDkarbon) = on ?>
0190                                 <ComponentRef Id="KARBON.LNK" />
0191                         <?endif ?>
0192                         <?if $(env.BUILDsheets) = on ?>
0193                                 <ComponentRef Id="SHEETS.LNK" />
0194                         <?endif ?>
0195                         <?if $(env.BUILDstage) = on ?>
0196                                 <ComponentRef Id="STAGE.LNK" />
0197                         <?endif ?>
0198                         <?if $(env.BUILDwords) = on ?>
0199                                 <ComponentRef Id="WORDS.LNK" />
0200                         <?endif ?>
0201                         
0202                         <!-- Packaged by heat from the %C2WINSTALL_INPUT% folder -->
0203             <ComponentGroupRef Id="CalligraBaseFiles" />
0204 
0205             <!-- Program Menu -->
0206             <ComponentRef Id="ProgramMenuDir" />
0207             <ComponentRef Id="ProgramMenuDir.Tools" />
0208         </Feature>
0209                 <Feature
0210                         Id="DesktopIconsFeaure"
0211                         Title="Desktop Icons"
0212                         Description="Create shortcuts to the Calligra applications on the Windows Desktop."
0213                         Display="expand"
0214                         InstallDefault="local"
0215                         TypicalDefault="install"
0216                         AllowAdvertise="no"
0217                         Level="1">
0218                         
0219                         <ComponentRef Id="DesktopShortcuts" />
0220                 </Feature>
0221                 <!--
0222                 <Feature
0223                         Id="FileAssociations"
0224                         Title="Associate File Types"
0225                         Level="1">
0226                         <ComponentRef Id="FileAssociations"/>
0227                         <ComponentRef Id="FILEEXT_KRA"/>
0228                         <ComponentRef Id="FILEEXT_ODT"/>                        
0229                 </Feature>
0230                 -->
0231 
0232         <!-- Icons -->
0233         <?if $(env.BUILDkarbon) = on ?>
0234                         <Icon Id="Icon.Karbon.exe" SourceFile="$(env.C2WINSTALL_INPUT)\bin\KARBON.EXE" />
0235         <?endif ?>
0236         <?if $(env.BUILDsheets) = on ?>
0237                         <Icon Id="Icon.Sheets.exe" SourceFile="$(env.C2WINSTALL_INPUT)\bin\CALLIGRASHEETS.EXE" />
0238         <?endif ?>
0239         <?if $(env.BUILDstage) = on ?>
0240                         <Icon Id="Icon.Stage.exe" SourceFile="$(env.C2WINSTALL_INPUT)\bin\CALLIGRASTAGE.EXE" />
0241         <?endif ?>
0242         <?if $(env.BUILDwords) = on ?>
0243                         <Icon Id="Icon.Words.exe" SourceFile="$(env.C2WINSTALL_INPUT)\bin\CALLIGRAWORDS.EXE" />
0244                 <?endif ?>
0245                 
0246                 <!-- Uninstall Icon -->
0247         <Icon Id="Icon.Calligra.ico" SourceFile="res\package\calligra-icon.ico" />
0248                 <Property Id="ARPPRODUCTICON" Value="Icon.Calligra.ico" />
0249                 
0250                 <!-- File Associations -->
0251                 <!--
0252                 <?include "calligra_fileassociations.wxi" ?>
0253                 -->
0254                 
0255         <!-- Custom UI -->
0256         <WixVariable Id="WixUILicenseRtf" Value="res\UIExtension\gpl-2.0.rtf" />
0257         <WixVariable Id="WixUIBannerBmp" Overridable="yes" Value="res\UIExtension\Bitmaps\bannrbmp.bmp"/>
0258         <WixVariable Id="WixUIDialogBmp" Overridable="yes" Value="res\UIExtension\Bitmaps\dlgbmp.bmp"/>
0259 
0260                 <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
0261         <UI>
0262             <UIRef Id="WixUI_MondoCalligra" />
0263         </UI>
0264 
0265         <!-- Custom post-install actions
0266              Need to run update-mime-database, followed by kbuildsycoca4 -->
0267         <CustomAction   Id="RunUpdateMimeDb"
0268                         FileKey="ENV.BAT"
0269                         ExeCommand="update-mime-database &quot;[CALLIGRADIR]share\mime&quot;"
0270                         Return="ignore"
0271                         Impersonate="no"
0272                         Execute="deferred"/>
0273         <CustomAction   Id="RunKBuildSycoca4"
0274                         FileKey="ENV.BAT"
0275                         ExeCommand="kbuildsycoca4 --noincremental"
0276                         Return="ignore"
0277                                                 Impersonate="no"
0278                         Execute="deferred"/>
0279                 <CustomAction   Id="RunKdeinit4Terminate"
0280                         FileKey="ENV.BAT"
0281                         ExeCommand="kdeinit4 --terminate"
0282                         Return="ignore"
0283                                                 Impersonate="no"
0284                         Execute="deferred"/>
0285 
0286         <!-- Custom pre-install action - ensure Callligra apps and KDE framework are shut down -->
0287         <!-- TODO debug - this is not currently working -->
0288         <CustomAction   Id="RunKdeTerminate"
0289                         Directory="CALLIGRADIR"
0290                         ExeCommand="[CALLIGRADIR]STARTAPP.VBS kdeinit4 --terminate"
0291                         Return="ignore"
0292                         Execute="immediate"/>
0293 
0294         <InstallExecuteSequence>
0295             <!-- When installing the app -->
0296             <RemoveExistingProducts Before="InstallInitialize" />
0297 
0298             <Custom Action="RunKdeTerminate" After="InstallInitialize">REMOVE~="ALL"</Custom>
0299 
0300             <!-- Only on successful install/upgrade -->
0301             <Custom Action="RunUpdateMimeDb" After="PublishProduct">NOT Installed</Custom>
0302             <Custom Action="RunKBuildSycoca4" After="RunUpdateMimeDb">NOT Installed</Custom>
0303             <Custom Action="RunKdeinit4Terminate" After="RunKBuildSycoca4">NOT Installed</Custom>
0304         </InstallExecuteSequence>
0305     </Product>
0306 </Wix>