`Packager`: Minor changes regarding documentation and minor improvements
MODIFY
WalletWasabi.Packager/ArgsProcessor.cs
WalletWasabi.Packager/ArgsProcessor.cs
@@ -12,6 +12,8 @@ public class ArgsProcessor
public string[] Args { get; }
+ /// <summary>Builds Wasabi Wallet binaries for supported platforms to be compared then with the official binaries, and terminates.</summary>
+ /// <seealso href="https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi.Documentation/Guides/DeterministicBuildGuide.md"/>
public bool IsOnlyBinariesMode() => IsOneOf("onlybinaries");
public bool IsContinuousDeliveryMode() => IsOneOf("cdelivery");

MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -6,20 +6,24 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.Json;
-using System.Text.Json.Serialization;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
using WalletWasabi.Userfacing;
namespace WalletWasabi.Packager;
+/// <summary>
+/// Instructions:
+/// <list type="number">
+/// <item>Bump Client version (or else wrong .msi will be created) - <see cref="Helpers.Constants.ClientVersion"/>.</item>
+/// <item>Publish with Packager.</item>
+/// <item>Build WIX project with Release and x64 configuration.</item>
+/// <item>Sign with Packager, set restore true so the password won't be kept.</item>
+/// </list>
+/// <seealso href="https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi.Documentation/ClientDeployment.md"/>
+/// </summary>
public static class Program
{
- // 0. Dump Client version (or else wrong .msi will be created) - Helpers.Constants.ClientVersion
- // 1. Publish with Packager.
- // 2. Build WIX project with Release and x64 configuration.
- // 3. Sign with Packager, set restore true so the password won't be kept.
-
public const bool DoPublish = true;
public const bool DoSign = false;
public const bool DoRestoreProgramCs = false;
@@ -27,13 +31,8 @@ public static class Program
public const string PfxPath = "C:\\digicert.pfx";
public const string ExecutableName = Constants.ExecutableName;
- // https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog
- // BOTTLENECKS:
- // Tor - win-32, linux-32, osx-64
- // .NET Core - win-32, linux-64, osx-64
- // Avalonia - win7-32, linux-64, osx-64
- // We'll only support x64, if someone complains, we can come back to it.
- // For 32 bit Windows there needs to be a lot of WIX configuration to be done.
+ /// <remarks>Only 64-bit platforms are supported for now.</remarks>
+ /// <seealso href="https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog"/>
private static string[] Targets = new[]
{
"win7-x64",
@@ -101,7 +100,7 @@ public static class Program
{
if (OnlyBinaries)
{
- Console.WriteLine($"I'll only generate binaries and disregard all other options.");
+ Console.WriteLine("I'll only generate binaries and disregard all other options.");
}
Console.WriteLine($"{nameof(VersionPrefix)}:\t\t\t{VersionPrefix}");
Console.WriteLine($"{nameof(ExecutableName)}:\t\t\t{ExecutableName}");
@@ -214,8 +213,6 @@ public static class Program
string buildInfoJson = GetBuildInfoData();
- CheckUncommittedGitChanges();
-
foreach (string target in Targets)
{
string publishedFolder = Path.Combine(BinDistDirectory, target);
@@ -236,33 +233,7 @@ public static class Program
StartProcessAndWaitForExit("dotnet", DesktopProjectDirectory, arguments: "clean");
- // https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore21
- // -c|--configuration {Debug|Release}
- // Defines the build configuration. The default value is Debug.
- // --force
- // Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the project.assets.json file.
- // -o|--output <OUTPUT_DIRECTORY>
- // Specifies the path for the output directory.
- // If not specified, it defaults to ./bin/[configuration]/[framework]/publish/ for a framework-dependent deployment or
- // ./bin/[configuration]/[framework]/[runtime]/publish/ for a self-contained deployment.
- // If the path is relative, the output directory generated is relative to the project file location, not to the current working directory.
- // --self-contained
- // Publishes the .NET Core runtime with your application so the runtime does not need to be installed on the target machine.
- // If a runtime identifier is specified, its default value is true. For more information about the different deployment types, see .NET Core application deployment.
- // -r|--runtime <RUNTIME_IDENTIFIER>
- // Publishes the application for a given runtime. This is used when creating a self-contained deployment (SCD).
- // For a list of Runtime Identifiers (RIDs), see the RID catalog. Default is to publish a framework-dependent deployment (FDD).
- // --version-suffix <VERSION_SUFFIX>
- // Defines the version suffix to replace the asterisk (*) in the version field of the project file.
- // https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-restore?tabs=netcore2x
- // --disable-parallel
- // Disables restoring multiple projects in parallel.
- // --no-cache
- // Specifies to not cache packages and HTTP requests.
- // https://github.com/dotnet/docs/issues/7568
- // /p:Version=1.2.3.4
- // "dotnet publish" supports msbuild command line options like /p:Version=1.2.3.4
-
+ // See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish for details.
string dotnetProcessArgs = string.Join(
" ",
$"publish",
@@ -415,6 +386,7 @@ public static class Program
$"sudo find ./{newFolderName} {chmodExecutablesArgs}",
$"tar -pczvf {newFolderName}.tar.gz {newFolderName}"
};
+
string arguments = string.Join(" && ", commands);
StartProcessAndWaitForExit("wsl", BinDistDirectory, arguments: arguments);
@@ -463,7 +435,7 @@ public static class Program
$"Section: utils\n" +
$"Maintainer: nopara73 <adam.ficsor73@gmail.com>\n" +
$"Version: {VersionPrefix}\n" +
- $"Homepage: http://wasabiwallet.io\n" +
+ $"Homepage: https://wasabiwallet.io\n" +
$"Vcs-Git: git://github.com/zkSNACKs/WalletWasabi.git\n" +
$"Vcs-Browser: https://github.com/zkSNACKs/WalletWasabi\n" +
$"Architecture: amd64\n" +
@@ -510,6 +482,7 @@ public static class Program
$"sudo chmod -R 0644 {debDestopFileLinuxPath}",
$"dpkg --build {Tools.LinuxPath(debFolderRelativePath)} $(pwd)"
};
+
arguments = string.Join(" && ", commands);
StartProcessAndWaitForExit("wsl", BinDistDirectory, arguments: arguments);
@@ -623,6 +596,7 @@ public static class Program
private static bool TryStartProcessAndWaitForExit(string command, string workingDirectory, [NotNullWhen(true)] out string? result, string? writeToStandardInput = null, string? arguments = null, bool redirectStandardOutput = false)
{
result = null;
+
try
{
result = StartProcessAndWaitForExit(command, workingDirectory, writeToStandardInput, arguments, redirectStandardOutput)?.Trim() ?? "";
@@ -632,6 +606,7 @@ public static class Program
{
Console.WriteLine($"Process failed: '{ex}'.");
}
+
return false;
}
}

`Packager`: Minor changes regarding documentation and minor improvements