Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSI Installer for CLI #1065

Merged
merged 9 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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