This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generalize build-msi.sh for 32/64 builds (#408)
* generalize build-msi.sh for 32/64 builds * Rename windows-connector.wxs to windows-connector-x64.wxs * Create windows-connector-x86.wxs
- Loading branch information
Showing
3 changed files
with
184 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<Product | ||
Id="*" | ||
Name="Google Cloud Print Windows Connector" | ||
Language="1033" | ||
Version="$(env.CONNECTOR_VERSION)" | ||
Manufacturer="Google, Inc." | ||
UpgradeCode="15C3FD61-B03C-4C04-A56D-CD8424C99D7F"> | ||
<Package | ||
InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> | ||
|
||
<MajorUpgrade | ||
DowngradeErrorMessage= | ||
"A newer version of [ProductName] is already installed." | ||
Schedule="afterInstallExecute" /> | ||
<MediaTemplate EmbedCab="yes" /> | ||
|
||
<!-- Variable used by WIX at build time to find the built files --> | ||
<?if $(env.GOPATH) ?> | ||
<WixVariable Id="SourceDir" Overridable="yes" Value="$(env.GOPATH)\bin"/> | ||
<?else?> | ||
<WixVariable Id="SourceDir" Overridable="yes" Value="C:\go32\bin"/> | ||
<?endif?> | ||
<!-- Variable used by WIX at build time to locate the dependency dlls --> | ||
<WixVariable | ||
Id="DependencyDir" | ||
Overridable="yes" | ||
Value="C:\msys32\mingw32\bin"/> | ||
|
||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" /> | ||
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" /> | ||
<UIRef Id="WixUI_InstallDir" /> | ||
|
||
<Feature | ||
Id="connector" | ||
Title="Google Cloud Print Windows Connector" | ||
Level="1"> | ||
<ComponentGroupRef Id="ProductComponents" /> | ||
<ComponentGroupRef Id="Dependencies" /> | ||
<ComponentRef Id="ConfigFile" /> | ||
</Feature> | ||
</Product> | ||
|
||
<Fragment> | ||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="ProgramFilesFolder"> | ||
<Directory Id="GoogleFolder" Name="Google"> | ||
<Directory Id="INSTALLFOLDER" Name="Cloud Print Connector" /> | ||
</Directory> | ||
</Directory> | ||
<Directory Id="TempFolder" /> | ||
<Directory Id="CommonAppDataFolder"> | ||
<Directory Id="GoogleDataFolder" Name="Google"> | ||
<Directory Id="CloudPrintDataFolder" Name="Cloud Print Connector" /> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<!-- Group of components that are our main application items --> | ||
<ComponentGroup | ||
Id="ProductComponents" | ||
Directory="INSTALLFOLDER" | ||
Source="!(wix.SourceDir)"> | ||
<Component Id="Connector_exe"> | ||
<File Name="gcp-windows-connector.exe" KeyPath="yes" /> | ||
<ServiceInstall | ||
Name="Cloud Print Connector" | ||
Description="Shares printers with Google Cloud Print" | ||
Start="auto" | ||
Type="ownProcess" | ||
ErrorControl="normal" | ||
Vital="yes" | ||
Arguments='--config-filename="[CloudPrintDataFolder]gcp-windows-connector.config.json"'> | ||
<ServiceDependency Id="Spooler" /> | ||
<ServiceDependency Id="Tcpip" /> | ||
</ServiceInstall> | ||
<ServiceControl | ||
Id="StopService" | ||
Name="Cloud Print Connector" | ||
Remove="uninstall" | ||
Stop="uninstall" /> | ||
</Component> | ||
<Component Id="Connector_exe_start" Guid="" KeyPath="yes"> | ||
<ServiceControl | ||
Id="StartService" | ||
Name="Cloud Print Connector" | ||
Start="install" /> | ||
<Condition>STARTSERVICE="YES"</Condition> | ||
</Component> | ||
<Component Id="Connector_Util_exe"> | ||
<File Id="ConnectorUtil" Name="gcp-connector-util.exe" KeyPath="yes" /> | ||
</Component> | ||
</ComponentGroup> | ||
<Component Id="ConfigFile" Guid="19aa4f1c-3fd8-4fd6-abba-865d1e62ec42" | ||
Directory="CloudPrintDataFolder"> | ||
<CreateFolder /> | ||
<RemoveFolder Id="RemoveCloudPrintDataFolder" On="uninstall" /> | ||
<RemoveFolder Id="RemoveGoogleDataFolder" On="uninstall" | ||
Directory="GoogleDataFolder" /> | ||
<CopyFile | ||
Id="ConfigFile" | ||
Delete="yes" | ||
DestinationDirectory="CloudPrintDataFolder" | ||
DestinationName="gcp-windows-connector.config.json" | ||
SourceProperty="CONFIGFILEPATH" /> | ||
<RemoveFile | ||
Id="ConfigFile" | ||
Directory="CloudPrintDataFolder" | ||
Name="gcp-windows-connector.config.json" | ||
On="uninstall" /> | ||
</Component> | ||
<Property Id="CONFIGFILE" Secure="yes" /> | ||
<SetProperty | ||
Id="CONFIGFILEPATH" | ||
Action="SetConfigFileDefault" | ||
After="LaunchConditions" | ||
Sequence="first" | ||
Value="[TempFolder]gcp-windows-connector.config.json"> | ||
NOT CONFIGFILE | ||
</SetProperty> | ||
<SetProperty | ||
Id="CONFIGFILEPATH" | ||
Action="SetConfigFileCustom" | ||
After="LaunchConditions" | ||
Sequence="first" | ||
Value="[CONFIGFILE]"> | ||
CONFIGFILE | ||
</SetProperty> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<InstallUISequence> | ||
<ExecuteAction /> | ||
<Show Dialog="WelcomeDlg" Before="ManualInit" /> | ||
<Show Dialog="ProgressDlg" After="ManualInit" /> | ||
<Custom Action="ManualInit" Before="ExecuteAction"> | ||
NOT CONFIGFILE and NOT Installed and NOT WIX_UPGRADE_DETECTED and RUNINIT="YES" | ||
</Custom> | ||
</InstallUISequence> | ||
|
||
<InstallExecuteSequence> | ||
<RemoveFiles /> | ||
<Custom Action="DeletePrinters" Before="RemoveFiles"> | ||
DELETEPRINTERS="YES" AND $ConfigFile=2 | ||
</Custom> | ||
</InstallExecuteSequence> | ||
|
||
<Property Id="DELETEPRINTERS" Value="YES" Secure="yes" /> | ||
<Property Id="INITPARAMS" Secure="yes" Hidden="yes" /> | ||
<Property Id="RUNINIT" Secure="yes" Value="YES" /> | ||
<Property Id="STARTSERVICE" Secure="yes" Value="YES" /> | ||
|
||
<CustomAction | ||
Id="ManualInit" | ||
BinaryKey="ConnectorUtil" | ||
Execute="immediate" | ||
Return="check" | ||
ExeCommand="init [INITPARAMS]" /> | ||
|
||
<CustomAction | ||
Id="DeletePrinters" | ||
FileKey="ConnectorUtil" | ||
Execute="deferred" | ||
Return="ignore" | ||
ExeCommand='--config-filename="[CloudPrintDataFolder]gcp-windows-connector.config.json" delete-all-gcp-printers' /> | ||
|
||
<Binary | ||
Id="ConnectorUtil" | ||
SourceFile="!(wix.SourceDir)\gcp-connector-util.exe" /> | ||
</Fragment> | ||
</Wix> |