idk what all this is but it's a lot
Some checks failed
Public Preview Builds / publish-preview (push) Failing after 7s
Some checks failed
Public Preview Builds / publish-preview (push) Failing after 7s
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
e3d3a96c70
commit
d67d2b9997
8 changed files with 228 additions and 227 deletions
119
.github/README.md
vendored
119
.github/README.md
vendored
|
@ -1,119 +0,0 @@
|
|||
# Xdg.Net
|
||||
|
||||
> A .NET Standard library for the XDG Base Directory Specification and XDG user directories.
|
||||
|
||||
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/xdg-net/xdg.directories/build-test.yaml?style=for-the-badge&logo=github)](https://github.com/xdg-net/Xdg.Net/actions/workflows/build-test.yaml)
|
||||
[![NuGet Version](https://img.shields.io/nuget/v/xdg.directories?style=for-the-badge&logo=nuget)](https://www.nuget.org/packages/Xdg.Directories/)
|
||||
[![MIT License](https://img.shields.io/github/license/xdg-net/xdg.directories?style=for-the-badge)](https://choosealicense.com/licenses/mit/)
|
||||
|
||||
Xdg.Net is a ***small*** (the .dll is only 11 KB), [***fast***](./src/Xdg.Benchmarks/README.md) and ***portable*** (Completely supports .NET Standard 2.0 and even NativeAOT!) .NET implementation of the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) and XDG user directories for Windows, MacOS and Linux/FreeBSD.
|
||||
|
||||
<!--
|
||||
<p align="center">
|
||||
<a href="https://github.com/xdg-net/Xdg.Net/actions/workflows/build-test.yaml/badge.svg" rel="nofollow">
|
||||
<img src="https://github.com/xdg-net/Xdg.Net/actions/workflows/build-test.yaml/badge.svg" alt="GitHub Actions status">
|
||||
</a>
|
||||
<a href="https://www.nuget.org/packages/Xdg.Directories" rel="nofollow">
|
||||
<img src="https://img.shields.io/nuget/v/Xdg.Directories" alt="NuGet">
|
||||
</a>
|
||||
</p> -->
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
Use [NuGet](http://docs.nuget.org/docs/start-here/installing-nuge) to install [Xdg.Directories](thttps://www.nuget.org/packages/Xdg.Directories).
|
||||
|
||||
From the .NET CLI:
|
||||
|
||||
```bash
|
||||
dotnet add package Xdg.Directories
|
||||
```
|
||||
|
||||
or from Visual Studio's package manager:
|
||||
|
||||
```pwsh
|
||||
Install-Package Xdg.Directories
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Base Directories, C#
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using Xdg.Directories;
|
||||
|
||||
// Prints /home/$USER/.local/share
|
||||
Console.Writeline(BaseDirectory.DataHome);
|
||||
|
||||
// Prints /home/$USER/.cache
|
||||
Console.Writeline(BaseDirectory.CacheHome)
|
||||
```
|
||||
|
||||
### User Directories, F#
|
||||
|
||||
```fsharp
|
||||
open Xdg.Directories
|
||||
|
||||
// Prints /home/$USER/Documents
|
||||
printfn "%s" UserDirectory.DesktopDir
|
||||
```
|
||||
|
||||
## Default Locations
|
||||
|
||||
If any of the respective XDG environment are specified, the variable will always be returned.
|
||||
Otherwise, the value depends on the operating system.
|
||||
|
||||
Inspiration is taken from the [Go implementation](https://github.com/adrg/xdg) for Windows and MacOS directories.
|
||||
|
||||
<details open>
|
||||
<summary>Base Directory</summary>
|
||||
|
||||
| Environment Variable | Windows | macOS | Linux/FreeBSD |
|
||||
| --- | --- | --- | --- |
|
||||
| `XDG_DATA_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.local/share` |
|
||||
| `XDG_CONFIG_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.config` |
|
||||
| `XDG_STATE_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.local/state` |
|
||||
| `XDG_BIN_HOME` | `null` | `null` | `$HOME/.local/bin` |
|
||||
| `XDG_DATA_DIRS` | `%APPDATA%:%PROGRAMDATA%` | `/Library/Application Support` | `/usr/local/share:/usr/share` |
|
||||
| `XDG_CONFIG_DIRS` | `%LOCALAPPDATA%` | `$HOME/Library/Preferences:/Library/Application Support:/Library/Preferences` | `/etc/xdg` |
|
||||
| `XDG_CACHE_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.config` |
|
||||
| `XDG_RUNTIME_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `/run/user/$UID` |
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>User Directory</summary>
|
||||
|
||||
User directories on Windows use [Known Folders](https://learn.microsoft.com/en-us/windows/win32/shell/known-folders).
|
||||
| Environment Variable | Windows | macOS | Linux/FreeBSD |
|
||||
| --- | --- | --- | --- |
|
||||
| `XDG_DESKTOP_DIR` | `Desktop` | `$HOME/Desktop` | `$HOME/Desktop` |
|
||||
| `XDG_DOWNLOAD_DIR` | `null` | `$HOME/Downloads` | `$HOME/Downloads` |
|
||||
| `XDG_DOCUMENTS_DIR` | `My Documents` | `$HOME/Documents` | `$HOME/Documents` |
|
||||
| `XDG_MUSIC_DIR` | `My Music` | `$HOME/Music` | `$HOME/Music` |
|
||||
| `XDG_PICTURES_DIRS` | `My Pictures` | `$HOME/Pictures` | `$HOME/Pictures` |
|
||||
| `XDG_VIDEOS_DIR` | `My Videos` | `$HOME/Movies` | `$HOME/Videos` |
|
||||
| `XDG_TEMPLATES_DIR` | `Templates` | `$HOME/Templates` | `$HOME/Templates` |
|
||||
| `XDG_PUBLICSHARE_DIR` | `%PUBLIC%` | `$HOME/Public` | `$HOME/Public` |
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>Extra Directories</summary>
|
||||
|
||||
| | Windows | macOS | Linux/FreeBSD |
|
||||
| --- | --- | --- | --- |
|
||||
| Home | `%USERPROFILE%` | `$HOME` | `$HOME` |
|
||||
</details>
|
||||
|
||||
## Pre-releases
|
||||
|
||||
Preview releases are uploaded to both [GitHub packages](https://github.com/xdg-net/Xdg.Net/pkgs/nuget/Xdg.Directories) (need GitHub account to download) and [Forgejo packages](https://git.froth.zone/mirrors/-/packages/nuget/xdg.directories) (no login required).
|
||||
|
||||
|
||||
### Native Library (WIP)
|
||||
|
||||
[View the README here](./src/Xdg.Directories.FFI/README.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](./LICENSE)
|
33
.github/workflows/benckmark.yaml
vendored
Normal file
33
.github/workflows/benckmark.yaml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Benchmarks
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
deployments: write
|
||||
|
||||
jobs:
|
||||
benchmark:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
- name: Run Benchmarks
|
||||
run: dotnet run -c Release --project src/Xdg.Benchmarks --exporters json --framework net8.0
|
||||
|
||||
- name: Store Benchmark Result
|
||||
uses: benchmark-action/github-action-benchmark@v1
|
||||
with:
|
||||
name: Benchmark.Net Benchmark
|
||||
tool: 'benchmarkdotnet'
|
||||
output-file-path: 'BenchmarkDotNet.Artifacts/results/Program.Benchmarks-report-full.json'
|
||||
github-token: $ {{ secrets.GITHUB_TOKEN }}
|
||||
auto-push: true
|
||||
alert-threshold: '200%'
|
||||
comment-on-alert: true
|
||||
fail-on-alert: true
|
||||
alert-comment-cc-users: '@SamTherapy'
|
109
README.md
109
README.md
|
@ -1 +1,108 @@
|
|||
# You should not see this :)
|
||||
# Xdg.Directories
|
||||
|
||||
> A .NET Standard library for the XDG Base Directory Specification and XDG user directories.
|
||||
|
||||
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/xdg-net/xdg.directories/build-test.yaml?style=for-the-badge&logo=github)](https://github.com/xdg-net/Xdg.Net/actions/workflows/build-test.yaml)
|
||||
[![NuGet Version](https://img.shields.io/nuget/v/xdg.directories?style=for-the-badge&logo=nuget)](https://www.nuget.org/packages/Xdg.Directories/)
|
||||
[![MIT License](https://img.shields.io/github/license/xdg-net/xdg.directories?style=for-the-badge)](https://choosealicense.com/licenses/mit/)
|
||||
|
||||
Xdg.Net is a ***small*** (the .dll is only 11 KB), [***fast***](./src/Xdg.Benchmarks/README.md) and ***portable*** (Completely supports .NET Standard 2.0 and even NativeAOT!) .NET implementation of the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) and XDG user directories for Windows, MacOS and Linux/FreeBSD.
|
||||
|
||||
## Installation
|
||||
|
||||
Use [NuGet](http://docs.nuget.org/docs/start-here/installing-nuge) to install [Xdg.Directories](thttps://www.nuget.org/packages/Xdg.Directories).
|
||||
|
||||
From the .NET CLI:
|
||||
|
||||
```bash
|
||||
dotnet add package Xdg.Directories
|
||||
```
|
||||
|
||||
or from Visual Studio's package manager:
|
||||
|
||||
```pwsh
|
||||
Install-Package Xdg.Directories
|
||||
```
|
||||
|
||||
### Pre-releases
|
||||
|
||||
Preview releases are uploaded to both [GitHub packages](https://github.com/xdg-net/Xdg.Net/pkgs/nuget/Xdg.Directories) (need GitHub account to download) and [Forgejo packages](https://git.froth.zone/mirrors/-/packages/nuget/xdg.directories) (no login required).
|
||||
|
||||
## Usage
|
||||
|
||||
### Base Directories, C#
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using Xdg.Directories;
|
||||
|
||||
// Prints /home/$USER/.local/share
|
||||
Console.Writeline(BaseDirectory.DataHome);
|
||||
|
||||
// Prints /home/$USER/.cache
|
||||
Console.Writeline(BaseDirectory.CacheHome)
|
||||
```
|
||||
|
||||
### User Directories, F#
|
||||
|
||||
```fsharp
|
||||
open Xdg.Directories
|
||||
|
||||
// Prints /home/$USER/Documents
|
||||
printfn "%s" UserDirectory.DesktopDir
|
||||
```
|
||||
|
||||
## Default Locations
|
||||
|
||||
If any of the respective XDG environment are specified, the variable will always be returned.
|
||||
Otherwise, the value depends on the operating system.
|
||||
|
||||
Inspiration is taken from the [Go implementation](https://github.com/adrg/xdg) for Windows and MacOS directories.
|
||||
|
||||
<details open>
|
||||
<summary>Base Directory</summary>
|
||||
|
||||
| Environment Variable | Windows | macOS | Linux/FreeBSD |
|
||||
| --- | --- | --- | --- |
|
||||
| `XDG_DATA_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.local/share` |
|
||||
| `XDG_CONFIG_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.config` |
|
||||
| `XDG_STATE_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.local/state` |
|
||||
| `XDG_BIN_HOME` | `null` | `null` | `$HOME/.local/bin` |
|
||||
| `XDG_DATA_DIRS` | `%APPDATA%:%PROGRAMDATA%` | `/Library/Application Support` | `/usr/local/share:/usr/share` |
|
||||
| `XDG_CONFIG_DIRS` | `%LOCALAPPDATA%` | `$HOME/Library/Preferences:/Library/Application Support:/Library/Preferences` | `/etc/xdg` |
|
||||
| `XDG_CACHE_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `$HOME/.config` |
|
||||
| `XDG_RUNTIME_HOME` | `%LOCALAPPDATA%` | `$HOME/Library/Application Support` | `/run/user/$UID` |
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>User Directory</summary>
|
||||
|
||||
User directories on Windows use [Known Folders](https://learn.microsoft.com/en-us/windows/win32/shell/known-folders).
|
||||
| Environment Variable | Windows | macOS | Linux/FreeBSD |
|
||||
| --- | --- | --- | --- |
|
||||
| `XDG_DESKTOP_DIR` | `Desktop` | `$HOME/Desktop` | `$HOME/Desktop` |
|
||||
| `XDG_DOWNLOAD_DIR` | `null` | `$HOME/Downloads` | `$HOME/Downloads` |
|
||||
| `XDG_DOCUMENTS_DIR` | `My Documents` | `$HOME/Documents` | `$HOME/Documents` |
|
||||
| `XDG_MUSIC_DIR` | `My Music` | `$HOME/Music` | `$HOME/Music` |
|
||||
| `XDG_PICTURES_DIRS` | `My Pictures` | `$HOME/Pictures` | `$HOME/Pictures` |
|
||||
| `XDG_VIDEOS_DIR` | `My Videos` | `$HOME/Movies` | `$HOME/Videos` |
|
||||
| `XDG_TEMPLATES_DIR` | `Templates` | `$HOME/Templates` | `$HOME/Templates` |
|
||||
| `XDG_PUBLICSHARE_DIR` | `%PUBLIC%` | `$HOME/Public` | `$HOME/Public` |
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>Extra Directories</summary>
|
||||
|
||||
| | Windows | macOS | Linux/FreeBSD |
|
||||
| --- | --- | --- | --- |
|
||||
| Home | `%USERPROFILE%` | `$HOME` | `$HOME` |
|
||||
</details>
|
||||
|
||||
### Native Library (WIP)
|
||||
|
||||
[View the README here](./src/Xdg.Directories.FFI/README.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://choosealicense.com/licenses/mit/) \
|
||||
Icon is made by Emoji One, [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0), via [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Eo_circle_purple_white_letter-x.svg)
|
BIN
icon.png
Normal file
BIN
icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
|
@ -7,51 +7,52 @@ open Xdg.Directories
|
|||
#if WINDOWS
|
||||
[<SimpleJob(RuntimeMoniker.Net481)>]
|
||||
#endif
|
||||
[<SimpleJob(RuntimeMoniker.Net70, baseline=true)>]
|
||||
// [<SimpleJob(RuntimeMoniker.NativeAot70)>]
|
||||
[<SimpleJob(RuntimeMoniker.Net80, baseline=true)>]
|
||||
// [<SimpleJob(RuntimeMoniker.NativeAot80)>]
|
||||
[<JsonExporterAttribute.Full>]
|
||||
type Benchmarks() =
|
||||
// Base Directory
|
||||
[<Benchmark(Baseline=true)>]
|
||||
member _.DataHome () = BaseDirectory.DataHome
|
||||
[<Benchmark>]
|
||||
member _.ConfigHome () = BaseDirectory.ConfigHome
|
||||
[<Benchmark>]
|
||||
member _.StateHome () = BaseDirectory.StateHome
|
||||
[<Benchmark>]
|
||||
member _.BinHome () = BaseDirectory.BinHome
|
||||
[<Benchmark>]
|
||||
member _.DataDirs () = BaseDirectory.DataDirs
|
||||
[<Benchmark>]
|
||||
member _.ConfigDirs () = BaseDirectory.ConfigDirs
|
||||
[<Benchmark>]
|
||||
member _.CacheHome () = BaseDirectory.CacheHome
|
||||
[<Benchmark>]
|
||||
member _.RuntimeDir() = BaseDirectory.RuntimeDir
|
||||
//[<Benchmark>]
|
||||
//member _.ConfigHome () = BaseDirectory.ConfigHome
|
||||
//[<Benchmark>]
|
||||
//member _.StateHome () = BaseDirectory.StateHome
|
||||
//[<Benchmark>]
|
||||
//member _.BinHome () = BaseDirectory.BinHome
|
||||
//[<Benchmark>]
|
||||
//member _.DataDirs () = BaseDirectory.DataDirs
|
||||
// [<Benchmark>]
|
||||
// member _.ConfigDirs () = BaseDirectory.ConfigDirs
|
||||
//[<Benchmark>]
|
||||
//member _.CacheHome () = BaseDirectory.CacheHome
|
||||
//[<Benchmark>]
|
||||
//member _.RuntimeDir() = BaseDirectory.RuntimeDir
|
||||
|
||||
// User Directories
|
||||
[<Benchmark>]
|
||||
member _.DesktopDir () = UserDirectory.DesktopDir
|
||||
[<Benchmark>]
|
||||
member _.DownloadDir () = UserDirectory.DownloadDir
|
||||
[<Benchmark>]
|
||||
member _.DocumentsDir () = UserDirectory.DocumentsDir
|
||||
[<Benchmark>]
|
||||
member _.MusicDir () = UserDirectory.MusicDir
|
||||
[<Benchmark>]
|
||||
member _.PicturesDir () = UserDirectory.PicturesDir
|
||||
[<Benchmark>]
|
||||
member _.VideosDir () = UserDirectory.VideosDir
|
||||
[<Benchmark>]
|
||||
member _.TemplatesDir () = UserDirectory.TemplatesDir
|
||||
[<Benchmark>]
|
||||
member _.PublicDir () = UserDirectory.PublicDir
|
||||
// [<Benchmark>]
|
||||
// member _.DesktopDir () = UserDirectory.DesktopDir
|
||||
//[<Benchmark>]
|
||||
//member _.DownloadDir () = UserDirectory.DownloadDir
|
||||
//[<Benchmark>]
|
||||
//member _.DocumentsDir () = UserDirectory.DocumentsDir
|
||||
//[<Benchmark>]
|
||||
//member _.MusicDir () = UserDirectory.MusicDir
|
||||
//[<Benchmark>]
|
||||
//member _.PicturesDir () = UserDirectory.PicturesDir
|
||||
//[<Benchmark>]
|
||||
//member _.VideosDir () = UserDirectory.VideosDir
|
||||
//[<Benchmark>]
|
||||
//member _.TemplatesDir () = UserDirectory.TemplatesDir
|
||||
//[<Benchmark>]
|
||||
//member _.PublicDir () = UserDirectory.PublicDir
|
||||
|
||||
// Other
|
||||
[<Benchmark>]
|
||||
member _.Home () = Other.Home
|
||||
[<Benchmark>]
|
||||
member _.Applications () = Other.Applications
|
||||
[<Benchmark>]
|
||||
member _.Fonts () = Other.Fonts
|
||||
// [<Benchmark>]
|
||||
// member _.Home () = Other.Home
|
||||
//[<Benchmark>]
|
||||
//member _.Applications () = Other.Applications
|
||||
//[<Benchmark>]
|
||||
//member _.Fonts () = Other.Fonts
|
||||
|
||||
BenchmarkRunner.Run<Benchmarks>() |> ignore
|
|
@ -1,51 +1,34 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworks>net8.0;net462</TargetFrameworks>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsPublishable>false</IsPublishable>
|
||||
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
|
||||
<RunAnalyzersDuringLiveAnalysis>True</RunAnalyzersDuringLiveAnalysis>
|
||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
||||
<EnableNETAnalyzers>True</EnableNETAnalyzers>
|
||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworks>net8.0;net462</TargetFrameworks>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsPublishable>false</IsPublishable>
|
||||
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
|
||||
<RunAnalyzersDuringLiveAnalysis>True</RunAnalyzersDuringLiveAnalysis>
|
||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
||||
<EnableNETAnalyzers>True</EnableNETAnalyzers>
|
||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
||||
<WarningLevel>5</WarningLevel>
|
||||
|
||||
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">
|
||||
true
|
||||
</IsWindows>
|
||||
</PropertyGroup>
|
||||
<DefineConstants Condition="$([MSBuild]::IsOSPlatform('Windows'))">
|
||||
WINDOWS
|
||||
</DefineConstants>
|
||||
|
||||
<PropertyGroup Condition="'$(IsWindows)'=='true'">
|
||||
<DefineConstants>Windows</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'">
|
||||
<WarningLevel>5</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0|AnyCPU'">
|
||||
<WarningLevel>5</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net462|AnyCPU'">
|
||||
<WarningLevel>5</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net462|AnyCPU'">
|
||||
<WarningLevel>5</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Xdg.Directories\Xdg.Directories.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Xdg.Directories\Xdg.Directories.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -81,7 +81,7 @@ public static class BaseDirectory
|
|||
?? GetFolderPath(SpecialFolder.CommonApplicationData)
|
||||
},
|
||||
Helpers.OS.MacOS => new string[] { "/Library/Application Support" },
|
||||
Helpers.OS.UnixLike => new string[] {"/usr/local/share", "/usr/share"},
|
||||
Helpers.OS.UnixLike => new string[] { "/usr/local/share", "/usr/share" },
|
||||
_ => Array.Empty<string>()
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,51 +7,47 @@
|
|||
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
|
||||
<IsTrimmable
|
||||
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
|
||||
<IsAotCompatible
|
||||
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<EnableNETAnalyzers>True</EnableNETAnalyzers>
|
||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
||||
<WarningLevel>9999</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="NuGet Packaging">
|
||||
<Title>Xdg.Directories.Net</Title>
|
||||
<Description>.NET implementation of the XDG Base Directory Specification and user directories</Description>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<Authors>$(AssemblyName) Authors</Authors>
|
||||
<PackageProjectUrl>https://github.com/xdg-net/Xdg.Net</PackageProjectUrl>
|
||||
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<Title>Xdg.Directories</Title>
|
||||
<Authors>$(AssemblyName) Authors</Authors>
|
||||
<Description>.NET implementation of the XDG Base Directory Specification and user directories</Description>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<PackageProjectUrl>https://xdg-net.github.io/xdg.directories</PackageProjectUrl>
|
||||
<PackageTags>
|
||||
xdg;base-directories;base-directory;xdg-base-directory;directory;freedesktop;cross-platform</PackageTags>
|
||||
|
||||
<RepositoryUrl>https://github.com/xdg-net/Xdg.Directories</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<IncludeSymbols>True</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<PackageTags>xdg;base-directories;base-directory;xdg-base-directory;directory;freedesktop;cross-platform</PackageTags>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
|
||||
<MinVerTagPrefix>v</MinVerTagPrefix>
|
||||
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'">
|
||||
<WarningLevel>9999</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0|AnyCPU'">
|
||||
<WarningLevel>9999</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
|
||||
<WarningLevel>9999</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
|
||||
<WarningLevel>9999</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<IsPublishable>False</IsPublishable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Label="Extra files">
|
||||
<None Include="..\..\icon.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
<None Include="..\..\LICENSE" Visible="false">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
|
@ -75,4 +71,4 @@
|
|||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="Xdg.Testing" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
Loading…
Reference in a new issue