License Charac under MIT and include package notices
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Nitload-NSI
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -38,4 +38,8 @@ docs/ 设计、状态与验收文档
|
|||||||
deploy/ Windows Service 与 systemd 模板
|
deploy/ Windows Service 与 systemd 模板
|
||||||
```
|
```
|
||||||
|
|
||||||
阅读[文档库](docs/README.md)、[单域名通信入口](docs/client-server-transport.md)、[架构](docs/architecture.md)、[交付状态](docs/implementation-status.md)和[贡献指南](CONTRIBUTING.md)。
|
阅读[文档库](docs/README.md)、[单域名通信入口](docs/client-server-transport.md)、[架构](docs/architecture.md)、[交付状态](docs/implementation-status.md)和[贡献指南](CONTRIBUTING.md)。
|
||||||
|
|
||||||
|
## 许可证
|
||||||
|
|
||||||
|
Charac 项目代码采用 [MIT 许可证](LICENSE)。Client 内嵌的 IBM Plex Mono 字体采用 [SIL Open Font License 1.1](src/client/Assets/Fonts/IBM-Plex-LICENSE.txt),不属于项目的 MIT 授权范围。
|
||||||
|
|||||||
+13
-6
@@ -50,7 +50,7 @@ if ($Target -eq 'ClientMsi') {
|
|||||||
if (-not $WixPath) { $WixPath = Join-Path $repository 'temp/tools/wix.exe' }
|
if (-not $WixPath) { $WixPath = Join-Path $repository 'temp/tools/wix.exe' }
|
||||||
if (-not (Test-Path -LiteralPath $WixPath -PathType Leaf)) { throw 'WiX CLI 6.0.2 is required; pass -WixPath.' }
|
if (-not (Test-Path -LiteralPath $WixPath -PathType Leaf)) { throw 'WiX CLI 6.0.2 is required; pass -WixPath.' }
|
||||||
$output = Join-Path $packages "charac-client_${version}_win-x64.msi"
|
$output = Join-Path $packages "charac-client_${version}_win-x64.msi"
|
||||||
& $WixPath build '-arch' 'x64' '-d' "PackageVersion=$version" '-d' "PayloadDir=$payload" '-d' "ConfigTemplatePath=$(Join-Path $repository 'client.config.example')" '-pdbtype' 'none' '-o' $output (Join-Path $PSScriptRoot 'windows/Client.wxs')
|
& $WixPath build '-arch' 'x64' '-d' "PackageVersion=$version" '-d' "PayloadDir=$payload" '-d' "ConfigTemplatePath=$(Join-Path $repository 'client.config.example')" '-d' "LicensePath=$(Join-Path $repository 'LICENSE')" '-pdbtype' 'none' '-o' $output (Join-Path $PSScriptRoot 'windows/Client.wxs')
|
||||||
if ($LASTEXITCODE -ne 0) { throw "WiX failed with exit code $LASTEXITCODE." }
|
if ($LASTEXITCODE -ne 0) { throw "WiX failed with exit code $LASTEXITCODE." }
|
||||||
Write-Output $output
|
Write-Output $output
|
||||||
exit 0
|
exit 0
|
||||||
@@ -65,12 +65,12 @@ if ($Target -eq 'ClientTermuxDeb') {
|
|||||||
$lines = [System.Collections.Generic.List[string]]::new()
|
$lines = [System.Collections.Generic.List[string]]::new()
|
||||||
$lines.Add('name: charac')
|
$lines.Add('name: charac')
|
||||||
$lines.Add("version: $version")
|
$lines.Add("version: $version")
|
||||||
$lines.Add('release: 1')
|
$lines.Add('release: 2')
|
||||||
$lines.Add('arch: aarch64')
|
$lines.Add('arch: aarch64')
|
||||||
$lines.Add('platform: linux')
|
$lines.Add('platform: linux')
|
||||||
$lines.Add('maintainer: nitload')
|
$lines.Add('maintainer: nitload')
|
||||||
$lines.Add('vendor: nitload')
|
$lines.Add('vendor: nitload')
|
||||||
$lines.Add('license: Proprietary')
|
$lines.Add('license: MIT AND OFL-1.1')
|
||||||
$lines.Add('description: Charac CLI for Termux')
|
$lines.Add('description: Charac CLI for Termux')
|
||||||
$lines.Add('depends:')
|
$lines.Add('depends:')
|
||||||
$lines.Add(' - dotnet-runtime-10.0')
|
$lines.Add(' - dotnet-runtime-10.0')
|
||||||
@@ -82,9 +82,11 @@ if ($Target -eq 'ClientTermuxDeb') {
|
|||||||
Add-PackageFile $lines $file.FullName "$prefix/opt/charac/$relative" $mode
|
Add-PackageFile $lines $file.FullName "$prefix/opt/charac/$relative" $mode
|
||||||
}
|
}
|
||||||
Add-PackageFile $lines (Join-Path $PSScriptRoot 'termux/charac') "$prefix/bin/charac" '0755'
|
Add-PackageFile $lines (Join-Path $PSScriptRoot 'termux/charac') "$prefix/bin/charac" '0755'
|
||||||
|
Add-PackageFile $lines (Join-Path $repository 'LICENSE') "$prefix/share/doc/charac/LICENSE"
|
||||||
|
Add-PackageFile $lines (Join-Path $repository 'src/client/Assets/Fonts/IBM-Plex-LICENSE.txt') "$prefix/share/doc/charac/IBM-Plex-LICENSE.txt"
|
||||||
$config = Join-Path $scratch 'charac-termux.yaml'
|
$config = Join-Path $scratch 'charac-termux.yaml'
|
||||||
[IO.File]::WriteAllLines($config, [string[]]$lines)
|
[IO.File]::WriteAllLines($config, [string[]]$lines)
|
||||||
$output = Join-Path $packages "charac_${version}-1_aarch64.deb"
|
$output = Join-Path $packages "charac_${version}-2_aarch64.deb"
|
||||||
& $NfpmPath package --config $config --packager deb --target $output
|
& $NfpmPath package --config $config --packager deb --target $output
|
||||||
if ($LASTEXITCODE -ne 0) { throw "nFPM failed with exit code $LASTEXITCODE." }
|
if ($LASTEXITCODE -ne 0) { throw "nFPM failed with exit code $LASTEXITCODE." }
|
||||||
Write-Output $output
|
Write-Output $output
|
||||||
@@ -99,7 +101,7 @@ if (-not $NfpmPath) { $NfpmPath = Join-Path $repository 'temp/tools/nfpm/nfpm.ex
|
|||||||
if (-not (Test-Path -LiteralPath $NfpmPath -PathType Leaf)) { throw 'nFPM 2.47.0 is required; pass -NfpmPath.' }
|
if (-not (Test-Path -LiteralPath $NfpmPath -PathType Leaf)) { throw 'nFPM 2.47.0 is required; pass -NfpmPath.' }
|
||||||
|
|
||||||
$name = "charac-$kind"
|
$name = "charac-$kind"
|
||||||
$release = if ($kind -eq 'server') { '2' } else { '1' }
|
$release = if ($kind -eq 'server') { '3' } else { '2' }
|
||||||
$lines = [System.Collections.Generic.List[string]]::new()
|
$lines = [System.Collections.Generic.List[string]]::new()
|
||||||
$lines.Add("name: $name")
|
$lines.Add("name: $name")
|
||||||
$lines.Add("version: $version")
|
$lines.Add("version: $version")
|
||||||
@@ -108,7 +110,7 @@ $lines.Add('arch: amd64')
|
|||||||
$lines.Add('platform: linux')
|
$lines.Add('platform: linux')
|
||||||
$lines.Add('maintainer: nitload')
|
$lines.Add('maintainer: nitload')
|
||||||
$lines.Add('vendor: nitload')
|
$lines.Add('vendor: nitload')
|
||||||
$lines.Add('license: Proprietary')
|
$lines.Add($(if ($kind -eq 'server') { 'license: MIT' } else { 'license: MIT AND OFL-1.1' }))
|
||||||
$lines.Add("description: Charac $kind")
|
$lines.Add("description: Charac $kind")
|
||||||
if ($kind -eq 'server') {
|
if ($kind -eq 'server') {
|
||||||
$lines.Add('depends:')
|
$lines.Add('depends:')
|
||||||
@@ -118,6 +120,11 @@ if ($kind -eq 'server') {
|
|||||||
$lines.Add(' postremove: ' + (ConvertTo-Json -InputObject (Join-Path $PSScriptRoot 'linux/server-postremove.sh') -Compress))
|
$lines.Add(' postremove: ' + (ConvertTo-Json -InputObject (Join-Path $PSScriptRoot 'linux/server-postremove.sh') -Compress))
|
||||||
}
|
}
|
||||||
$lines.Add('contents:')
|
$lines.Add('contents:')
|
||||||
|
$licenseDirectory = "/usr/share/licenses/$name"
|
||||||
|
Add-PackageFile $lines (Join-Path $repository 'LICENSE') "$licenseDirectory/LICENSE"
|
||||||
|
if ($kind -eq 'client') {
|
||||||
|
Add-PackageFile $lines (Join-Path $repository 'src/client/Assets/Fonts/IBM-Plex-LICENSE.txt') "$licenseDirectory/IBM-Plex-LICENSE.txt"
|
||||||
|
}
|
||||||
$files = Get-ChildItem -LiteralPath $payload -Recurse -File | Sort-Object FullName
|
$files = Get-ChildItem -LiteralPath $payload -Recurse -File | Sort-Object FullName
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
$relative = [IO.Path]::GetRelativePath($payload, $file.FullName).Replace('\', '/')
|
$relative = [IO.Path]::GetRelativePath($payload, $file.FullName).Replace('\', '/')
|
||||||
|
|||||||
@@ -17,12 +17,16 @@
|
|||||||
<Component Id="ClientConfigTemplate" Directory="INSTALLFOLDER" Guid="*">
|
<Component Id="ClientConfigTemplate" Directory="INSTALLFOLDER" Guid="*">
|
||||||
<File Id="ClientConfigTemplateFile" Source="$(var.ConfigTemplatePath)" KeyPath="yes" />
|
<File Id="ClientConfigTemplateFile" Source="$(var.ConfigTemplatePath)" KeyPath="yes" />
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component Id="ClientLicense" Directory="INSTALLFOLDER" Guid="*">
|
||||||
|
<File Id="ClientLicenseFile" Source="$(var.LicensePath)" KeyPath="yes" />
|
||||||
|
</Component>
|
||||||
<Feature Id="Complete" Title="Charac Client" Level="1">
|
<Feature Id="Complete" Title="Charac Client" Level="1">
|
||||||
<Files Directory="INSTALLFOLDER" Include="$(var.PayloadDir)\**">
|
<Files Directory="INSTALLFOLDER" Include="$(var.PayloadDir)\**">
|
||||||
<Exclude Files="$(var.PayloadDir)\**.pdb" />
|
<Exclude Files="$(var.PayloadDir)\**.pdb" />
|
||||||
</Files>
|
</Files>
|
||||||
<ComponentRef Id="ClientPath" />
|
<ComponentRef Id="ClientPath" />
|
||||||
<ComponentRef Id="ClientConfigTemplate" />
|
<ComponentRef Id="ClientConfigTemplate" />
|
||||||
|
<ComponentRef Id="ClientLicense" />
|
||||||
</Feature>
|
</Feature>
|
||||||
</Package>
|
</Package>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
|||||||
Reference in New Issue
Block a user