Skip to content

Commit

Permalink
配置只有在 windows 平台才使用自己写的代码打包
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Jan 4, 2024
1 parent 4c643da commit 898675b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions DebUOS/Packaging.DebUOS/DebUOSPackageCreator.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Extensions.Logging;
using Packaging.Targets;
Expand All @@ -28,9 +30,20 @@ public void PackageDeb(DirectoryInfo packingFolder, FileInfo outputDebFile, Dire
{
Logger.LogInformation($"开始打包。Start packaging UOS deb from '{packingFolder.FullName}' to '{outputDebFile.FullName}'");

ArchiveBuilder archiveBuilder = new ArchiveBuilder()
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
};
// 在 Linux 上直接使用 dpkg-deb 打包
var process = Process.Start("dpkg-deb", new[]
{
"-b",
packingFolder.FullName,
outputDebFile.FullName,
});
process.WaitForExit();
return;
}

ArchiveBuilder archiveBuilder = new ArchiveBuilder();

workingFolder ??= packingFolder;
var debTarFilePath = Path.Combine(workingFolder.FullName, "deb.tar");
Expand Down

0 comments on commit 898675b

Please sign in to comment.