Skip to content

Commit

Permalink
Update README.md (#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
crutkas committed Mar 3, 2020
1 parent 6556e1b commit b2370f5
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions installer/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
# PowerToys MSIX installer instructions
# PowerToys installer instructions

## One-time tasks
## MSI installer instructions

### Create and install the self-sign certificate
1. Install the [WiX Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WiXToolset).
2. Install the [WiX Toolset build tools](https://wixtoolset.org/releases/) in the development machine.
3. Open `powertoys.sln`, select the "Release" and "x64" configurations and build the `PowerToysSetup` project.
4. The resulting installer will be built to `PowerToysSetup\bin\Release\PowerToysSetup.msi`.

## MSIX installer instructions

### One-time tasks

#### Create and install the self-sign certificate
For the first-time installation, you'll need to generate a self-signed certificate. The script below will generate and add a cert to your [TRCA store](https://docs.microsoft.com/en-us/windows-hardware/drivers/install/trusted-root-certification-authorities-certificate-store).
1. Open `Developer PowerShell for VS` as an Admin
2. Navigate to your repo's `installer\MSIX`
3. Run `.\generate_self_sign_cert.ps1`

**Note:** if you delete the folder, you will have to regenerate the key

### Elevate `Developer PowerShell for VS` permissions due to unsigned file
#### Elevate `Developer PowerShell for VS` permissions due to unsigned file
`msix_reinstall.ps1` is unsigned, you'll need to elevate your prompt.
1. Open `Developer PowerShell for VS` as admin
2. Run `Set-ExecutionPolicy -executionPolicy Unrestricted`

### Allow Sideloaded apps
#### Allow Sideloaded apps
In order to install the MSIX package without using the Microsoft Store, sideloading apps needs to be enabled. This can be done by enabling `Developer Options > Sideload apps` or `Developer Options > Developer mode`.

## To Build MSIX
### Building the MSIX package
1. Make sure you've built the `Release` configuration of `powertoys.sln`
2. Open `Developer PowerShell for VS`
3. Navigate to your repo's `installer\MSIX`
Expand All @@ -27,7 +36,7 @@ In order to install the MSIX package without using the Microsoft Store, sideload
### What msix_reinstall.ps1 does
`msix_reinstall.ps1` removes the current PowerToys installation, restarts explorer.exe (to update PowerRename shell extension), builds `PowerToys-x64.msix` package, signs it with a PowerToys_TemporaryKey.pfx, and finally installs it.

### Removing all .msi/.msix PowerToys installations
## Cleanup - Removing all .msi/.msix PowerToys installations
```ps
$name='PowerToys'
Get-AppxPackage -Name $name | select -ExpandProperty "PackageFullName" | Remove-AppxPackage
Expand All @@ -36,9 +45,3 @@ gwmi win32_product -filter "Name = '$name'" -namespace root/cimv2 | foreach {
else { write-warning "Failed to uninstall $name." }
}
```

# MSI Build instructions (Deprecated)
1. Install the [WiX Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WiXToolset).
2. Install the [WiX Toolset build tools](https://wixtoolset.org/releases/) in the development machine.
3. Open `powertoys.sln`, select the "Release" and "x64" configurations and build the `PowerToysSetup` project.
4. The resulting installer will be built to `PowerToysSetup\bin\Release\PowerToysSetup.msi`.

0 comments on commit b2370f5

Please sign in to comment.