diff --git a/PupNet/BuildHost.cs b/PupNet/BuildHost.cs index 7c62179..7e9d095 100644 --- a/PupNet/BuildHost.cs +++ b/PupNet/BuildHost.cs @@ -219,6 +219,33 @@ public bool Run() } } + if (Builder.Kind == PackageKind.Setup) + { + if (Directory.GetFiles(Builder.BuildAppBin, "*.dll").Length == 0) + { + if (Builder.ManifestContent != null) + { + Console.WriteLine("No dll files found"); + StringReader reader = new StringReader(Builder.ManifestContent); + string line = reader.ReadLine(); + var sb = new StringBuilder(); + while (line != null) + { + if (line.Contains($"Source: \"{Builder.BuildAppBin}\\*.dll\"; DestDir: \"{{app}}\"")) + { + Console.WriteLine("Skipping dll line: " + line); + } + else + { + sb.AppendLine(line); + } + line = reader.ReadLine(); + } + Builder.ManifestContent = sb.ToString().TrimEnd(); + } + } + } + Console.WriteLine(); Console.WriteLine("Building Package ..."); Builder.BuildPackage(); diff --git a/PupNet/Builders/AppImageBuilder.cs b/PupNet/Builders/AppImageBuilder.cs index 71b8a58..8ae4365 100644 --- a/PupNet/Builders/AppImageBuilder.cs +++ b/PupNet/Builders/AppImageBuilder.cs @@ -160,7 +160,7 @@ public override string? MetaBuildPath /// /// Implements. /// - public override string? ManifestContent { get; } + public override string? ManifestContent { get; set; } /// /// Implements. diff --git a/PupNet/Builders/DebianBuilder.cs b/PupNet/Builders/DebianBuilder.cs index 34772da..ff4879c 100644 --- a/PupNet/Builders/DebianBuilder.cs +++ b/PupNet/Builders/DebianBuilder.cs @@ -130,6 +130,7 @@ public override string Architecture public override string? ManifestContent { get { return GetControlFile(); } + set { throw new NotImplementedException(); } } /// diff --git a/PupNet/Builders/FlatpakBuilder.cs b/PupNet/Builders/FlatpakBuilder.cs index d8e5f79..2bb9818 100644 --- a/PupNet/Builders/FlatpakBuilder.cs +++ b/PupNet/Builders/FlatpakBuilder.cs @@ -123,7 +123,7 @@ public override string OutputName /// /// Implements. /// - public override string? ManifestContent { get; } + public override string? ManifestContent { get; set; } /// /// Implements. diff --git a/PupNet/Builders/RpmBuilder.cs b/PupNet/Builders/RpmBuilder.cs index ec837d4..aa9dd32 100644 --- a/PupNet/Builders/RpmBuilder.cs +++ b/PupNet/Builders/RpmBuilder.cs @@ -147,6 +147,7 @@ public override string Architecture public override string? ManifestContent { get { return GetSpec(); } + set { throw new NotImplementedException(); } } /// diff --git a/PupNet/Builders/SetupBuilder.cs b/PupNet/Builders/SetupBuilder.cs index 78ba05e..0aadea2 100644 --- a/PupNet/Builders/SetupBuilder.cs +++ b/PupNet/Builders/SetupBuilder.cs @@ -96,7 +96,7 @@ public override string Architecture /// /// Implements. /// - public override string? ManifestContent { get; } + public override string? ManifestContent { get; set; } /// /// Implements. diff --git a/PupNet/Builders/ZipBuilder.cs b/PupNet/Builders/ZipBuilder.cs index b401c59..dc9e762 100644 --- a/PupNet/Builders/ZipBuilder.cs +++ b/PupNet/Builders/ZipBuilder.cs @@ -82,7 +82,7 @@ public override string OutputName /// /// Implements. /// - public override string? ManifestContent { get; } + public override string? ManifestContent { get; set; } /// /// Implements. diff --git a/PupNet/PackageBuilder.cs b/PupNet/PackageBuilder.cs index 666e034..193c334 100644 --- a/PupNet/PackageBuilder.cs +++ b/PupNet/PackageBuilder.cs @@ -388,7 +388,7 @@ public string InstallExec /// "Spec file" content. For Flatpak, it is the "manifest". For deb, it is the "control file". It must not contain /// macros. It may be null if not used. /// - public abstract string? ManifestContent { get; } + public abstract string? ManifestContent { get; set; } /// /// Gets the manifest file path to which will be written. diff --git a/README.nuget.md b/README.nuget.md index b5a2ab7..240bf6e 100644 --- a/README.nuget.md +++ b/README.nuget.md @@ -5,7 +5,7 @@ **PupNet Deploy** is a cross-platform deployment utility which packages your .NET project as a ready-to-ship installation file in a single step. It is not to be confused with the `dotnet pack` command. -It has been possible to cross-compile console C# applications for sometime now. More recently, the cross-platform +It has been possible to cross-compile console C# applications for some time now. More recently, the cross-platform [Avalonia](https://github.com/AvaloniaUI/Avalonia) replacement for WPF allows fully-featured GUI applications to target a range of platforms, including: Linux, Windows, MacOS and Android.