Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Create installer
run: |
dotnet tool install --global wix --version 4.0.5
wix build Product.wxs -o "./Desktop Notes/Desktop Notes/bin/Release/Desktop_Notes.msi"
wix build Product.wxs -ext WixToolset.Util.wixext -o "./Desktop Notes/Desktop Notes/bin/Release/Desktop_Notes.msi"

- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Create installer
run: |
dotnet tool install --global wix --version 4.0.5
wix build Product.wxs -o "./Desktop Notes/Desktop Notes/bin/Release/Desktop_Notes.msi"
wix build Product.wxs -ext WixToolset.Util.wixext -o "./Desktop Notes/Desktop Notes/bin/Release/Desktop_Notes.msi"

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
9 changes: 8 additions & 1 deletion Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<?define Manufacturer = "Webarcx"?>
<?define Guid = "E4D9B1E5-BE35-4CD8-8A81-983EDA7089B8"?>

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<Package Name="$(var.Name)" Manufacturer="$(var.Manufacturer)" Version="!(bind.FileVersion.MainExe)" UpgradeCode="$(var.Guid)" Language="1033" InstallerVersion="500" Scope="perUser">
<SummaryInformation Manufacturer="$(var.Manufacturer)" />
<Icon Id="Logo.ico" SourceFile="Images\main.ico" />
Expand All @@ -21,6 +22,12 @@
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.Name)" />
</StandardDirectory>
<util:CloseApplication
Id="CloseDesktopNotes"
Target="Desktop_Notes.exe"
CloseMessage="yes"
RebootPrompt="no"
TerminateProcess="5" />
<MajorUpgrade
DowngradeErrorMessage="不支持降级安装。请先卸载当前版本再安装旧版本。"
Schedule="afterInstallInitialize"
Expand Down
Loading