Skip to content

Commit 6af82e3

Browse files
authored
Merge pull request #31 from basicx-StrgV/develop
Release 4.0.0
2 parents 13c859c + ab8d0e8 commit 6af82e3

394 files changed

Lines changed: 40997 additions & 31008 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.nuke/build.schema.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"$ref": "#/definitions/build",
4+
"title": "Build Schema",
5+
"definitions": {
6+
"build": {
7+
"type": "object",
8+
"properties": {
9+
"Continue": {
10+
"type": "boolean",
11+
"description": "Indicates to continue a previously failed build attempt"
12+
},
13+
"DoxygenBin": {
14+
"type": "string",
15+
"description": "The path of the doxygen bin directory (Default: C:\\Program Files\\doxygen\\bin)"
16+
},
17+
"Help": {
18+
"type": "boolean",
19+
"description": "Shows the help text for this build assembly"
20+
},
21+
"Host": {
22+
"type": "string",
23+
"description": "Host for execution. Default is 'automatic'",
24+
"enum": [
25+
"AppVeyor",
26+
"AzurePipelines",
27+
"Bamboo",
28+
"Bitbucket",
29+
"Bitrise",
30+
"GitHubActions",
31+
"GitLab",
32+
"Jenkins",
33+
"Rider",
34+
"SpaceAutomation",
35+
"TeamCity",
36+
"Terminal",
37+
"TravisCI",
38+
"VisualStudio",
39+
"VSCode"
40+
]
41+
},
42+
"KeepVersion": {
43+
"type": "boolean",
44+
"description": "Don't update the version (Default: Minor version will be updated)"
45+
},
46+
"Major": {
47+
"type": "boolean",
48+
"description": "Update the major version (Default: Minor version will be updated)"
49+
},
50+
"NoDocs": {
51+
"type": "boolean",
52+
"description": "Sets that no docs should be created (Default: Automatically updating the version from the build config)"
53+
},
54+
"NoLogo": {
55+
"type": "boolean",
56+
"description": "Disables displaying the NUKE logo"
57+
},
58+
"Partition": {
59+
"type": "string",
60+
"description": "Partition to use on CI"
61+
},
62+
"Patch": {
63+
"type": "boolean",
64+
"description": "Update the patch version (Default: Minor version will be updated)"
65+
},
66+
"Plan": {
67+
"type": "boolean",
68+
"description": "Shows the execution plan (HTML)"
69+
},
70+
"Profile": {
71+
"type": "array",
72+
"description": "Defines the profiles to load",
73+
"items": {
74+
"type": "string"
75+
}
76+
},
77+
"Root": {
78+
"type": "string",
79+
"description": "Root directory during build execution"
80+
},
81+
"Skip": {
82+
"type": "array",
83+
"description": "List of targets to be skipped. Empty list skips all dependencies",
84+
"items": {
85+
"type": "string",
86+
"enum": [
87+
"Compile",
88+
"Docs",
89+
"Info",
90+
"LoadConfig",
91+
"Pack",
92+
"Restore",
93+
"UpdateConfig"
94+
]
95+
}
96+
},
97+
"Solution": {
98+
"type": "string",
99+
"description": "Path to a solution file that is automatically loaded"
100+
},
101+
"Target": {
102+
"type": "array",
103+
"description": "List of targets to be invoked. Default is '{default_target}'",
104+
"items": {
105+
"type": "string",
106+
"enum": [
107+
"Compile",
108+
"Docs",
109+
"Info",
110+
"LoadConfig",
111+
"Pack",
112+
"Restore",
113+
"UpdateConfig"
114+
]
115+
}
116+
},
117+
"Verbosity": {
118+
"type": "string",
119+
"description": "Logging verbosity during build execution. Default is 'Normal'",
120+
"enum": [
121+
"Minimal",
122+
"Normal",
123+
"Quiet",
124+
"Verbose"
125+
]
126+
},
127+
"Version": {
128+
"type": "string",
129+
"description": "Provide a new version for the package"
130+
}
131+
}
132+
}
133+
}
134+
}

.nuke/parameters.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "/build.schema.json",
3+
"Solution": "src/WGet.Net.sln"
4+
}

README.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,34 @@
77

88
## ❓ What is WGet.NET
99

10-
WGet.NET is a WinGet wrapper library for .Net.
10+
WGet.NET is a WinGet wrapper library for **.Net** that allows you to easily install, update, uninstall and more, with the help of **WinGet**, from your application.
1111

1212
![WGet.NET Icon](https://raw.githubusercontent.com/basicx-StrgV/WGet.NET/main/repo_design/WGet.NET_Icon_Small.png)
1313

14-
I created it for another project and then made a library out of it in hope it might be useful to someone else too.
15-
**If you tried this library, please give me some feedback. And if you miss a feature, you can create an issue to let me know.**
14+
I created it for another project and then made a library out of it in the hope it might be useful to someone else too.
15+
16+
**If you miss a feature or find a problem with the library, feel free to create an [issue](https://github.com/basicx-StrgV/WGet.NET/issues).**
17+
18+
## ✨ Version 4.0
19+
20+
Version 4.0 is intended as a “health” update for the library and therefore includes changes to the structure, classes and functions.
21+
This includes breaking changes to the usage of the library.
22+
23+
***But fear not, no functionality is lost and all breaking changes are documented and provide information on how to change the implementation.***
24+
25+
You can find the full migration documentation [here](https://github.com/basicx-StrgV/WGet.NET/blob/develop/migration_info/V3-V4.md).
26+
27+
This was done to improve maintainability and the experience of using the library, by improving the data structure, removing redundant or useless functions and making the implementation more consistent.
28+
29+
***More information about version 4.0 can be found [here](https://github.com/basicx-StrgV/WGet.NET/releases/tag/4.0.0).***
1630

1731
## 📓 Documentation
1832

1933
https://basicx-strgv.github.io/WGet.NET/
2034

2135
## ⚡ Features
2236

23-
**Supported Frameworks:** .Net Core 3.1, .Net Standard 2.0
37+
**[Supported Framework Versions](https://www.nuget.org/packages/WGet.NET/#supportedframeworks-body-tab)**
2438

2539
- WinGet
2640
- [x] Get a list of installed packages
@@ -41,7 +55,7 @@ https://basicx-strgv.github.io/WGet.NET/
4155
- [x] Reset sources
4256
- [x] Calculate file hash
4357
- [x] Export Settings
44-
- [x] Download package installer
58+
- [x] Download package installers
4559
- [x] Manage pinned packages
4660
- [x] Access info of the WinGet installation
4761
- Other
@@ -60,16 +74,18 @@ If WinGet is not installed on your system you can get it here: https://github.co
6074
## 💡 Getting started
6175

6276
The needed namespace is **WGetNET** (`using WGetNET;`).
63-
This namespace contains the three main classes that are used to perform actions or get information with winget, plus all additional classes that are needed.
77+
This namespace contains the three main classes that are used to perform actions or get information with winget, plus additional classes that are needed.
78+
79+
Exceptions are located in the `WGetNET.Exceptions` namespace.
6480

6581
### WinGetInfo:
66-
The ***WinGetInfo*** class can be used to get information about WinGet itself.
82+
The ***WinGet*** class can be used to get information about WinGet itself.
6783
This class is inherited by the ***WinGetPackageManager*** and ***WinGetSourceManager*** class.
6884

69-
USing this class to check if winget is installed could look like this:
85+
Using this class to check if winget is installed could look like this:
7086
```csharp
71-
WinGetInfo wingetInfo = new WinGetInfo();
72-
if (wingetInfo.WinGetInstalled)
87+
WinGet winget = new WinGet();
88+
if (winget.IsInstalled)
7389
{
7490
Console.WriteLine("WinGet is installed.");
7591
}
@@ -113,8 +129,8 @@ WinGetPackageManager packageManager = new WinGetPackageManager();
113129
string packageId = "nkdAgility.AzureDevOpsMigrationTools";
114130
WinGetPackage package = packageManager.GetInstalledPackages(packageId, true).FirstOrDefault();
115131

116-
if (package.AvailableVersionObject > package.VersionObject)
132+
if (package.AvailableVersion > package.Version)
117133
{
118-
Console.WriteLine("You are currently running version {currentVersion} and a newer version ({latestVersion}) is available. You should update now using Winget command 'winget {packageId}' from the Windows Terminal.", package.VersionObject, package.AvailableVersionObject, packageId);
134+
Console.WriteLine("You are currently running version {currentVersion} and a newer version ({latestVersion}) is available. You should update now using Winget command 'winget {packageId}' from the Windows Terminal.", package.Version, package.AvailableVersion, packageId);
119135
}
120136
```

docs/WGet.NET_Icon.png

252 KB
Loading

docs/about.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<script type="text/javascript" src="./doxygen-custom-page-injector.js"></script>
2+
3+
<div id="injection-wrapper" nav-to="about.html" style="display: none;">
4+
<div class="header">
5+
<div class="headertitle">
6+
<div class="title">
7+
About
8+
</div>
9+
</div>
10+
</div>
11+
<div class="contents">
12+
<div class="textblock">
13+
<!--General info-->
14+
<p><b>WGet.Net</b> was created and is maintained by <b>basic-StrgV</b>.</p>
15+
<p>Thanks to all <a href="https://github.com/basicx-StrgV/WGet.NET/graphs/contributors">contributors</a> and people that opened issues, for helping in improving the library.</p>
16+
<p><b>License:</b> <a href="https://github.com/basicx-StrgV/WGet.NET/blob/main/LICENSE">MIT</a></p>
17+
<p><b>GitHub Repository:</b> <a href="https://github.com/basicx-StrgV/WGet.NET">https://github.com/basicx-StrgV/WGet.NET</a></p>
18+
<!--Contact info-->
19+
<h1>Contact</h1>
20+
<p>
21+
<b>GitHub:</b> <a href="https://github.com/basicx-StrgV">https://github.com/basicx-StrgV</a>
22+
<br>
23+
<b>E-Mail:</b> <a href="mailto:basicx.strgv@gmail.com">basicx.strgv@gmail.com</a>
24+
</p>
25+
<!--Docs info-->
26+
<h1>Docs</h1>
27+
<p>The documentation was generated with the help of <a href="https://www.doxygen.nl/">Doxygen</a>.</p>
28+
<p>
29+
The base style, dark/light mode toggling and other UI improvements are done with <a href="https://github.com/jothepro/doxygen-awesome-css">doxygen-awesome-css</a>.
30+
<br>
31+
There are additional custom styles and scripts, and the <b>doxygen-awesome-darkmode-toggle.js</b> script was modified for this project.
32+
</p>
33+
<p>
34+
Custom html pages, like this "<i>About</i>" page, are done with the
35+
<a href="https://github.com/basicx-StrgV/doxygen-custom-page-injector">doxygen-custom-page-injector</a>, which was initially created for this project.
36+
</p>
37+
</div>
38+
</div>
39+
</div>
40+

0 commit comments

Comments
 (0)