From 779e71d3a0cf78cf45264028ea1f96b77e88718b Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 14:56:10 +0800
Subject: [PATCH 01/34] update
---
.github/workflows/build_msi_installer.yml | 75 +++++++++++++++++++
scripts/installer/windows/product.wxs | 4 +-
scripts/installer/windows/promptflow.wixproj | 2 +-
.../windows/scripts/version_info.txt | 2 +-
4 files changed, 79 insertions(+), 4 deletions(-)
create mode 100644 .github/workflows/build_msi_installer.yml
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
new file mode 100644
index 00000000000..67a0c03e385
--- /dev/null
+++ b/.github/workflows/build_msi_installer.yml
@@ -0,0 +1,75 @@
+name: Build MSI Installer CI
+
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+
+env:
+ packageSetupType: promptflow_with_extra
+ testWorkingDirectory: ${{ github.workspace }}/src/promptflow
+
+jobs:
+ build_msi_installer:
+ runs-on: windows-latest
+ name: Build Windows MSI
+
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v1.1
+
+ - name: Install Wix Toolset
+ shell: pwsh
+ working-directory: ${{ github.workspace }}/scripts/installer/windows
+ run: |
+ Invoke-WebRequest -Uri 'https://azurecliprod.blob.core.windows.net/msi/wix310-binaries-mirror.zip' -OutFile 'wix-archive.zip'
+ Expand-Archive -Path 'wix-archive.zip' -DestinationPath 'wix'
+ Remove-Item -Path 'wix-archive.zip'
+
+
+ - name: Install Python and dependencies
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.9
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install promptflow[azure,executable] promptflow-tools
+ shell: pwsh
+
+ - name: Get promptflow version
+ id: get-version
+ run: |
+ version=$(python -c "import promptflow; print(promptflow.__version__)")
+ echo "::set-output name=version::$version"
+ shell: pwsh
+
+ - name: Build Python project
+ working-directory: ${{ github.workspace }}/scripts/installer/windows/scripts
+ run: |
+ echo "Version from promptflow: ${{ steps.get-version.outputs.version }}"
+ $text = Get-Content "version_info.txt" -Raw
+ $text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
+ $text | Out-File -FilePath "version_info.txt" -Encoding utf8
+ pyinstaller promptflow.spec
+ shell: pwsh
+
+ - name: Build Wix project
+ working-directory: ${{ github.workspace }}/scripts/installer/windows
+ run: |
+ $env:CLI_VERSION = ${{ steps.get-version.outputs.version }}
+ msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj
+ shell: pwsh
+
+ - name: Upload MSI to Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: msi-artifact
+ path: scripts/installer/windows/out/*.msi
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 184d9c87b12..34c47cdc8f1 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -1,10 +1,10 @@
-
+
-
+
diff --git a/scripts/installer/windows/promptflow.wixproj b/scripts/installer/windows/promptflow.wixproj
index 4bc976d1210..717ce079472 100644
--- a/scripts/installer/windows/promptflow.wixproj
+++ b/scripts/installer/windows/promptflow.wixproj
@@ -7,7 +7,7 @@
3.10
04ff6707-750d-4474-89b3-7922c84721be
2.0
- promptflow
+ promptflow-$(env.CLI_VERSION)
Package
$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets
$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
diff --git a/scripts/installer/windows/scripts/version_info.txt b/scripts/installer/windows/scripts/version_info.txt
index 19132294f54..a6404604996 100644
--- a/scripts/installer/windows/scripts/version_info.txt
+++ b/scripts/installer/windows/scripts/version_info.txt
@@ -35,7 +35,7 @@ VSVersionInfo(
StringStruct('InternalName', 'setup'),
StringStruct('LegalCopyright', 'Copyright (c) Microsoft Corporation. All rights reserved.'),
StringStruct('ProductName', 'Microsoft prompt flow'),
- StringStruct('ProductVersion', '1.0.0.0')])
+ StringStruct('ProductVersion', '$(env.CLI_VERSION)')])
]),
VarFileInfo([VarStruct('Translation', [1033, 1252])])
]
From db83389277b2576397136b0126f8edc0dd748b0c Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 15:01:47 +0800
Subject: [PATCH 02/34] typo
---
.github/workflows/build_msi_installer.yml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 67a0c03e385..57fc6d81c14 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -1,4 +1,4 @@
-name: Build MSI Installer CI
+name: Build and Package MSI
on:
workflow_dispatch:
@@ -6,10 +6,6 @@ on:
branches:
- main
-env:
- packageSetupType: promptflow_with_extra
- testWorkingDirectory: ${{ github.workspace }}/src/promptflow
-
jobs:
build_msi_installer:
runs-on: windows-latest
From 439d09a2bf8b55a18d5d7d7487c864d5773c7fec Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 15:10:51 +0800
Subject: [PATCH 03/34] update
---
.github/workflows/build_msi_installer.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 57fc6d81c14..9fc5fe6fe28 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -2,7 +2,8 @@ name: Build and Package MSI
on:
workflow_dispatch:
- push:
+ # will delete pull request when it's ready
+ pull_request:
branches:
- main
From ca1ddef55589fe0fac5f8f672702d52f4272f55c Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 15:56:54 +0800
Subject: [PATCH 04/34] typo
---
.github/workflows/build_msi_installer.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 9fc5fe6fe28..57ee8af1bcf 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -44,7 +44,7 @@ jobs:
- name: Get promptflow version
id: get-version
run: |
- version=$(python -c "import promptflow; print(promptflow.__version__)")
+ $version=$(python -c "import promptflow; print(promptflow.__version__)")
echo "::set-output name=version::$version"
shell: pwsh
From 2504e75e7175bf0e6f3a869facbd7d323fc0e508 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 16:14:19 +0800
Subject: [PATCH 05/34] update
---
.github/workflows/build_msi_installer.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 57ee8af1bcf..08482c25ff6 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -48,7 +48,7 @@ jobs:
echo "::set-output name=version::$version"
shell: pwsh
- - name: Build Python project
+ - name: Build Pyinstaller project
working-directory: ${{ github.workspace }}/scripts/installer/windows/scripts
run: |
echo "Version from promptflow: ${{ steps.get-version.outputs.version }}"
@@ -61,6 +61,9 @@ jobs:
- name: Build Wix project
working-directory: ${{ github.workspace }}/scripts/installer/windows
run: |
+ $text = Get-Content "promptflow.wixproj" -Raw
+ $text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
+ $text | Out-File -FilePath "promptflow.wixproj" -Encoding utf8
$env:CLI_VERSION = ${{ steps.get-version.outputs.version }}
msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj
shell: pwsh
From cc1ff890483835454555c435d590a5cd9b42dcc3 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 16:32:08 +0800
Subject: [PATCH 06/34] use replace
---
.github/workflows/build_msi_installer.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 08482c25ff6..c4d12a1e446 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -64,7 +64,11 @@ jobs:
$text = Get-Content "promptflow.wixproj" -Raw
$text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
$text | Out-File -FilePath "promptflow.wixproj" -Encoding utf8
- $env:CLI_VERSION = ${{ steps.get-version.outputs.version }}
+
+ $text = Get-Content "promptflow.wxs" -Raw
+ $text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
+ $text | Out-File -FilePath "promptflow.wxs" -Encoding utf8
+
msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj
shell: pwsh
From 894924be1da9d94aa970790059c5ea2efedc8b28 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 16:44:09 +0800
Subject: [PATCH 07/34] typo
---
.github/workflows/build_msi_installer.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index c4d12a1e446..3c5b3cb62bf 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -65,9 +65,9 @@ jobs:
$text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
$text | Out-File -FilePath "promptflow.wixproj" -Encoding utf8
- $text = Get-Content "promptflow.wxs" -Raw
+ $text = Get-Content "product.wxs" -Raw
$text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
- $text | Out-File -FilePath "promptflow.wxs" -Encoding utf8
+ $text | Out-File -FilePath "product.wxs" -Encoding utf8
msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj
shell: pwsh
From c50cee41074bbe99607dd5a32d0924d0c315b313 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 17:09:33 +0800
Subject: [PATCH 08/34] typo
---
.github/workflows/build_msi_installer.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 3c5b3cb62bf..4dc0c3fc311 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -53,7 +53,7 @@ jobs:
run: |
echo "Version from promptflow: ${{ steps.get-version.outputs.version }}"
$text = Get-Content "version_info.txt" -Raw
- $text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
+ $text = $text -replace '\$\((env\.CLI_VERSION)\)', '${{ steps.get-version.outputs.version }}'
$text | Out-File -FilePath "version_info.txt" -Encoding utf8
pyinstaller promptflow.spec
shell: pwsh
@@ -62,12 +62,12 @@ jobs:
working-directory: ${{ github.workspace }}/scripts/installer/windows
run: |
$text = Get-Content "promptflow.wixproj" -Raw
- $text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
+ $text = $text -replace '\$\((env\.CLI_VERSION)\)', '${{ steps.get-version.outputs.version }}'
$text | Out-File -FilePath "promptflow.wixproj" -Encoding utf8
$text = Get-Content "product.wxs" -Raw
- $text = $text -replace '\$\((env\.CLI_VERSION)\)', ${{ steps.get-version.outputs.version }}
- $text | Out-File -FilePath "product.wxs" -Encoding utf8
+ $text = $text -replace '\$\((env\.CLI_VERSION)\)', '${{ steps.get-version.outputs.version }}'
+ $text | Out-File -FilePath "product.wxs" -Encoding utf8
msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj
shell: pwsh
From e0febbbe0108f301014c1006e6ad766cd7df58d6 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 17:45:36 +0800
Subject: [PATCH 09/34] update
---
scripts/installer/windows/product.wxs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 34c47cdc8f1..80505611aee 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -1,4 +1,4 @@
-
+
@@ -133,7 +133,7 @@
KeyPath="yes"/>
-
+
From 0be45bf1588e212c408352b54889140ad92878fe Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 18:31:20 +0800
Subject: [PATCH 10/34] use merge to resolve conflict
---
scripts/installer/windows/product.wxs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 80505611aee..8780dd0b416 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -86,6 +86,10 @@
NOT Installed AND NOT WIX_UPGRADE_DETECTED
+
+
+
+
From 83acbd089b280242256db456a7e0841a980e94c3 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 18:45:07 +0800
Subject: [PATCH 11/34] update
---
scripts/installer/windows/product.wxs | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 8780dd0b416..6922b54594d 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -86,10 +86,6 @@
NOT Installed AND NOT WIX_UPGRADE_DETECTED
-
-
-
-
@@ -101,6 +97,12 @@
+
+
+
+
+
+
@@ -137,7 +139,7 @@
KeyPath="yes"/>
-
+
From db28381fc4f8870c03cebc628f02dc38920b56ee Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 18:54:09 +0800
Subject: [PATCH 12/34] update
---
scripts/installer/windows/product.wxs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 6922b54594d..ac7af10f59c 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -98,7 +98,7 @@
-
+
From 28e13c272e752d21364b066ffd7e01221f9da636 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 19:07:57 +0800
Subject: [PATCH 13/34] test
---
scripts/installer/windows/product.wxs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index ac7af10f59c..06dce904b80 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -139,7 +139,7 @@
KeyPath="yes"/>
-
+
From 6385d7daa7461cc7d0a5c279a3666b818fbfd314 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 19:22:05 +0800
Subject: [PATCH 14/34] add sharedfiles component
---
scripts/installer/windows/product.wxs | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 06dce904b80..5551bc049b4 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -149,6 +149,7 @@
+
From 883530aa8cbcab11190d5c4b4eaf310c473c4bb0 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 19:24:48 +0800
Subject: [PATCH 15/34] typo
---
scripts/installer/windows/promptflow.wixproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/installer/windows/promptflow.wixproj b/scripts/installer/windows/promptflow.wixproj
index 717ce079472..bbbe6a809eb 100644
--- a/scripts/installer/windows/promptflow.wixproj
+++ b/scripts/installer/windows/promptflow.wixproj
@@ -61,7 +61,6 @@
WixUtilExtension
-
From 38daf9828c79c849ec4350353a9af563d1cf2b43 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Tue, 14 Nov 2023 20:34:37 +0800
Subject: [PATCH 16/34] post process heat
---
.github/workflows/build_msi_installer.yml | 4 ++--
scripts/installer/windows/heat_post_process.ps1 | 14 ++++++++++++++
scripts/installer/windows/product.wxs | 9 +--------
scripts/installer/windows/promptflow.wixproj | 1 +
4 files changed, 18 insertions(+), 10 deletions(-)
create mode 100644 scripts/installer/windows/heat_post_process.ps1
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 4dc0c3fc311..3ff5cf48606 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -21,7 +21,7 @@ jobs:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- - name: Install Wix Toolset
+ - name: Install WIX Toolset
shell: pwsh
working-directory: ${{ github.workspace }}/scripts/installer/windows
run: |
@@ -58,7 +58,7 @@ jobs:
pyinstaller promptflow.spec
shell: pwsh
- - name: Build Wix project
+ - name: Build WIX project
working-directory: ${{ github.workspace }}/scripts/installer/windows
run: |
$text = Get-Content "promptflow.wixproj" -Raw
diff --git a/scripts/installer/windows/heat_post_process.ps1 b/scripts/installer/windows/heat_post_process.ps1
new file mode 100644
index 00000000000..0b281cb6ad1
--- /dev/null
+++ b/scripts/installer/windows/heat_post_process.ps1
@@ -0,0 +1,14 @@
+$content = Get-Content -Path "out\promptflow.wxs"
+$searchText = "pfs.exe"
+
+for ($i = 0; $i -lt $content.Count; $i++) {
+ if ($content[$i] -match $searchText) {
+ $start = [Math]::Max(0, $i - 1)
+ $end = [Math]::Min($i + 1, $content.Count - 1)
+
+ $content = $content[0..($start - 1)] + $content[($end + 1)..($content.Count - 1)]
+ }
+}
+
+$content | Set-Content -Path "out\promptflow.wxs"
+
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 5551bc049b4..80505611aee 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -97,12 +97,6 @@
-
-
-
-
-
-
@@ -139,7 +133,7 @@
KeyPath="yes"/>
-
+
@@ -149,7 +143,6 @@
-
diff --git a/scripts/installer/windows/promptflow.wixproj b/scripts/installer/windows/promptflow.wixproj
index bbbe6a809eb..77bea30e723 100644
--- a/scripts/installer/windows/promptflow.wixproj
+++ b/scripts/installer/windows/promptflow.wixproj
@@ -68,5 +68,6 @@
+
From 2929f4ce0983c21e154b4d4e9d09e880fd320662 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 14:22:11 +0800
Subject: [PATCH 17/34] test upload
---
.github/workflows/build_msi_installer.yml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 3ff5cf48606..591aea8c5a2 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -77,3 +77,17 @@ jobs:
with:
name: msi-artifact
path: scripts/installer/windows/out/*.msi
+
+ - name: Install Azure CLI
+ uses: azure/setup-azure-cli@v1
+
+ - name: Upload to Azure Storage
+ env:
+ AZURE_STORAGE_ACCOUNT_NAME: promptflowartifact
+ AZURE_CONTAINER_NAME: msi-installer
+ run: |
+ az storage blob upload \
+ --account-name $AZURE_STORAGE_ACCOUNT_NAME \
+ --container-name $AZURE_CONTAINER_NAME \
+ --file scripts/installer/windows/out/*.msi \
+ --name chenyin_test
\ No newline at end of file
From 015eaf08441dc9ceeed8acfbcd338a0f8a09b04e Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 14:25:29 +0800
Subject: [PATCH 18/34] login
---
.github/workflows/build_msi_installer.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 591aea8c5a2..bba2bd7ad2f 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -78,8 +78,10 @@ jobs:
name: msi-artifact
path: scripts/installer/windows/out/*.msi
- - name: Install Azure CLI
- uses: azure/setup-azure-cli@v1
+ - name: Azure Login
+ uses: azure/login@v1
+ with:
+ creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Upload to Azure Storage
env:
From a13cd956a5365dacddca4ffc060ba29a36dcc5f7 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 14:40:03 +0800
Subject: [PATCH 19/34] test
---
.github/workflows/build_msi_installer.yml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index bba2bd7ad2f..4bab2837a0f 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -88,8 +88,4 @@ jobs:
AZURE_STORAGE_ACCOUNT_NAME: promptflowartifact
AZURE_CONTAINER_NAME: msi-installer
run: |
- az storage blob upload \
- --account-name $AZURE_STORAGE_ACCOUNT_NAME \
- --container-name $AZURE_CONTAINER_NAME \
- --file scripts/installer/windows/out/*.msi \
- --name chenyin_test
\ No newline at end of file
+ az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT_NAME --container-name $AZURE_CONTAINER_NAME --file scripts/installer/windows/out/*.msi --name chenyin_test
\ No newline at end of file
From 44066fb265a3d4406125c2334bdcfb34a56ea05c Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 14:53:43 +0800
Subject: [PATCH 20/34] typo
---
.github/workflows/build_msi_installer.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 4bab2837a0f..d52eba10e9f 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -84,8 +84,6 @@ jobs:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Upload to Azure Storage
- env:
- AZURE_STORAGE_ACCOUNT_NAME: promptflowartifact
- AZURE_CONTAINER_NAME: msi-installer
run: |
- az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT_NAME --container-name $AZURE_CONTAINER_NAME --file scripts/installer/windows/out/*.msi --name chenyin_test
\ No newline at end of file
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/*.msi --name chenyin_test
+ shell: pwsh
\ No newline at end of file
From f4d8603d7ed54676329238205904543643973b8b Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 14:57:47 +0800
Subject: [PATCH 21/34] update
---
.github/workflows/build_msi_installer.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index d52eba10e9f..d993865a6b6 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -85,5 +85,6 @@ jobs:
- name: Upload to Azure Storage
run: |
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/*.msi --name chenyin_test
+ $file_name = 'promptflow-${{ steps.get-version.outputs.version }}'
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$file_name.msi --name chenyin_test
shell: pwsh
\ No newline at end of file
From 11c5eb3638bbb575a0cbae03f99e80815544fc42 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 15:15:05 +0800
Subject: [PATCH 22/34] add upload storage account
---
.github/workflows/build_msi_installer.yml | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index d993865a6b6..8352c038ab2 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout Repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
submodules: true
@@ -72,12 +72,6 @@ jobs:
msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj
shell: pwsh
- - name: Upload MSI to Artifact
- uses: actions/upload-artifact@v2
- with:
- name: msi-artifact
- path: scripts/installer/windows/out/*.msi
-
- name: Azure Login
uses: azure/login@v1
with:
@@ -85,6 +79,6 @@ jobs:
- name: Upload to Azure Storage
run: |
- $file_name = 'promptflow-${{ steps.get-version.outputs.version }}'
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$file_name.msi --name chenyin_test
+ $msi_file = Get-ChildItem -Path 'scripts/installer/windows/out/' -Filter *.msi
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$msi_file --name $msi_file --overwrite
shell: pwsh
\ No newline at end of file
From a28b0f05c19d5e93933db1303182566595aa84db Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 15:36:14 +0800
Subject: [PATCH 23/34] typo
---
.github/workflows/build_msi_installer.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 8352c038ab2..75bc6a75576 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -80,5 +80,5 @@ jobs:
- name: Upload to Azure Storage
run: |
$msi_file = Get-ChildItem -Path 'scripts/installer/windows/out/' -Filter *.msi
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$msi_file --name $msi_file --overwrite
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$($msi_file.Name) --name $($msi_file.Name) --overwrite
shell: pwsh
\ No newline at end of file
From 1bfdce87eda7f8fd92ed0a92c12b3960e7ad0520 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 16:01:58 +0800
Subject: [PATCH 24/34] add comment
---
scripts/installer/windows/heat_post_process.ps1 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/installer/windows/heat_post_process.ps1 b/scripts/installer/windows/heat_post_process.ps1
index 0b281cb6ad1..39f8f1363d5 100644
--- a/scripts/installer/windows/heat_post_process.ps1
+++ b/scripts/installer/windows/heat_post_process.ps1
@@ -1,3 +1,5 @@
+# Add the script to delete the pfs.exe component from the generated wxs file, which is conflicting with the pfs.exe
+# service component in the project.wxs.
$content = Get-Content -Path "out\promptflow.wxs"
$searchText = "pfs.exe"
From 175cbb62c4853a5fbf95023a7f798e7c2b845025 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 16:16:49 +0800
Subject: [PATCH 25/34] add upload_as_latest input
---
.github/workflows/build_msi_installer.yml | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 75bc6a75576..9423f009752 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -2,6 +2,12 @@ name: Build and Package MSI
on:
workflow_dispatch:
+ inputs:
+ UploadAsLatest:
+ type: string
+ default: "False"
+ required: false
+ description: 'Also upload the msi installer to storage account as latest'
# will delete pull request when it's ready
pull_request:
branches:
@@ -13,6 +19,10 @@ jobs:
name: Build Windows MSI
steps:
+ - name: Check input parameters
+ run: |
+ echo "UploadAsLatest: ${{ inputs.UploadAsLatest }}"
+
- name: Checkout Repo
uses: actions/checkout@v3
with:
@@ -80,5 +90,9 @@ jobs:
- name: Upload to Azure Storage
run: |
$msi_file = Get-ChildItem -Path 'scripts/installer/windows/out/' -Filter *.msi
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$($msi_file.Name) --name $($msi_file.Name) --overwrite
+ if [inputs.UploadAsLatest == 'False']; then
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$($msi_file.Name) --name $($msi_file.Name) --overwrite
+ else
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$($msi_file.Name) --name promptflow.msi --overwrite
+ fi
shell: pwsh
\ No newline at end of file
From 65c3cd1969fd405f55104590095fa75845717d89 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 16:34:56 +0800
Subject: [PATCH 26/34] update
---
.github/workflows/build_msi_installer.yml | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 9423f009752..7a61d440578 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -45,7 +45,7 @@ jobs:
with:
python-version: 3.9
- - name: Install dependencies
+ - name: Install promptflow dependencies
run: |
python -m pip install --upgrade pip
pip install promptflow[azure,executable] promptflow-tools
@@ -89,10 +89,12 @@ jobs:
- name: Upload to Azure Storage
run: |
- $msi_file = Get-ChildItem -Path 'scripts/installer/windows/out/' -Filter *.msi
- if [inputs.UploadAsLatest == 'False']; then
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$($msi_file.Name) --name $($msi_file.Name) --overwrite
- else
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file scripts/installer/windows/out/$($msi_file.Name) --name promptflow.msi --overwrite
- fi
+ $msi_files = Get-ChildItem -Path 'scripts/installer/windows/out/' -Filter *.msi
+ foreach ($msi_file in $msi_files) {
+ if ($env:INPUT_UPLOADASLATEST -eq 'False') {
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "$($msi_file.Name)" --overwrite
+ } else {
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "promptflow_test.msi" --overwrite
+ }
+ }
shell: pwsh
\ No newline at end of file
From f5086663116d85027d3099740b97d8602a26ed7e Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 16:45:58 +0800
Subject: [PATCH 27/34] update if statement
---
.github/workflows/build_msi_installer.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 7a61d440578..68cf81b939f 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -91,10 +91,10 @@ jobs:
run: |
$msi_files = Get-ChildItem -Path 'scripts/installer/windows/out/' -Filter *.msi
foreach ($msi_file in $msi_files) {
- if ($env:INPUT_UPLOADASLATEST -eq 'False') {
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "$($msi_file.Name)" --overwrite
+ if ($env:INPUT_UPLOADASLATEST -ieq 'True') {
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "promptflow.msi" --overwrite
} else {
- az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "promptflow_test.msi" --overwrite
+ az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "$($msi_file.Name)" --overwrite
}
}
shell: pwsh
\ No newline at end of file
From 1eec1f15596aafdc5bfec2bdaf50d9a5378ea25d Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 17:28:09 +0800
Subject: [PATCH 28/34] test copy blob
---
.github/workflows/build_msi_installer.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index 68cf81b939f..f09e52819dd 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -93,8 +93,10 @@ jobs:
foreach ($msi_file in $msi_files) {
if ($env:INPUT_UPLOADASLATEST -ieq 'True') {
az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "promptflow.msi" --overwrite
+ az storage blob copy start --account-name promptflowartifact --destination-container msi-installer --destination-blob "$($msi_file.Name)"--source-container msi-installer --source-blob "promptflow.msi"
} else {
az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "$($msi_file.Name)" --overwrite
+ az storage blob copy start --account-name promptflowartifact --destination-container msi-installer --destination-blob "chenyin-test.msi"--source-container msi-installer --source-blob "$($msi_file.Name)"
}
}
shell: pwsh
\ No newline at end of file
From 03c04346a6669d4ebdf098f71ea3d8968156b286 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 17:52:26 +0800
Subject: [PATCH 29/34] convert file version to four turple
---
.github/workflows/build_msi_installer.yml | 11 ++++++++---
scripts/installer/windows/scripts/version_info.txt | 6 +++---
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index f09e52819dd..b477263390b 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -61,8 +61,14 @@ jobs:
- name: Build Pyinstaller project
working-directory: ${{ github.workspace }}/scripts/installer/windows/scripts
run: |
- echo "Version from promptflow: ${{ steps.get-version.outputs.version }}"
+ echo 'Version from promptflow: ${{ steps.get-version.outputs.version }}'
$text = Get-Content "version_info.txt" -Raw
+
+ $versionString = '${{ steps.get-version.outputs.version }}'
+ $versionArray = $versionString.Split('.') + 0
+ $versionTuple = [string]::Join(', ', $versionArray)
+ $text = $text -replace '\$\((env\.FILE_VERSION)\)', $versionTuple
+
$text = $text -replace '\$\((env\.CLI_VERSION)\)', '${{ steps.get-version.outputs.version }}'
$text | Out-File -FilePath "version_info.txt" -Encoding utf8
pyinstaller promptflow.spec
@@ -93,10 +99,9 @@ jobs:
foreach ($msi_file in $msi_files) {
if ($env:INPUT_UPLOADASLATEST -ieq 'True') {
az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "promptflow.msi" --overwrite
- az storage blob copy start --account-name promptflowartifact --destination-container msi-installer --destination-blob "$($msi_file.Name)"--source-container msi-installer --source-blob "promptflow.msi"
+ az storage blob copy start --account-name promptflowartifact --destination-container msi-installer --destination-blob "$($msi_file.Name)" --source-container msi-installer --source-blob "promptflow.msi"
} else {
az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "$($msi_file.Name)" --overwrite
- az storage blob copy start --account-name promptflowartifact --destination-container msi-installer --destination-blob "chenyin-test.msi"--source-container msi-installer --source-blob "$($msi_file.Name)"
}
}
shell: pwsh
\ No newline at end of file
diff --git a/scripts/installer/windows/scripts/version_info.txt b/scripts/installer/windows/scripts/version_info.txt
index a6404604996..12b4ada8875 100644
--- a/scripts/installer/windows/scripts/version_info.txt
+++ b/scripts/installer/windows/scripts/version_info.txt
@@ -1,4 +1,4 @@
-# UTF-8
+# UTF-8
#
# For more details about fixed file info 'ffi' see:
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
@@ -6,7 +6,7 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0.
- filevers=(1, 0, 0, 0),
+ filevers=($(env.FILE_VERSION)),
prodvers=(1, 0, 0, 0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
@@ -36,7 +36,7 @@ VSVersionInfo(
StringStruct('LegalCopyright', 'Copyright (c) Microsoft Corporation. All rights reserved.'),
StringStruct('ProductName', 'Microsoft prompt flow'),
StringStruct('ProductVersion', '$(env.CLI_VERSION)')])
- ]),
+ ]),
VarFileInfo([VarStruct('Translation', [1033, 1252])])
]
)
\ No newline at end of file
From 4d7c80dc4dee33efe8213b8ddf5f243556a8f1b7 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 18:21:22 +0800
Subject: [PATCH 30/34] update readme
---
scripts/installer/windows/README.md | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/scripts/installer/windows/README.md b/scripts/installer/windows/README.md
index 37df1fce8e7..0c869577f90 100644
--- a/scripts/installer/windows/README.md
+++ b/scripts/installer/windows/README.md
@@ -1,10 +1,13 @@
-Building the Windows MSI Installer
-========================
+# Building the Windows MSI Installer
This document provides instructions on creating the MSI installer.
-Prerequisites
--------------
+## Building with Github Actions
+Trigger the [workflow](https://github.com/microsoft/promptflow/actions/workflows/build_msi_installer.yml) manually.
+
+
+## Local Building
+### Prerequisites
1. Turn on the '.NET Framework 3.5' Windows Feature (required for WIX Toolset).
2. Install 'Microsoft Build Tools 2015'.
@@ -20,12 +23,11 @@ Prerequisites
- `pip install promptflow[azure,executable] promptflow-tools`
-Building
---------
-1. `cd scripts/installer/windows/scripts` and run `pyinstaller promptflow.spec`.
-2. `cd scripts/installer/windows` and Run `msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj`.
-3. The unsigned MSI will be in the `scripts/installer/windows/out` folder.
+### Building
+1. Update the version number `$(env.CLI_VERSION)` and `$(env.FILE_VERSION)` in `product.wxs`, `promptflow.wixproj` and `version_info.txt`.
+2. `cd scripts/installer/windows/scripts` and run `pyinstaller promptflow.spec`.
+3. `cd scripts/installer/windows` and Run `msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj`.
+4. The unsigned MSI will be in the `scripts/installer/windows/out` folder.
-Notes
---------
+## Notes
- If you encounter "Access is denied" error when running promptflow. Please follow the [link](https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction-rules-deployment-implement?view=o365-worldwide#customize-attack-surface-reduction-rules) to add the executable to the Windows Defender Attack Surface Reduction (ASR) rule.
\ No newline at end of file
From a0657c2186e019d79089576267c63904e38aba93 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Wed, 15 Nov 2023 18:22:21 +0800
Subject: [PATCH 31/34] update
---
scripts/installer/windows/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/installer/windows/README.md b/scripts/installer/windows/README.md
index 0c869577f90..95657c1c821 100644
--- a/scripts/installer/windows/README.md
+++ b/scripts/installer/windows/README.md
@@ -2,11 +2,11 @@
This document provides instructions on creating the MSI installer.
-## Building with Github Actions
+## Option1: Building with Github Actions
Trigger the [workflow](https://github.com/microsoft/promptflow/actions/workflows/build_msi_installer.yml) manually.
-## Local Building
+## Option2: Local Building
### Prerequisites
1. Turn on the '.NET Framework 3.5' Windows Feature (required for WIX Toolset).
From 33fbf1e5a98bb023e38ca49759c95617f485a656 Mon Sep 17 00:00:00 2001
From: zhen
Date: Wed, 15 Nov 2023 20:52:45 +0800
Subject: [PATCH 32/34] [msi] remove pfs service installer (#1151)
# 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.
---
scripts/installer/windows/product.wxs | 6 ---
scripts/installer/windows/scripts/pfs.py | 50 +-----------------------
2 files changed, 1 insertion(+), 55 deletions(-)
diff --git a/scripts/installer/windows/product.wxs b/scripts/installer/windows/product.wxs
index 80505611aee..9b968f88339 100644
--- a/scripts/installer/windows/product.wxs
+++ b/scripts/installer/windows/product.wxs
@@ -8,7 +8,6 @@
-
@@ -132,11 +131,6 @@
Value="$(var.ProductVersion)"
KeyPath="yes"/>
-
-
-
-
-
diff --git a/scripts/installer/windows/scripts/pfs.py b/scripts/installer/windows/scripts/pfs.py
index e5af4b70943..724fc271fc2 100644
--- a/scripts/installer/windows/scripts/pfs.py
+++ b/scripts/installer/windows/scripts/pfs.py
@@ -2,55 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from promptflow._sdk._service.entry import main
-import sys
-
-import win32serviceutil # ServiceFramework and commandline helper
-import win32service # Events
-import servicemanager # Simple setup and logging
-
-
-class MyService:
- """Silly little application stub"""
- def stop(self):
- """Stop the service"""
- self.running = False
-
- def run(self):
- """Main service loop. This is where work is done!"""
- self.running = True
- while self.running:
- main() # Important work
- servicemanager.LogInfoMsg("Service running...")
-
-
-class MyServiceFramework(win32serviceutil.ServiceFramework):
-
- _svc_name_ = 'PromptflowService'
- _svc_display_name_ = 'Promptflow Service'
-
- def SvcStop(self):
- """Stop the service"""
- self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
- self.service_impl.stop()
- self.ReportServiceStatus(win32service.SERVICE_STOPPED)
-
- def SvcDoRun(self):
- """Start the service; does not return until stopped"""
- self.ReportServiceStatus(win32service.SERVICE_START_PENDING)
- self.service_impl = MyService()
- self.ReportServiceStatus(win32service.SERVICE_RUNNING)
- # Run the service
- self.service_impl.run()
-
-
-def init():
- if len(sys.argv) == 1:
- servicemanager.Initialize()
- servicemanager.PrepareToHostSingle(MyServiceFramework)
- servicemanager.StartServiceCtrlDispatcher()
- else:
- win32serviceutil.HandleCommandLine(MyServiceFramework)
if __name__ == '__main__':
- init()
+ main()
From 5800cf972e098b64eb5229ed2b62768b26e7b823 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Thu, 16 Nov 2023 10:26:12 +0800
Subject: [PATCH 33/34] remove heat_post_process
---
scripts/installer/windows/heat_post_process.ps1 | 16 ----------------
scripts/installer/windows/promptflow.wixproj | 1 -
2 files changed, 17 deletions(-)
delete mode 100644 scripts/installer/windows/heat_post_process.ps1
diff --git a/scripts/installer/windows/heat_post_process.ps1 b/scripts/installer/windows/heat_post_process.ps1
deleted file mode 100644
index 39f8f1363d5..00000000000
--- a/scripts/installer/windows/heat_post_process.ps1
+++ /dev/null
@@ -1,16 +0,0 @@
-# Add the script to delete the pfs.exe component from the generated wxs file, which is conflicting with the pfs.exe
-# service component in the project.wxs.
-$content = Get-Content -Path "out\promptflow.wxs"
-$searchText = "pfs.exe"
-
-for ($i = 0; $i -lt $content.Count; $i++) {
- if ($content[$i] -match $searchText) {
- $start = [Math]::Max(0, $i - 1)
- $end = [Math]::Min($i + 1, $content.Count - 1)
-
- $content = $content[0..($start - 1)] + $content[($end + 1)..($content.Count - 1)]
- }
-}
-
-$content | Set-Content -Path "out\promptflow.wxs"
-
diff --git a/scripts/installer/windows/promptflow.wixproj b/scripts/installer/windows/promptflow.wixproj
index 77bea30e723..bbbe6a809eb 100644
--- a/scripts/installer/windows/promptflow.wixproj
+++ b/scripts/installer/windows/promptflow.wixproj
@@ -68,6 +68,5 @@
-
From 3fa1ffd2b60f04f19a152085d893e03013279991 Mon Sep 17 00:00:00 2001
From: Ying Chen <2601502859@qq.com>
Date: Thu, 16 Nov 2023 11:11:22 +0800
Subject: [PATCH 34/34] delete pull request
---
.github/workflows/build_msi_installer.yml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml
index b477263390b..7df90b09a45 100644
--- a/.github/workflows/build_msi_installer.yml
+++ b/.github/workflows/build_msi_installer.yml
@@ -8,10 +8,6 @@ on:
default: "False"
required: false
description: 'Also upload the msi installer to storage account as latest'
- # will delete pull request when it's ready
- pull_request:
- branches:
- - main
jobs:
build_msi_installer: