Skip to content

Commit

Permalink
Revert MSI package stop custom action (#2901)
Browse files Browse the repository at this point in the history
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Co-authored-by: Ying Chen <[email protected]>
  • Loading branch information
YingChen1996 and Ying Chen committed Apr 19, 2024
1 parent b4a915b commit 1c977e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_msi_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ jobs:
run: |
$version = "${{ steps.get-version.outputs.version }}"
$downloaded_version = "${{ steps.download-json.outputs.downloaded_version }}"
if ($version -like '1.*' -and [Version]$version -gt [Version]$downloaded_version){
$uploadAsLatest = "${{ github.event.inputs.uploadAsLatest }}"
if ($uploadAsLatest -ieq 'True' -and $version -like '1.*' -and [Version]$version -gt [Version]$downloaded_version){
$jsonContent = @{
"promptflow" = $version
} | ConvertTo-Json -Depth 100
Expand Down
14 changes: 1 addition & 13 deletions scripts/installer/windows/product.wxs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<?define ProductVersion="$(env.CLI_VERSION)" ?>

Expand All @@ -12,7 +12,6 @@
<?if $(var.Platform) = "x64" ?>
<?define PromptflowCliRegistryGuid = "0efd984f-9eec-425b-b230-a3994b69649a" ?>
<?define PromptflowServiceGuid = "d4e99207-77be-4bdf-a430-b08632c5aa2b" ?>
<?define StopPromptflowServiceGuid = "a33e2e72-6e5c-47c2-ad9b-9b2c20c0040f" ?>
<?define PromptflowSystemPathGuid = "4c321045-d4e0-4446-bda4-8c19eaa42af1" ?>
<?define ProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define RemovePromptflowFolderGuid = "ee843aa5-2b72-4958-be84-53dbac17efc7" ?>
Expand All @@ -22,7 +21,6 @@
<?elseif $(var.Platform) = "x86" ?>
<?define PromptflowCliRegistryGuid = "7c2c792d-c395-44a1-8222-8e4ea006abb9" ?>
<?define PromptflowServiceGuid = "f706b208-a15d-4ae7-9185-cfcc43656570" ?>
<?define StopPromptflowServiceGuid = "c381ece5-1aea-4555-8c96-48f12e4caf78" ?>
<?define PromptflowSystemPathGuid = "9661fe6a-ff48-4e7c-a60d-fc34c2d06ef3" ?>
<?define ProgramFilesFolder = "ProgramFilesFolder" ?>
<?define RemovePromptflowFolderGuid = "588ca5e1-38c6-4659-8b38-762df7ed5b28" ?>
Expand Down Expand Up @@ -91,13 +89,7 @@
Execute="deferred"
ExeCommand="wscript.exe promptflow_service.vbs"
Return="asyncNoWait" />
<CustomAction Id="StopPromptFlowService"
Directory="APPLICATIONFOLDER"
Execute="immediate"
ExeCommand="wscript.exe stop_service.vbs"
Return="ignore" />
<InstallExecuteSequence>
<Custom Action="StopPromptFlowService" Before="InstallInitialize">Installed OR WIX_UPGRADE_DETECTED</Custom>
<Custom Action="StartPromptFlowService" Before="InstallFinalize">NOT Installed OR WIX_UPGRADE_DETECTED</Custom>
</InstallExecuteSequence>
</Product>
Expand Down Expand Up @@ -134,10 +126,6 @@
<File Id="promptflow_service.vbs" Source="scripts\promptflow_service.vbs" KeyPath="yes" Checksum="yes"/>
</Component>

<Component Id="stop_service.vbs" Directory="APPLICATIONFOLDER" Guid="$(var.StopPromptflowServiceGuid)">
<File Id="stop_service.vbs" Source="scripts\stop_service.vbs" KeyPath="yes" Checksum="yes"/>
</Component>

<Component Id="ApplicationShortcut" Directory="StartupFolder" Guid="$(var.PromptflowCliRegistryGuid)">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Prompt flow service"
Expand Down
3 changes: 0 additions & 3 deletions scripts/installer/windows/scripts/stop_service.vbs

This file was deleted.

0 comments on commit 1c977e4

Please sign in to comment.