Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for no dll innosetup #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions PupNet/BuildHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion PupNet/Builders/AppImageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public override string? MetaBuildPath
/// <summary>
/// Implements.
/// </summary>
public override string? ManifestContent { get; }
public override string? ManifestContent { get; set; }

/// <summary>
/// Implements.
Expand Down
1 change: 1 addition & 0 deletions PupNet/Builders/DebianBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public override string Architecture
public override string? ManifestContent
{
get { return GetControlFile(); }
set { throw new NotImplementedException(); }
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion PupNet/Builders/FlatpakBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public override string OutputName
/// <summary>
/// Implements.
/// </summary>
public override string? ManifestContent { get; }
public override string? ManifestContent { get; set; }

/// <summary>
/// Implements.
Expand Down
1 change: 1 addition & 0 deletions PupNet/Builders/RpmBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public override string Architecture
public override string? ManifestContent
{
get { return GetSpec(); }
set { throw new NotImplementedException(); }
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion PupNet/Builders/SetupBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public override string Architecture
/// <summary>
/// Implements.
/// </summary>
public override string? ManifestContent { get; }
public override string? ManifestContent { get; set; }

/// <summary>
/// Implements.
Expand Down
2 changes: 1 addition & 1 deletion PupNet/Builders/ZipBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override string OutputName
/// <summary>
/// Implements.
/// </summary>
public override string? ManifestContent { get; }
public override string? ManifestContent { get; set; }

/// <summary>
/// Implements.
Expand Down
2 changes: 1 addition & 1 deletion PupNet/PackageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
public abstract string? ManifestContent { get; }
public abstract string? ManifestContent { get; set; }

/// <summary>
/// Gets the manifest file path to which <see cref="ManifestContent"/> will be written.
Expand Down
2 changes: 1 addition & 1 deletion README.nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down