Skip to content

Commit

Permalink
MSI Installer for CLI (#1065)
Browse files Browse the repository at this point in the history
* Adding wix files

Signed-off-by: shivamkm07 <shivamkm07@gmail.com>

* Adding msi build in workflow

Signed-off-by: shivamkm07 <shivamkm07@gmail.com>

* Updating .gitignore

Signed-off-by: shivam <shivamkm07@gmail.com>

* Updating Readme

Signed-off-by: shivam <shivamkm07@gmail.com>

* Updating Product/Manufacturer Name

Signed-off-by: shivam <shivamkm07@gmail.com>

* Removed unncessary whitespace

Signed-off-by: shivam <shivamkm07@gmail.com>

Signed-off-by: shivamkm07 <shivamkm07@gmail.com>
Signed-off-by: shivam <shivamkm07@gmail.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Co-authored-by: Pravin Pushkar <ppushkar@microsoft.com>
  • Loading branch information
3 people authored Sep 22, 2022
1 parent 9e07fcd commit 80f7bee
Show file tree
Hide file tree
Showing 6 changed files with 493 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/get_release_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,23 @@
with open(os.getenv("GITHUB_ENV"), "a") as githubEnv:
if gitRef is None or not gitRef.startswith(tagRefPrefix):
githubEnv.write("REL_VERSION=edge\n")
githubEnv.write("MSI_VERSION=0.0.0.0\n")
print ("This is daily build from {}...".format(gitRef))
sys.exit(0)

releaseVersion = gitRef[len(tagRefPrefix):]
releaseNotePath="docs/release_notes/v{}.md".format(releaseVersion)
msiVersion = releaseVersion

if gitRef.find("-rc.") > 0:
print ("Release Candidate build from {}...".format(gitRef))
# For pre-releases like 1.9.0-rc.1, msiVersion would be 1.9.0.1
msiVersion = ".".join(msiVersion.split("-rc."))
else:
# Set LATEST_RELEASE to true
githubEnv.write("LATEST_RELEASE=true\n")
print ("Release build from {}...".format(gitRef))

githubEnv.write("REL_VERSION={}\n".format(releaseVersion))
githubEnv.write("MSI_VERSION={}\n".format(msiVersion))

47 changes: 47 additions & 0 deletions .github/wix/dapr.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>

<!-- Product IDs are autogenerated (*) at every build-->
<Product Name='CLI' Id='*' UpgradeCode='ed31d74d-b958-4db2-910f-de85c0a9cea0' Language='1033' Codepage='1252' Version='$(var.Version)' Manufacturer='Dapr'>

<!-- Installer Package-->
<Package Id='*' Keywords='Installer' Description="Dapr CLI Installer" InstallerVersion='400' Languages='1033' Compressed='yes' SummaryCodepage='1252' />

<!-- License Agreement -->
<WixVariable Id="WixUILicenseRtf" Value="$(var.DaprLicenseDirectory)/license.rtf" />

<!-- Upgrade logic -->
<!-- AllowSameVersionUpgrades "yes" -> Always upgrade, never allow two versions to be installed next to each other -->
<!-- AllowSameVersionUpgrades causes ICE61 which must be ignored -->
<!-- AllowDowngrades "no" -> Prevents out-of-order installations i.e. installing an older version after installing a newer version -->
<MajorUpgrade AllowSameVersionUpgrades="yes" AllowDowngrades="no" DowngradeErrorMessage="A later version of Dapr CLI is already installed. Setup will now exit."/>

<Media Id='1' Cabinet='Dapr.cab' EmbedCab='yes' />

<!-- Directory Structure -->
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='INSTALLDIR'>

<!-- Dapr EXE Component -->
<Component Id='DaprEXE_Comp' Guid='83363a24-2323-489c-b9b7-a3fd7f0dacd1'>
<File Id='DaprEXE' Name='dapr.exe' DiskId='1' Source='$(var.DaprEXEDirectory)/dapr.exe' KeyPath='yes'>
</File>
</Component>

</Directory>
</Directory>

<!-- Default Install Location is 'C:\dapr'-->
<SetDirectory Id='INSTALLDIR' Value='[WindowsVolume]dapr' />

<Feature Id='Complete' Level='1'>
<ComponentRef Id='DaprEXE_Comp' />
</Feature>

<!-- Dialog to let the user choose a directory where the product will be installed-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="WixUI_InstallDir" />

</Product>
</Wix>

Loading

0 comments on commit 80f7bee

Please sign in to comment.