Commit a372daa
authored
🩹 [Patch]: Verify that
## Description
- Fixes #13
This pull request includes several changes to improve platform
compatibility and ensure the necessary dependencies are installed. The
most important changes include adding a new function to check for the
Visual C++ Redistributable, updating scripts to verify platform support,
and initializing the Sodium library conditionally.
### Platform compatibility improvements:
*
[`src/functions/private/Assert-VisualCRedistributableInstalled.ps1`](diffhunk://#diff-35f6fe814179c7dc7dbe445edfeaec04e40ead8fd994ff12ff293aa5f6883d6dR1-R47):
Added a new function `Assert-VisualCRedistributableInstalled` to check
if the Visual C++ Redistributable for Visual Studio 2015 or later is
installed and meets the specified minimum version.
*
[`src/main.ps1`](diffhunk://#diff-75cbc94876914e3617b466284eb14da2baf68299fb67315e8a5a2f6f1c38ab3fR4-R20):
Modified the main script to set the `$script:Supported` variable based
on platform checks and the result of
`Assert-VisualCRedistributableInstalled` for Windows.
*
[`src/variables/private/Supported.ps1`](diffhunk://#diff-7904f48b2851050ac94d151a468c3e9f107ca59a76c6297d8dfe3adaee8837daR1):
Added a new variable `$script:Supported` initialized to `$false` to
track platform support status.
### Sodium library initialization:
* `src/functions/public/ConvertFrom-SodiumSealedBox.ps1`,
`src/functions/public/ConvertTo-SodiumSealedBox.ps1`,
`src/functions/public/New-SodiumKeyPair.ps1`: Updated these scripts to
throw an error if Sodium is not supported on the platform by checking
the `$script:Supported` variable before initializing the Sodium library.
[[1]](diffhunk://#diff-afea5aa86ab4622c3a4bff63aa61976494cb620d338df534bf7121018056bbadR44)
[[2]](diffhunk://#diff-be3e1727721972ed3d4275a880537b89ce6fbb16c1d97405e02d7e798b6c7bfbR33)
[[3]](diffhunk://#diff-b951668ffde5fc1b700af8f8b2b6076d7ce27b0ec23e9d556ad1a893e204c87bR60)
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] vcruntime140 is installed on Windows (#23)1 parent f88a0f0 commit a372daa
7 files changed
Lines changed: 54 additions & 2 deletions
File tree
- src
- functions
- private
- public
- variables/private
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments