update the manual msi generation instructions for winget (#8178)

# Description

Yet another winget failure and yet another update of the manual msi
generation instructions for winget releases.

# User-Facing Changes

N/A
This commit is contained in:
Darren Schroeder 2023-02-23 08:19:13 -06:00 committed by GitHub
parent aba0fb0000
commit 9890966fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,29 +6,37 @@
# REF:
# 1. https://github.com/volks73/cargo-wix
# Instructions for manually creating an MSI for Winget Releases when they fail
# Added 2022-11-29 when Windows packaging wouldn't work
# To run this manual for windows
# unset CARGO_TARGET_DIR if set
# hide-env CARGO_TARGET_DIR
# let-env TARGET = 'x86_64-pc-windows-msvc'
# let-env TARGET_RUSTFLAGS = ''
# let-env GITHUB_WORKSPACE = 'C:\Users\dschroeder\source\repos\forks\nushell'
# let-env GITHUB_OUTPUT = 'C:\Users\dschroeder\source\repos\forks\nushell\output\out.txt'
# let-env OS = 'windows-latest'
# You need to run this twice. The first pass makes the output folder and builds everything
# The second pass generates the msi file
# Pass 1 let-env _EXTRA_ = 'bin'
# Pass 2 let-env _EXTRA_ = 'msi'
# Updated again on 2023-02-23 because msis are still failing validation
# To run this manual for windows here are the steps I take
# checkout the release you want to publish
# 1. git checkout 0.76.0
# unset CARGO_TARGET_DIR if set (I have to do this in the parent shell to get it to work)
# 2. $env:CARGO_TARGET_DIR = ""
# 2. hide-env CARGO_TARGET_DIR
# 3. let-env TARGET = 'x86_64-pc-windows-msvc'
# 4. let-env TARGET_RUSTFLAGS = ''
# 5. let-env GITHUB_WORKSPACE = 'C:\Users\dschroeder\source\repos\forks\nushell'
# 6. let-env GITHUB_OUTPUT = 'C:\Users\dschroeder\source\repos\forks\nushell\output\out.txt'
# 7. let-env OS = 'windows-latest'
# make sure 7z.exe is in your path https://www.7-zip.org/download.html
# let-env Path = ($env.Path | append 'c:\apps\7-zip')
# 8. let-env Path = ($env.Path | append 'c:\apps\7-zip')
# make sure aria2c.exe is in your path https://github.com/aria2/aria2
# let-env Path = ($env.Path | append 'c:\path\to\aria2c')
# 9. let-env Path = ($env.Path | append 'c:\path\to\aria2c')
# make sure you have the wixtools installed https://wixtoolset.org/
# let-env Path = ($env.Path | append 'C:\Users\dschroeder\AppData\Local\tauri\WixTools')
# After msi is generated, if you have to update winget-pkgs repo, you'll need to patch the release
# 10. let-env Path = ($env.Path | append 'C:\Users\dschroeder\AppData\Local\tauri\WixTools')
# You need to run the release-pkg twice. The first pass, with _EXTRA_ as 'bin', makes the output
# folder and builds everything. The second pass, that generates the msi file, with _EXTRA_ as 'msi'
# 11. let-env _EXTRA_ = 'bin'
# 12. source .github\workflows\release-pkg.nu
# 13. cd ..
# 14. let-env _EXTRA_ = 'msi'
# 15. source .github\workflows\release-pkg.nu
# After msi is generated, you have to update winget-pkgs repo, you'll need to patch the release
# by deleting the existing msi and uploading this new msi. Then you'll need to update the hash
# on the winget-pkgs PR. To generate the hash, run this command
# open target\wix\nu-0.74.0-x86_64-pc-windows-msvc.msi | hash sha256
# 16. open target\wix\nu-0.74.0-x86_64-pc-windows-msvc.msi | hash sha256
# Then, just take the output and put it in the winget-pkgs PR for the hash on the msi