diff --git a/ParallelKit.ps1 b/ParallelKit.ps1 index 99c9662..6a9f9c6 100644 --- a/ParallelKit.ps1 +++ b/ParallelKit.ps1 @@ -2,7 +2,7 @@ # graceful Ctrl+C/window-close handling for Windows PowerShell 5.1 and # PowerShell 7. # -# Version 3.5 - https://github.com/HalRiveria/PowerShell-ParallelKit +# Version 4.0 - https://github.com/HalRiveria/PowerShell-ParallelKit # (Initialize-ParallelKit reports the version too: change both together. The # module's manifest takes it from here.) # Copyright (c) 2026 HalRiveria. MIT License: keep this notice with any copy; @@ -1253,7 +1253,7 @@ function Initialize-ParallelKit { $jobOk = Initialize-PkChildProcessJob # The header's Version line: the version PR changes both, and the harness # checks they match. - $version = [version]'3.5' + $version = [version]'4.0' return [pscustomobject][ordered]@{ AbortHandler = $handlerOk; ChildProcessJob = $jobOk; Version = $version; StartMode = [PkChildProcessJob]::StartMode } } diff --git a/README.md b/README.md index 57502c8..1ea8951 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Each one has built-in help: `Get-Help Invoke-PkProcessBatch -Full` shows its par ## Setup -Requires Windows, with Windows PowerShell 5.1 or PowerShell 7. Download `ParallelKit.ps1` from the [Releases page](https://github.com/HalRiveria/PowerShell-ParallelKit/releases) (this README describes version 3.5 and later), put it in your project, and dot-source it from your script: +Requires Windows, with Windows PowerShell 5.1 or PowerShell 7. Download `ParallelKit.ps1` from the [Releases page](https://github.com/HalRiveria/PowerShell-ParallelKit/releases) (this README describes version 4.0 and later), put it in your project, and dot-source it from your script: ```powershell . "$PSScriptRoot\ParallelKit.ps1" @@ -135,7 +135,7 @@ if ($pk.StartMode -eq 'NoJob') { If you downloaded the file, Windows marks it as coming from the internet and your execution policy may refuse to load it. Run `Unblock-File .\ParallelKit.ps1` once to clear that. -If your machines only run signed scripts (the `AllSigned` execution policy), the file has to be signed with a certificate they trust. The release copy isn't signed. +If your machines only run signed scripts (the `AllSigned` execution policy), the file has to be signed with a certificate they trust. The release copy isn't signed, and neither is the module.
What Initialize-ParallelKit returns @@ -164,14 +164,21 @@ Its public functions are imported globally, so they stay available for the rest ## As a module -The kit also comes as a module, built from `ParallelKit.ps1`: the same code, with `Import-Module` in place of dot-sourcing. To build it from a copy of this repository and import it: +The kit also comes as a module, built from `ParallelKit.ps1`: the same code, with `Import-Module` in place of dot-sourcing. To install it from the PowerShell Gallery and import it: + +```powershell +Install-Module ParallelKit -Scope CurrentUser +Import-Module ParallelKit +``` + +Or build it from a copy of this repository: ```powershell .\Build\New-ParallelKitModule.ps1 -OutputDirectory C:\Modules\ParallelKit Import-Module C:\Modules\ParallelKit ``` -With that `ParallelKit` folder somewhere on `$env:PSModulePath`, `Import-Module ParallelKit` finds it by name, and so does a call to any of its functions without importing it first. The rest of this README applies either way. +Installed, or built into a `ParallelKit` folder somewhere on `$env:PSModulePath`, `Import-Module ParallelKit` finds it by name, and so does a call to any of its functions without importing it first. The rest of this README applies either way.
If the import is refused