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: # REF:
# 1. https://github.com/volks73/cargo-wix # 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 # Added 2022-11-29 when Windows packaging wouldn't work
# To run this manual for windows # Updated again on 2023-02-23 because msis are still failing validation
# unset CARGO_TARGET_DIR if set # To run this manual for windows here are the steps I take
# hide-env CARGO_TARGET_DIR # checkout the release you want to publish
# let-env TARGET = 'x86_64-pc-windows-msvc' # 1. git checkout 0.76.0
# let-env TARGET_RUSTFLAGS = '' # unset CARGO_TARGET_DIR if set (I have to do this in the parent shell to get it to work)
# let-env GITHUB_WORKSPACE = 'C:\Users\dschroeder\source\repos\forks\nushell' # 2. $env:CARGO_TARGET_DIR = ""
# let-env GITHUB_OUTPUT = 'C:\Users\dschroeder\source\repos\forks\nushell\output\out.txt' # 2. hide-env CARGO_TARGET_DIR
# let-env OS = 'windows-latest' # 3. let-env TARGET = 'x86_64-pc-windows-msvc'
# You need to run this twice. The first pass makes the output folder and builds everything # 4. let-env TARGET_RUSTFLAGS = ''
# The second pass generates the msi file # 5. let-env GITHUB_WORKSPACE = 'C:\Users\dschroeder\source\repos\forks\nushell'
# Pass 1 let-env _EXTRA_ = 'bin' # 6. let-env GITHUB_OUTPUT = 'C:\Users\dschroeder\source\repos\forks\nushell\output\out.txt'
# Pass 2 let-env _EXTRA_ = 'msi' # 7. let-env OS = 'windows-latest'
# make sure 7z.exe is in your path https://www.7-zip.org/download.html # 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 # 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/ # make sure you have the wixtools installed https://wixtoolset.org/
# let-env Path = ($env.Path | append 'C:\Users\dschroeder\AppData\Local\tauri\WixTools') # 10. 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 # 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 # 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 # 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 # Then, just take the output and put it in the winget-pkgs PR for the hash on the msi